@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; }

:root { 
    --primary: #2F5E48; 
    --secondary: #6FA382; 
    --accent: #E8F3EB;
    --text-dark: #2C3E50; 
    --text-light: #64748b;
    --white: #ffffff; 
    --shadow: 0 10px 30px rgba(47, 94, 72, 0.08);
}

/* IMPORTANTE: Evita que se salga contenido a los lados */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body { background-color: #fcfcfc; color: var(--text-dark); line-height: 1.6; }
a { text-decoration: none; transition: 0.3s; }
ul { list-style: none; }

/* REGLAS VISIBILIDAD */
.menu-toggle { display: none !important; }
.mobile-admin-link { display: none !important; }
.nav-buttons { display: block !important; }

/* NAVBAR */
.navbar { background: var(--white); height: 80px; display: flex; justify-content: space-between; align-items: center; padding: 0 8%; box-shadow: 0 2px 15px rgba(0,0,0,0.04); position: sticky; top: 0; z-index: 1000; }
.logo-img { height: 55px; }
.nav-links { display: flex; gap: 35px; align-items: center; }
.nav-links a { color: var(--text-dark); font-weight: 500; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; background-color: var(--primary); transition: width 0.3s; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.btn-admin { border: 1px solid var(--text-dark); padding: 10px 25px; border-radius: 50px; color: var(--text-dark); font-weight: 600; font-size: 13px; text-transform: uppercase; }
.btn-admin:hover { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* CONTENIDO */
.contact-header { background-color: var(--primary); color: var(--white); text-align: center; padding: 100px 20px; background-image: linear-gradient(135deg, #2F5E48 0%, #244a38 100%); }
.contact-header h1 { font-size: 3rem; margin-bottom: 15px; font-weight: 700; letter-spacing: 1px; }
.contact-header p { font-size: 1.2rem; font-weight: 300; opacity: 0.9; }

.contact-container { display: flex; flex-wrap: wrap; max-width: 1200px; margin: 80px auto; padding: 0 5%; gap: 80px; align-items: flex-start; }
.info-column { flex: 1; min-width: 300px; }
.info-column h2 { color: var(--primary); font-size: 2rem; margin-bottom: 40px; font-weight: 700; }
.info-item { display: flex; align-items: flex-start; margin-bottom: 40px; }
.info-item i { font-size: 1.5rem; color: var(--white); background: var(--secondary); width: 50px; height: 50px; line-height: 50px; text-align: center; border-radius: 50%; margin-right: 20px; flex-shrink: 0; }
.info-item div h3 { margin: 0 0 5px; color: var(--text-dark); font-size: 1.1rem; font-weight: 600; }
.info-item div p { color: var(--text-light); font-size: 0.95rem; line-height: 1.5; margin: 0; }

.form-column { flex: 1.2; min-width: 300px; background: var(--white); padding: 50px; border-radius: 20px; box-shadow: var(--shadow); border: none; }
.contact-form h3 { color: var(--primary); margin-bottom: 30px; text-align: center; font-size: 1.8rem; font-weight: 700; }
.input-group { margin-bottom: 25px; }
.input-group label { display: block; font-size: 0.9rem; color: var(--text-dark); margin-bottom: 8px; font-weight: 600; }
.input-group input, .input-group textarea, .input-group select { width: 100%; padding: 15px 20px; border: 1px solid #e0e0e0; border-radius: 10px; background: #f9f9f9; outline: none; font-size: 0.95rem; color: var(--text-dark); transition: 0.3s; font-family: 'Montserrat', sans-serif; }
.input-group input:focus, .input-group textarea:focus, .input-group select:focus { background: white; border-color: var(--secondary); box-shadow: 0 4px 10px rgba(0,0,0,0.03); }
.btn-submit { width: 100%; background-color: var(--primary); color: white; padding: 15px; border: none; border-radius: 50px; font-weight: 700; cursor: pointer; font-size: 1rem; letter-spacing: 0.5px; box-shadow: 0 5px 15px rgba(47, 94, 72, 0.2); transition: 0.3s; }
.btn-submit:hover { background-color: #244a38; transform: translateY(-2px); }

.full-map { width: 100%; height: 500px; margin-top: 80px; }
.full-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(10%) contrast(1.1); }

footer { background-color: var(--primary); color: var(--white); padding: 70px 10%; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; font-size: 0.95rem; border-top: 5px solid var(--secondary); }
.footer-col { flex: 1; min-width: 250px; }
.footer-col h4 { margin-bottom: 25px; color: var(--secondary); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.footer-col p { color: rgba(255,255,255,0.85); margin-bottom: 12px; line-height: 1.6; display: flex; align-items: center; gap: 10px; }
.footer-col a { display: block; color: rgba(255,255,255,0.85); margin-bottom: 12px; transition: all 0.3s ease; text-decoration: none; }
.footer-col a:hover { color: var(--white); padding-left: 8px; color: var(--secondary); }
.socials a { display: inline-block; font-size: 1.4rem; margin-right: 20px; color: var(--white); opacity: 0.8; transition: 0.3s; background: transparent; width: auto; height: auto; line-height: normal; border-radius: 0; text-align: left; }
.socials a:hover { opacity: 1; color: var(--secondary); transform: translateY(-3px); background: transparent; padding-left: 0; }

/* =======================================================
   MEDIA QUERIES (SÓLO PARA CELULAR) - AJUSTADO Y COMPACTO
   ======================================================= */

@media (max-width: 900px) {
    /* Navbar Fija */
    .navbar { position: fixed !important; top: 0; left: 0; width: 100%; z-index: 2000; padding: 0 20px; }
    body { padding-top: 80px; }

    .menu-toggle { display: block !important; font-size: 1.8rem; cursor: pointer; color: var(--primary); }
    .nav-buttons { display: none !important; }
    .mobile-admin-link { display: block !important; margin-top: 15px; }
    .mobile-admin-link a { border: 2px solid var(--primary); padding: 8px 20px; border-radius: 50px; color: var(--primary) !important; font-weight: 700; }

    .nav-links {
        display: none; position: fixed; top: 80px; left: 0; width: 100%;
        background-color: var(--white); flex-direction: column; align-items: center; padding: 30px 0; gap: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1); z-index: 1000; border-top: 1px solid #eee; overflow-y: auto; max-height: 80vh;
    }
    .nav-links.active { display: flex !important; }

    /* CONTENIDO AJUSTADO A PANTALLA PEQUEÑA */
    .contact-header { padding: 80px 20px 40px 20px; }
    .contact-header h1 { font-size: 2.2rem; }

    /* Contenedor principal: Sin márgenes laterales exagerados */
    .contact-container { 
        flex-direction: column; 
        gap: 30px; 
        margin-top: 0; 
        padding: 20px; /* Reducido para ganar espacio */
        width: 100%;
    }
    
    .info-column, .form-column { 
        width: 100%; 
        min-width: auto; 
        padding: 0; 
    }
    
    /* FORMULARIO COMPACTO */
    .form-column { 
        padding: 25px 20px; /* Menos relleno interno */
    }
    
    /* MAPA PEQUEÑO Y AJUSTADO */
    .full-map { 
        height: 300px; /* Altura controlada para móvil */
        width: 100%; 
        margin-top: 20px; 
    }
    
    /* Footer Centrado */
    footer { flex-direction: column; text-align: center; padding: 40px 20px; }
    .footer-col { width: 100%; margin-bottom: 30px; display: flex; flex-direction: column; align-items: center; }
    
    /* Centrar iconos y texto forzosamente */
    .footer-col p { justify-content: center !important; text-align: center; }
    
    .socials { justify-content: center; display: flex; }
}