/* ==========================================================================
   1. VARIABLES Y BASE (CORREGIDO PARA ADMITIR STICKY)
   ========================================================================== */
html {
    width: 100%;
    margin: 0;
    padding: 0;
    /* ELIMINADO: overflow-x e position: relative que rompían el sticky */
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: 'Inter', sans-serif;
    background-color: var(--beige);
    color: var(--brown);
    /* EL ARREGLO: Protege contra desbordamientos laterales sin romper el scroll de la ventana */
    overflow-x: clip; 
}

:root {
    --gold: #c5a059;
    --brown: #4a3f35;
    --beige: #f9f6f1;
    --white: #ffffff;
    --text-soft: #6a5f55;
    --accent-color: #a68a6d;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, .logo {
    font-family: 'Playfair Display', serif;
}

/* ==========================================================================
   2. HEADER & NAVEGACIÓN (FIXED COMPATIBLE CON MÓVIL)
   ========================================================================== */
header {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(197, 160, 89, 0.1);
    /* SOLUCIÓN ROBUSTA: Usamos fixed para garantizar consistencia absoluta en el scroll */
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100; 
    box-shadow: 0 2px 10px rgba(74, 63, 53, 0.05); 
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%; /* Unificado a tu estándar */
    height: 80px;      /* Forzamos los 80px idénticos */
    background: #ffffff;
    position: relative;
    z-index: 1100;
}

/* --- COMPENSACIÓN OBLIGATORIA DEL HEADER FIXED --- */
/* Como el header ahora flota desde el segundo 0, el primer elemento (Hero) 
   se metería debajo de él. Añadimos un margen superior al cuerpo para empujarlo. */
body {
    padding-top: 80px; 
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brown);
    text-decoration: none;
}

.logo span { 
    color: var(--gold); 
    font-weight: 400; 
}

/* --- ESTILOS DESKTOP POR DEFECTO --- */
.nav-links-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    position: relative; 
    left: 0;            
    width: auto;
    height: auto;
    background: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--brown);
    font-size: 0.95rem; 
    font-weight: 500; 
    text-transform: uppercase;
    letter-spacing: 1px; 
    transition: color 0.3s ease;
}

/* --- ESTADO ACTIVO (SIN SUBRAYADO) --- */
.nav-links a:hover,
.nav-links a.active { 
    color: var(--gold) !important; 
}

.btn-reserva {
    background: var(--gold);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    display: inline-block; 
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.3);
    transition: all 0.3s ease;
}

.btn-reserva:hover {
    transform: translateY(-3px); 
    box-shadow: 0 8px 15px rgba(197, 160, 89, 0.5); 
    color: white !important; 
    opacity: 0.9;
}

/* --- BOTÓN HAMBURGUESA (OCULTO EN PC) --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1200;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--brown);
}

.menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 999;
    backdrop-filter: blur(3px);
}

.menu-overlay.is-active { display: block; }
/* ==========================================================================
   3. HERO (BANNER GLASSMORPHISM)
   ========================================================================== */
.hero-about {
    height: 60vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-glass {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    padding: 60px 80px;
    border-radius: 30px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 90%;
}

.banner-glass h1 {
    font-size: 4rem;
    margin: 0;
    color: var(--brown);
}

.banner-glass h1 span { color: var(--gold); font-style: italic; }

.banner-glass p {
    font-size: 1.2rem;
    margin-top: 15px;
    color: var(--brown);
    letter-spacing: 1px;
    line-height: 1.4;
}

/* ==========================================================================
   4. FILOSOFÍA & PILARES
   ========================================================================== */
.philosophy { padding: 100px 0; background-color: var(--white); }

.two-column { display: flex; align-items: center; gap: 80px; }

.image-frame { flex: 1; position: relative; }
.image-frame img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 30px 30px 0px var(--beige), 31px 31px 0px var(--gold);
}

.text-content { flex: 1; }

.section-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin-top: 10px;
}

.section-title.center { text-align: center; margin-bottom: 80px; }
.section-title.center::after { margin: 10px auto 0; }

.pillars { padding: 100px 0; background-color: var(--beige); }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }

.info-card {
    background: var(--white);
    padding: 50px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 10px 10px 30px rgba(74, 63, 53, 0.03);
    border: 1px solid rgba(197, 160, 89, 0.1);
    transition: transform 0.3s ease;
}

.info-card:hover { transform: translateY(-10px); }
.info-card i { font-size: 3rem; color: var(--gold); opacity: 0.3; margin-bottom: 25px; }

/* ==========================================================================
   5. TIMELINE PROFESIONAL
   ========================================================================== */
.professional-timeline { padding: 100px 0; background-color: var(--white); }

.timeline-wrapper {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 40px;
}

.timeline-line {
    position: absolute;
    top: 50px;
    left: 0; width: 100%; height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    opacity: 0.5;
    z-index: 1;
}

.timeline-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    text-align: center; position: relative; z-index: 2; padding: 0 10px;
}

