/* =========================================================
   FUERZA CIUDADANA · Página de inicio
   Índice (mismo orden que en el archivo)
    0. Tokens              7. Propuestas          14. Footer
    1. Base                8. Biografía           15. Extras (volver arriba, visor)
    2. Utilidades          9. Estadísticas        16. Movimiento y accesibilidad
    3. Botones            10. Galería             17. Responsive
    4. Header / Nav       11. Cronología          18. Impresión
    5. Portada            12. Redes
    6. Layout dividido    13. Contacto
   ========================================================= */

/* ---------- 0. TOKENS ---------- */
:root {
    --azul: #002E86;
    --azul-medio: #0C43AD;
    --azul-noche: #001A4D;
    --amarillo: #FFD500;
    --papel: #F3F5FA;
    --blanco: #FFFFFF;
    --tinta: #16213E;
    --gris: #4F5D7A;
    --linea: #DCE2EF;
    --linea-fuerte: #C9D3EA;
    --error: #C62828;

    --font-titles: 'Bricolage Grotesque', 'Poppins', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --radius: 14px;
    --radius-lg: 24px;
    --shadow: 0 1px 2px rgba(0, 26, 77, .06), 0 14px 34px -14px rgba(0, 26, 77, .22);
    --ease: cubic-bezier(.16, 1, .3, 1);

    --header-h: 116px;
    --gutter: clamp(1.25rem, 5vw, 3rem);
    --max: 1240px;
    --section-y: clamp(4rem, 8vw, 7rem);

    /* Color del anillo de foco: cambia según el fondo */
    --foco: var(--azul-medio);
}

/* ---------- 1. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--tinta);
    background: var(--blanco);
    overflow-x: hidden;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
a { color: inherit; }

/* Iconos SVG propios (reemplazan a Font Awesome): heredan tamaño y color del texto */
.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    flex: none;
    vertical-align: -0.125em;
    fill: none;
    stroke: currentColor;
}

h1, h2, h3, h4 {
    font-family: var(--font-titles);
    font-weight: 800;
    line-height: 1.1;
    text-wrap: balance;
}

p { text-wrap: pretty; }

:focus-visible {
    outline: 3px solid var(--foco);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Fondos oscuros: el foco pasa a amarillo */
.hero-section, .stats-section, .contacto-info, .main-footer { --foco: var(--amarillo); }

/* ---------- 2. UTILIDADES ---------- */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: -100px; left: 1rem;
    z-index: 2000;
    background: var(--amarillo);
    color: var(--azul);
    font-weight: 700;
    padding: .7rem 1.1rem;
    border-radius: 0 0 var(--radius) var(--radius);
    text-decoration: none;
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

/* Título de sección: barra amarilla como firma de marca */
.section-title {
    font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.9rem);
    color: var(--azul);
    padding-left: 1rem;
    border-left: 6px solid var(--amarillo);
}

.section-head {
    max-width: var(--max);
    margin: 0 auto 3rem;
}

/* ---------- 3. BOTONES ---------- */
.btn-primary,
.btn-secondary,
.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: .8rem 1.7rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s;
}

