


/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --primary: #FFD100; /* Amarillo Vibrante */
    --primary-hover: #e6bc00;
    --primary-text: #000000;
    --accent: #ffffff;
    
    /* Fondo Azul Oscuro "Técnico" */
    --bg-body: #050a0e; 
    --bg-card: #0e161d;
    --bg-card-dark: #020406;
    --bg-glass: rgba(14, 22, 29, 0.7);
    
    --text-main: #f0f2f5;
    --text-muted: #94a3b8;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* =========================================
   2. UTILITIES & ANIMATIONS
   ========================================= */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.relative { position: relative; }
.section-padding { padding: 100px 0; }
.section-padding-small { padding: 60px 0; }
.mb-40 { margin-bottom: 40px; }
.mb-60 { margin-bottom: 60px; }
.mb-80 { margin-bottom: 80px; }

/* Fondos */
.bg-body { background-color: var(--bg-body); }
.bg-dark { background-color: var(--bg-body); }
.bg-darker { background-color: var(--bg-card-dark); }
.bg-card-dark { background-color: var(--bg-card-dark); }

/* Gradientes y Efectos */
.text-gradient {
    background: linear-gradient(90deg, var(--primary), #fff);
    /* SOLUCIÓN ERROR 2: El prefijo -webkit- va primero, luego el estándar */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback para navegadores que no soporten text-fill */
}

.glass {
    background: var(--bg-glass);
    /* SOLUCIÓN ERROR 1: El prefijo -webkit- va primero */
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.bg-fixed {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-attachment: fixed; opacity: 0.4;
}
.overlay-gradient {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, var(--bg-body) 0%, rgba(5,10,14,0.9) 50%, rgba(5,10,14,0.4) 100%);
}
.overlay-gradient-strong {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(5,10,14,0.7) 0%, rgba(5,10,14,0.95) 100%);
    z-index: 1;
}

/* Animaciones */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s var(--ease-out); }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }

/* =========================================
   3. HEADER
   ========================================= */
.main-header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 45px; }
.main-nav ul { display: flex; gap: 40px; align-items: center; }
.nav-link { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); position: relative; }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--primary); transition: 0.3s;
}
.nav-link:hover::after { width: 100%; }
.btn-primary-outline {
    border: 1px solid rgba(255,255,255,0.2); padding: 8px 24px; border-radius: 50px;
    font-size: 0.9rem; font-weight: 600;
}
.btn-primary-outline:hover {
    border-color: var(--primary); background: var(--primary); color: var(--primary-text);
}
.mobile-toggle { display: none; color: white; font-size: 1.5rem; }

/* =========================================
   4. HERO SECTIONS
   ========================================= */
.hero { /* Home Hero */
    height: 100vh;  position: relative; display: flex; align-items: center; overflow: hidden;
}
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    transform: scale(1.05); animation: zoomOut 20s infinite alternate;
}
@keyframes zoomOut { from { transform: scale(1.05); } to { transform: scale(1.15); } }
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(5,10,14,0.4) 0%, rgba(5,10,14,0.9) 70%, var(--bg-body) 100%);
}
.hero-container { position: relative; z-index: 2; width: 100%; }
.badge {
    display: inline-block; padding: 6px 16px;
    background: rgba(255, 209, 0, 0.15); color: var(--primary);
    border: 1px solid rgba(255, 209, 0, 0.3); border-radius: 4px;
    font-size: 0.8rem; font-weight: 700; letter-spacing: 2px;
    margin-bottom: 20px; 
    /* Corrección compatibilidad */
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}
.hero h1 { font-size: 5rem; margin-bottom: 20px; color: white; }
.hero p { 
    font-size: 1.2rem; 
    color: var(--text-muted); 
    max-width: 600px; 
    margin-bottom: 40px; 
    margin-left: auto;
    margin-right: auto;
}
.hero-text {
    text-align: center;      
    margin: 0 auto;          
    max-width: 900px;        
}
.hero-btns { 
    display: flex; 
    gap: 20px; 
    align-items: center; 
    justify-content: center;
    
   
}