.timeline-dot {
    width: 16px; height: 16px; background-color: var(--white);
    border: 2px solid var(--gold); border-radius: 50%;
    margin-bottom: 30px; transition: 0.4s;
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.2);
}

.timeline-item:hover .timeline-dot {
    background-color: var(--gold); transform: scale(1.4);
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.5);
}

.timeline-content {
    background: var(--beige); padding: 25px; border-radius: 15px;
    border: 1px solid rgba(197, 160, 89, 0.1); transition: 0.4s; opacity: 0.8;
}

.timeline-item:hover .timeline-content {
    opacity: 1; transform: translateY(-10px);
    background-color: var(--white); box-shadow: 0 15px 30px rgba(74, 63, 53, 0.05);
}

/* ==========================================================================
   6. FORMACIÓN ACADÉMICA
   ========================================================================== */
.academic-formation.bg-beige {
    background-color: var(--beige) !important;
    padding: 140px 0 100px !important;
}

.formation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.formation-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    transition: 0.4s;
    border: 1px solid rgba(197, 160, 89, 0.1);
}

.card-edge {
    position: absolute; left: 0; top: 0; height: 100%; width: 4px;
    background-color: var(--gold); opacity: 0.6;
}

.formation-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(74, 63, 53, 0.08);
    border-color: var(--gold);
}

/* ==========================================================================
   7. STATS (NÚMEROS TRAYECTORIA)
   ========================================================================== */
.stats-section.bg-white { 
    padding: 100px 0; 
    background-color: #ffffff; 
    display: block; /* Asegura que el IntersectionObserver mida bien la sección */
}

.title-accent { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    margin-bottom: 60px; 
    padding: 0 8%; /* Alineación con el resto del contenido */
}

.title-accent::before { 
    content: ''; 
    width: 5px; 
    height: 50px; 
    background-color: var(--gold); 
    flex-shrink: 0; 
}

.title-accent h2.section-title { margin: 0; }
.title-accent h2.section-title::after { display: none; }