.btn-primary {
    background: var(--amarillo);
    color: var(--azul);
    border: 0;
    box-shadow: 0 6px 18px -6px rgba(255, 213, 0, .7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -8px rgba(255, 213, 0, .8); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: transparent;
    color: var(--blanco);
    border: 2px solid rgba(255, 255, 255, .85);
}
.btn-secondary:hover { background: var(--blanco); color: var(--azul); }

/* ---------- 4. HEADER / NAV ---------- */
.navbar {
    --nav-bg: var(--azul);
    --nav-fg: #fff;
    --nav-soft: rgba(255, 255, 255, .82);
    --nav-line: rgba(255, 255, 255, .16);
    --nav-accent: var(--amarillo);
    --nav-chip: rgba(255, 255, 255, .12);
    --nav-hover-bg: var(--amarillo);
    --nav-hover-fg: var(--azul);
    --nav-menu-bg: var(--azul-noche);
    --foco: var(--amarillo);

    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    color: var(--nav-fg);
    box-shadow: 0 1px 0 var(--nav-line);
    transition: background-color .3s, box-shadow .3s;
}

/* Al bajar, el JS agrega .scrolled */
.navbar.scrolled {
    --nav-bg: rgba(255, 255, 255, .97);
    --nav-fg: var(--azul);
    --nav-soft: #3A4767;
    --nav-line: rgba(0, 46, 134, .12);
    --nav-accent: var(--azul);
    --nav-chip: rgba(0, 46, 134, .08);
    --nav-hover-bg: var(--azul);
    --nav-hover-fg: var(--amarillo);
    --nav-menu-bg: #fff;
    --foco: var(--azul-medio);
    box-shadow: 0 10px 28px -14px rgba(0, 26, 77, .3);
}

@supports (backdrop-filter: blur(8px)) {
    .navbar.scrolled {
        --nav-bg: rgba(255, 255, 255, .94);
        backdrop-filter: saturate(1.4) blur(12px);
    }
}

.navbar-container {
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin: 0 auto;
    padding: .45rem var(--gutter);
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

/* Fila superior */
.nav-top-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 50px;
}

.logo-titulo {
    display: flex;
    align-items: center;
    gap: .7rem;
    text-decoration: none;
    color: var(--nav-fg);
}

.logo-campana-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    flex: none;
}

.brand-name,
.logo-titulo h1,
.logo-titulo h3 {
    font-family: var(--font-titles);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -.01em;
    line-height: 1;
    white-space: nowrap;
    color: var(--nav-fg);
    transition: color .3s;
}

.nav-top-row .modulos-principales {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.nav-top-row .modulo-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .85rem;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--nav-soft);
    text-decoration: none;
    transition: background-color .25s, color .25s;
}
.nav-top-row .modulo-item .icon { font-size: .85rem; }
.nav-top-row .modulo-item[aria-current="page"] { color: var(--nav-fg); background: var(--nav-chip); }
.nav-top-row .modulo-item:hover { background: var(--nav-hover-bg); color: var(--nav-hover-fg); }

/* Botón hamburguesa (solo móvil) */
.menu-toggle {
    display: none;
    width: 44px; height: 44px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--nav-line);
    border-radius: 10px;
    color: var(--nav-fg);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color .25s, color .25s;
}
.menu-toggle:hover { background: var(--nav-chip); }

/* Fila inferior */
.nav-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .3rem;
    border-top: 1px solid var(--nav-line);
    transition: border-color .3s;
}

.nav-list { display: flex; gap: 1.6rem; }

.nav-link {
    position: relative;
    display: inline-block;
    padding: .5rem 0;
    font-size: .95rem;
    font-weight: 500;
    color: var(--nav-soft);
    text-decoration: none;
    transition: color .25s;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 1px;
    height: 3px;
    border-radius: 2px;
    background: var(--nav-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease);
}
.nav-link:hover,
.nav-link.active { color: var(--nav-fg); }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; }

.btn-unete {
    display: inline-block;
    padding: .55rem 1.25rem;
    border-radius: 999px;
    background: var(--amarillo);
    color: var(--azul);
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .3);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s;
}
.btn-unete:hover { transform: translateY(-2px); filter: brightness(.96); box-shadow: 0 8px 16px -6px rgba(0, 0, 0, .35); }
.btn-unete:active { transform: translateY(0); }

/* Barra de progreso de lectura */
.scroll-progress {
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 3px;
    background: var(--amarillo);
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}
.navbar.scrolled .scroll-progress { background: var(--azul); }