/* Botones */
.btn-primary {
    background: var(--primary); color: var(--primary-text);
    padding: 14px 36px; border-radius: 4px; font-weight: 700;
    font-family: var(--font-heading); letter-spacing: 0.5px;
    display: inline-flex; align-items: center; gap: 10px;
    transition: transform 0.2s, background 0.3s;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-text { color: white; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.btn-text:hover i { transform: translateX(5px); transition: 0.3s; color: var(--primary); }

/* Scroll Indicator */
.scroll-indicator {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px;
    color: rgba(255,255,255,0.5); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px;
}
.scroll-indicator .line { width: 1px; height: 60px; background: rgba(255,255,255,0.2); position: relative; overflow: hidden; }
.scroll-indicator .line::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 50%;
    background: var(--primary); animation: scrollLine 2s infinite;
}
@keyframes scrollLine { 0% { top: -100%; } 100% { top: 100%; } }

/* Hero Compacto (Páginas interiores) */
.compact-hero { 
    height: 40vh; min-height: 400px;
    padding-top: 100px; display: flex; align-items: center; justify-content: center;
    position: relative; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.small-hero { height: 40vh; min-height: 400px; padding-top: 100px; display: flex; align-items: center; justify-content: center; position: relative; border-bottom: 1px solid rgba(255,255,255,0.05); }

.hero-desc-box {
    max-width: 700px; margin: 20px auto 0;
    color: var(--text-muted); font-size: 1.1rem; line-height: 1.5;
}
.hero-desc-box .small-note { font-size: 0.95rem; margin-top: 10px; color: white; }
.hero-desc-box strong { color: white; }


/* =========================================
   5. HOME CONTENT
   ========================================= */
.grid-2-col { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; align-items: center; }
.title-decor { font-size: 3rem; margin-bottom: 20px; }
.highlight { color: var(--primary); }
.lead-text { font-size: 1.2rem; color: #fff; font-weight: 500; border-left: 3px solid var(--primary); padding-left: 20px; }
.text-content p { margin-bottom: 20px; color: var(--text-muted); font-size: 1.05rem; }
.link-arrow { color: white; font-weight: 600; margin-top: 20px; display: inline-block; border-bottom: 1px solid var(--primary); padding-bottom: 2px; }

/* STATS */
.stats-section {
    position: relative; z-index: 10;
    margin-top: 0; 
    background-color: var(--bg-body); 
    padding: 60px 0;
}
.stats-grid-clean { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.stat-item { padding: 20px; transition: transform 0.3s; }
.stat-item:hover { transform: translateY(-5px); }
.stat-item h3 { font-size: 4rem; font-weight: 800; color: white; line-height: 1; margin-bottom: 5px; text-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.stat-item .unit { font-size: 1.2rem; font-weight: 400; color: var(--primary); text-transform: uppercase; display: block; margin-top: 5px; letter-spacing: 2px; }
.stat-item p { color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

/* COMPETITION */
.comp-content {
    max-width: 700px;
    text-align: center;      
    margin: 0 auto;          
}
.overline { color: var(--primary); font-weight: 700; letter-spacing: 2px; font-size: 0.9rem; display: block; margin-bottom: 10px; }
.social-row {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center; 
}
.social-pill { 
    background: rgba(255,255,255,0.05); 
    padding: 10px 20px; 
    border-radius: 50px; 
    font-size: 0.7rem; 
    /* Corrección compatibilidad */
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px); 
    border: 1px solid rgba(255,255,255,0.1); 
}
.social-pill:hover { background: white; color: black; }

/* SPONSORS HOME */
.max-w-700 { max-width: 700px; margin: 0 auto 60px; line-height: 1.6; }
.home-sponsors-grid { display: flex; justify-content: center; flex-wrap: wrap; gap: 60px; align-items: center; }
.home-sponsor-logo { height: 60px; width: auto; filter: grayscale(100%) brightness(1.5); opacity: 0.6; transition: 0.3s; }
.home-sponsor-logo:hover { filter: none; opacity: 1; transform: scale(1.1); }
.spacer-large { height: 80px; width: 100%; }
.btn-secondary { display: inline-block; color: white; border-bottom: 1px solid #333; padding-bottom: 5px; transition: 0.3s; }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* CTA FINAL */
.cta-section { position: relative; height: 500px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cta-bg { position: absolute; top:0; left:0; width:100%; height:100%; background-size: cover; background-position: center; opacity: 0.4; }
.cta-content { position: relative; z-index: 2; padding: 60px 80px; text-align: center; border: 1px solid rgba(255,255,255,0.1); }
.cta-content h2 {
    margin-bottom: 15px; 
    line-height: 1.2;    
}

.sponsors-cta-section .subtitle {
    font-size: 1.04rem;  
    line-height: 1.6;    
}

.cta-buttons { margin-top: 30px; display: flex; gap: 20px; justify-content: center; }
.btn-white { background: white; color: black; padding: 14px 36px; border-radius: 4px; font-weight: 700; }
.btn-white:hover { background: #ddd; }

/* =========================================
   6. HISTORIA (TIMELINE & NAV)
   ========================================= */
.history-hero { padding: 160px 0 80px; background-color: var(--bg-body); overflow: hidden; }
.history-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center; }
.academic-text p { color: var(--text-muted); margin-bottom: 20px; font-size: 1.05rem; line-height: 1.8; }

/* Nav Años */
.year-nav-wrapper { position: sticky; top: 75px; z-index: 900; border-bottom: 1px solid rgba(255,255,255,0.05); background: rgba(5, 10, 14, 0.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); overflow-x: auto; padding: 10px 0; white-space: nowrap; }
.year-nav-wrapper::-webkit-scrollbar { height: 4px; }
.year-nav-wrapper::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
.year-nav { display: inline-flex; justify-content: center; gap: 10px; padding: 0 20px; min-width: 100%; }
.year-nav li a { font-family: var(--font-heading); color: var(--text-muted); font-weight: 600; font-size: 0.85rem; padding: 6px 12px; border-radius: 20px; transition: 0.3s; border: 1px solid transparent; }
.year-nav li a:hover, .year-nav li a.active { color: white; background: rgba(255, 209, 0, 0.15); border-color: rgba(255, 209, 0, 0.3); box-shadow: 0 0 10px rgba(255, 209, 0, 0.1); }
.highlight-year-link { color: #fff; }

/* Contador */
.counter-display { text-align: center; position: relative; padding: 20px; }
.counter-label { display: block; font-size: 1rem; font-weight: 700; color: var(--primary); letter-spacing: 3px; text-transform: uppercase; }
.counter-number { font-family: var(--font-heading); font-weight: 800; font-size: 8rem; line-height: 1; background: linear-gradient(180deg, #fff 20%, rgba(255,255,255,0.5) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.counter-number .unit { font-size: 2rem; color: var(--primary); -webkit-text-fill-color: var(--primary); font-weight: 600; margin-left: -10px; }

/* Timeline */
.timeline-section { padding: 100px 0; position: relative; overflow: hidden; background-color: var(--bg-body); }
.timeline-line { position: absolute; left: 50%; top: 0; width: 2px; height: 100%; background: rgba(255, 255, 255, 0.1); transform: translateX(-50%); z-index: 1; }
.timeline-line::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 150px; background: linear-gradient(to bottom, transparent, var(--primary), transparent); animation: goldenBeam 3s infinite linear; box-shadow: 0 0 15px var(--primary); }
@keyframes goldenBeam { 0% { top: -200px; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

.timeline-row { display: flex; justify-content: center; align-items: flex-start; margin-bottom: 100px; position: relative; z-index: 2; scroll-margin-top: 180px; }
.timeline-date { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); background: var(--bg-body); color: var(--primary); font-weight: 800; font-family: var(--font-heading); padding: 8px 18px; border-radius: 50px; border: 2px solid var(--primary); z-index: 10; font-size: 1.1rem; box-shadow: 0 0 15px rgba(255, 209, 0, 0.1); }
.timeline-card { width: 45%; border-radius: 8px; overflow: hidden; transition: 0.3s; border: 1px solid rgba(255, 255, 255, 0.08); }
.timeline-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.card-image { width: 100%; height: auto; background: #0f161d; position: relative; line-height: 0; }
.card-image img { width: 100%; height: auto; object-fit: contain; display: block; }
.card-content { padding: 30px; }
.card-content h3 { margin-bottom: 15px; font-size: 1.5rem; color: white; }
.card-content p { font-size: 1rem; color: var(--text-muted); line-height: 1.6; text-align: left; }
.timeline-row.left { flex-direction: row; }
.timeline-row.right { flex-direction: row-reverse; }
.timeline-row.left .timeline-card { margin-right: auto; }
.timeline-row.right .timeline-card { margin-left: auto; }

.timeline-continuation { position: relative; text-align: center; margin-top: 60px; z-index: 5; }
.arrow-icon { display: inline-block; color: var(--primary); font-size: 1.5rem; opacity: 0.6; animation: bounceSubtle 2s infinite; }
.timeline-continuation::before { content: ''; position: absolute; top: -60px; left: 50%; width: 2px; height: 60px; background: linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(255,209,0,0.3)); transform: translateX(-50%); }
@keyframes bounceSubtle { 0%, 100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(8px); opacity: 0.8; } }

/* =========================================
   7. PATROCINADORES
   ========================================= */
.institutions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.institution-card { display: flex; flex-direction: column; gap: 20px; text-align: left; }
.inst-header { height: 100px; display: flex; align-items: center; justify-content: flex-start; }
.inst-logo { max-width: 80%; max-height: 80px; filter: grayscale(100%) brightness(200%); transition: 0.3s; }
.institution-card:hover .inst-logo { filter: none; transform: scale(1.05); }
.inst-body h3 { color: var(--primary); margin-bottom: 10px; font-size: 1.5rem; }
.inst-body p { color: var(--text-muted); margin-bottom: 20px; font-size: 0.95rem; }
.text-link { color: white; font-weight: 600; font-size: 0.9rem; border-bottom: 1px solid var(--primary); padding-bottom: 2px; }
.text-link:hover { color: var(--primary); }

.clean-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; max-width: 1200px; margin: 0 auto; }
.clean-item { position: relative; height: 160px; display: flex; align-items: center; justify-content: center; transition: transform 0.3s; cursor: pointer; background: rgba(255,255,255,0.01); border-radius: 8px; }
.clean-item:hover { transform: translateY(-5px); background: rgba(255,255,255,0.03); }
.clean-item img { max-width: 80%; max-height: 80px; filter: grayscale(100%) brightness(1.5); opacity: 0.6; transition: 0.4s ease; }
.clean-item:hover img { filter: none; opacity: 1; transform: scale(1.1); }
.clean-overlay { display: none; }

/* MODAL */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.9); 
    /* Corrección compatibilidad */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px); 
    z-index: 2000; 
    display: flex; align-items: center; justify-content: center; 
    opacity: 0; visibility: hidden; transition: 0.3s; padding: 20px; 
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: #0f161d; border: 1px solid rgba(255,255,255,0.1); padding: 50px 40px; border-radius: 12px; max-width: 700px; width: 100%; position: relative; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.6); transform: scale(0.95); transition: 0.3s ease-out; }
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-logo-container { height: 100px; display: flex; align-items: center; justify-content: center; margin-bottom: 25px; }
.modal-logo-container img { max-height: 100%; max-width: 80%; }
.modal-body h3 { color: white; font-size: 2rem; margin-bottom: 15px; }
.modal-body p { color: var(--text-muted); font-size: 1rem; margin-bottom: 30px; line-height: 1.7; max-height: 40vh; overflow-y: auto; }
.modal-socials { display: flex; justify-content: center; gap: 15px; margin-bottom: 25px; }
.social-link { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: white; font-size: 1.1rem; transition: 0.3s; }
.social-link:hover { background: var(--primary); color: black; border-color: var(--primary); }
.modal-close { position: absolute; top: 20px; right: 20px; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; transition: 0.3s; }
.modal-close:hover { color: var(--primary); transform: rotate(90deg); }
.modal-nav { position: absolute; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: rgba(255,255,255,0.3); font-size: 2rem; cursor: pointer; transition: 0.3s; }
.modal-nav:hover { color: var(--primary); }
.modal-nav.prev { left: -60px; }
.modal-nav.next { right: -60px; }

/* 3. CTA (Llamada a la acción) */
.sponsor-cta {
    padding: 160px 0; margin-top: 100px;
    background-color: var(--bg-body); border-top: 1px solid rgba(255,255,255,0.05);
}
.cta-bg {
    position: absolute; top:0; left:0; width:100%; height:100%;
    background-size: cover; background-position: center; opacity: 0.2;
}
.sponsor-cta h2 { font-size: 3.5rem; margin-bottom: 20px; }
.sponsor-cta p { font-size: 1.2rem; margin-bottom: 40px; color: var(--text-muted); }

/* =========================================
   8. CONTACTO
   ========================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; }
.contact-info h3 { color: white; font-size: 2rem; margin-bottom: 20px; }
.info-intro { color: var(--text-muted); margin-bottom: 40px; font-size: 1.05rem; line-height: 1.6; }
.info-items { display: flex; flex-direction: column; gap: 30px; margin-bottom: 40px; }
.info-item { display: flex; gap: 20px; align-items: flex-start; }
.icon-box { width: 50px; height: 50px; background: rgba(255,255,255,0.05); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.2rem; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.1); }
.info-item h4 { color: white; margin-bottom: 5px; font-size: 1.1rem; }
.info-item p, .info-item a { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }
.info-item a:hover { color: var(--primary); }
.map-container { border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); filter: grayscale(100%) invert(90%); transition: 0.3s; }
.map-container:hover { filter: none; }
.text-link-yellow { color: var(--primary); font-weight: 600; font-size: 0.9rem; }
.mt-30 { margin-top: 30px; }
.text-sm { font-size: 0.85rem; }

.contact-form-wrapper { padding: 50px; border-radius: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 25px; }
.form-group label { display: block; color: var(--text-main); font-weight: 500; margin-bottom: 8px; font-size: 0.9rem; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form input[type="tel"], .contact-form textarea { width: 100%; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.1); padding: 14px 18px; border-radius: 6px; color: white; font-family: var(--font-body); font-size: 1rem; transition: 0.3s; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); background: rgba(0, 0, 0, 0.5); box-shadow: 0 0 15px rgba(255, 209, 0, 0.1); }
.radio-group { display: flex; gap: 20px; flex-wrap: wrap; }
.radio-box { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-muted); font-size: 0.95rem; }
.radio-box input { display: none; }
.radio-custom { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.3s; position: relative; }
.radio-custom::after { content: ''; width: 10px; height: 10px; background: var(--primary); border-radius: 50%; opacity: 0; transform: scale(0); transition: 0.2s; position: absolute; }
.radio-box input:checked + .radio-custom { border-color: var(--primary); }
.radio-box input:checked + .radio-custom::after { opacity: 1; transform: scale(1); }
.radio-box input:checked ~ span { color: white; }
.btn-primary.full-width { width: 100%; justify-content: center; margin-top: 10px; font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* --- CORRECCIÓN DEFINITIVA BOTÓN ACTIVO --- */
.btn-primary-outline.active,
.mobile-nav-menu .btn-primary-outline.active {
    background-color: var(--primary) !important;
    color: #000 !important; /* Negro forzado */
    border-color: var(--primary) !important;
    font-weight: 800 !important;
    box-shadow: 0 0 15px rgba(255, 209, 0, 0.4); /* Un brillito extra para que destaque */
}

/* Efecto Hover cuando está activo */
.btn-primary-outline.active:hover {
    background-color: #e6bc00 !important; /* Un poco más oscuro */
    transform: translateY(-2px);
}

/* =========================================
   9. FOOTER
   ========================================= */
.main-footer { background: #020406; padding: 80px 0 30px; border-top: 1px solid rgba(255,255,255,0.05); font-size: 0.9rem; }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 60px; }
.footer-col h4 { color: white; margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a, .footer-col p { color: #666; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 30px; display: flex; justify-content: space-between; color: #444; }
.footer-socials a { margin-left: 20px; font-size: 1.2rem; color: #666; }
.footer-socials a:hover { color: var(--primary); }

/* Controlamos el tamaño de los logos desde aquí en vez del HTML */
.footer-logo {
    height: 60px; width: auto;
}

/* Opcional: Un pequeño efecto al pasar el ratón para indicar que es clicable */
.footer-logo:hover {
    transform: scale(1.05); /* Crece un poquito al pasar el mouse */
    filter: brightness(1.2); /* Se ilumina un poco */
}


/* =========================================
   10. RESPONSIVE & MOBILE MENU (MEJORADO)
   ========================================= */

/* A. AJUSTES GENERALES PARA TABLET (max-width: 992px) */
@media (max-width: 992px) {
    .hero h1 { font-size: 3.5rem; }
    .title-decor { font-size: 2.5rem; }
    .grid-2-col { grid-template-columns: 1fr; gap: 40px; }
    .history-hero {
        padding-bottom: 160px; 
        min-height: 100vh; 
        display: flex;
        align-items: center;
    }
    .history-grid { grid-template-columns: 1fr; text-align: center; }
    .contact-grid { grid-template-columns: 1fr; gap: 60px; }
    .stats-grid-clean { grid-template-columns: 1fr; gap: 30px; }
    .container { padding: 0 30px; }
    .timeline-line { left: 30px; }
    .timeline-row, .timeline-row.left, .timeline-row.right { flex-direction: column; align-items: flex-start; margin-left: 60px; margin-bottom: 60px; }
    .timeline-date { left: -30px; top: 0; transform: none; font-size: 0.9rem; }
    .timeline-card { width: 100%; margin: 0 !important; }
    .modal-nav.prev { left: 10px; z-index: 10; }
    .modal-nav.next { right: 10px; z-index: 10; }
    .main-nav ul { display: none; } /* Ocultamos el menú normal */
    .mobile-toggle { display: block; cursor: pointer; z-index: 1001; font-size: 1.8rem; }
    
    .year-nav { justify-content: flex-start; }
}

/* B. ESTILOS DEL MENÚ MÓVIL (OFF-CANVAS) */
.mobile-nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 998;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.mobile-nav-overlay.active { opacity: 1; visibility: visible; }

.mobile-nav-menu {
    position: fixed; top: 0; right: -300px; width: 280px; height: 100%;
    background: #0f161d; z-index: 999;
    padding: 80px 30px 30px;
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
    transition: 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    display: flex; flex-direction: column; gap: 20px;
}
.mobile-nav-menu.active { right: 0; }

.mobile-nav-menu a {
    font-size: 1.2rem; font-weight: 600; color: white;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 15px; display: block;
}
.mobile-nav-menu a.active, .mobile-nav-menu a:hover { color: var(--primary); border-color: var(--primary); }
.mobile-nav-menu .btn-primary-outline { text-align: center; border: 2px solid var(--primary); margin-top: 20px; }

/* C. AJUSTES PARA MÓVIL (max-width: 768px) */
@media (max-width: 768px) {
    .hero h1 .text-gradient {
        display: block;        
        white-space: nowrap;   
        margin-top: 5px;       
    }

    .force-nowrap {
        display: block;       
        white-space: nowrap;  
    }
    
    .hero p { font-size: 1rem; }
    .section-padding { padding: 80px 0; }
    .clean-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .institutions-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .inst-header { justify-content: center; }
    .home-sponsors-grid { gap: 30px; }
    .home-sponsor-logo { height: 40px; }
    
    .compact-hero, .small-hero { height: auto; min-height: 400px; padding: 140px 0 60px; }
    
    .contact-form-wrapper { padding: 30px 20px; }
    .modal-content { padding: 40px 20px; width: 95%; }
    .modal-nav { width: 40px; height: 40px; font-size: 1rem; background: rgba(0,0,0,0.5); }
    .modal-nav.prev { left: 5px; top: 50%; }
    .modal-nav.next { right: 5px; top: 50%; }
    .counter-number {
        display: flex;          
        flex-direction: column; 
        align-items: center;    
        line-height: 1.2;       
        font-size: 6rem;        
    }
    .counter-number .unit {
        margin-left: 0;       
        margin-top: -10px;    
    }
    
    .sponsor-cta { padding: 100px 0; margin-top: 60px; }
    .sponsor-cta h2 { font-size: 2.5rem; }
}

/* D. AJUSTES PARA MÓVIL PEQUEÑO (max-width: 480px) */
@media (max-width: 480px) {
    .clean-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .stat-item h3 { font-size: 2.5rem; }
    .hero h1 { font-size: 2.2rem; }
}

.year-nav-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 20px;
    min-width: max-content;
}

.year-label {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* --- SELECTOR DE IDIOMA PERSONALIZADO --- */
.custom-lang-selector {
    position: relative;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid rgba(255,255,255,0.1);
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    color: white;
    padding: 6px 12px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.lang-btn:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.lang-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background: #0f161d;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    
    /* Oculto por defecto */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Mostrar al hacer hover o cuando tenga clase active (por si quieres click) */
.custom-lang-selector:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    padding: 8px 12px;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.lang-option span { font-size: 1.2rem; } /* Tamaño bandera emoji */

@media (max-width: 992px) {
    .custom-lang-selector {
        margin-left: auto;
        margin-right: 60px; /* Separar del menú hamburguesa */
        border: none;
    }
}

/* --- CORRECCIONES CONTACTO MÓVIL --- */
@media (max-width: 992px) {
    .contact-grid {
        display: flex;
        flex-direction: column-reverse; /* Formulario ARRIBA, Info ABAJO */
        gap: 60px;
    }
    
    .contact-info { display: flex; flex-direction: column; }
    .contact-info h3, .contact-info .info-intro { order: -1; margin-bottom: 20px; } 
}

/* --- SELECTOR DE IDIOMA MÓVIL --- */
.mobile-lang-wrapper {
    margin-top: auto; /* Empujar al fondo del menú */
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.mobile-lang-wrapper label {
    color: var(--text-muted); font-size: 0.9rem; margin-bottom: 10px; display: block;
}
.mobile-lang-select {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}
.mobile-lang-select option { background: #0f161d; color: white; }

/* Ocultar selector de escritorio en móvil */
@media (max-width: 992px) {
    .custom-lang-selector { display: none; }
}

/* --- ARREGLO SCROLL HISTORIA --- */
/* Scroll suave nativo para toda la página */
html { scroll-behavior: smooth; }

/* Ajuste del scroll-margin para que el sticky header no tape el título */
.timeline-row { scroll-margin-top: 180px; }

/* Ocultar intro móvil en PC */
.contact-intro-mobile-only { display: none; margin-bottom: 30px; text-align: center; }
.contact-intro-mobile-only h3 { font-size: 2rem; margin-bottom: 15px; color: white; }
.contact-intro-mobile-only p { color: var(--text-muted); }

@media (max-width: 992px) {
    .contact-grid { display: flex; flex-direction: column; gap: 40px; }
    
    /* Mostrar intro móvil y ocultar la de dentro de la columna izquierda */
    .contact-intro-mobile-only { display: block; }
    .desktop-intro { display: none; }
    
    /* El orden natural ahora será: Intro -> Formulario -> Info (mapa) */
}

/* =========================================
   AJUSTES FINALES DE CONTACTO (REORDENAMIENTO)
   ========================================= */

/* 1. LAYOUT ESCRITORIO (Defecto) */
.contact-grid {
    display: grid;
    /* INFO a la Izquierda (1fr) | FORM a la Derecha (1.2fr) */
    grid-template-columns: 1fr 1.2fr; 
    gap: 80px;
}

/* Ocultar el título móvil en escritorio */
.contact-intro-mobile { display: none; }
/* Mostrar el título de la columna izquierda */
.desktop-intro { display: block; }


/* 2. LAYOUT MÓVIL (max-width: 992px) */
@media (max-width: 992px) {
    .contact-grid {
        display: flex;
        flex-direction: column; /* Uno debajo de otro */
        gap: 50px;
    }

    /* Mostrar título móvil arriba del todo */
    .contact-intro-mobile { 
        display: block; 
        text-align: center; 
        margin-bottom: 20px;
    }
    .contact-intro-mobile h3 { color: white; font-size: 2rem; margin-bottom: 15px; }
    .contact-intro-mobile p { color: var(--text-muted); font-size: 1.1rem; }

    /* Ocultar título duplicado dentro de la info */
    .desktop-intro { display: none; }

    /* Orden visual: Formulario ya está antes en el HTML, así que sale primero */
    .contact-form-wrapper { order: 1; }
    .contact-info { order: 2; }
}
/* =========================================
   MEJORA VISUAL SECCIÓN "EL DESAFÍO"
   ========================================= */

/* 1. El contenedor principal */
.comp-content {
    /* Aumentamos el ancho máximo de 600px a 800px para que el texto respire */
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

/* 2. El subtítulo dorado "EL DESAFÍO" */
.comp-content .overline {
    font-size: 1.3rem;      /* Mucho más grande (antes era 0.9rem) */
    letter-spacing: 4px;    /* Más separación entre letras para un look más épico */
    margin-bottom: 20px;    /* Más espacio debajo */
    font-weight: 800;
}

/* 3. El título principal "Shell Eco-Marathon" */
.comp-content h2 {
    font-size: 4.5rem;      /* ¡Gigante! Para que sea muy visual */
    line-height: 1.1;
    margin-bottom: 35px;    /* Mucho espacio antes del párrafo */
    /* Una sombra suave para que el texto "salte" del fondo oscuro */
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

/* 4. El párrafo de texto */
.comp-content p {
    font-size: 1.2rem;      
    line-height: 1.6;       
    margin-bottom: 50px;    
    color: rgba(255,255,255,0.9); 
}

/* 5. Los botones (aseguramos que sigan centrados) */
.social-row {
    display: flex;
    justify-content: center;
    gap: 25px; /* Un poco más de espacio entre los dos botones */
}

/* Ajuste para móviles para que el título gigante no se rompa */
@media (max-width: 768px) {
    .comp-content h2 {
        font-size: 3rem; /* Un tamaño grande pero manejable en móvil */
    }
    .comp-content .overline {
        font-size: 1.1rem;
    }
}
/* --- CORRECCIÓN DEFINITIVA TÍTULO SHELL --- */

/* 1. Evita que Eco-Marathon se parta por el guion en cualquier pantalla */
.texto-indivisible {
    white-space: nowrap;
}

/* 2. Configuración del salto de línea inteligente */
.salto-movil {
    display: none; /* En PC NO hace salto (se ve en una línea) */
}

/* Solo en pantallas pequeñas (Móvil) */
@media (max-width: 768px) {
    .salto-movil {
        display: block; /* En Móvil SÍ hace salto */
        content: "";    /* Asegura que el navegador lo renderice */
    }
    
    /* Opcional: Ajusta un poco el tamaño si en móvil se ve demasiado gigante */
    h2[data-i18n="comp_title"] {
        font-size: 3.5rem; /* Ajusta este valor si Eco-Marathon se sale de la pantalla */
        line-height: 1.1;
    }
}

/* =========================================
   CORRECCIONES VISUALES (TÍTULO Y BOTONES)
   ========================================= */

/* A. ESTILOS DE LOS BOTONES (ICONO ARRIBA) */
.social-pill {
    display: flex;             /* Usamos Flexbox */
    flex-direction: column;    /* Pone los elementos uno encima de otro (Columna) */
    align-items: center;       /* Centra horizontalmente */
    justify-content: center;   /* Centra verticalmente */
    text-align: center;
    
    /* Ajustes de tamaño para que queden bonitos */
    width: 180px;              /* Ancho fijo para que sean iguales */
    height: 100px;             /* Altura fija */
    padding: 15px;
    gap: 10px;                 /* Espacio entre el icono y el texto */
    line-height: 1.2;
}
.social-pill i {
    font-size: 1.2rem;         /* Hacemos el icono más grande */
    margin-bottom: 4px;
}

/* B. REGLAS PARA LA RUPTURA DE TEXTO */
.mobile-break { display: none; } /* En PC no hace salto */
.no-break { white-space: nowrap; } /* Prohibido romper esta palabra */


/* C. AJUSTES ESPECÍFICOS PARA MÓVIL */
@media (max-width: 768px) {
    
    /* 1. Solución al título cortado "Eco-Marathon" */
    .comp-content h2 {
        /* IMPORTANTE: Bajamos el tamaño para que la palabra larga quepa */
        font-size: 2.2rem !important; 
        line-height: 1.1;
    }
}

#record-counter {
    opacity: 0; /* Invisible al principio */
    transition: opacity 0.5s ease; /* Aparece suavemente cuando la imagen carga */
}

/* Fuerza el texto a una sola línea en pantallas grandes */
.texto-una-linea {
    white-space: nowrap;       /* Prohíbe partir la línea */
    max-width: 100% !important; /* Quita el límite de anchura que tenías antes (ej: 600px) */
    width: auto;               /* Deja que ocupe lo que necesite */
}

/* IMPORTANTE: En móviles (pantallas pequeñas) debemos dejar que se parta
   o se saldrá de la pantalla y no se leerá */
@media (max-width: 992px) {
    .texto-una-linea {
        white-space: normal; /* Vuelve al comportamiento normal en móvil */
    }
}

/* --- BANDERAS DE IDIOMA --- */
.lang-flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    margin-right: 8px;
    box-shadow: 0 0 2px rgba(0,0,0,0.5); /* Sombrita para que se vean bien sobre fondo oscuro */
}

/* Ajuste para el botón principal */
.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px; /* Espacio entre bandera, texto y flecha */
}

/* =========================================
   12. COOKIE CONSENT (FLOTANTE Y ELEGANTE)
   ========================================= */
.cookie-consent-modal {
    position: fixed;
    bottom: 30px;
    left: 30px; /* Abajo a la izquierda, no molesta */
    z-index: 9999;
    max-width: 400px; /* Ancho contenido */
    width: calc(100% - 60px);
    font-family: var(--font-body);
    
    /* Animación de entrada suave */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    
    /* Inicialmente oculto por display en HTML, pero la animación lo maneja */
}

/* Efecto de aparición */
.cookie-consent-modal.show {
    opacity: 1;
    transform: translateY(0);
}

.cookie-content-wrapper.glass {
    background: rgba(12, 18, 24, 0.95); /* Muy oscuro */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px; /* Bordes redondeados pero técnicos */
    padding: 25px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7); /* Sombra profunda */
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px); /* Efecto vidrio más fuerte */
    position: relative; /* Para posicionar la X */
}

/* Botón de Cierre (X) */
.cookie-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.cookie-close-btn:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.cookie-header h4 {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 10px;
    padding-right: 30px; /* Espacio para la X */
}

.cookie-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.cookie-link {
    color: var(--primary);
    font-size: 0.85rem;
    text-decoration: underline;
    transition: 0.3s;
}
.cookie-link:hover { color: white; }

.cookie-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-cookie-primary, .btn-cookie-secondary {
    flex: 1;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: 0.3s;
    border: 1px solid;
}

.btn-cookie-primary {
    background: var(--primary);
    color: black;
    border-color: var(--primary);
}
.btn-cookie-primary:hover {
    background: #e6bc00;
    border-color: #e6bc00;
}

.btn-cookie-secondary {
    background: transparent;
    color: var(--text-muted);
    border-color: rgba(255,255,255,0.2);
}
.btn-cookie-secondary:hover {
    color: white;
    border-color: white;
}

/* En móvil ocupa todo el ancho abajo */
@media (max-width: 768px) {
    .cookie-consent-modal {
        left: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
    .cookie-content-wrapper.glass {
        border-radius: 12px 12px 0 0;
        border-bottom: none;
    }
}


/* Aseguramos que la sección hero sea el contenedor relativo */
.hero {
    position: relative;
    width: 100%;
    height: 100vh; /* O la altura que tengas definida */
    overflow: hidden; /* Para recortar lo que sobre del video */
}

/* EL VIDEO (LA MAGIA) */
.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* ESTO ES LA CLAVE: Rellena todo sin deformarse */
    z-index: 0; /* Al fondo del todo */
}

/* AJUSTAR CAPAS (Z-INDEX) */
/* El overlay debe estar encima del video pero debajo del texto */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Oscurecer video un 50% */
    z-index: 1; 
}

/* El contenido (texto) encima de todo */
.hero-container {
    position: relative;
    z-index: 2; 
}

/* El indicador de scroll también encima */
.scroll-indicator {
    z-index: 2;
}


/* =========================================
   3. HEADER (LOGO GRANDE & DINÁMICO)
   ========================================= */
.main-header {
    position: fixed; 
    top: 0; 
    width: 100%; 
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    /* Padding inicial ajustado para dejar espacio al logo grande */
    padding: 15px 0; 
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

/* --- LOGO GRANDE (CAMBIO PRINCIPAL) --- */
.logo a {
    display: flex;
    align-items: center;
}

.logo img { 
    /* Aumentamos de 45px a 90px para que destaque mucho más */
    height: 40px; 
    width: auto; 
    display: block;
    object-fit: contain; /* Asegura que no se deforme */
    transition: height 0.4s ease;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.3)); /* Sombra sutil para que resalte del fondo */
}

/* --- ESTADO SCROLLED (Cuando bajas) --- */
.main-header.scrolled {
    background: rgba(5, 10, 14, 0.95);
    padding: 8px 0; /* Header más compacto al bajar */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 209, 0, 0.1);
}

/* El logo se reduce elegantemente al hacer scroll */
.main-header.scrolled .logo img { 
    height: 40px; 
}

/* --- NAVEGACIÓN --- */
.main-nav ul { display: flex; gap: 40px; align-items: center; }
.nav-link { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); position: relative; }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--primary); transition: 0.3s;
}
.nav-link:hover::after { width: 100%; }

.btn-primary-outline {
    border: 1px solid rgba(255,255,255,0.2); padding: 8px 24px; border-radius: 50px;
    font-size: 0.9rem; font-weight: 600;
}
.btn-primary-outline:hover {
    border-color: var(--primary); background: var(--primary); color: var(--primary-text);
}

/* Botón activo */
.btn-primary-outline.active,
.mobile-nav-menu .btn-primary-outline.active {
    background-color: var(--primary) !important;
    color: #000 !important;
    border-color: var(--primary) !important;
    font-weight: 800 !important;
    box-shadow: 0 0 15px rgba(255, 209, 0, 0.4);
}

.mobile-toggle { display: none; color: white; font-size: 1.5rem; }

/* --- RESPONSIVE LOGO (MÓVIL) --- */
@media (max-width: 992px) {
    .logo img {
        /* En móvil un poco más pequeño para que quepa con la hamburguesa, pero grande */
        height: 85px; 
    }
}
/* =========================================
   3. HEADER (LOGO GRANDE & DINÁMICO)
   ========================================= */
.main-header {
    position: fixed; 
    top: 0; 
    width: 100%; 
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    padding: 15px 0; 
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

/* LOGO */
.logo a { display: flex; align-items: center; }
.logo img { 
    height: 45px; /* Tamaño base escritorio */
    width: auto; 
    display: block;
    object-fit: contain;
    transition: height 0.4s ease;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.3));
}

/* ESTADO SCROLLED (Cuando bajas) */
.main-header.scrolled {
    background: rgba(5, 10, 14, 0.95);
    padding: 8px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 209, 0, 0.1);
}
.main-header.scrolled .logo img { height: 25px; } /* Se hace un poco más pequeño */

/* NAVEGACIÓN ESCRITORIO */
.main-nav ul { display: flex; gap: 40px; align-items: center; }
.nav-link { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); position: relative; }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--primary); transition: 0.3s;
}
.nav-link:hover::after { width: 100%; }

