/*
Theme Name: Bicentenario Colchagua — Solemne
Theme URI: https://colchagua200.cl
Author: Diego Grez / El Marino Producciones y Consultorías Limitada
Description: Rediseño formal y conmemorativo del sitio del Bicentenario de la Provincia de Colchagua (1826–2026). Conserva todos los ajustes del Personalizador, metadatos, plantillas de página, categorías y efemérides del tema "Bicentenario Colchagua" 4.4, y puede importar su configuración con un clic. Modo oscuro, tipografías autoalojadas y sin dependencias externas.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: bicentenario-colchagua-solemne
*/

/* ==========================================================================
   1. TIPOGRAFÍA (autoalojada)
   Crimson Pro (OFL) para títulos y lectura · Museo Sans / GobCL para interfaz
   ========================================================================== */
@font-face { font-family: 'Crimson Pro'; src: url('assets/fonts/crimsonpro-regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Crimson Pro'; src: url('assets/fonts/crimsonpro-italic.woff') format('woff'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Crimson Pro'; src: url('assets/fonts/crimsonpro-bold.woff') format('woff'); font-weight: 600 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'GobSans'; src: url('assets/fonts/museosans-regular.woff2') format('woff2'); font-weight: 300 450; font-style: normal; font-display: swap; }
@font-face { font-family: 'GobSans'; src: url('assets/fonts/gobcl-bold.woff2') format('woff2'); font-weight: 500 900; font-style: normal; font-display: swap; }

/* ==========================================================================
   2. TOKENS
   ========================================================================== */
:root {
    color-scheme: light;

    /* Marca */
    --azul: #1d2a63;
    --azul-prof: #16204f;
    --azul-noche: #0d1233;
    --azul-medio: #2c3d8f;
    --oro: #a8873f;
    --oro-claro: #d8bd7e;
    --oro-texto: #7a5d20;
    --rojo: #c8102e;

    /* Superficies y texto */
    --bg: #fbfbf9;
    --bg-alt: #eff1f6;
    --surface: #ffffff;
    --surface-2: #f6f7fa;
    --line: #d8dce8;
    --line-fuerte: #b9bfd3;
    --ink: #181d36;
    --ink-2: #434a66;
    --ink-3: #5c637f;
    --titulo: #16204f;
    --enlace: #1d4aa0;
    --enlace-h: #12337a;

    /* Bandas oscuras (idénticas en ambos modos, ajustadas en oscuro) */
    --oscuro-bg: #16204f;
    --oscuro-2: #0d1233;
    --cab-bg: #16204f;
    --pie-bg: #0d1233;

    --sombra: 0 1px 2px rgba(13, 18, 51, .06), 0 10px 28px rgba(13, 18, 51, .07);
    --sombra-h: 0 2px 4px rgba(13, 18, 51, .08), 0 18px 40px rgba(13, 18, 51, .14);
    --filtro-img: none;

    /* Efemérides */
    --efe-rojo-enlace: #b3122b;

    /* Tipografía y medidas */
    --f-display: 'Crimson Pro', 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
    --f-cuerpo: 'GobSans', 'Museo Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --ancho: 1180px;
    --radio: 2px;
    --salto: 104px; /* separación al anclar bajo la cabecera */
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0b1030;
    --bg-alt: #0f1642;
    --surface: #131b46;
    --surface-2: #18214f;
    --line: #2a3566;
    --line-fuerte: #3b4780;
    --ink: #e8ebf7;
    --ink-2: #b6bdd8;
    --ink-3: #98a1c4;
    --titulo: #eceefc;
    --enlace: #92b8ff;
    --enlace-h: #c0d5ff;
    --oro: #d2b26a;
    --oro-texto: #dcc387;

    --oscuro-bg: #131c57;
    --oscuro-2: #070a22;
    --cab-bg: #0e1540;
    --pie-bg: #070a22;

    --sombra: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .35);
    --sombra-h: 0 2px 4px rgba(0, 0, 0, .45), 0 18px 40px rgba(0, 0, 0, .5);
    --filtro-img: brightness(.92) contrast(1.02);
    --efe-rojo-enlace: #ff8fa0;
}

/* ==========================================================================
   3. BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--f-cuerpo);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color .25s ease, color .25s ease;
}
#main { flex: 1 0 auto; }

img, svg, video { max-width: 100%; height: auto; }
img { border-style: none; }
figure { margin: 0; }
ul, ol { padding-left: 1.25rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-display);
    font-weight: 400;
    color: var(--titulo);
    line-height: 1.12;
    letter-spacing: -.005em;
    text-wrap: balance;
    margin: 0 0 .6em;
}
h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; }
p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--enlace); text-decoration: none; }
a:hover { color: var(--enlace-h); }

:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; border-radius: 2px; }
.seccion-oscura :focus-visible, .cabecera :focus-visible, .pie :focus-visible, .portada :focus-visible, .cabecera-pagina :focus-visible { outline-color: var(--oro-claro); }
::selection { background: var(--azul); color: #fff; }

.sr, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.saltar-contenido { position: absolute; top: -100px; left: 12px; background: var(--oro-claro); color: #0d1233; padding: 10px 18px; z-index: 100000; font-weight: 700; text-decoration: none; }
.saltar-contenido:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Íconos propios */
.ico { flex: none; vertical-align: middle; }

/* ==========================================================================
   4. ESTRUCTURA Y PIEZAS COMUNES
   ========================================================================== */
.contenedor { width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.contenedor-estrecho { max-width: 880px; }

.seccion { padding-block: clamp(64px, 9vw, 120px); background: var(--bg); }
.seccion-alt { background: var(--bg-alt); }
.seccion-compacta { padding-block: clamp(40px, 6vw, 72px); }
.seccion-oscura { background: var(--oscuro-bg); color: rgba(255, 255, 255, .86); }
.seccion-oscura h2, .seccion-oscura h3, .seccion-oscura h4 { color: #fff; }
.seccion-oscura a { color: var(--oro-claro); }

/* Encabezado de sección: título + filete doble, como un decreto */
.seccion-cab {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 16px 40px;
    margin-bottom: clamp(32px, 5vw, 56px);
    padding-bottom: 22px;
    border-bottom: 3px double var(--oro);
}
.seccion-cab h2 { font-size: clamp(2.1rem, 2.4vw + 1.2rem, 3.2rem); margin: 0; }
.seccion-cab p { margin: .7rem 0 0; max-width: 62ch; color: var(--ink-3); font-size: 1rem; }
.seccion-oscura .seccion-cab p { color: rgba(255, 255, 255, .72); }
.seccion-cab-centro { justify-content: center; text-align: center; }
.seccion-cab-centro p { margin-inline: auto; }

/* Botones y enlaces de acción */
.boton, .boton-contorno, .boton-oro {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 28px; border-radius: var(--radio);
    font-family: var(--f-cuerpo); font-weight: 600; font-size: .95rem; letter-spacing: .02em; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    border: 1px solid var(--azul);
    transition: background-color .2s, color .2s, border-color .2s;
}
.boton { background: var(--azul); color: #fff; }
.boton:hover { background: var(--azul-noche); color: #fff; border-color: var(--azul-noche); }
.boton-contorno { background: transparent; color: var(--titulo); border-color: var(--titulo); }
.boton-contorno:hover { background: var(--azul); border-color: var(--azul); color: #fff; }
.boton-oro { background: var(--oro-claro); border-color: var(--oro-claro); color: #0d1233; }
.boton-oro:hover { background: #fff; border-color: #fff; color: #0d1233; }
.boton-claro { background: transparent; border-color: rgba(255, 255, 255, .6); color: #fff; }
.boton-claro:hover { background: #fff; border-color: #fff; color: #0d1233; }
.boton-bloque { display: flex; width: 100%; }
:root[data-theme="dark"] .boton { background: var(--oro-claro); border-color: var(--oro-claro); color: #0d1233; }
:root[data-theme="dark"] .boton:hover { background: #fff; border-color: #fff; color: #0d1233; }
:root[data-theme="dark"] .boton-contorno { color: var(--titulo); border-color: var(--line-fuerte); }
:root[data-theme="dark"] .boton-contorno:hover { background: var(--oro-claro); border-color: var(--oro-claro); color: #0d1233; }

.enlace-flecha {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 600; font-size: .95rem; color: var(--enlace); text-decoration: none;
}
.enlace-flecha:hover { color: var(--enlace-h); }
.enlace-flecha .ico { transition: transform .2s; }
.enlace-flecha:hover .ico { transform: translateX(3px); }
.seccion-oscura .enlace-flecha { color: var(--oro-claro); }

/* Ornamento: filete con estrella */
.ornamento { display: flex; align-items: center; gap: 14px; color: var(--oro); margin-block: 2rem; }
.ornamento span { flex: 1; height: 0; border-top: 1px solid currentColor; opacity: .7; }
.ornamento .ico { fill: currentColor; stroke: none; }

/* Bloque cuando no hay imagen */
.sin-imagen {
    display: grid; place-items: center; width: 100%; height: 100%; min-height: 100%;
    background: linear-gradient(135deg, var(--azul-prof), var(--azul-medio));
    color: rgba(216, 189, 126, .55);
}
.sin-imagen .ico { fill: currentColor; stroke: none; }

.aviso-editor { text-align: center; color: var(--ink-3); border: 1px dashed var(--line-fuerte); padding: 18px; margin: 0; }
.cuadro-vacio { text-align: center; padding: clamp(40px, 7vw, 80px) 20px; color: var(--ink-3); border: 1px dashed var(--line-fuerte); background: var(--surface); }
.cuadro-vacio .ico { color: var(--oro); margin-bottom: 14px; }
.cuadro-vacio h2 { font-size: 1.8rem; }

/* Etiquetas de estado */
.etiqueta { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .04em; padding: 5px 13px; line-height: 1.3; }
.etiqueta-proximo { background: var(--oro-claro); color: #0d1233; }
.etiqueta-hecho { background: rgba(13, 18, 51, .9); color: #fff; }

/* Utilidades mínimas (las usan los módulos de efemérides) */
.fw-bold { font-weight: 700; }
.text-muted { color: var(--ink-3); }
.small { font-size: .88em; }
.mb-0 { margin-bottom: 0 !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-2 { margin-top: .5rem !important; }
.ms-1 { margin-left: .25rem !important; }

/* ==========================================================================
   5. CABECERA Y NAVEGACIÓN
   ========================================================================== */
.cabecera {
    position: sticky; top: 0; z-index: 1030;
    background: var(--cab-bg);
    border-bottom: 1px solid rgba(216, 189, 126, .38);
    box-shadow: 0 2px 14px rgba(8, 12, 38, .28);
    transition: transform .3s ease-in-out, background-color .25s ease;
}
.cabecera-oculta { transform: translateY(-100%); }
body.admin-bar .cabecera { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .cabecera { top: 46px; } }

.cabecera-int {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    max-width: 1320px; margin-inline: auto; padding: 0 clamp(16px, 3vw, 32px);
    min-height: 80px;
}
.marca { display: flex; align-items: center; align-self: stretch; padding-block: 10px; flex: 0 1 auto; min-width: 0; }
.marca img { height: 100%; max-height: 58px; width: auto; max-width: 100%; object-fit: contain; display: block; }
.marca-texto { color: #fff; font-family: var(--f-display); font-size: 1.35rem; text-decoration: none; letter-spacing: .01em; }

.cabecera-acc { display: flex; align-items: center; gap: 18px; }

.menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.menu li { position: relative; list-style: none; }
.menu a {
    display: inline-block; padding: 10px 14px;
    color: rgba(255, 255, 255, .92); text-decoration: none;
    font-weight: 600; font-size: .95rem; letter-spacing: .02em;
    background-image: linear-gradient(var(--oro-claro), var(--oro-claro));
    background-repeat: no-repeat; background-position: 14px calc(100% - 4px); background-size: 0 2px;
    transition: background-size .25s ease, color .2s;
}
.menu a:hover,
.menu li.current-menu-item > a,
.menu li.current-menu-ancestor > a,
.menu li.current_page_item > a { color: #fff; background-size: calc(100% - 28px) 2px; }

.menu .sub-menu {
    position: absolute; top: 100%; left: 0; min-width: 260px; margin: 0; padding: 8px 0; list-style: none;
    background: var(--cab-bg); border: 1px solid rgba(216, 189, 126, .32); border-top: 0;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .4); z-index: 1040;
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.menu li:hover > .sub-menu, .menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.menu .sub-menu a { display: block; padding: 11px 20px; background: none; font-weight: 500; white-space: normal; }
.menu .sub-menu a:hover { background: rgba(255, 255, 255, .08); }

.tema-toggle, .menu-toggle {
    width: 42px; height: 42px; flex: none; display: inline-grid; place-items: center; padding: 0;
    color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; cursor: pointer;
    transition: background-color .2s, border-color .2s;
}
.tema-toggle:hover, .menu-toggle:hover { background: rgba(255, 255, 255, .12); border-color: var(--oro-claro); }
.tema-toggle svg { width: 19px; height: 19px; fill: currentColor; }
.tema-toggle .ico-luna { display: none; }
:root[data-theme="dark"] .tema-toggle .ico-sol { display: none; }
:root[data-theme="dark"] .tema-toggle .ico-luna { display: block; }

.menu-toggle { display: none; }
.menu-toggle .barras, .menu-toggle .barras::before, .menu-toggle .barras::after {
    content: ""; display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform .25s, opacity .2s;
}
.menu-toggle .barras { position: relative; }
.menu-toggle .barras::before { position: absolute; top: -6px; }
.menu-toggle .barras::after { position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] .barras { background: transparent; }
.menu-toggle[aria-expanded="true"] .barras::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .barras::after { transform: translateY(-6px) rotate(-45deg); }

.submenu-toggle { display: none; }

@media (max-width: 991.98px) {
    .cabecera-int { min-height: 64px; }
    .marca img { max-height: 44px; }
    .menu-toggle { display: inline-grid; }
    .cabecera-acc { gap: 10px; }

    .nav-principal {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: var(--cab-bg); border-top: 1px solid rgba(216, 189, 126, .3);
        box-shadow: 0 18px 28px rgba(0, 0, 0, .4);
        max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
    .nav-principal.abierto { display: block; }
    .menu { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
    .menu > li { display: flex; flex-wrap: wrap; align-items: stretch; }
    .menu > li + li { border-top: 1px solid rgba(255, 255, 255, .07); }
    .menu a { flex: 1 1 0; min-width: 0; display: block; padding: 16px 24px; font-size: 1.05rem; background: none !important; }
    .menu li.current-menu-item > a, .menu li.current_page_item > a { color: var(--oro-claro); }

    .menu .sub-menu {
        display: none; flex: 0 0 100%; position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: 0; background: rgba(0, 0, 0, .2); min-width: 0; padding: 0;
    }
    .menu li.abierto > .sub-menu { display: block; }
    .menu .sub-menu a { padding: 13px 24px 13px 44px; font-size: .98rem; }
    .menu .sub-menu li + li { border-top: 1px solid rgba(255, 255, 255, .05); }

    .submenu-toggle {
        display: grid; place-items: center; flex: 0 0 56px; padding: 0; cursor: pointer;
        background: transparent; color: #fff; border: 0; border-left: 1px solid rgba(255, 255, 255, .09);
    }
    .submenu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .2s; }
    li.abierto > .submenu-toggle svg { transform: rotate(180deg); }
}

/* ==========================================================================
   6. PORTADA (hero)
   ========================================================================== */
.portada {
    position: relative; isolation: isolate; overflow: hidden;
    min-height: min(88vh, 860px);
    display: flex; align-items: flex-end;
    background: linear-gradient(135deg, var(--azul-noche), var(--azul-medio));
    color: #fff;
}
.portada-img { position: absolute; inset: 0; z-index: -2; background-image: var(--img-m, var(--img)); background-size: cover; background-position: center; filter: saturate(1.05) contrast(1.04); }
@media (min-width: 801px) { .portada-img { background-image: var(--img); } }
.portada-vel {
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, rgba(13, 18, 51, .82) 0%, rgba(13, 18, 51, .25) 62%, rgba(13, 18, 51, 0) 100%),
        linear-gradient(180deg, rgba(13, 18, 51, .3) 0%, rgba(13, 18, 51, .42) 50%, rgba(13, 18, 51, .94) 100%);
}
.portada-int { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding-block: clamp(56px, 9vw, 112px); }
.portada-titulo { color: #fff; font-size: clamp(3rem, 6.8vw + .5rem, 6.4rem); line-height: 1; letter-spacing: -.012em; margin: 0 0 26px; max-width: 13ch; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.portada-sub {
    display: flex; align-items: center; gap: 18px; margin: 0;
    font-family: var(--f-display); font-style: italic; font-size: clamp(1.3rem, 1.2vw + 1rem, 1.85rem); color: var(--oro-claro);
}
.portada-sub::before { content: ""; width: 64px; height: 1px; background: var(--oro-claro); flex: none; }

/* La inscripción: el elemento memorable de la portada */
.portada-fechas { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--f-display); line-height: .92; text-align: right; flex: none; }
.fecha-ini { font-size: clamp(3.4rem, 7vw, 6.4rem); color: transparent; -webkit-text-stroke: 1px var(--oro-claro); letter-spacing: .01em; }
.fecha-linea { width: 72px; height: 1px; background: var(--oro-claro); margin: 16px 0 14px; }
.fecha-fin { font-size: clamp(3.4rem, 7vw, 6.4rem); color: #fff; letter-spacing: .01em; }

@media (prefers-reduced-motion: no-preference) {
    .portada-texto > * { animation: subir 1s cubic-bezier(.2, .7, .2, 1) both; }
    .portada-texto .portada-titulo { animation-delay: .08s; }
    .portada-texto .portada-sub { animation-delay: .22s; }
    .portada-fechas { animation: aparecer 1.4s .45s both; }
}
@keyframes subir { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 760px) {
    .portada { min-height: 74vh; }
    .portada-int { flex-direction: column; align-items: flex-start; gap: 28px; }
    .portada-fechas { flex-direction: row; align-items: center; gap: 14px; }
    .fecha-ini, .fecha-fin { font-size: 2.4rem; }
    .fecha-linea { margin: 0; width: 40px; }
}

/* ==========================================================================
   7. PORTADA: HISTORIA, COMUNAS, LÍNEA DE TIEMPO, HITOS
   ========================================================================== */
.historia-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(36px, 7vw, 100px); align-items: center; }
.historia-texto h2 { font-size: clamp(2.2rem, 2.8vw + 1.2rem, 3.6rem); margin-bottom: .5em; }
.historia-cuerpo { font-family: var(--f-display); font-size: clamp(1.2rem, .5vw + 1.1rem, 1.38rem); line-height: 1.7; color: var(--ink-2); margin-bottom: 2rem; }
.historia-cuerpo > p:first-child::first-letter {
    float: left; font-weight: 700; font-size: 3.5em; line-height: .82; padding: .06em .09em 0 0; color: var(--oro-texto);
}
.marco-foto { position: relative; isolation: isolate; margin: 14px 0 0 14px; }
.marco-foto::before { content: ""; position: absolute; inset: -14px 14px 14px -14px; border: 1px solid var(--oro); z-index: -1; }
.marco-foto img { display: block; width: 100%; aspect-ratio: 4 / 5; max-height: 560px; object-fit: cover; filter: var(--filtro-img); }
@media (max-width: 900px) { .historia-grid { grid-template-columns: 1fr; } .marco-foto img { aspect-ratio: 3 / 2; } }

/* Comunas */
.comunas-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(12px, 1.6vw, 20px); grid-template-columns: repeat(5, minmax(0, 1fr)); }
.comuna-card {
    position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; isolation: isolate;
    color: #fff; text-decoration: none; background: var(--azul-prof);
}
.comuna-card:hover { color: #fff; }
.comuna-img { position: absolute; inset: 0; z-index: -2; background-color: var(--azul-prof); background-image: linear-gradient(135deg, var(--azul-prof), var(--azul-medio)); background-size: cover; background-position: center; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.comuna-card:hover .comuna-img { transform: scale(1.06); }
.comuna-vel { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(13, 18, 51, .12) 0%, rgba(13, 18, 51, .28) 40%, rgba(13, 18, 51, .95) 100%); }
.comuna-card::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(216, 189, 126, .55); pointer-events: none; transition: inset .3s ease, border-color .3s ease; }
.comuna-card:hover::after, .comuna-card:focus-visible::after { inset: 6px; border-color: var(--oro-claro); }
.comuna-escudo { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .55)); }
.comuna-txt { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; }
.comuna-nombre { display: block; font-family: var(--f-display); font-weight: 700; font-size: 1.55rem; line-height: 1.08; }
.comuna-desc { display: -webkit-box; margin-top: 8px; font-size: .83rem; line-height: 1.45; color: rgba(255, 255, 255, .84); -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mapa-caja { margin-top: clamp(32px, 5vw, 56px); padding: 10px; background: var(--surface); border: 1px solid var(--line); }
.mapa-caja iframe { display: block; width: 100%; aspect-ratio: 21 / 9; min-height: 320px; border: 0; }

@media (max-width: 999.98px) {
    .comunas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .comuna-card { aspect-ratio: 16 / 10; }
}
@media (max-width: 559.98px) {
    .comuna-card { aspect-ratio: 4 / 5; }
    .comuna-desc { display: none; }
    .comuna-txt { padding: 16px; }
    .comuna-nombre { font-size: 1.3rem; }
    .comuna-escudo { top: 16px; right: 16px; width: 32px; height: 32px; }
}

/* Línea de tiempo (portada: bandas oscuras; autoridades: versión clara) */
.cronologia-ctrl { display: flex; gap: 10px; }
.ctrl-btn {
    width: 46px; height: 46px; display: grid; place-items: center; padding: 0; cursor: pointer;
    background: transparent; color: var(--oro-claro); border: 1px solid rgba(216, 189, 126, .6); border-radius: 50%;
    transition: background-color .2s, color .2s;
}
.ctrl-btn:hover { background: var(--oro-claro); color: #0d1233; }
.cronologia-clara .ctrl-btn, .ctrl-btn-claro { color: var(--titulo); border-color: var(--line-fuerte); }
.cronologia-clara .ctrl-btn:hover, .ctrl-btn-claro:hover { background: var(--azul); color: #fff; border-color: var(--azul); }

.cronologia {
    --cr-texto: #fff; --cr-suave: rgba(255, 255, 255, .74); --cr-eje: rgba(216, 189, 126, .6); --cr-punto: var(--oro-claro); --cr-fondo: var(--oscuro-bg);
    --cr-altura-fecha: 112px;
    overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; scrollbar-color: rgba(216, 189, 126, .55) transparent;
    padding-bottom: 12px;
}
.cronologia.cr-compacta { --cr-altura-fecha: 72px; }
.cronologia.cr-con-dia { --cr-altura-fecha: 110px; }
.cronologia-clara { --cr-texto: var(--titulo); --cr-suave: var(--ink-2); --cr-eje: var(--line-fuerte); --cr-punto: var(--oro); --cr-fondo: var(--bg-alt); }
.cronologia-pista {
    display: flex; list-style: none; margin: 0; width: max-content; min-width: 100%;
    padding: 0 max(20px, calc((100vw - var(--ancho)) / 2 + 40px));
}
.cr-nodo { position: relative; flex: 1 0 clamp(260px, 26vw, 320px); max-width: 480px; display: flex; flex-direction: column; padding-right: 26px; }
.cr-nodo::before { content: ""; position: absolute; left: 0; right: 0; top: var(--cr-altura-fecha); height: 1px; background: var(--cr-eje); }
.cr-punto { position: absolute; left: 0; top: calc(var(--cr-altura-fecha) - 6px); width: 13px; height: 13px; transform: rotate(45deg); background: var(--cr-punto); border: 2px solid var(--cr-fondo); }
.cr-fecha { height: var(--cr-altura-fecha); display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 18px; }
.cronologia.cr-pocos .cronologia-pista { justify-content: center; }
.cr-fecha-dia { font-size: .92rem; line-height: 1.35; color: var(--cr-suave); }
.cr-fecha-anio { font-family: var(--f-display); font-size: 3.3rem; line-height: 1; color: var(--cr-texto); }
.cr-fecha-anio-sm { font-size: 2.1rem; }
.cr-card { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; white-space: normal; }
.cr-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--azul-prof); }
.cr-img img { width: 100%; height: 100%; object-fit: cover; display: block; filter: var(--filtro-img); }
.cr-card h3 { color: var(--cr-texto); font-size: 1.4rem; margin: 4px 0 0; }
.cr-card p { margin: 0; font-size: .95rem; line-height: 1.6; color: var(--cr-suave); display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.cr-card .enlace-flecha { align-self: flex-start; margin-top: 4px; }

/* Hitos conmemorativos */
.filtros { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filtro {
    appearance: none; background: transparent; border: 1px solid var(--line-fuerte); border-radius: 99px; padding: 8px 20px;
    font: inherit; font-weight: 600; font-size: .97rem; color: var(--ink-3); cursor: pointer;
}
.filtro:hover { color: var(--titulo); }
.filtro.activo { color: #fff; background: var(--azul); border-color: var(--azul); }
:root[data-theme="dark"] .filtro.activo { color: #0d1233; background: var(--oro-claro); border-color: var(--oro-claro); }

.hitos-pista { list-style: none; margin: 0 -4px; padding: 4px 4px 28px; display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.hitos-rejilla { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hito-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); transition: box-shadow .25s, border-color .25s; }
.hitos-pista .hito-card { flex: 0 0 min(86%, 380px); scroll-snap-align: start; }
.hito-card:hover { box-shadow: var(--sombra-h); border-color: var(--line-fuerte); }
.hito-img { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--azul-prof); }
.hito-img img { width: 100%; height: 100%; object-fit: cover; display: block; filter: var(--filtro-img); }
.hito-img .etiqueta { position: absolute; top: 14px; left: 14px; z-index: 2; }
.hito-cuerpo { display: flex; flex-direction: column; flex: 1; gap: 12px; padding: 22px 24px 26px; }
.hito-fecha { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-weight: 600; font-size: .9rem; color: var(--oro-texto); }
.hito-fecha .sep { opacity: .5; }
.hito-titulo { font-size: 1.5rem; line-height: 1.2; margin: 0; }
.hito-titulo a { color: var(--titulo); text-decoration: none; }
.hito-titulo a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.hito-titulo a:hover { color: var(--enlace); }
.hito-lugar { margin-top: auto; display: flex; align-items: flex-start; gap: 8px; font-size: .92rem; color: var(--ink-2); }
.hito-lugar .ico { color: var(--oro-texto); margin-top: 3px; }
@media (min-width: 1000px) { .hitos-pista .hito-card { flex-basis: calc((100% - 48px) / 3); } }
@media (max-width: 999.98px) { .hitos-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639.98px) { .hitos-rejilla { grid-template-columns: 1fr; } }

/* ==========================================================================
   8. PORTADA: COMITÉ, NOTICIAS, TEXTOS, AUTORIDADES
   ========================================================================== */
.intro-seccion { font-family: var(--f-display); font-size: clamp(1.3rem, 1vw + 1.1rem, 1.7rem); line-height: 1.5; color: var(--ink-2); max-width: 46ch; margin: 0 auto clamp(36px, 5vw, 60px); text-align: center; }

.miembros { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(32px, 4vw, 56px) clamp(24px, 3vw, 44px); }
.miembro { flex: 0 0 clamp(220px, 28%, 300px); }
.miembro-enlace { display: flex; flex-direction: column; align-items: center; text-align: center; color: inherit; text-decoration: none; }
.retrato { position: relative; display: block; width: 100%; aspect-ratio: 5 / 6; overflow: hidden; background: var(--bg-alt); margin-bottom: 22px; display: grid; place-items: center; color: var(--line-fuerte); }
.retrato img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform .9s cubic-bezier(.2, .7, .2, 1); filter: var(--filtro-img); }
.miembro-enlace:hover .retrato img { transform: scale(1.04); }
.retrato::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255, 255, 255, .55); pointer-events: none; }
.miembro-nombre { font-family: var(--f-display); font-weight: 700; font-size: 1.65rem; line-height: 1.12; color: var(--titulo); }
.miembro-cargo { margin-top: 6px; font-size: .97rem; color: var(--ink-3); }
.miembro-ver { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; color: var(--enlace); }
.miembro-enlace:hover .miembro-ver { color: var(--enlace-h); }

/* Noticias: la columna lateral se estira a la altura de la nota principal */
.noticias-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: stretch; }
.noticias-grid.solo-una { grid-template-columns: minmax(0, 1fr); max-width: 52rem; }
.nota { position: relative; display: flex; flex-direction: column; gap: 12px; }
.nota-img { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--azul-prof); }
.nota-img img, .nota-img .sin-imagen { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s cubic-bezier(.2, .7, .2, 1); filter: var(--filtro-img); }
.nota:hover .nota-img img { transform: scale(1.03); }
.nota-fecha { font-size: .9rem; font-weight: 600; color: var(--oro-texto); }
.nota-titulo { font-size: 1.55rem; line-height: 1.18; margin: 0; }
.nota-titulo a { color: var(--titulo); text-decoration: none; }
.nota-titulo a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.nota:hover .nota-titulo a { color: var(--enlace); }
.nota-extracto { margin: 0; color: var(--ink-2); font-size: 1rem; line-height: 1.65; }
.nota-principal .nota-titulo { font-size: clamp(1.9rem, 2vw + 1rem, 2.7rem); }
.nota-principal .nota-extracto { font-family: var(--f-display); font-size: 1.25rem; line-height: 1.55; }

.notas-lado { display: grid; grid-auto-rows: 1fr; }
.notas-lado .nota { flex-direction: row; align-items: stretch; gap: 22px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.notas-lado .nota:first-child { padding-top: 0; }
.notas-lado .nota:last-child { padding-bottom: 0; border-bottom: 0; }
.notas-lado .nota-img { flex: 0 0 38%; aspect-ratio: auto; min-height: 128px; }
.notas-lado .nota-img img, .notas-lado .nota-img .sin-imagen { position: absolute; inset: 0; }
.nota-txt { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; }
.notas-lado .nota-titulo { font-size: 1.3rem; }
.notas-lado .nota-extracto { font-size: .95rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.notas-lado.muchas .nota-extracto { display: none; }
@media (max-width: 900px) { .noticias-grid { grid-template-columns: 1fr; } .notas-lado { grid-auto-rows: auto; } }
@media (max-width: 479.98px) { .notas-lado .nota { gap: 16px; } .notas-lado .nota-img { flex-basis: 34%; min-height: 104px; } .notas-lado .nota-titulo { font-size: 1.15rem; } .notas-lado .nota-extracto { display: none; } }

/* Discursos y columnas */
.textos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.texto-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 34px 30px 28px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--oro); transition: box-shadow .25s; overflow: hidden; }
.texto-card:hover { box-shadow: var(--sombra-h); }
.texto-card::before { content: "\201D"; position: absolute; top: 4px; right: 20px; font-family: var(--f-display); font-size: 7rem; line-height: 1; color: var(--oro); opacity: .16; pointer-events: none; }
.texto-tipo { margin: 0; font-family: var(--f-display); font-style: italic; font-size: 1.15rem; color: var(--oro-texto); }
.texto-tipo .sep { margin: 0 .4em; opacity: .55; }
.texto-card h3 { font-size: 1.7rem; line-height: 1.14; margin: 0; }
.texto-card h3 a { color: var(--titulo); text-decoration: none; }
.texto-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.texto-card:hover h3 a { color: var(--enlace); }
.texto-autor { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: .95rem; color: var(--ink); }
.texto-extracto { margin: 0; font-family: var(--f-display); font-size: 1.2rem; line-height: 1.55; color: var(--ink-2); }
.texto-card .enlace-flecha { margin-top: auto; align-self: flex-start; position: relative; z-index: 2; }
.avatar { border-radius: 50%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 18%; flex: none; max-width: none; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-fuerte); background: var(--bg-alt); }
.avatar-vacio { display: inline-grid; place-items: center; color: var(--ink-3); }
@media (max-width: 960px) { .textos-grid { grid-template-columns: 1fr; } }
.enlaces-dobles { display: flex; gap: 22px; flex-wrap: wrap; }

/* Autoridades históricas */
.autoridades-bloque { position: relative; isolation: isolate; overflow: hidden; background: var(--oscuro-2); color: rgba(255, 255, 255, .86); border-top: 3px double var(--oro); }
.autoridades-img { position: absolute; inset: 0 auto 0 0; width: 64%; z-index: -1; background-size: cover; background-position: left center; opacity: .85; -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 30%, transparent 100%); mask-image: linear-gradient(90deg, #000 0%, #000 30%, transparent 100%); }
.autoridades-int { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 480px; padding-block: clamp(56px, 8vw, 100px); }
.autoridades-texto { grid-column: 2; }
.autoridades-texto h2 { color: #fff; font-size: clamp(2.2rem, 2.8vw + 1.2rem, 3.6rem); }
.autoridades-texto p { font-family: var(--f-display); font-size: 1.35rem; line-height: 1.6; color: rgba(255, 255, 255, .84); margin-bottom: 2rem; }
@media (max-width: 800px) {
    .autoridades-img { inset: 0; width: 100%; opacity: .3; -webkit-mask-image: none; mask-image: none; }
    .autoridades-int { grid-template-columns: 1fr; min-height: 0; }
    .autoridades-texto { grid-column: 1; }
}

/* ==========================================================================
   9. PIE DE PÁGINA
   ========================================================================== */
.pie { background: var(--pie-bg); color: #fff; border-top: 3px double var(--oro); flex-shrink: 0; }
.pie-int { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1.2fr); gap: 32px clamp(24px, 5vw, 64px); align-items: center; padding-block: clamp(40px, 5vw, 60px); }
.pie-logos { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 32px; }
.pie-logos img { max-height: 84px; width: auto; }
.pie-fallback { border-left: 2px solid var(--oro-claro); padding-left: 16px; font-family: var(--f-display); font-size: 1.5rem; line-height: 1.2; }
.pie-fallback small { display: block; font-family: var(--f-cuerpo); font-size: .8rem; color: rgba(255, 255, 255, .65); letter-spacing: .04em; }
.pie-redes { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.pie-redes a { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; text-decoration: none; border: 1px solid rgba(216, 189, 126, .5); border-radius: 50%; transition: background-color .2s, color .2s, border-color .2s; }
.pie-redes a:hover { background: var(--oro-claro); border-color: var(--oro-claro); color: #0d1233; }
.pie-texto { text-align: right; font-size: .95rem; }
.pie-texto strong { display: block; font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; line-height: 1.2; margin-bottom: 4px; }
.pie-texto span { color: rgba(255, 255, 255, .72); }
.pie-base { border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 18px; font-size: .86rem; color: rgba(255, 255, 255, .72); }
.pie-base .contenedor { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.pie a { color: #fff; text-decoration: none; }
.pie a:hover { color: var(--oro-claro); }
@media (max-width: 860px) {
    .pie-int { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .pie-logos { justify-content: center; }
    .pie-texto { text-align: center; }
    .pie-base .contenedor { justify-content: center; text-align: center; }
}

/* ==========================================================================
   10. PÁGINAS INTERIORES: CABECERA, LECTURA, FICHAS
   ========================================================================== */
.cabecera-pagina {
    position: relative; isolation: isolate; overflow: hidden;
    background: linear-gradient(135deg, var(--azul-noche), var(--oscuro-bg) 55%, var(--azul-medio));
    color: #fff; border-bottom: 3px double var(--oro);
    padding-block: clamp(56px, 9vw, 112px) clamp(44px, 6vw, 76px);
}
.cabecera-pagina-img { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; opacity: .42; }
.cabecera-pagina-vel { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(13, 18, 51, .9) 0%, rgba(13, 18, 51, .5) 100%); }
.cabecera-pagina-etq { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-family: var(--f-display); font-style: italic; font-size: 1.25rem; color: var(--oro-claro); }
.cabecera-pagina-titulo { color: #fff; font-size: clamp(2.5rem, 4.6vw + 1rem, 4.7rem); line-height: 1.04; margin: 0; max-width: 20ch; }
.cabecera-pagina-bajada { max-width: 62ch; margin-top: 24px; font-family: var(--f-display); font-size: clamp(1.2rem, .9vw + 1rem, 1.6rem); line-height: 1.5; color: rgba(255, 255, 255, .86); }
.cabecera-pagina-bajada p:last-child { margin-bottom: 0; }
.cabecera-pagina-corta { padding-block: clamp(40px, 6vw, 72px); }
.cabecera-pagina-corta .cabecera-pagina-titulo { font-size: clamp(1.9rem, 2.4vw + 1rem, 3rem); }

/* Texto de lectura (contenido del editor) */
.lectura, .entry-content {
    font-family: var(--f-display); font-size: clamp(1.2rem, .45vw + 1.1rem, 1.38rem); line-height: 1.72; color: var(--ink);
    max-width: 40rem; margin-inline: auto; overflow-wrap: break-word;
}
.lectura-izq { margin-inline: 0; }
.lectura > * + *, .entry-content > * + * { margin-top: 1.15em; margin-bottom: 0; }
.lectura h2, .entry-content h2 { font-size: 2.05rem; margin-top: 2.2em; }
.lectura h3, .entry-content h3 { font-size: 1.55rem; margin-top: 1.9em; }
.lectura h4, .entry-content h4 { font-size: 1.25rem; margin-top: 1.6em; }
.lectura a, .entry-content a { color: var(--enlace); font-weight: 600; text-decoration: none; border-radius: 2px; transition: background-color .2s, color .2s; }
.lectura a:hover, .entry-content a:hover { background: rgba(168, 135, 63, .16); }
.lectura ul, .lectura ol, .entry-content ul, .entry-content ol { padding-left: 1.4em; }
.lectura li + li, .entry-content li + li { margin-top: .4em; }
.lectura strong, .entry-content strong { font-weight: 700; color: var(--titulo); }
.capitular > p:first-of-type::first-letter, .capitular.entry-content > p:first-of-type::first-letter {
    float: left; font-weight: 700; font-size: 3.6em; line-height: .82; padding: .06em .09em 0 0; color: var(--oro-texto);
}
.lectura img, .entry-content img, .wp-block-image img { max-width: 100%; height: auto; display: block; margin-inline: auto; filter: var(--filtro-img); }
.entry-content .wp-caption, .entry-content figure { max-width: 100%; }
figcaption, .wp-caption-text { color: var(--ink-3); font-family: var(--f-cuerpo); font-size: .86rem; line-height: 1.5; text-align: center; margin-top: .6rem; }
.entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-family: var(--f-cuerpo); font-size: .95rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; }
.entry-content th { background: var(--surface-2); }
.entry-content iframe, .entry-content video { max-width: 100%; }
.alignleft { float: left; margin: .3em 1.4em 1em 0; max-width: 50%; }
.alignright { float: right; margin: .3em 0 1em 1.4em; max-width: 50%; }
.aligncenter { display: block; margin-inline: auto; }
.wp-block-separator, .entry-content hr { border: 0; border-top: 1px solid var(--oro); width: 80px; margin: 2.4em auto; opacity: .8; }

blockquote, .wp-block-quote {
    margin: 2em 0; padding: .4em 0 .4em 1.6rem; border-left: 3px solid var(--oro);
    font-style: italic; font-size: 1.12em; line-height: 1.6; color: var(--ink-2);
}
blockquote p:last-child { margin-bottom: 0; }
blockquote cite, .wp-block-quote cite { display: block; margin-top: .6em; font-family: var(--f-cuerpo); font-size: .85rem; font-style: normal; color: var(--ink-3); }

/* Disposición con barra lateral (ficha) */
.dos-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(36px, 6vw, 80px); align-items: start; }
.dos-col-inv { grid-template-columns: 340px minmax(0, 1fr); }
.ficha { position: sticky; top: var(--salto); padding: 30px 28px; background: var(--surface); border: 1px solid var(--line); }
.ficha-titulo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 6px; padding-bottom: 16px; border-bottom: 3px double var(--oro); font-size: 1.55rem; }
.ficha-lista { margin: 0; }
.ficha-fila { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ficha-fila:last-of-type { border-bottom: 0; }
.ficha-fila .ico { color: var(--oro-texto); margin-top: 3px; }
.ficha-fila dt { margin: 0 0 2px; font-size: .86rem; color: var(--ink-3); }
.ficha-fila dd { margin: 0; font-weight: 600; color: var(--ink); line-height: 1.4; }
.ficha-fila dd a { color: inherit; text-decoration: none; }
.ficha-resumen { margin: 6px 0 0; padding: 18px 0; border-top: 1px solid var(--line); font-family: var(--f-display); font-style: italic; font-size: 1.2rem; line-height: 1.55; color: var(--ink-2); }
.ficha-pie { margin-top: 12px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.ficha-autor { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.ficha-autor strong { display: block; line-height: 1.25; }
.ficha-autor small { color: var(--enlace); font-weight: 600; }
.ficha-foto { margin-bottom: 24px; background: var(--surface); border: 1px solid var(--line); padding: 8px; }
.ficha-foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center top; display: block; filter: var(--filtro-img); }
@media (max-width: 960px) {
    .dos-col, .dos-col-inv { grid-template-columns: 1fr; }
    .ficha { position: static; }
    .dos-col > .lateral { order: -1; }
}

.compartir { display: flex; gap: 10px; }
.compartir a { width: 42px; height: 42px; display: grid; place-items: center; color: var(--titulo); border: 1px solid var(--line-fuerte); border-radius: 50%; transition: background-color .2s, color .2s, border-color .2s; }
.compartir a:hover { background: var(--azul); border-color: var(--azul); color: #fff; }

.pie-articulo { max-width: 40rem; margin: 3rem auto 0; padding-top: 1.6rem; border-top: 3px double var(--oro); display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; font-family: var(--f-cuerpo); }
.dos-col .pie-articulo { margin-inline: 0; }
.etiquetas { font-size: .9rem; color: var(--ink-3); }
.etiquetas a { color: var(--ink-2); }

/* Artículo de noticia */
.articulo-cab { text-align: center; max-width: 52rem; margin-inline: auto; padding-block: clamp(48px, 7vw, 88px) clamp(28px, 4vw, 48px); }
.articulo-cat { font-family: var(--f-display); font-style: italic; font-size: 1.3rem; color: var(--oro-texto); margin: 0 0 14px; }
.articulo-cab h1 { font-size: clamp(2.3rem, 4vw + 1rem, 4.2rem); line-height: 1.07; margin: 0 0 22px; }
.articulo-meta { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: .95rem; color: var(--ink-2); padding-top: 18px; border-top: 1px solid var(--oro); }
.articulo-img { max-width: 960px; margin: 0 auto clamp(36px, 5vw, 60px); }
.articulo-img img { width: 100%; max-height: 560px; object-fit: cover; display: block; filter: var(--filtro-img); }
.articulo-cuerpo { padding-bottom: clamp(56px, 8vw, 100px); }

/* Texto editorial: discursos y columnas */
.texto-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: clamp(36px, 6vw, 80px); align-items: start; }
.autor-ficha { position: sticky; top: var(--salto); padding: 34px 28px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--oro); }
.autor-ficha .avatar { margin: 0 auto 16px; border-width: 4px; }
.autor-ficha .tipo { font-family: var(--f-display); font-style: italic; font-size: 1.15rem; color: var(--oro-texto); margin: 0 0 18px; }
.autor-ficha .rol { font-size: .85rem; color: var(--ink-3); margin: 0 0 4px; }
.autor-ficha h2 { font-size: 1.6rem; margin: 0 0 4px; }
.autor-ficha .cargo { font-size: .95rem; color: var(--ink-3); margin: 0 0 18px; }
.autor-ficha .fecha { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: center; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; }
.autor-ficha .fecha .ico { color: var(--oro-texto); }
.texto-titulo { font-size: clamp(2.3rem, 3.6vw + 1rem, 3.9rem); line-height: 1.08; margin-bottom: 1em; }
.texto-portada { margin: 0 0 clamp(28px, 4vw, 44px); }
.texto-portada img { width: 100%; max-height: 460px; object-fit: cover; display: block; filter: var(--filtro-img); }
@media (max-width: 960px) { .texto-grid { grid-template-columns: 1fr; } .autor-ficha { position: static; } }

/* Perfil biográfico */
.perfil { display: grid; grid-template-columns: minmax(250px, 360px) minmax(0, 1fr); gap: clamp(36px, 7vw, 100px); align-items: start; }
.perfil-lat { position: sticky; top: var(--salto); }
.perfil-retrato { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-alt); display: grid; place-items: center; color: var(--line-fuerte); }
.perfil-retrato img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; filter: var(--filtro-img); }
.perfil-retrato::after { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(255, 255, 255, .6); pointer-events: none; }
.perfil-redes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.perfil-redes a { width: 44px; height: 44px; display: grid; place-items: center; color: var(--titulo); border: 1px solid var(--line-fuerte); border-radius: 50%; transition: background-color .2s, color .2s, border-color .2s; }
.perfil-redes a:hover { background: var(--azul); border-color: var(--azul); color: #fff; }
.perfil-mensaje { margin: 28px 0 0; padding: 22px 0 0; border: 0; border-top: 3px double var(--oro); font-family: var(--f-display); font-style: italic; font-size: 1.32rem; line-height: 1.5; color: var(--ink-2); }
.perfil-nombre { font-size: clamp(2.5rem, 4vw + 1rem, 4.4rem); line-height: 1.04; margin: 0; }
.perfil-cargo { margin: 12px 0 0; font-family: var(--f-display); font-style: italic; font-size: 1.5rem; color: var(--oro-texto); }
.perfil-cuerpo { margin-top: clamp(28px, 4vw, 44px); padding-top: clamp(28px, 4vw, 40px); border-top: 3px double var(--oro); }
.perfil-cuerpo .lectura-izq { max-width: 42rem; }
.volver { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .perfil { grid-template-columns: 1fr; } .perfil-lat { position: static; max-width: 360px; } }

/* Barra flotante de la ficha histórica (móvil) */
.barra-titulo { position: fixed; top: 0; left: 0; right: 0; z-index: 1025; background: var(--cab-bg); border-bottom: 2px solid var(--oro-claro); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; color: #fff; }
body.admin-bar .barra-titulo { top: 46px; }
.barra-titulo .contenedor { display: flex; align-items: center; gap: 10px; padding-block: 12px; }
.barra-titulo strong { font-family: var(--f-display); font-weight: 400; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-titulo.visible { opacity: 1; visibility: visible; }
@media (min-width: 992px) { .barra-titulo { display: none !important; } }

/* Comunas (página) */
.comuna-hero { position: relative; width: 100%; height: 56vh; min-height: 380px; max-height: 620px; overflow: hidden; background: var(--azul-prof); border-bottom: 3px double var(--oro); }
.comuna-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comuna-cab { text-align: center; padding-block: clamp(44px, 6vw, 80px) clamp(24px, 3vw, 40px); }
.comuna-cab .pre { font-family: var(--f-display); font-style: italic; font-size: 1.4rem; color: var(--oro-texto); margin: 0 0 8px; }
.comuna-cab h1 { font-size: clamp(3rem, 6vw + 1rem, 6rem); line-height: 1; margin: 0 0 18px; }
.comuna-cab .sub { max-width: 46rem; margin: 0 auto; font-family: var(--f-display); font-size: 1.5rem; line-height: 1.5; color: var(--ink-2); }
.bloque { margin-bottom: clamp(48px, 7vw, 88px); }
.bloque-titulo { font-size: clamp(1.9rem, 1.6vw + 1.3rem, 2.6rem); margin: 0 0 clamp(22px, 3vw, 36px); padding-bottom: 16px; border-bottom: 3px double var(--oro); }
.datos-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 40px; align-items: center; }
.datos-lista { margin: 0; }
.datos-lista div { display: grid; grid-template-columns: 11rem 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.datos-lista div:last-child { border-bottom: 0; }
.datos-lista dt { color: var(--ink-3); font-size: .95rem; }
.datos-lista dd { margin: 0; font-family: var(--f-display); font-size: 1.3rem; line-height: 1.35; color: var(--ink); }
.datos-escudo { text-align: center; padding-left: 40px; border-left: 1px solid var(--line); }
.datos-escudo img { max-width: 170px; margin: 0 auto 12px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .15)); }
.datos-escudo p { margin: 0; font-size: .88rem; color: var(--ink-3); }
.autoridades-comunales { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.alcalde { text-align: center; padding: 30px 24px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--oro); }
.alcalde .rol, .concejo .rol { margin: 0 0 18px; font-family: var(--f-display); font-style: italic; font-size: 1.25rem; color: var(--oro-texto); }
.alcalde .avatar { margin: 0 auto 16px; border-width: 4px; }
.alcalde h3 { font-size: 1.5rem; margin: 0 0 4px; }
.alcalde p, .persona p { margin: 0; font-size: .92rem; color: var(--ink-3); }
.concejo .rol { margin-bottom: 22px; }
.concejales-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 28px; }
.persona { display: flex; align-items: center; gap: 16px; }
.persona strong { display: block; font-family: var(--f-display); font-size: 1.2rem; line-height: 1.2; color: var(--titulo); }
.galeria-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); }
.galeria-grid img { width: 100%; height: 360px; object-fit: cover; display: block; filter: var(--filtro-img); }
.lectura-ancha { max-width: 46rem; margin-inline: auto; }
@media (max-width: 900px) {
    .datos-grid, .autoridades-comunales { grid-template-columns: 1fr; }
    .datos-escudo { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--line); }
    .datos-lista div { grid-template-columns: 1fr; gap: 2px; }
    .alcalde { max-width: 340px; }
}
@media (max-width: 600px) { .concejales-grid, .galeria-grid { grid-template-columns: 1fr; } .galeria-grid img { height: 260px; } }

/* ==========================================================================
   11. HISTORIA DE COLCHAGUA, AUTORIDADES, COMITÉ, DOCUMENTACIÓN
   ========================================================================== */
/* Historia */
.citas-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.cita { display: flex; flex-direction: column; margin: 0; padding: 30px 28px 26px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--oro); }
.cita blockquote { margin: 0 0 24px; padding: 0; border: 0; font-family: var(--f-display); font-style: italic; font-size: 1.25rem; line-height: 1.55; color: var(--ink-2); }
.cita-autor { margin-top: auto; display: flex; align-items: center; gap: 14px; }
.cita-autor strong { display: block; font-family: var(--f-display); font-size: 1.15rem; line-height: 1.2; color: var(--titulo); }
.cita-autor small { color: var(--ink-3); font-size: .88rem; }
.dos-bloques { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 88px); }
.dos-bloques h2 { font-size: clamp(1.9rem, 1.6vw + 1.3rem, 2.6rem); margin-bottom: 1em; padding-bottom: 14px; border-bottom: 3px double var(--oro); }
.dato-grupo { padding: 20px 0; border-bottom: 1px solid var(--line); }
.dato-grupo:last-child { border-bottom: 0; }
.dato-grupo h3 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; color: var(--oro-texto); margin: 0 0 8px; }
.dato-grupo p { margin: 0 0 .6em; font-size: 1rem; line-height: 1.7; color: var(--ink-2); }
.dato-grupo p:last-child { margin-bottom: 0; }
.dato-grupo strong { color: var(--titulo); }
@media (max-width: 960px) { .citas-grid { grid-template-columns: 1fr 1fr; } .dos-bloques { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .citas-grid { grid-template-columns: 1fr; } }

/* Autoridades por cargo */
.cargo-bloque { padding-block: clamp(52px, 7vw, 92px); border-bottom: 1px solid var(--line); }
.cargo-cab { max-width: 52rem; margin-bottom: clamp(28px, 4vw, 48px); }
.cargo-cab h2 { font-size: clamp(2.3rem, 3vw + 1rem, 3.8rem); margin: 0; }
.cargo-periodo { display: block; margin: 8px 0 20px; font-family: var(--f-display); font-style: italic; font-size: 1.45rem; color: var(--oro-texto); }
.cargo-desc { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.65; color: var(--ink-2); }
.cargo-fuentes { display: flex; gap: 10px; margin: 20px 0 0; padding-left: 14px; border-left: 2px solid var(--oro); font-size: .9rem; color: var(--ink-3); }
.cargo-franja { background: var(--bg-alt); border-block: 1px solid var(--line); padding-top: 12px; }
.cargo-franja .cronologia { padding-bottom: 28px; }
.cargo-franja .cr-nodo { flex-basis: 240px; max-width: 300px; }
.aut-card {
    display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; flex: 1 1 auto; margin-top: 22px; padding: 22px 16px 20px; text-align: center; cursor: pointer;
    font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); transition: box-shadow .25s, border-color .25s, transform .25s; white-space: normal;
}
.aut-card:hover { box-shadow: var(--sombra-h); border-color: var(--oro); }
.aut-foto { position: relative; flex: none; width: 92px; height: 92px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--bg-alt); border: 1px solid var(--line-fuerte); color: var(--ink-3); }
.aut-foto img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 18%; display: block; border: 0; }
.aut-foto-simbolo { width: auto; min-width: 92px; height: 64px; overflow: visible; border: 0; border-radius: 0; background: transparent; }
.aut-foto-simbolo img, .aut-foto img.simbolo { position: static; width: auto; max-width: 100%; height: 64px; object-fit: contain; }
.aut-nombre { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; line-height: 1.2; color: var(--titulo); }
.aut-sub { font-style: italic; font-size: .85rem; line-height: 1.3; color: var(--ink-3); }
.aut-leer { margin-top: 4px; font-size: .85rem; font-weight: 600; color: var(--enlace); }
.aut-vacio { padding: 36px 20px; white-space: normal; color: var(--ink-3); }

dialog.aut-dialogo { padding: 0; border: 0; width: min(780px, calc(100vw - 28px)); max-height: calc(100vh - 40px); overflow: hidden; color: var(--ink); background: var(--surface); box-shadow: 0 30px 90px rgba(0, 0, 0, .5); }
dialog.aut-dialogo[open] { display: flex; flex-direction: column; }
dialog.aut-dialogo::backdrop { background: rgba(8, 12, 38, .78); }
.dialogo-cab { position: relative; padding: 30px 64px 26px 32px; background: var(--oscuro-bg); color: #fff; border-bottom: 3px double var(--oro-claro); }
.dialogo-cab .cargo-linea { margin: 0 0 6px; font-size: .88rem; color: rgba(255, 255, 255, .72); }
.dialogo-cab h2 { color: #fff; font-size: clamp(1.8rem, 2vw + 1rem, 2.6rem); margin: 0; }
.dialogo-cab .sub { margin: 6px 0 0; font-family: var(--f-display); font-style: italic; font-size: 1.2rem; color: var(--oro-claro); }
.dialogo-cerrar { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; display: grid; place-items: center; padding: 0; color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, .4); border-radius: 50%; cursor: pointer; }
.dialogo-cerrar:hover { background: #fff; color: #0d1233; }
.dialogo-cuerpo { padding: 30px 32px 34px; overflow-y: auto; display: grid; gap: 28px; grid-template-columns: 1fr; }
.dialogo-cuerpo.con-foto { grid-template-columns: 200px minmax(0, 1fr); }
.dialogo-cuerpo img { width: 200px; height: 200px; max-width: 100%; display: block; border-radius: 50%; object-fit: cover; object-position: center 18%; border: 1px solid var(--line-fuerte); }
.dialogo-cuerpo .texto { font-family: var(--f-display); font-size: 1.25rem; line-height: 1.7; color: var(--ink-2); }
@media (max-width: 600px) { .dialogo-cuerpo.con-foto { grid-template-columns: 1fr; } .dialogo-cuerpo img { margin-inline: auto; } }
body.dialogo-abierto { overflow: hidden; }

/* Sobre el comité */
.foto-grupal img { width: 100%; max-height: 640px; object-fit: cover; object-position: center; display: block; filter: var(--filtro-img); }
.foto-grupal figcaption { max-width: 60rem; margin: 18px auto 0; font-family: var(--f-display); font-style: italic; font-size: 1.1rem; line-height: 1.55; text-align: center; color: var(--ink-3); }
.dos-textos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 88px); }
.dos-textos h2 { font-size: clamp(1.9rem, 1.6vw + 1.3rem, 2.6rem); padding-bottom: 14px; border-bottom: 3px double var(--oro); }
.dos-textos p { font-family: var(--f-display); font-size: 1.28rem; line-height: 1.7; color: var(--ink-2); }
.mision-vision { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.mv { padding: 38px 34px 34px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--oro); }
.mv .ico { color: var(--oro-texto); margin-bottom: 16px; }
.mv h3 { font-size: 1.9rem; font-weight: 400; margin: 0 0 14px; }
.mv p { margin: 0; font-family: var(--f-display); font-size: 1.28rem; line-height: 1.65; color: var(--ink-2); }
.objetivos { background: var(--surface); border: 1px solid var(--line); }
.objetivos-cab { display: flex; align-items: center; gap: 14px; padding: 26px 34px; color: #fff; background: var(--oscuro-bg); border-bottom: 3px double var(--oro-claro); }
.objetivos-cab h3 { margin: 0; color: #fff; font-size: 1.9rem; font-weight: 400; }
.objetivos-cab .ico { color: var(--oro-claro); }
.objetivos-cuerpo { padding: clamp(26px, 4vw, 44px); }
.objetivos-cuerpo h4 { font-size: 1.5rem; margin: 0 0 12px; }
.objetivos-cuerpo > p { font-family: var(--f-display); font-size: 1.28rem; line-height: 1.7; color: var(--ink-2); padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.objetivos-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.objetivos-lista li { display: flex; gap: 16px; font-family: var(--f-display); font-size: 1.25rem; line-height: 1.6; color: var(--ink-2); }
.objetivos-lista .ico { color: var(--oro-texto); margin-top: 6px; }
.coordinacion { max-width: 52rem; margin-inline: auto; padding: clamp(32px, 5vw, 56px); text-align: center; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--oro); }
.coordinacion h3 { font-size: 2rem; font-weight: 400; }
.coordinacion p { margin: 0; font-family: var(--f-display); font-size: 1.3rem; line-height: 1.65; color: var(--ink-2); }
@media (max-width: 860px) { .dos-textos, .mision-vision { grid-template-columns: 1fr; } }

/* Documentos */
.doc-fundacional { max-width: 52rem; margin-inline: auto; }
.docs-buscador { position: relative; max-width: 640px; margin: 0 auto clamp(36px, 5vw, 56px); }
.docs-buscador .ico { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.docs-buscador input { width: 100%; padding: 18px 20px 18px 56px; font: inherit; font-size: 1.05rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line-fuerte); border-radius: var(--radio); }
.docs-buscador input::placeholder { color: var(--ink-3); }
.docs-buscador input:focus { outline: 0; border-color: var(--oro); box-shadow: 0 0 0 3px rgba(168, 135, 63, .25); }
.docs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); align-items: start; }
.docs-col { padding: 30px 26px 26px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--oro); }
.docs-col h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 1.7rem; }
.docs-col h2 .ico { color: var(--oro-texto); }
.docs-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.doc-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); transition: border-color .2s, background-color .2s; }
.doc-item:hover { border-color: var(--oro); background: var(--surface); color: var(--ink); }
.doc-item > .ico:first-child { color: var(--oro-texto); }
.doc-datos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-titulo { font-weight: 600; font-size: .98rem; line-height: 1.3; }
.doc-tipo { font-size: .78rem; letter-spacing: .04em; color: var(--ink-3); }
.doc-item .ico-descarga { color: var(--ink-3); transition: transform .2s, color .2s; }
.doc-item:hover .ico-descarga { color: var(--oro-texto); transform: translateY(2px); }
.doc-item-grande { padding: 20px 22px; }
.doc-item-grande .doc-titulo { font-size: 1.1rem; }
.doc-vacio { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; text-align: center; font-size: .92rem; color: var(--ink-3); border: 1px dashed var(--line-fuerte); }
@media (max-width: 960px) { .docs-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   12. ARCHIVOS: CATEGORÍAS, PAGINACIÓN, BÚSQUEDA
   ========================================================================== */
.rejilla-notas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 52px) clamp(22px, 3vw, 36px); }
.rejilla-notas .nota-titulo { font-size: 1.6rem; }
@media (max-width: 960px) { .rejilla-notas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .rejilla-notas { grid-template-columns: 1fr; } }

.lista-textos { display: grid; gap: clamp(24px, 3vw, 36px); max-width: 980px; margin-inline: auto; }
.fila-texto { position: relative; display: grid; grid-template-columns: 240px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); transition: box-shadow .25s; }
.fila-texto:hover { box-shadow: var(--sombra-h); }
.fila-meta { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 22px; text-align: center; background: var(--surface-2); border-right: 1px solid var(--line); }
.fila-meta .rol { margin: 6px 0 0; font-size: .82rem; color: var(--ink-3); }
.fila-meta strong { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.2; color: var(--titulo); }
.fila-meta time { margin-top: auto; padding-top: 18px; width: 100%; border-top: 1px solid var(--line); font-weight: 600; font-size: .9rem; color: var(--oro-texto); }
.fila-cuerpo { display: flex; flex-direction: column; min-width: 0; }
.fila-cuerpo .fila-img { aspect-ratio: 21 / 9; overflow: hidden; border-bottom: 1px solid var(--line); }
.fila-cuerpo .fila-img img { width: 100%; height: 100%; object-fit: cover; display: block; filter: var(--filtro-img); }
.fila-texto-int { display: flex; flex-direction: column; flex: 1; gap: 12px; padding: clamp(24px, 3vw, 36px); }
.fila-lectura { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .86rem; color: var(--ink-3); }
.fila-texto h2 { font-size: clamp(1.7rem, 1.4vw + 1.2rem, 2.3rem); line-height: 1.15; margin: 0; }
.fila-texto h2 a { color: var(--titulo); text-decoration: none; }
.fila-texto h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.fila-texto:hover h2 a { color: var(--enlace); }
.fila-extracto { margin: 0; font-family: var(--f-display); font-size: 1.22rem; line-height: 1.6; color: var(--ink-2); }
.fila-texto .enlace-flecha { align-self: flex-start; margin-top: auto; }
@media (max-width: 760px) {
    .fila-texto { grid-template-columns: 1fr; }
    .fila-meta { flex-direction: row; flex-wrap: wrap; justify-content: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 20px; }
    .fila-meta time { width: auto; margin: 0; padding: 0 0 0 14px; border-top: 0; border-left: 1px solid var(--line); }
}

.paginacion { margin-top: clamp(40px, 6vw, 72px); padding-top: 28px; border-top: 3px double var(--oro); }
.paginacion ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.paginacion .page-numbers { display: inline-flex; align-items: center; gap: 6px; min-width: 44px; height: 44px; justify-content: center; padding: 0 14px; font-weight: 600; font-size: .95rem; color: var(--titulo); text-decoration: none; background: var(--surface); border: 1px solid var(--line); transition: background-color .2s, color .2s, border-color .2s; }
.paginacion a.page-numbers:hover { border-color: var(--oro); color: var(--enlace); }
.paginacion .page-numbers.current { background: var(--azul); border-color: var(--azul); color: #fff; }
:root[data-theme="dark"] .paginacion .page-numbers.current { background: var(--oro-claro); border-color: var(--oro-claro); color: #0d1233; }
.paginacion .dots { border-color: transparent; background: none; }

.buscador-form { display: flex; gap: 10px; max-width: 560px; }
.buscador-form input[type="search"] { flex: 1; min-width: 0; padding: 14px 18px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-fuerte); border-radius: var(--radio); }
.buscador-form input[type="search"]:focus { outline: 0; border-color: var(--oro); box-shadow: 0 0 0 3px rgba(168, 135, 63, .25); }
.pagina-centro { text-align: center; max-width: 40rem; margin-inline: auto; }
.pagina-centro .gran-numero { font-family: var(--f-display); font-size: clamp(6rem, 18vw, 12rem); line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--oro); margin: 0 0 8px; }
.pagina-centro .buscador-form { margin: 28px auto 0; }

/* ==========================================================================
   13. EFEMÉRIDES  ("Un día como hoy")
   ========================================================================== */
.efe-caja { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--oro); box-shadow: var(--sombra); }
.efe-cabecera { display: flex; align-items: center; gap: 24px; padding: 22px clamp(20px, 3vw, 34px); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.efe-hoja {
    flex: none; width: 76px; padding: 10px 0 9px; text-align: center; line-height: 1;
    background: var(--azul-prof); color: #fff;
    box-shadow: inset 0 0 0 3px var(--azul-prof), inset 0 0 0 4px var(--oro-claro);
}
.efe-hoja-dia { display: block; font-family: var(--f-display); font-weight: 700; font-size: 2.1rem; }
.efe-hoja-mes { display: block; margin-top: 4px; font-size: .78rem; letter-spacing: .08em; color: var(--oro-claro); }
.efe-titulo { margin: 0; font-size: clamp(1.7rem, 1.5vw + 1.2rem, 2.3rem); }
.efe-subtitulo { margin: 4px 0 0; font-size: .95rem; color: var(--ink-3); }

.efe-cuerpo { display: grid; gap: 4px 36px; grid-template-columns: 1fr; padding: 26px clamp(20px, 3vw, 34px) 10px; }
.efe-cuerpo.con-figura { grid-template-columns: minmax(0, 1fr) 240px; }
.efe-figura { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
.efe-figura img { width: 100%; height: auto; display: block; border: 1px solid var(--line); padding: 5px; background: var(--surface); filter: var(--filtro-img); }
.efe-figura figcaption { text-align: left; font-size: .85rem; margin-top: 8px; }
.efe-principal { grid-column: 1; min-width: 0; }

.efe-lista { list-style: none; margin: 0 0 1rem; padding: 0; }
.efe-lista li { position: relative; padding: 8px 0 8px 22px; line-height: 1.6; }
.efe-lista li::before { content: ""; position: absolute; left: 4px; top: 1.2em; width: 6px; height: 6px; transform: rotate(45deg); background: var(--oro); }
.efe-anio { font-family: var(--f-display); font-weight: 700; font-size: 1.2em; color: var(--oro-texto); white-space: nowrap; }
.efe-sep { padding: 0 .25em; color: var(--ink-3); }
.efe-aniv { display: inline-block; margin-left: .5em; padding: 0 .65em; font-size: .75rem; font-weight: 600; line-height: 1.7; color: var(--oro-texto); border: 1px solid var(--oro); border-radius: 99px; vertical-align: .1em; }
.efe-desc { display: block; margin-top: 2px; font-size: .92rem; color: var(--ink-3); }
.efe-personas { margin: 0 0 .9rem; line-height: 1.75; }
.efe-etq { margin-right: .4em; font-family: var(--f-display); font-weight: 700; font-size: 1.15em; color: var(--titulo); }
.efe-persona + .efe-persona::before { content: " · "; color: var(--ink-3); }
.efe-persona small { color: var(--ink-3); font-size: .88em; }
.efe-caja a.efe-enlace { font-weight: 600; text-decoration: none; }
a.efe-rojo, span.efe-rojo { color: var(--efe-rojo-enlace) !important; font-weight: 600; text-decoration: none; cursor: help; }
a.efe-rojo { cursor: pointer; }

.efe-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 22px; margin-top: 10px; padding: 14px clamp(20px, 3vw, 34px); background: var(--surface-2); border-top: 1px solid var(--line); font-size: .93rem; }
.efe-pie a { font-weight: 600; }
.efe-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.efe-nav .actual { font-weight: 700; color: var(--titulo); }
.efe-vacio { padding: 28px clamp(20px, 3vw, 34px) 20px; color: var(--ink-2); }
.efe-vacio p { margin: 0 0 .5rem; }

@media (max-width: 767.98px) {
    .efe-cabecera { gap: 16px; padding: 18px 18px; }
    .efe-hoja { width: 64px; }
    .efe-cuerpo, .efe-cuerpo.con-figura { grid-template-columns: 1fr; padding: 20px 18px 6px; }
    .efe-figura { grid-column: 1; grid-row: auto; order: -1; max-width: 340px; margin: 0 auto 10px; }
    .efe-pie { padding: 14px 18px; }
}

/* Archivo de efemérides */
.efe-selector { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 32px; }
.efe-selector label { display: block; margin-bottom: 6px; font-size: .88rem; color: rgba(255, 255, 255, .85); }
.efe-selector select { min-width: 120px; padding: 12px 16px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-fuerte); border-radius: var(--radio); }
.efe-dia-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px 24px; margin-bottom: 28px; padding-bottom: 18px; border-bottom: 3px double var(--oro); }
.efe-dia-cab h2 { margin: 0; font-size: clamp(2rem, 2vw + 1.2rem, 3rem); }
.efe-grupo + .efe-grupo { margin-top: 2.4rem; }
.efe-grupo > h2 { margin-bottom: .6rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); font-size: 1.7rem; }
.efe-item { display: grid; grid-template-columns: 5.6rem 1fr; gap: 6px 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.efe-item:last-child { border-bottom: 0; }
.efe-item .efe-anio { font-size: 1.35rem; }
.efe-item img { width: 130px; height: auto; margin-top: 10px; border: 1px solid var(--line); padding: 4px; background: var(--surface); filter: var(--filtro-img); }
.efe-vacio-caja { padding: 28px; background: var(--surface); border: 1px solid var(--line); }
.efe-vacio-caja p { margin: 0 0 .6rem; }
.efe-calendario { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); }
.efe-mes { padding: 16px 18px 18px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--oro); }
.efe-mes h3 { margin: 0 0 12px; font-size: 1.4rem; font-weight: 400; }
.efe-dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.efe-dias a, .efe-dias span { padding: 5px 0; text-align: center; font-size: .84rem; line-height: 1.4; }
.efe-dias span { color: var(--ink-3); opacity: .6; }
.efe-dias a { font-weight: 700; text-decoration: none; color: var(--titulo); background: var(--bg-alt); }
.efe-dias a:hover { background: var(--azul); color: #fff; }
.efe-dias a.hoy { outline: 2px solid var(--oro); outline-offset: -2px; }
.efe-dias a.sel { background: var(--azul); color: #fff; }
:root[data-theme="dark"] .efe-dias a:hover, :root[data-theme="dark"] .efe-dias a.sel { background: var(--oro-claro); color: #0d1233; }
@media (max-width: 575.98px) { .efe-item { grid-template-columns: 1fr; } }

/* ==========================================================================
   14. IMPRESIÓN
   ========================================================================== */
@media print {
    .cabecera, .pie, .tema-toggle, .barra-titulo, .compartir, .cronologia-ctrl, .filtros { display: none !important; }
    body { background: #fff; color: #000; font-size: 11pt; }
    .seccion, .seccion-alt { padding-block: 24px; background: #fff; }
    a { color: #000; text-decoration: none; }
    .cabecera-pagina { background: none; color: #000; border-bottom: 1px solid #000; padding-block: 16px; }
    .cabecera-pagina-titulo, .cabecera-pagina-bajada { color: #000; }
}