/* ---------- 5. PORTADA ---------- */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: min(100svh, 860px);
    padding: calc(var(--header-h) + clamp(2rem, 6vw, 4.5rem)) var(--gutter) clamp(3rem, 7vw, 6rem);
    color: var(--blanco);
    overflow: hidden;
    background: radial-gradient(120% 90% at 85% 8%, var(--azul-medio) 0%, var(--azul) 52%, var(--azul-noche) 100%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    margin-bottom: 1.4rem;
    padding: .4rem 1rem;
    border-radius: 999px;
    background: rgba(255, 213, 0, .14);
    color: var(--amarillo);
    font-size: .9rem;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(2.4rem, .9rem + 5.4vw, 4.4rem);
    line-height: 1.03;
    letter-spacing: -.025em;
    color: var(--blanco);
    margin-bottom: 1.4rem;
}
.hero-title .linea { display: block; }

/* El nombre del distrito: la pieza memorable de la portada */
.hero-title .lugar {
    display: inline-block;
    margin-top: .14em;
    padding: .02em .2em .08em;
    background: var(--amarillo);
    color: var(--azul);
    border-radius: .14em;
    transform: rotate(-1.5deg);
    transform-origin: left center;
}

.hero-subtitle {
    max-width: 34ch;
    margin-bottom: 2.2rem;
    font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem);
    color: rgba(255, 255, 255, .9);
}

.hero-buttons { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-image-container {
    position: relative;
    justify-self: end;
    width: min(100%, 460px);
    aspect-ratio: 4 / 5;
}

.hero-graphic-bg {
    position: absolute;
    inset: 6% -5% -5% 8%;
    background: var(--amarillo);
    border-radius: var(--radius-lg);
    transform: rotate(3deg);
}

.hero-img {
    position: relative;
    z-index: 2;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px -24px rgba(0, 10, 40, .65);
}

.candidata-floating-card {
    position: absolute;
    z-index: 3;
    left: -1.5rem;
    bottom: 1.5rem;
    padding: .9rem 1.4rem;
    background: var(--blanco);
    color: var(--azul);
    border-radius: var(--radius);
    border-left: 6px solid var(--amarillo);
    box-shadow: var(--shadow);
}
.candidata-floating-card h2 { font-size: 1.2rem; }
.candidata-floating-card p {
    font-size: .85rem;
    font-weight: 600;
    color: var(--gris);
}

/* ---------- 6. LAYOUT DIVIDIDO (título | contenido) ---------- */
.split {
    display: grid;
    gap: 2.5rem clamp(2rem, 5vw, 4.5rem);
    max-width: var(--max);
    margin: 0 auto;
}
.split-intro p {
    margin-top: 1.1rem;
    max-width: 32ch;
    color: var(--gris);
}
.split-body { container-type: inline-size; min-width: 0; }

@media (min-width: 993px) {
    .split {
        grid-template-columns: minmax(230px, .7fr) 2.3fr;
        align-items: start;
    }
    .split-intro {
        position: sticky;
        top: calc(var(--header-h) + 2rem);
    }
}

/* ---------- 7. PROPUESTAS ---------- */
.propuestas-section { padding: var(--section-y) var(--gutter); }

.propuestas-grid {
    display: grid;
    grid-template-columns: 1fr;
    border-bottom: 1px solid var(--linea);
}
@container (min-width: 560px) {
    .propuestas-grid { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
}

.card-propuesta {
    display: flex;
    gap: 1.1rem;
    padding: 1.7rem 0;
    border-top: 1px solid var(--linea);
}

.icon-wrap {
    flex: none;
    display: grid;
    place-items: center;
    width: 52px; height: 52px;
    border-radius: var(--radius);
    background: var(--azul);
    color: var(--amarillo);
    font-size: 1.25rem;
}

.card-content h3 {
    margin-bottom: .4rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--azul);
}
.card-content p { font-size: .97rem; color: var(--gris); }

/* ---------- 8. BIOGRAFÍA ---------- */
.biografia-section {
    padding: var(--section-y) var(--gutter);
    background: var(--papel);
}

.biografia-container {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
    max-width: var(--max);
    margin: 0 auto;
}

.bio-image-side {
    position: relative;
    width: 100%;
    max-width: 480px;
    justify-self: center;
}

.bio-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.experience-badge {
    position: absolute;
    top: -1.25rem;
    right: -1.25rem;
    padding: 1.1rem 1.3rem;
    background: var(--azul);
    color: var(--blanco);
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 14px 30px -10px rgba(0, 46, 134, .5);
}
.badge-num {
    display: block;
    font-family: var(--font-titles);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--amarillo);
}
.badge-text { font-size: .8rem; font-weight: 600; line-height: 1.3; }

