/* ============================================= */
/* ======= ESTILOS GLOBALES Y REUTILIZADOS ======= */
/* ============================================= */

/*
  NOTA: Estos estilos de header y logo son los mismos de tu index.css.
  Si en el futuro creas un archivo CSS global, podrías borrar esto de aquí.
*/
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Lexend', sans-serif;
    margin: 0;
    background-color: #fff;
    color: #333;
}

.fixed-logo {
    position: fixed;
    top: 30px;
    left: 40px;
    z-index: 1001; /* Por encima del header */
}

.fixed-logo img {
    height: 40px;
    width: auto;
}

.main-header {
    position: fixed;
    top: 20px;
    right: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 20px;
    transition: top 0.3s ease;
}

.nav-wrapper {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.main-nav a {
    color: #333;
    text-decoration: none;
    margin: 0 20px;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.main-nav a.active::after,
.main-nav a:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #c5a47e; /* Color dorado */
}

.cta-button {
    background-color: #1a2a4a; /* Azul oscuro */
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    margin-left: 20px;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #3c4a6b;
}


/* ============================================= */
/* ======== ESTILOS DE LA PÁGINA "SOBRE NOSOTROS" ======== */
/* ============================================= */

main {
    padding-top: 120px; /* Espacio para que el header fijo no tape el contenido */
}

/* --- Bloque 1: Misión e Historia --- */
.about-hero {
    width: 100%;
    padding: 60px 40px;
    background-color: #f9f9f9; /* Un fondo muy sutil */
}

.about-hero-content {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 60px;
}

.about-hero-image {
    flex: 0 0 40%; /* La imagen ocupa el 40% del espacio */
}

.about-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-hero-text {
    flex: 1; /* El texto ocupa el resto del espacio */
}

.about-hero-text .subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #c5a47e; /* Dorado */
    letter-spacing: 1px;
    text-transform: uppercase;
}

.about-hero-text h1 {
    font-size: 2.8rem;
    color: #1a2a4a;
    margin: 10px 0 20px 0;
}

.about-hero-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}


/* --- Bloque 2: Nuestros Valores --- */
.values-section {
    padding: 100px 40px;
    text-align: center;
}

.values-section h2 {
    font-size: 2.5rem;
    color: #1a2a4a;
    margin-bottom: 60px;
}

.values-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap; /* Para móviles */
    max-width: 1200px;
    margin: 0 auto;
}

.value-card {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    flex-basis: 300px; /* Base de 300px, crecerá si hay espacio */
    flex-grow: 1;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    text-align: left;
}

.value-icon {
    font-size: 2.5rem;
    color: #c5a47e;
    margin-bottom: 20px;
    /* Temporalmente, para que se vea algo */
    background-color: #f0f0f0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem; /* Oculta el texto "ICONO X" */
}

.value-card h3 {
    font-size: 1.5rem;
    color: #1a2a4a;
    margin: 0 0 15px 0;
}

.value-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}


/* --- Bloque 3: CTA Hacia Equipo --- */
.team-cta {
    background-color: #1a2a4a;
    color: #fff;
    text-align: center;
    padding: 80px 40px;
}

.team-cta h2 {
    font-size: 2.2rem;
    margin: 0 auto 30px auto;
    max-width: 600px;
}