.btn-primary-outline {
    border: 1px solid rgba(255,255,255,0.2); padding: 8px 24px; border-radius: 50px;
    font-size: 0.9rem; font-weight: 600;
}
.btn-primary-outline:hover {
    border-color: var(--primary); background: var(--primary); color: var(--primary-text);
}
.btn-primary-outline.active {
    background-color: var(--primary) !important;
    color: #000 !important;
    border-color: var(--primary) !important;
    font-weight: 800 !important;
    box-shadow: 0 0 15px rgba(255, 209, 0, 0.4);
}

/* HAMBURGUESA (Oculta en escritorio por defecto) */
.mobile-toggle { display: none; color: white; font-size: 1.5rem; cursor: pointer; }


/* =========================================
   10. RESPONSIVE & MOBILE MENU (ARREGLADO)
   ========================================= */

/* A. TABLET Y MÓVIL (Activar Menú Hamburguesa) */
@media (max-width: 992px) {
    .main-nav ul { display: none; } /* Ocultar menú normal */
    .mobile-toggle { display: block; } /* Mostrar icono hamburguesa */
    
    /* Ajuste logo en móvil */
    .logo img { height: 50px; } 
    .main-header { padding: 15px 0; }
    
    .custom-lang-selector { display: none; } /* Ocultar selector idioma escritorio */
}