.bio-lead {
    max-width: 46ch;
    margin: 1.5rem 0 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--azul);
}

/* Historia → Trayectoria → Visión: sí es una secuencia, por eso va como línea de tiempo */
.timeline-summary {
    margin: 2rem 0 2.2rem;
    padding-left: 1.6rem;
    border-left: 2px solid var(--linea-fuerte);
}
.timeline-item-short { position: relative; margin-bottom: 1.4rem; }
.timeline-item-short:last-child { margin-bottom: 0; }
.timeline-item-short::before {
    content: "";
    position: absolute;
    top: .35rem;
    left: calc(-1.6rem - 7px);
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--amarillo);
    border: 3px solid var(--azul);
}
.timeline-item-short h3 { font-size: 1.1rem; color: var(--azul); }
.timeline-item-short p { max-width: 52ch; font-size: .97rem; color: var(--gris); }

/* ---------- 9. ESTADÍSTICAS ---------- */
.stats-section {
    padding: clamp(3rem, 6vw, 4.5rem) var(--gutter);
    background: var(--azul);
    color: var(--blanco);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: var(--max);
    margin: 0 auto;
    text-align: center;
}

.stat-box { padding: .5rem 1.5rem; }
.stat-box + .stat-box { border-left: 1px solid rgba(255, 255, 255, .2); }

.stat-number {
    font-family: var(--font-titles);
    font-size: clamp(3rem, 2rem + 3.5vw, 4.6rem);
    font-weight: 800;
    line-height: 1;
    color: var(--amarillo);
    font-variant-numeric: tabular-nums;
}
.stat-label { margin-top: .5rem; font-size: 1rem; font-weight: 600; }

/* ---------- 10. GALERÍA ---------- */
.gallery-section {
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin: 0 auto;
    padding: var(--section-y) var(--gutter);
}

.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 260px;
    grid-auto-flow: dense;
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--linea);
    box-shadow: var(--shadow);
}
.gallery-item.size-v { grid-row: span 2; }
.gallery-item.size-h { grid-column: span 2; }

.gallery-trigger { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.gallery-trigger:focus-visible { outline-offset: -4px; }

.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease);
}
.gallery-item:hover img { transform: scale(1.06); }

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 1.2rem;
    background: linear-gradient(to top, rgba(0, 26, 77, .88) 0%, transparent 60%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s var(--ease);
}
.gallery-overlay span { font-weight: 700; font-size: 1.05rem; color: var(--blanco); }

.gallery-item:hover .gallery-overlay,
.gallery-trigger:focus-visible + .gallery-overlay { opacity: 1; }

/* En pantallas táctiles no existe el hover: el título se muestra siempre */
@media (hover: none) {
    .gallery-overlay { opacity: 1; }
}

/* ---------- 11. CRONOLOGÍA ---------- */
.timeline-section {
    padding: var(--section-y) var(--gutter);
    background: var(--papel);
}

.interactive-timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: 2rem;
}
.interactive-timeline::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 18px;
    height: 4px;
    border-radius: 2px;
    background: var(--linea-fuerte);
}

.timeline-node {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 0;
    background: none;
    border: 0;
    font: inherit;
    color: inherit;
    text-align: center;
    cursor: pointer;
}