/* Grid de Números */
.stats-grid { 
    display: flex; 
    flex-direction: row; /* Garantiza el layout horizontal en escritorio */
    justify-content: space-around; 
    align-items: center; 
    gap: 30px; 
    text-align: center; 
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item { 
    flex: 1; 
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.4s ease; 
}

.stat-item:hover { transform: translateY(-10px); }

.stat-number {
    display: block; 
    font-family: 'Playfair Display', serif; /* Consistencia tipográfica */
    font-size: 6rem; 
    font-weight: 700;
    color: var(--gold); 
    line-height: 1; 
    margin-bottom: 10px; 
    opacity: 0.9;
    min-width: 150px; /* Evita saltos visuales durante la animación */
}

.stat-label { 
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem; 
    font-weight: 500; 
    color: var(--brown);
    text-transform: uppercase; 
    letter-spacing: 2px; 
}

/* ==========================================================================
   8. FOOTER & MEDIA QUERIES (MÓVIL)
   ========================================================================== */
footer { background: var(--beige); padding: 50px 0; text-align: center; border-top: 1px solid rgba(0,0,0,0.05); }

.social-links { display: flex; justify-content: center; gap: 20px; }
.social-icon { font-size: 1.5rem; color: var(--brown); opacity: 0.4; transition: 0.3s; text-decoration: none; }
.social-icon:hover { opacity: 1; color: var(--gold); transform: translateY(-5px); }

@media (max-width: 992px) {
    /* 1. CONFIGURACIÓN DEL HEADER Y NAVBAR */
    .navbar {
        padding: 15px 5%; 
        width: 100%;
        box-sizing: border-box; 
    }

    .logo { font-size: 1.2rem; }
    .menu-toggle { display: flex; }

   .nav-links-wrapper {
        position: fixed; 
        top: 80px; /* IMPORTANTE: Cambiado de 0 a 80px para que ruede limpio debajo del header */
        left: -110%; 
        width: 100%; 
        height: calc(100vh - 80px); /* Ajusta el alto para que cuadre exacto */
        background-color: white; 
        flex-direction: column; 
        justify-content: center;
        align-items: center;
        transition: 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        z-index: 1000;
    }

    .nav-links-wrapper.is-active { left: 0; }

    /* --- EL ARREGLO: FORZAMOS EL MENÚ A SER VERTICAL --- */
    .nav-links { 
        display: flex !important;
        flex-direction: column !important; /* Volvemos a ponerlo uno debajo de otro */
        align-items: center !important;
        gap: 25px !important;
        padding: 0 !important;
        overflow: visible !important; /* Evita que intente hacer scroll lateral */
        width: auto !important;
        margin: 0 !important;
    }

    .nav-links a { 
        font-size: 1.3rem; 
        flex: none !important; /* Evita que los enlaces hereden el ancho del carrusel */
    }

    /* 2. CARRUSELES LATERALES (Solo secciones de contenido) */
    .timeline-wrapper, 
    .info-grid,
    .stats-grid,
    .formation-grid { 
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        width: 100vw !important;
        margin-left: -5%; 
        padding: 20px 5% 40px !important;
        gap: 20px !important;
        box-sizing: border-box !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    /* Ocultamos las barras de scroll */
    .timeline-wrapper::-webkit-scrollbar, 
    .info-grid::-webkit-scrollbar,
    .stats-grid::-webkit-scrollbar,
    .formation-grid::-webkit-scrollbar {
        display: none;
    }

    /* 3. AJUSTE DE TARJETAS (Solo para los carruseles) */
    .timeline-item, 
    .info-card,
    .stat-item,
    .formation-card {
        flex: 0 0 82% !important;
        min-width: 82% !important;
        scroll-snap-align: center;
        margin: 0 !important;
        display: block !important;
    }

    /* 4. REGLAS ADICIONALES */
    .timeline-line { display: none !important; }
    .stat-number { font-size: 4rem !important; }
    .banner-glass { width: 92% !important; margin: 0 auto; padding: 30px 20px; }
    .two-column { flex-direction: column; gap: 40px; }
}
/* Estilos para el contenedor del logo */
.logo-container {
    display: flex;
    align-items: center;
    height: 100%;
    max-height: 80px; /* Mantiene el límite estricto de la navbar */
    overflow: hidden; /* Corta cualquier excedente invisible */
}

.nav-logo {
    /* UN POCO MENOS DE TAMAÑO: Bajamos de 115px a 100px para darle más aire */
    height: 80px;       
    width: auto;         
    object-fit: contain;
    
    /* SUAVIZAMOS MÁRGENES: Reducimos el recorte de -18px a -10px para 
       compensar el nuevo tamaño más pequeño y mantenerlo centrado */
    margin-top: -5px;   
    margin-bottom: -5px;
    margin-left: -2px;   /* Alineación sutil con el borde izquierdo */
    
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.02);
}

/* Ajuste proporcional para teléfonos y tablets */
@media (max-width: 992px) {
    .logo-container {
        max-height: 80px;
    }
    .nav-logo {
        /* Ajuste equivalente en móvil para mantener la misma proporción */
        height: 75px;
        margin-top: -2px;
        margin-bottom: -2px;
        margin-left: -0px;
    }
}
/* ==========================================================================
   CRÉDITOS DEL DESARROLLADOR (FIVERR & LINKEDIN)
   ========================================================================== */
.developer-credits {
    margin-top: 25px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.developer-credits:hover {
    opacity: 1; /* Se ilumina sutilmente al posar el cursor */
}

.developer-credits p {
    color: var(--text-soft, #6a5f55);
    margin: 0;
}

.developer-credits strong {
    color: var(--brown);
    font-weight: 600;
}

/* Separadores visuales */
.dev-sep {
    color: var(--gold);
    margin: 0 6px;
    opacity: 0.5;
}

/* Enlaces a tus perfiles */
.dev-link {
    color: var(--brown);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.dev-link:hover {
    color: var(--gold); /* Cambia al dorado de la web */
}

/* Animación de línea inferior minimalista al hacer hover */
.dev-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: -1px;
    left: 0;
    background-color: var(--gold);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.dev-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Ajuste sutil para que en móviles no se amontone */
@media (max-width: 480px) {
    .developer-credits {
        font-size: 0.8rem;
    }
    .dev-sep {
        margin: 0 3px;
    }
}
/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP (CON ANIMACIÓN)
   ========================================================================== */
.whatsapp-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366; /* El color verde oficial de WhatsApp */
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 2000; /* Lo mantiene por encima de la navbar fija y del modal */
    transition: all 0.3s ease;
}

/* El icono SVG interno */
.whatsapp-floating-btn svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* Efecto Hover: Se eleva un poquito y brilla más */
.whatsapp-floating-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    background-color: #20ba5a;
}

/* --- ANIMACIÓN DE PULSO --- */
/* Crea un anillo de ondas expansivas muy sutil alrededor del botón */
.whatsapp-floating-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #25d366;
    opacity: 0.5;
    z-index: -1;
    animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Ajuste fino para pantallas móviles para que no estorbe al leer */
@media (max-width: 768px) {
    .whatsapp-floating-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-floating-btn svg {
        width: 26px;
        height: 26px;
    }
}
/* ==========================================================================
   SECCIÓN LEGAL DEL FOOTER
   ========================================================================== */
.footer-bottom-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.footer-bottom-info p {
    margin: 0;
    color: var(--text-soft, #6a5f55);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-legal a {
    color: var(--text-soft, #6a5f55);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.8;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.footer-legal a:hover {
    color: var(--gold, #c5a059);
    opacity: 1;
}

.legal-sep {
    color: var(--gold, #c5a059);
    font-size: 0.7rem;
    opacity: 0.5;
}

/* Ajuste responsive para celulares */
@media (max-width: 576px) {
    .footer-legal {
        flex-direction: column;
        gap: 6px;
    }
    
    .legal-sep {
        display: none; /* Escondemos el punto separador en vertical */
    }
}