/* B. ESTILOS DEL MENÚ LATERAL (EL QUE TE GUSTABA) */
.mobile-nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 998;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.mobile-nav-overlay.active { opacity: 1; visibility: visible; }

.mobile-nav-menu {
    position: fixed; top: 0; right: -300px; width: 280px; height: 100%;
    background: #0f161d; z-index: 999;
    padding: 100px 30px 30px; /* Espacio arriba para que no se tape con la X */
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
    transition: 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    display: flex; flex-direction: column; gap: 20px;
    overflow-y: auto;
}
.mobile-nav-menu.active { right: 0; }

/* Enlaces del menú móvil (Grandes y claros) */
.mobile-nav-menu a {
    font-size: 1.2rem; 
    font-weight: 600; 
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 15px; 
    display: block;
}
.mobile-nav-menu a.active, .mobile-nav-menu a:hover { 
    color: var(--primary); 
    border-color: var(--primary); 
}
.mobile-nav-menu .btn-primary-outline { 
    text-align: center; 
    border: 2px solid var(--primary); 
    margin-top: 10px; 
    display: block;
}

/* Selector de idioma móvil */
.mobile-lang-wrapper {
    margin-top: auto; 
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.mobile-lang-select {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}
.mobile-lang-select option { background: #0f161d; color: white; }


/* =========================================
   PARCHE MÓVIL (CORREGIDO PARA NO BLOQUEAR SCROLL)
   ========================================= */

@media (max-width: 768px) {
    
    /* CORRECCIÓN: Aplicamos solo a body y quitamos el !important peligroso del html */
    body {
        max-width: 100vw;
        overflow-x: hidden; /* Oculta lo lateral sin bloquear lo vertical */
    }

    /* Aseguramos que el contenedor de la línea de tiempo no se corte */
    .year-nav-wrapper {
        position: sticky;
        top: 60px; /* Ajustado para que no choque con el header */
        z-index: 900;
    }

    /* Solución Título Portada (Igual que antes) */
    .hero { width: 100%; overflow: hidden; }
    
    .hero h1 {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 3.5rem !important; 
        line-height: 1;
        margin-bottom: 10px;
        width: 100%;
        padding: 0 10px;
    }

    .hero h1 .text-gradient {
        display: block;       
        white-space: nowrap;  
        font-size: 12vw !important; 
        margin-top: 0;
        line-height: 1.1;
        padding-bottom: 5px;
    }
}