.node-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: .5rem 1rem;
    border: 3px solid var(--linea-fuerte);
    border-radius: 999px;
    background: var(--blanco);
    font-size: .85rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gris);
    transition: background-color .3s, border-color .3s, color .3s;
}
.node-title { font-weight: 700; color: var(--gris); transition: color .3s; }

.timeline-node:hover .node-date { border-color: var(--azul); }
.timeline-node.active .node-date {
    background: var(--amarillo);
    border-color: var(--azul);
    color: var(--azul);
}
.timeline-node.active .node-title { color: var(--azul); }

.timeline-detail-box {
    padding: 1.75rem 2rem;
    background: var(--blanco);
    border-left: 6px solid var(--azul);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: fadeIn .5s var(--ease);
}
.timeline-detail-box h3 { margin-bottom: .6rem; font-size: 1.35rem; color: var(--azul); }
.timeline-detail-box p { max-width: 60ch; color: var(--gris); }

/* ---------- 12. REDES ---------- */
.social-section {
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter) var(--section-y);
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: var(--max);
    margin: 0 auto;
}

.social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 1.8rem 1rem;
    background: var(--blanco);
    border: 1px solid var(--linea);
    border-radius: var(--radius);
    color: var(--tinta);
    font-weight: 700;
    text-decoration: none;
    transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease);
}
.social-icon { font-size: 1.9rem; color: var(--azul); transition: color .3s, transform .3s var(--ease); }

.social-card:hover,
.social-card:focus-visible { color: var(--blanco); transform: translateY(-3px); }
.social-card:hover .social-icon,
.social-card:focus-visible .social-icon { color: var(--blanco); transform: scale(1.12); }

.social-card.facebook:hover,  .social-card.facebook:focus-visible  { background: #1662D1; border-color: #1662D1; }
.social-card.instagram:hover, .social-card.instagram:focus-visible { background: #D62976; border-color: #D62976; }
.social-card.tiktok:hover,    .social-card.tiktok:focus-visible    { background: #000000; border-color: #000000; }
.social-card.youtube:hover,   .social-card.youtube:focus-visible   { background: #CD201F; border-color: #CD201F; }

/* ---------- 13. CONTACTO ---------- */
.contacto-section {
    padding: var(--section-y) var(--gutter);
    background: var(--papel);
}

.contacto-container {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--blanco);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contacto-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 3.5rem);
    background: var(--azul);
    color: var(--blanco);
}
.contacto-info h2 { margin-bottom: 1rem; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); }
.contacto-info p { max-width: 40ch; color: rgba(255, 255, 255, .9); }

.info-item {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-top: 1.2rem;
    font-weight: 500;
    color: var(--blanco);
    text-decoration: none;
    overflow-wrap: anywhere;
}
.info-item .icon { flex: none; width: 1.2em; text-align: center; color: var(--amarillo); }
.info-item:hover { text-decoration: underline; text-underline-offset: 4px; }

.contacto-form-wrapper { padding: clamp(2rem, 5vw, 3.5rem); }

.form-group { position: relative; margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: .4rem; font-size: .92rem; font-weight: 600; }
.opcional { font-weight: 400; color: var(--gris); }

.form-group input,
.form-group textarea {
    width: 100%;
    min-height: 48px;
    padding: .75rem 1rem;
    background: var(--blanco);
    color: var(--tinta);
    border: 1.5px solid #B9C3DA;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color .25s, box-shadow .25s;
}
.form-group textarea { resize: vertical; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: #64708B; }

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--azul-medio);
    box-shadow: 0 0 0 4px rgba(12, 67, 173, .18);
}

/* El JS agrega .invalid al grupo */
.form-group.invalid input,
.form-group.invalid textarea { border-color: var(--error); }
.error-msg {
    display: none;
    margin-top: .4rem;
    font-size: .85rem;
    font-weight: 500;
    color: var(--error);
}
.form-group.invalid .error-msg { display: block; }