.cta-button-footer {
    background-color: #c5a47e;
    color: #fff;
    padding: 15px 40px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.cta-button-footer:hover {
    background-color: #b39169;
    transform: translateY(-3px);
}


/* ============================================= */
/* =========== ESTILOS PARA ANIMACIONES ========== */
/* ============================================= */
.hidden-from-left { opacity: 0; transform: translateX(-50px); }
.hidden-from-right { opacity: 0; transform: translateX(50px); }
.hidden-fade-up { opacity: 0; transform: translateY(40px); }

.about-hero-image, .about-hero-text, .values-section h2, .value-card, .team-cta {
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* Retrasos para el efecto escalonado */
.values-grid .value-card:nth-child(2) { transition-delay: 0.2s; }
.values-grid .value-card:nth-child(3) { transition-delay: 0.4s; }

.whatsapp-float {
    position: fixed; /* Esto lo mantiene fijo en la pantalla */
    width: 60px;
    height: 60px;
    bottom: 40px; /* Distancia desde abajo */
    right: 40px; /* Distancia desde la derecha */
    background-color: #25D366; /* Color oficial de WhatsApp */
    color: #FFF;
    border-radius: 50%; /* Lo hace redondo */
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000; /* Asegura que esté por encima de todo */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.whatsapp-icon {
    width: 35px; /* Ajusta el tamaño del icono SVG */
    height: 35px;
    fill: #FFF; /* Color del icono */
}

.whatsapp-float:hover {
    transform: scale(1.1); /* Efecto al pasar el ratón */
    background-color: #128C7E; /* Un verde un poco más oscuro */
}

.main-header.nav-hidden {
    top: -100px; /* Mueve el header completamente fuera de la vista hacia arriba */
}

/* La transición ya debería estar en la clase .main-header, 
   pero nos aseguramos de que esté: */
.main-header {
    /* ...tus otros estilos... */
    transition: top 0.4s ease-in-out; /* Esta es la línea clave para la animación suave */
}

.mobile-nav-toggle { display: none; }

@media (max-width: 992px) {
    /* Ajustamos el layout principal */
    .about-hero-content {
        gap: 40px; /* Reducimos el espacio entre imagen y texto */
    }
    .about-hero-text h1 {
        font-size: 2.4rem;
    }
    .values-section {
        padding: 80px 30px;
    }
    .values-section h2 {
        font-size: 2.2rem;
    }
}


/* ----- Móviles Grandes (hasta 768px) ----- */
@media (max-width: 768px) {
    /* --- Ajustes Generales --- */
    main {
        padding-top: 80px;
    }
    
    .fixed-logo { top: 15px; left: 20px; }
    .fixed-logo img { height: 30px; }

    /* --- Header para Móvil --- */
    .main-header {
        top: 0; left: 0; right: 0;
        padding: 15px 20px;
        background-color: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        justify-content: flex-end;
    }

    /* (El resto de los estilos del menú de hamburguesa que ya funcionan bien) */
    .nav-wrapper { background: none; box-shadow: none; padding: 0; }
    .mobile-nav-toggle { display: block; position: relative; z-index: 1001; background: transparent; border: 0; padding: 0.5em; cursor: pointer; width: 28px; height: 20px; }
    .mobile-nav-toggle .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .mobile-nav-toggle::before, .mobile-nav-toggle::after { content: ''; position: absolute; left: 0; width: 28px; height: 3px; background: #333; border-radius: 2px; transition: transform 0.3s ease-out, top 0.3s ease-out; }
    .mobile-nav-toggle::before { top: 6px; }
    .mobile-nav-toggle::after { top: -6px; }
    .nav-open .mobile-nav-toggle::before { transform: rotate(45deg); top: 0; }
    .nav-open .mobile-nav-toggle::after { transform: rotate(-45deg); top: 0; }
    .main-nav { position: fixed; z-index: 1000; inset: 0 0 0 30%; flex-direction: column; justify-content: center; align-items: center; gap: 3rem; padding: min(20vh, 10rem) 2em; background: rgba(26, 42, 74, 0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transform: translateX(100%); transition: transform 0.4s ease-out; }
    .main-nav a { color: white; margin: 0; }
    .main-nav a.active::after, .main-nav a:hover::after { background-color: #c5a47e; }
    .main-nav .cta-button { background-color: transparent; color: white; border: 2px solid white; }
    .nav-open .main-nav { transform: translateX(0%); }
    body.nav-open { overflow: hidden; }
    
    /* --- Bloque 1: Misión e Historia (SOLUCIÓN SIMPLIFICADA) --- */
    .about-hero {
        padding: 40px 20px; /* Este padding ya no causará problemas */
    }
    .about-hero-content {
        flex-direction: column;
        text-align: center;
    }
    .about-hero-image {
        width: 100%;
        max-width: 400px;
    }
    
    .about-hero-text h1 {
        font-size: 2rem;
    }
    .about-hero-text p {
        font-size: 1rem;
        text-align: justify;
    }

    /* --- Bloques 2 y 3 (sin cambios) --- */
    .values-section { padding: 60px 20px; }
    .values-section h2 { font-size: 2rem; margin-bottom: 40px; }
    .values-grid { flex-direction: column; gap: 25px; }
    .value-card { flex-basis: 100%; padding: 30px; }
    .team-cta { padding: 60px 20px; }
    .team-cta h2 { font-size: 1.8rem; }
    .whatsapp-float { width: 50px; height: 50px; bottom: 20px; right: 20px; }
    .whatsapp-icon { width: 28px; height: 28px; }
}


/* ----- Móviles Pequeños (hasta 480px) ----- */
@media (max-width: 480px) {
    .main-nav a {
        margin: 0 10px;
        font-size: 0.9rem;
    }
    .cta-button {
        padding: 10px 18px;
        font-size: 0.9rem;
        margin-left: 10px;
    }
    .about-hero-text h1 {
        font-size: 1.8rem;
    }
    .values-section h2 {
        font-size: 1.8rem;
    }
    .team-cta h2 {
        font-size: 1.6rem;
    }
    .cta-button-footer {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
}

/* ============================================= */
/* ======== MODAL DE WHATSAPP ================== */
/* ============================================= */
.whatsapp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.whatsapp-modal.is-visible {
    opacity: 1;
    visibility: visible;
}

.whatsapp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.whatsapp-modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 16px;
    padding: 40px 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 10001;
}

.whatsapp-modal.is-visible .whatsapp-modal-content {
    transform: scale(1);
}

.whatsapp-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #5A5A5A;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.whatsapp-modal-close:hover {
    background-color: #f0f0f0;
    color: #0D1B2A;
}

.whatsapp-modal-content h3 {
    margin: 0 0 25px 0;
    font-size: 1.5rem;
    color: #0D1B2A;
    text-align: center;
    font-weight: 600;
}

.whatsapp-numbers {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.whatsapp-number-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background-color: #25D366;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
    font-size: 1.1rem;
    font-weight: 500;
}

.whatsapp-number-btn:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.whatsapp-number-btn svg {
    flex-shrink: 0;
}

.whatsapp-number-btn span {
    flex-grow: 1;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Responsive para modal */
@media (max-width: 768px) {
    .whatsapp-modal-content {
        padding: 30px 20px;
        max-width: 340px;
    }

    .whatsapp-modal-content h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .whatsapp-number-btn {
        padding: 15px 18px;
        font-size: 1rem;
        gap: 12px;
    }
}