:root {

    --azul: #8E1B2B;       
    --azul-osc: #4F111C;   
    --amarillo: #C27E24;   
    --turquesa: #C96F5E;   
    --fondo: #FBF5EA;      
    --fondo2: #F1E3CE;     
    --texto: #3B2523;      
}
* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font-family: 'Poppins', sans-serif; background: var(--fondo); color: var(--texto); overflow-x: clip; width: 100%; }
h1, h2, h3, .logo, .main-blog-title { font-family: 'Oswald', sans-serif; text-transform: uppercase; }

/* Navbar fija */
.navbar { background: var(--azul); padding: 10px 0; border-bottom: 3px solid var(--amarillo); position: sticky; top: 0; z-index: 1000; }
.nav-container-wide { display: flex; justify-content: space-between; align-items: center; max-width: 95%; margin: 0 auto; padding: 0 20px; }
.logo { font-size: 1.9em; color: #fff; text-decoration: none; display: flex; align-items: baseline; gap: 12px; white-space: nowrap; }
.logo-sub { font-family: 'Barlow Condensed', sans-serif; font-size: 0.45em; color: var(--amarillo); text-transform: none; letter-spacing: 1px; font-style: italic; }
.top-nav { display: flex; align-items: center; }
.top-nav > a { color: #fff; text-decoration: none; margin-left: 40px; font-weight: 500; transition: color .3s; }
.top-nav > a:hover { color: var(--amarillo); }

/* Dropdown */
.nav-secciones-dropdown { position: relative; }
.nav-secciones-btn { background: none; border: none; cursor: pointer; color: #fff; font: 500 1em 'Poppins', sans-serif; margin-left: 40px; padding: 0; display: flex; align-items: center; gap: 5px; transition: color .3s; }
.nav-secciones-btn:hover { color: var(--amarillo); }
.nav-arrow { font-size: .8em; transition: transform .25s; }
.nav-secciones-dropdown.open .nav-arrow { transform: rotate(180deg); }
.nav-secciones-menu { display: none; position: absolute; top: calc(100% + 14px); right: 0; background: var(--azul-osc); border: 1px solid rgba(194,126,36,.3); border-radius: 10px; min-width: 240px; box-shadow: 0 8px 28px rgba(0,0,0,.5); overflow: hidden; animation: dropFade .2s ease both; }
.nav-secciones-dropdown.open .nav-secciones-menu { display: block; }
@keyframes dropFade { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.nav-drop-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; color: #fff; font-size: .9em; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,.08); transition: background .2s; }
.nav-drop-link:last-child { border-bottom: none; }
.nav-drop-link:hover { background: rgba(201,111,94,.25); color: var(--amarillo); }
.ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-drop-icono .ic { width: 18px; height: 18px; }
.nav-drop-icono { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Hero */
.hero-welcome { position: relative; width: 100%; height: 560px; overflow: hidden; display: flex; align-items: center; background: var(--azul-osc); }
.hero-bg-video { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 100%; min-height: 100%; object-fit: cover; z-index: 0; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(79,17,28,.85), rgba(79,17,28,.35)); z-index: 1; }
.hero-welcome-content { position: relative; z-index: 2; max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 60px; }
.hero-label { font-family: 'Barlow Condensed', sans-serif; color: var(--amarillo); letter-spacing: 3px; font-size: 1.2em; text-transform: uppercase; display: block; margin-bottom: 8px; animation: fadeInUp .8s .1s both; }
.hero-title { font-size: 5.5em; color: #fff; margin: 0; line-height: 1; animation: fadeInUp .8s .25s both; }
.hero-subtitle { font-family: 'Barlow Condensed', sans-serif; font-style: italic; font-size: 2em; color: var(--amarillo); margin: 0 0 18px; animation: fadeInUp .8s .35s both; }
.hero-desc { font-size: 1.1em; line-height: 1.8; color: rgba(255,255,255,.9); max-width: 580px; animation: fadeInUp .8s .45s both; }
.hero-divider { width: 80px; height: 5px; background: var(--amarillo); border-radius: 10px; margin-top: 28px; animation: expandWidth .8s .6s both; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes expandWidth { from { width: 0; opacity: 0; } to { width: 80px; opacity: 1; } }

/* Enlace largo del menú (versión corta en pantallas chicas) */
.nav-short { display: none; }
@media (max-width: 1100px) { .nav-full { display: none; } .nav-short { display: inline; } }

/* Barra de secciones bajo el hero */
.section-menu { display: flex; justify-content: center; flex-wrap: wrap; width: 100%; background: var(--fondo2); border-bottom: 3px solid var(--turquesa); }
.menu-link { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 14px; text-decoration: none; color: var(--texto); font-weight: 500; font-size: .98em; padding: 26px 24px; border-right: 1px solid rgba(142,27,43,.15); position: relative; transition: background .3s, color .3s; }
.menu-link:last-child { border-right: none; }
.menu-link-icon { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--azul); background: #fff; color: var(--azul); flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: background .3s, border-color .3s, color .3s; }
.menu-link-icon .ic { width: 24px; height: 24px; }
.menu-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 4px; background: var(--amarillo); transition: width .35s cubic-bezier(.22,1,.36,1); }
.menu-link:hover { color: var(--azul); background: rgba(201,111,94,.15); }
.menu-link:hover .menu-link-icon { background: var(--amarillo); border-color: var(--amarillo); color: #fff; }
.menu-link:hover::after { width: 100%; }

/* Layout con barra lateral */
.layout-principal { display: flex; align-items: stretch; gap: 0; width: 100%; margin: 0; padding: 0; }
.sidebar-ng { width: 290px; flex-shrink: 0; background: #fff; border-left: 3px solid var(--turquesa); padding: 24px 20px; }
.sidebar-inner { position: sticky; top: 88px; }  /* js/script.js ajusta "top" si la barra es más alta que la pantalla */
.contenido-principal { flex: 1; min-width: 0; }
.sidebar-titulo { font-family: 'Oswald', sans-serif; text-transform: uppercase; color: var(--azul); font-size: 1.1em; letter-spacing: 1px; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 3px solid var(--amarillo); }
.side-links { display: flex; flex-direction: column; margin-bottom: 20px; }
.side-links a { text-decoration: none; color: var(--texto); font-weight: 500; padding: 6px 14px; font-size: .92em; border-left: 4px solid var(--fondo2); transition: all .25s; }
.side-links a:hover { border-left-color: var(--amarillo); background: var(--fondo2); color: var(--azul); padding-left: 20px; }
.ng-card { display: block; text-decoration: none; color: var(--texto); background: #fff; border-radius: 16px; overflow: hidden; margin-bottom: 12px; border: 2px solid var(--fondo2); transition: transform .3s, border-color .3s; }
.ng-card:hover { transform: translateY(-4px); border-color: var(--turquesa); }
.ng-card-img { height: 84px; overflow: hidden; }
.ng-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.ng-card:hover .ng-card-img img { transform: scale(1.07); }
.ng-a { background: linear-gradient(135deg, var(--azul), var(--turquesa)); }
.ng-b { background: linear-gradient(135deg, var(--amarillo), var(--turquesa)); }
.ng-card-info { padding: 10px 14px; }
.ng-card-tag { font-family: 'Oswald', sans-serif; text-transform: uppercase; color: var(--azul); font-size: 1em; }
.ng-card-info p { margin: 4px 0 0; font-size: .82em; line-height: 1.4; }

/* Introducción */
.intro-strip { background: var(--azul); color: #fff; border-radius: 0; padding: 55px 50px; border-left: 12px solid var(--amarillo); margin: 0; }
.intro-strip h2 { font-size: 2.6em; margin: 0 0 18px; color: var(--amarillo); }
.intro-strip p { font-size: 1.3em; line-height: 1.85; margin: 0; }

/* Secciones */
.historia-seccion { padding: 55px 50px; }
.alt-bg { background: var(--fondo2); margin: 0; padding: 55px 50px; border-radius: 0; }
.seccion-titulo { font-size: 2.6em; color: var(--azul); margin: 0 0 35px; border-left: 8px solid var(--amarillo); padding-left: 18px; }
.blog-entry { display: flex; align-items: center; gap: 40px; }
.info-side, .media-side { flex: 1; }
.info-side p { font-size: 1.25em; line-height: 1.85; margin: 0; }
.video-container { border-radius: 30px; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,.12); background: #fff; border: 2px solid var(--turquesa); padding: 12px; display: flex; align-items: center; justify-content: center; }
.blog-video { width: 100%; max-width: 360px; height: 340px; object-fit: contain; display: block; margin: 0 auto; }

/* Actividades (sin tarjetas) */
.actividad { display: flex; gap: 30px; align-items: flex-start; padding: 30px 0; border-bottom: 2px dashed var(--turquesa); }
.actividad:last-child { border-bottom: none; }
.actividad-num { font-family: 'Oswald', sans-serif; font-size: 5.5em; line-height: .85; color: var(--amarillo); flex-shrink: 0; width: 70px; }
.actividad-texto h3 { font-size: 1.9em; color: var(--azul); margin: 0 0 12px; }
.actividad-texto p { font-size: 1.2em; line-height: 1.8; margin: 0 0 18px; }
.card-btn { display: inline-block; background: var(--azul); color: #fff; text-decoration: none; padding: 11px 26px; border-radius: 30px; font-weight: 600; transition: background .3s, color .3s; }
.card-btn:hover { background: var(--amarillo); color: var(--azul-osc); }

/* Línea de tiempo */
.linea-tiempo { list-style: none; margin: 0; padding: 0 0 0 34px; border-left: 4px solid var(--turquesa); }
.linea-tiempo li { position: relative; padding: 0 0 34px 28px; }
.linea-tiempo li:last-child { padding-bottom: 0; }
.linea-tiempo li::before { content: ''; position: absolute; left: -45px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--fondo); border: 4px solid var(--azul); }
.linea-tiempo li.destacado::before { background: var(--amarillo); border-color: var(--amarillo); box-shadow: 0 0 0 6px rgba(194,126,36,.25); }
.mes { font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 1.7em; color: var(--azul); display: block; }
.linea-tiempo li.destacado .mes { color: var(--amarillo); }
.linea-tiempo p { font-size: 1.15em; line-height: 1.7; margin: 4px 0 0; }

/* Participantes */
.participantes p { font-size: 1.2em; line-height: 1.7; margin: 0; padding: 16px 0 16px 20px; border-left: 5px solid var(--turquesa); }
.participantes p + p { margin-top: 12px; }
.participantes strong { color: var(--azul); }
.location { margin: 35px 0 0; font-family: 'Barlow Condensed', sans-serif; font-size: 1.25em; color: var(--azul); }

.scroll-reveal { opacity: 0; transform: translateY(40px); transition: all 1s ease-out; }
.scroll-reveal.active { opacity: 1; transform: none; }

.footer { background: var(--azul-osc); color: #fff; text-align: center; padding: 40px 20px; border-top: 3px solid var(--amarillo); }

:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .scroll-reveal { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 1024px) {
    .section-menu { flex-direction: column; align-items: stretch; }
    .menu-link { flex: none; justify-content: flex-start; padding: 16px 24px; border-right: none; border-bottom: 1px solid rgba(142,27,43,.15); }
    .menu-link:last-child { border-bottom: none; }
    .layout-principal { flex-direction: column; }
    .sidebar-ng { width: 100%; border-left: none; border-top: 3px solid var(--turquesa); padding: 25px 20px; }
    .sidebar-inner { position: static; top: auto !important; }
    .historia-seccion { padding: 45px 20px; }
    .side-links { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .side-links a { border: 2px solid var(--fondo2); border-radius: 30px; padding: 8px 16px; }
    .side-links a:hover { padding-left: 16px; }
    .ng-card { display: inline-block; width: calc(50% - 10px); vertical-align: top; }
    .alt-bg { padding: 45px 20px; }
}
@media (max-width: 768px) {
    .logo { font-size: 1.3em; } .logo-sub { display: none; }
    .top-nav > a { margin-left: 14px; font-size: .85em; }
    .nav-secciones-btn { margin-left: 14px; font-size: .85em; }
    .hero-welcome { height: 440px; }
    .hero-welcome-content { padding: 0 25px; }
    .hero-title { font-size: 3.2em; } .hero-subtitle { font-size: 1.5em; } .hero-desc { font-size: 1em; }
    .intro-strip { padding: 30px 24px; border-left-width: 8px; }
    .intro-strip h2 { font-size: 1.8em; } .intro-strip p { font-size: 1.05em; }
    .seccion-titulo { font-size: 1.9em; }
    .blog-entry { flex-direction: column; }
    .info-side p { font-size: 1.05em; }
    .blog-video { max-width: 240px; height: 240px; }
    .actividad { flex-direction: column; gap: 10px; }
    .actividad-num { font-size: 3.5em; width: auto; }
    .actividad-texto h3 { font-size: 1.5em; } .actividad-texto p { font-size: 1.05em; }
    .ng-card { width: 100%; }
}
@media (max-width: 480px) {
    .nav-container-wide { padding: 0 8px; }
    .logo { font-size: 1em; }
    .top-nav > a { font-size: .68em; margin-left: 7px; }
    .nav-secciones-btn { font-size: .68em; margin-left: 7px; }
    .nav-secciones-menu { min-width: 200px; }
}

/* Circulitos de la barra superior en tono cremita en todas las páginas */
.navbar button,
.navbar .btn-buscar,
.navbar .btn-accesibilidad,
.navbar .btn-ayuda,
.navbar [aria-label*="buscar" i],
.navbar [aria-label*="accesibilidad" i],
.navbar [aria-label*="ayuda" i] {
    color: #fae9d2 !important;
    flex-shrink: 0;
}

.navbar button svg,
.navbar a svg,
.navbar button i,
.navbar a i,
.navbar button span,
.navbar a span {
    color: #fae9d2  !important;
    stroke: currentColor;
    fill: currentColor;
}

@media (max-width: 600px) {
    .navbar .nav-secciones-dropdown {
        position: relative;
    }

    .navbar .nav-secciones-menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        z-index: 2000;
        max-width: min(260px, calc(100vw - 24px));
    }
}