.btn-submit {
    width: 100%;
    background: var(--azul);
    color: var(--blanco);
    border: 0;
    border-radius: 12px;
}
.btn-submit:hover { background: var(--azul-medio); transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }

.success-alert {
    display: none;
    align-items: center;
    gap: .7rem;
    margin-top: 1.25rem;
    padding: 1rem;
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
    border-radius: 10px;
    font-weight: 600;
}

/* ---------- 14. FOOTER ---------- */
.main-footer {
    padding: clamp(3.5rem, 7vw, 5rem) var(--gutter) 2rem;
    background: var(--azul-noche);
    color: #B4BFDA;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2.5rem;
    max-width: var(--max);
    margin: 0 auto 3rem;
}

.footer-brand { flex: 1.5 1 250px; }
.footer-brand .brand-name { color: var(--blanco); }
.footer-brand .logo-titulo { color: var(--blanco); }
.footer-slogan { margin-top: 1rem; max-width: 34ch; }

.footer-links, .footer-legal { flex: 1 1 200px; }
.footer-links h2, .footer-legal h2 {
    margin-bottom: 1.1rem;
    font-size: 1.05rem;
    color: var(--blanco);
}
.footer-links li { margin-bottom: .6rem; }
.footer-links a {
    color: #B4BFDA;
    text-decoration: none;
    transition: color .25s;
}
.footer-links a:hover { color: var(--amarillo); text-decoration: underline; text-underline-offset: 4px; }
.footer-legal p { max-width: 38ch; }

.footer-bottom {
    max-width: var(--max);
    margin: 0 auto;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, .14);
    text-align: center;
    font-size: .9rem;
}

/* ---------- 15. EXTRAS ---------- */
.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 999;
    display: grid;
    place-items: center;
    width: 46px; height: 46px;
    background: var(--azul);
    color: var(--amarillo);
    border: 2px solid var(--amarillo);
    border-radius: 50%;
    box-shadow: 0 8px 20px -6px rgba(0, 26, 77, .5);
    cursor: pointer;
    /* Oculto de verdad (también para teclado y lectores de pantalla) hasta que el JS agregue .show */
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity .3s, transform .3s var(--ease), visibility 0s .3s;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s, transform .3s var(--ease), visibility 0s;
}
.back-to-top:hover { background: var(--azul-medio); }

/* Visor de fotos (lo crea mejoras.js) */
.lightbox {
    position: fixed;
    inset: 0;
    margin: auto;
    padding: 0;
    width: min(94vw, 1100px);
    max-height: 92vh;
    background: transparent;
    border: 0;
    overflow: visible;
    color: var(--blanco);
}
.lightbox::backdrop { background: rgba(0, 12, 40, .88); }
.lightbox img {
    max-height: 80vh;
    width: auto;
    margin: 0 auto;
    border-radius: var(--radius);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
}
.lightbox figcaption { margin-top: .9rem; text-align: center; font-weight: 600; }
.lightbox-close {
    position: absolute;
    top: -.6rem; right: -.2rem;
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    background: var(--amarillo);
    color: var(--azul);
    border: 0;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    --foco: var(--blanco);
}

/* ---------- 16. MOVIMIENTO ---------- */
@keyframes fadeIn {
    from { transform: translateY(14px); }
    to   { transform: translateY(0); }
}

/* Una sola entrada orquestada en la portada */
.fade-in { animation: fadeIn .9s var(--ease) both; }
.hero-image-container.fade-in { animation-delay: .15s; }

/* Las secciones solo se ocultan si hay JS; sin JS, el contenido siempre se ve */
.js .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s var(--ease);
}
.js .scroll-reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .js .scroll-reveal { opacity: 1; transform: none; }
    .hero-title .lugar { transform: none; }
}

/* ---------- 17. RESPONSIVE ---------- */
@media (max-width: 992px) {
    :root { --header-h: 116px; }

    .menu-toggle { display: inline-flex; }

    /* El menú de páginas se abre con la hamburguesa (.mobile-active lo pone inicio.js) */
    .nav-top-row .modulos-principales {
        display: none;
        position: absolute;
        top: calc(100% + .5rem);
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: .2rem;
        padding: .6rem;
        background: var(--nav-menu-bg);
        border-radius: var(--radius);
        box-shadow: 0 20px 40px -16px rgba(0, 26, 77, .5);
        z-index: 999;
    }
    .nav-top-row .modulos-principales.mobile-active { display: flex; }

    .nav-top-row .modulo-item {
        padding: .85rem 1rem;
        font-size: 1rem;
        color: var(--nav-fg);
    }
    .nav-top-row .modulo-item .icon { width: 1.2em; text-align: center; font-size: 1rem; }

    /* Menú de secciones como carrusel horizontal */
    .nav-bottom-row { gap: .5rem; }
    .container-nav { flex: 1 1 auto; min-width: 0; }
    .nav-list {
        flex-wrap: nowrap;
        gap: 1.2rem;
        padding: 0 14px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
                mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
    }
    .nav-list::-webkit-scrollbar { display: none; }
    .nav-list li { flex: none; scroll-snap-align: start; }
    .nav-link { white-space: nowrap; }
    .nav-actions { flex: none; }
    .btn-unete { padding: .5rem 1rem; font-size: .85rem; white-space: nowrap; }

    .hero-section { min-height: auto; }
    .hero-container { grid-template-columns: 1fr; }
    .hero-image-container { justify-self: center; width: min(100%, 400px); margin-top: 1rem; }
    .candidata-floating-card { left: .5rem; }

    .biografia-container { grid-template-columns: 1fr; }
    .experience-badge { top: .75rem; right: .75rem; padding: .9rem 1.1rem; }

    .social-grid { grid-template-columns: repeat(2, 1fr); }
    .contacto-container { grid-template-columns: 1fr; }

    .gallery-masonry { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
    .gallery-item.size-h { grid-column: span 2; }
}

@media (max-width: 768px) {
    .stats-container { grid-template-columns: 1fr; gap: 1.5rem; }
    .stat-box + .stat-box {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, .2);
        padding-top: 1.5rem;
    }
}

@media (max-width: 640px) {
    /* Cronología en vertical */
    .interactive-timeline { flex-direction: column; gap: .6rem; }
    .interactive-timeline::before { display: none; }
    .timeline-node {
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
        padding: .5rem;
        background: var(--blanco);
        border: 1px solid var(--linea);
        border-radius: var(--radius);
        text-align: left;
    }
    .timeline-node.active { border-color: var(--azul); }
    .node-date { min-width: 112px; }

    .gallery-masonry { grid-template-columns: 1fr; grid-auto-rows: 240px; }
    .gallery-item.size-v { grid-row: span 1; }
    .gallery-item.size-h { grid-column: auto; }
}

@media (max-width: 480px) {
    .brand-name { font-size: 1.1rem; }
    .logo-campana-img { width: 34px; height: 34px; }

    .hero-buttons { flex-direction: column; align-items: stretch; }
    .candidata-floating-card { padding: .7rem 1.1rem; bottom: 1rem; }
    .candidata-floating-card h2 { font-size: 1rem; }

    .badge-num { font-size: 1.7rem; }
    .timeline-detail-box { padding: 1.4rem; }
    .contacto-info, .contacto-form-wrapper { padding: 1.75rem 1.25rem; }
    .social-card { padding: 1.4rem .75rem; }
}

/* ---------- 18. IMPRESIÓN ---------- */
@media print {
    .navbar, .back-to-top, .skip-link, .scroll-progress { display: none !important; }
    .js .scroll-reveal { opacity: 1; transform: none; }
    .hero-section { min-height: auto; padding-top: 2rem; }
}
