/* ==========================================================================
   NNGG Asturias · Sistema visual «Editorial Pop» (v2)
   Azul como color principal. El amarillo solo como acento: subrayados,
   palabras destacadas, etiquetas «Nuevo» y el indicador de sección activa.
   Nunca como fondo de sección.
   ========================================================================== */

/* Fuentes alojadas en el propio servidor (SIL Open Font License): sin
   peticiones a Google ni envío de la IP del visitante a terceros. */
@font-face {
    font-family: 'Anton';
    src: url('../fonts/anton-latin-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-latin-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Color */
    --azul: #1E4A90;
    --azul-oscuro: #173B74;
    --tinta: #0B1B3A;
    --amarillo: #F7D417;
    --cielo: #9ED8FF;
    --coral: #FFC9B5;
    --niebla: #F3F5F9;
    --blanco: #FFFFFF;
    --texto: #0B1B3A;
    --texto-2: #34405A;
    --texto-3: #4A5873;
    --texto-claro: #C9D3E6;
    --linea: #D5DCE8;
    --linea-fuerte: #B9C4D8;
    --linea-oscura: #2A3B5E;

    /* Tipografía */
    --display: 'Anton', Impact, 'Arial Narrow', sans-serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Forma y espacio */
    --r-sm: 8px;
    --r: 16px;
    --r-lg: 24px;
    --max: 1280px;
    --gutter: 24px;
    --section: 96px;
}

@media (max-width: 720px) {
    :root { --gutter: 20px; --section: 56px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 112px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    color: var(--texto);
    background: var(--blanco);
    -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: var(--azul); }
a:hover { color: var(--tinta); }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; border-radius: 4px; }
.site-header :focus-visible, .mobile-menu :focus-visible, .site-footer :focus-visible,
.section--azul :focus-visible, .section--tinta :focus-visible, .panel--tinta :focus-visible,
.panel--azul :focus-visible, .cta-band :focus-visible, .hero-photo :focus-visible,
.junta-panel :focus-visible { outline-color: var(--amarillo); }
[hidden] { display: none !important; }
.icon-lg { width: 36px; height: 36px; color: var(--azul); }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 100;
    background: var(--tinta); color: var(--blanco); padding: 12px 18px; border-radius: var(--r-sm);
}
.skip-link:focus { top: 16px; color: var(--blanco); }

/* ---------- Layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--niebla { background: var(--niebla); }
.section--tinta { background: var(--tinta); color: var(--blanco); }
.section--azul { background: var(--azul); color: var(--blanco); }
.stack { display: flex; flex-direction: column; gap: var(--gap, 24px); }
.split { display: flex; flex-wrap: wrap; gap: var(--gap, 48px); align-items: var(--align, flex-start); }
.split > * { min-width: 0; max-width: 100%; }
.split > .split__main { flex: 999 1 560px; min-width: 0; }
.split > .split__side { flex: 1 1 340px; min-width: 0; }
.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(var(--min, 300px), 100%), 1fr));
    gap: var(--gap, 32px);
}
.section-head {
    display: flex; flex-wrap: wrap; gap: 16px 24px;
    justify-content: space-between; align-items: flex-end;
    margin-bottom: 40px;
}

/* ---------- Tipografía ---------- */
.eyebrow {
    font-size: 12px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase;
    color: var(--azul);
}
.section--tinta .eyebrow, .section--azul .eyebrow, .on-dark .eyebrow { color: var(--amarillo); }
.display, .h1, .h2, .h3-display {
    font-family: var(--display);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    overflow-wrap: anywhere;
}
.display { font-size: clamp(48px, 10vw, 152px); line-height: 1.04; }
.h1 { font-size: clamp(44px, 8.5vw, 144px); line-height: 1.04; }
.h2 { font-size: clamp(36px, 5vw, 72px); line-height: 1.04; }
.h3-display { font-size: clamp(28px, 3.4vw, 48px); line-height: 1.08; }
.h3 { font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -0.3px; }
.lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; color: var(--texto-2); max-width: 600px; }
.section--tinta .lead, .section--azul .lead, .on-dark .lead { color: var(--texto-claro); }
.muted { color: var(--texto-3); }

/* Acentos amarillos: subrayado de una palabra o palabra en amarillo sobre oscuro */
.hl { background: linear-gradient(transparent 62%, var(--amarillo) 62%); padding-inline: 2px; }
.hl-text { color: var(--amarillo); }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 56px; padding: 0 28px;
    border-radius: 999px; border: 1.5px solid transparent;
    font-size: 17px; font-weight: 700; line-height: 1.1;
    text-decoration: none; cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn--sm { min-height: 48px; padding: 0 22px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--azul); color: var(--blanco); }
.btn--primary:hover { background: var(--azul-oscuro); color: var(--blanco); }
.btn--dark { background: var(--tinta); color: var(--blanco); }
.btn--dark:hover { background: var(--azul); color: var(--blanco); }
.btn--outline { border-color: var(--tinta); color: var(--tinta); background: transparent; }
.btn--outline:hover { background: var(--tinta); color: var(--blanco); }
.btn--light { background: var(--blanco); color: var(--tinta); }
.btn--light:hover { background: var(--niebla); color: var(--tinta); }
.btn--outline-light { border-color: var(--blanco); color: var(--blanco); background: transparent; }
.btn--outline-light:hover { background: var(--blanco); color: var(--tinta); }
@media (max-width: 720px) { .btn { min-height: 52px; } }

.link-arrow {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
    font-weight: 700; font-size: 16px; color: var(--azul);
    text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px;
}
.link-arrow svg { width: 18px; height: 18px; }
.on-dark .link-arrow, .section--tinta .link-arrow, .section--azul .link-arrow { color: var(--blanco); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Etiquetas, chips y estados ---------- */
.tag-new {
    display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px;
    border-radius: 6px; background: var(--amarillo); color: var(--tinta);
    font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
}
.chip {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
    border-radius: 999px; border: 1px solid var(--linea-fuerte); background: var(--blanco);
    color: var(--tinta); font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.chip:hover { border-color: var(--tinta); color: var(--tinta); }
.chip.is-active, .chip[aria-pressed="true"], .chip[aria-current] { background: var(--tinta); border-color: var(--tinta); color: var(--blanco); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.badge {
    display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 14px;
    border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--tinta);
    background: var(--niebla); white-space: nowrap;
}
.badge svg { width: 14px; height: 14px; }
.badge--aprobada { background: var(--cielo); }
.badge--rechazada { background: var(--coral); }

/* ---------- Cabecera ---------- */
/* Sólida en azul tinta arriba; translúcida con desenfoque al bajar (clase .is-scrolled desde nngg.js) */
.site-header {
    position: sticky; top: 0; z-index: 50; color: var(--blanco);
    background: var(--tinta); border-bottom: 1px solid var(--linea-oscura);
    transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled {
    background: rgba(11, 27, 58, .72);
    border-bottom-color: rgba(255, 255, 255, .08);
    box-shadow: 0 8px 24px rgba(11, 27, 58, .18);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-header.is-scrolled { background: rgba(11, 27, 58, .94); }
}
.site-header__inner {
    max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter);
    min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.site-header__logo img { height: 34px; width: auto; }
.nav-links { display: flex; align-self: stretch; gap: 4px; list-style: none; padding: 0; }
.nav-links a {
    display: flex; align-items: center; height: 100%; min-height: 44px; padding: 0 14px;
    font-size: 15px; font-weight: 600; color: inherit; text-decoration: none; white-space: nowrap;
    border-bottom: 3px solid transparent;
}
.nav-links a:hover { border-bottom-color: var(--linea-fuerte); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--amarillo); }
.site-header__actions { display: flex; align-items: center; gap: 8px; }
.site-header__actions { flex-shrink: 0; }
.site-header__actions .btn { white-space: nowrap; }
.site-header .btn--primary { background: var(--blanco); color: var(--tinta); }
.site-header .btn--primary:hover { background: var(--niebla); }
.menu-toggle {
    display: none; width: 44px; height: 44px; border-radius: 999px;
    border: 1px solid #4A5B7E; background: transparent; color: inherit;
    align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.menu-toggle svg { width: 22px; height: 22px; }
@media (max-width: 1100px) {
    .site-header__inner { min-height: 68px; gap: 12px; }
    .site-header__logo img { height: auto; width: clamp(120px, 38vw, 166px); }
    .nav-links { display: none; }
    .menu-toggle { display: inline-flex; }
    .site-header .btn--sm { min-height: 44px; padding: 0 18px; }
}

/* Menú móvil a pantalla completa */
.mobile-menu {
    position: fixed; inset: 0; z-index: 60; background: var(--tinta); color: var(--blanco);
    padding: 16px var(--gutter) 24px; display: flex; flex-direction: column; gap: 28px;
    overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__top { display: flex; justify-content: space-between; align-items: center; min-height: 52px; }
.mobile-menu__top img { height: 26px; width: auto; }
.mobile-menu nav ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mobile-menu nav a {
    font-family: var(--display); font-size: 44px; line-height: 1.15; text-transform: uppercase;
    color: var(--blanco); text-decoration: none;
}
.mobile-menu nav a[aria-current="page"] { color: var(--amarillo); }
.mobile-menu__sub { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu__sub a { color: var(--texto-claro); font-size: 16px; min-height: 40px; display: flex; align-items: center; }
.mobile-menu__cta { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.mobile-menu .menu-toggle { display: inline-flex; border-color: #4A5B7E; color: var(--blanco); }
body.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { padding-block: 64px 80px; }
.hero__media { display: flex; gap: 16px; align-items: flex-end; }
.hero__media .tall { flex: 3; aspect-ratio: 9 / 16; }
.hero__media .stack-media { flex: 2; display: flex; flex-direction: column; gap: 16px; }
.hero__media .short { aspect-ratio: 4 / 5; }
/* Hero de portada: la foto a sangre manda; el texto va sobre el desenfoque azul de la derecha */
.hero-photo {
    position: relative; isolation: isolate; overflow: hidden;
    background: var(--tinta); color: var(--blanco);
    min-height: clamp(620px, calc(100svh - 88px), 920px);
    display: flex; align-items: flex-end;
}
.hero-photo__img, .hero-photo__img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-photo__img { z-index: -2; }
.hero-photo__img img { object-fit: cover; object-position: 30% 35%; }
.hero-photo::after {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        linear-gradient(to left, rgba(11, 27, 58, .82) 0%, rgba(11, 27, 58, .55) 38%, rgba(11, 27, 58, 0) 62%),
        linear-gradient(to top, rgba(11, 27, 58, .55) 0%, rgba(11, 27, 58, 0) 35%);
}
.hero-photo__inner { width: 100%; display: flex; justify-content: flex-end; padding-block: 80px; }
.hero-photo__content { max-width: min(600px, 48vw); }
@media (min-width: 961px) and (max-width: 1280px) {
    /* Desplaza el encuadre para que el texto no pise la cara */
    .hero-photo__img img { object-position: 55% 35%; }
    .hero-photo .display { font-size: clamp(64px, 7vw, 96px); }
}
.hero-photo .display { font-size: clamp(56px, 6.6vw, 104px); }
.hero-photo .lead { color: #E3E8F0; }
.hero-photo .eyebrow { color: var(--amarillo); }
@media (max-width: 960px) {
    .hero-photo::after {
        background: linear-gradient(to top, rgba(11, 27, 58, .95) 0%, rgba(11, 27, 58, .7) 40%, rgba(11, 27, 58, 0) 70%);
    }
    .hero-photo__inner { justify-content: flex-start; }
    .hero-photo__content { max-width: 600px; }
}
@media (max-width: 720px) {
    /* En móvil la foto vertical ocupa la parte alta y el texto entra sobre su fundido */
    .hero-photo { display: block; min-height: 0; }
    .hero-photo__img { position: relative; display: block; aspect-ratio: 4 / 5; }
    .hero-photo__img img { object-position: 50% 30%; }
    .hero-photo::after {
        inset: 0 0 auto 0; aspect-ratio: 4 / 5; height: auto;
        background: linear-gradient(to top, var(--tinta) 0%, rgba(11, 27, 58, .75) 28%, rgba(11, 27, 58, 0) 60%);
    }
    .hero-photo__inner { margin-top: -140px; padding-block: 0 48px; position: relative; }
    .hero-photo .display { font-size: clamp(48px, 13vw, 64px); }
}

.media { border-radius: 20px; overflow: hidden; background: var(--azul); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero { padding-block: 64px 40px; }
.page-hero__row { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end; }
.page-hero__rule { border-top: 1px solid var(--tinta); padding-top: 24px; margin-top: 32px; }
@media (max-width: 720px) {
    .hero { padding-block: 28px 40px; }
    .hero__media .stack-media { display: none; }
    .hero__media .tall { aspect-ratio: 4 / 5; }
}


/* ---------- Tarjetas ---------- */
.card-news { display: flex; flex-direction: column; gap: 14px; color: var(--tinta); text-decoration: none; }
.card-news__img { position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; background: var(--niebla); }
.card-news__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card-news:hover .card-news__img img { transform: scale(1.03); }
.card-news__img .tag-new { position: absolute; top: 16px; left: 16px; }
.card-news__title { font-size: 22px; font-weight: 700; line-height: 1.28; letter-spacing: -0.3px; }
.card-news:hover .card-news__title { color: var(--azul); }
.card-news--lead .card-news__img { aspect-ratio: 16 / 10; border-radius: 20px; }
.card-news--lead .card-news__title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; line-height: 1.15; letter-spacing: -0.6px; }
.card-news--row { flex-direction: row; align-items: flex-start; gap: 20px; }
.card-news--row .card-news__img { width: 160px; flex-shrink: 0; aspect-ratio: 1; }
.card-news--row .card-news__title { font-size: 20px; }
@media (max-width: 720px) { .card-news--row .card-news__img { width: 96px; } .card-news--row .card-news__title { font-size: 17px; } }
.news-side { display: flex; flex-direction: column; gap: 32px; }
.news-side > * + * { border-top: 1px solid var(--linea); padding-top: 32px; }

.card-feature {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0;
    background: var(--tinta); color: var(--blanco); border-radius: var(--r-lg); overflow: hidden; text-decoration: none;
}
.card-feature:hover { color: var(--blanco); }
.card-feature__img { flex: 999 1 560px; min-width: 0; aspect-ratio: 16 / 10; background: var(--azul); }
.card-feature__img img { width: 100%; height: 100%; object-fit: cover; }
.card-feature__body { flex: 1 1 360px; padding: 40px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.card-feature__title { font-family: var(--display); font-size: clamp(36px, 3.4vw, 48px); line-height: 0.98; text-transform: uppercase; }
.card-feature .eyebrow { color: var(--cielo); }
@media (max-width: 720px) { .card-feature__body { padding: 24px; } }

.card-ini {
    display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
    background: var(--blanco); border-radius: var(--r); padding: 28px; min-height: 260px;
    color: var(--tinta); text-decoration: none; border: 1px solid transparent;
}
.section--niebla .card-ini { border-color: transparent; }
.card-ini:hover { border-color: var(--azul); color: var(--tinta); }
.card-ini__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-ini__title { font-size: 21px; font-weight: 700; line-height: 1.3; }
.card-ini__meta { font-size: 14px; color: var(--texto-3); border-top: 1px solid var(--linea); padding-top: 16px; }

.ini-list { border-top: 1px solid var(--tinta); }
.ini-row {
    display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; padding: 26px 0;
    border-bottom: 1px solid var(--linea); color: var(--tinta); text-decoration: none;
}
.ini-row:hover .ini-row__title { color: var(--azul); }
.ini-row__date { width: 110px; font-size: 14px; color: var(--texto-3); }
.ini-row__area { width: 170px; }
.ini-row__title { flex: 1 1 360px; font-size: 20px; font-weight: 700; line-height: 1.3; }
.ini-row svg.arrow { width: 22px; height: 22px; }
@media (max-width: 720px) {
    .ini-row { gap: 8px 16px; padding: 20px 0; }
    .ini-row__date, .ini-row__area { width: auto; }
    .ini-row__title { flex-basis: 100%; order: 3; font-size: 18px; }
    .ini-row svg.arrow { display: none; }
}

.card-person { display: flex; flex-direction: column; gap: 8px; }
.card-person__img { border-radius: 20px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--cielo); }
.card-person__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card-person--sq .card-person__img { aspect-ratio: 1; border-radius: var(--r); background: var(--blanco); }
.card-person__name { font-size: 18px; font-weight: 700; }
.card-person__role { font-size: 14px; color: var(--texto-3); margin-top: -4px; }
.card-person__links { display: flex; gap: 8px; margin-top: 4px; }

/* ---------- Organigrama (Conócenos) ----------
   Dirección → vicesecretarías → secretarías de área.
   La jerarquía real la dan las listas anidadas; las líneas son
   pseudo-elementos decorativos que dibujan el árbol. */
.org {
    --line: 2px;
    --line-c: var(--azul);
    --cg: 24px;        /* entre columnas */
    --rg: 64px;        /* entre filas: aquí va la barra horizontal */
    --lead: 200px;     /* retrato de Dirección */
    --lead-col: 320px;
    --face: 132px;     /* retrato de vicesecretaría */
    --face-sm: 112px;  /* retrato de secretaría */
    --elbow: 22px;
}
:where(.org) ul { list-style: none; margin: 0; padding: 0; }

/* Retratos circulares; el fondo cielo solo asoma en fotos recortadas. */
.org-face {
    position: relative; flex-shrink: 0;
    width: var(--face); height: var(--face);
    border-radius: 999px; overflow: hidden; background: var(--cielo);
}
.org-face img {
    display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%;
    transform: scale(var(--portrait-zoom, 1)); transform-origin: 50% 40%;
}
.org-face--lg { width: var(--lead); height: var(--lead); box-shadow: 0 0 0 8px var(--niebla); z-index: 1; }
.org-face--sm { width: var(--face-sm); height: var(--face-sm); }
.org-face--ini {
    display: flex; align-items: center; justify-content: center;
    background: var(--amarillo); color: var(--tinta);
    font-size: 28px; font-weight: 800; letter-spacing: .5px;
}

/* Dirección: dos retratos unidos; del centro baja el tronco */
.org__top {
    position: relative;
    display: grid; grid-template-columns: repeat(2, minmax(0, var(--lead-col)));
    justify-content: center;
    padding-bottom: 48px;
}
.org__top::before, .org__top::after { content: ""; position: absolute; background: var(--line-c); }
.org__top::before {
    top: calc(var(--lead) / 2 - var(--line) / 2); height: var(--line);
    left: max(25%, 50% - var(--lead-col) / 2); right: max(25%, 50% - var(--lead-col) / 2);
}
.org__top::after { top: calc(var(--lead) / 2); bottom: 0; left: calc(50% - var(--line) / 2); width: var(--line); }
.org-lead { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-inline: 12px; text-align: center; }
.org-lead .org-face { margin-bottom: 16px; }
.org-lead__name { font-size: 20px; font-weight: 800; line-height: 1.25; }
.org-lead__role { font-size: 15px; color: var(--texto-3); }

/* Vicesecretarías */
.org__areas {
    display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr));
    column-gap: var(--cg); row-gap: var(--rg);
    padding-top: calc(var(--rg) / 2);
}
.org-area {
    position: relative;
    display: flex; flex-direction: column; gap: 18px;
    background: var(--blanco); border-radius: var(--r-lg); border: 1px solid var(--linea);
    padding: 28px;
}
.org-area::before, .org-area::after, .org-area__trunk { content: ""; position: absolute; background: var(--line-c); }
.org-area__trunk { display: none; }
.org-area__name {
    font-family: var(--display); font-weight: 400; text-transform: uppercase;
    font-size: 30px; line-height: 1; letter-spacing: .3px; color: var(--tinta);
    overflow-wrap: anywhere;
}

.org-person { display: flex; align-items: center; gap: 24px; }
.org-person__text { display: flex; flex-direction: column; min-width: 0; }
.org-person__name { font-size: 22px; font-weight: 700; line-height: 1.3; }
.org-person__role { font-size: 14px; line-height: 1.35; color: var(--texto-3); }

/* Secretarías: cuelgan del retrato de su vicesecretaría */
.org-area__team {
    display: flex; flex-direction: column; gap: 12px;
    margin-top: 0;
    padding-left: 36px;
}
.org-person--sub { position: relative; align-items: center; }
.org-person--sub .org-person__text { padding-top: 2px; }
.org-person--sub .org-person__name { font-size: 20px; }
.org-person--sub::before, .org-person--sub::after { content: ""; position: absolute; background: var(--line-c); }
.org-person--sub::before {
    left: calc(-1 * var(--elbow) - var(--line) / 2); width: var(--line);
    top: -12px; bottom: 0;
}
.org-person--sub:last-child::before { bottom: auto; height: calc(12px + var(--face-sm) / 2 + var(--line) / 2); }
.org-person--sub::after {
    left: calc(-1 * var(--elbow) - var(--line) / 2); width: calc(var(--elbow) + var(--line) / 2);
    top: calc(var(--face-sm) / 2 - var(--line) / 2); height: var(--line);
}

/* Móvil: raíl a la izquierda del que cuelga cada área */
@media (max-width: 639px) {
    .org { --lead: clamp(100px, 26vw, 148px); --face: 104px; --face-sm: 104px; --rg: 24px; --rail: 6px; --indent: 20px; }
    .org__top { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: var(--indent); padding-bottom: 28px; }
    .org__top::before { left: var(--rail); right: calc((100% - var(--indent)) / 4); }
    .org__top::after { left: calc(var(--rail) - var(--line) / 2); }
    .org-lead { padding-inline: 4px; }
    .org-lead__name { font-size: 17px; }
    .org-lead__role { font-size: 14px; }
    .org__areas { padding-left: var(--indent); padding-top: var(--rg); }
    .org-area::after {
        left: calc(var(--rail) - var(--indent) - var(--line) / 2); width: var(--line);
        top: calc(-1 * var(--rg)); bottom: 0;
    }
    .org-area:last-child::after { bottom: auto; height: calc(var(--rg) + 38px); }
    .org-area::before {
        left: calc(var(--rail) - var(--indent)); width: calc(var(--indent) - var(--rail));
        top: calc(38px - var(--line) / 2); height: var(--line);
    }
    .org-area { padding: 22px 18px 22px; }
    .org-area__name { font-size: 28px; }
    .org-person { gap: 16px; }
    .org-person__name, .org-person--sub .org-person__name { font-size: 18px; }
    .org-area__team { padding-left: 14px; }
    .org-person--sub::before, .org-person--sub::after { --elbow: 12px; }
}

/* Tableta y escritorio: barra horizontal por fila, bajada a cada área
   y tronco central que enlaza una fila con la siguiente */
@media (min-width: 640px) {
    .org-area::before {
        top: calc(var(--rg) / -2 - var(--line) / 2); height: var(--line);
        left: calc(var(--cg) / -2); right: calc(var(--cg) / -2);
    }
    .org-area::after { top: calc(var(--rg) / -2); height: calc(var(--rg) / 2); left: calc(50% - var(--line) / 2); width: var(--line); }
    .org-area:last-child::before { right: 50%; }
    .org-area__trunk { top: calc(var(--rg) / -2); bottom: calc(var(--rg) / -2); right: calc(var(--cg) / -2 - var(--line) / 2); width: var(--line); }
}
@media (min-width: 640px) {
    .org__areas { --cols: 2; }
    .org-area:nth-child(2n+1)::before { left: 50%; }
    .org-area:nth-child(2n)::before { right: 50%; }
    .org-area:nth-child(2n+1):not(:nth-last-child(-n+2)) .org-area__trunk { display: block; }
}
@media (min-width: 640px) and (max-width: 1000px) {
    .org { --face: 112px; --face-sm: 104px; }
    .org-area { padding: 24px; }
    .org-person { flex-direction: column; align-items: flex-start; gap: 16px; }
    .org-area__name { min-height: 2em; }
}
@media (max-width: 380px) {
    .org-person { flex-direction: column; align-items: flex-start; gap: 12px; }
}

.person-row { display: flex; gap: 14px; align-items: center; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--linea); }
.person-row__ini {
    width: 48px; height: 48px; border-radius: 999px; background: var(--azul); color: var(--blanco);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0;
}

.promo {
    position: relative; display: flex; flex-direction: column; justify-content: flex-end;
    min-height: 520px; border-radius: 20px; overflow: hidden; color: var(--blanco); text-decoration: none;
    background: var(--azul);
}
.promo:hover { color: var(--blanco); }
.promo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo__panel { position: relative; background: var(--azul); margin: 20px; border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.promo .eyebrow, .junta-panel .eyebrow { color: var(--amarillo); }
.promo--tinta { background: var(--tinta); justify-content: space-between; padding: 36px; gap: 24px; }
.promo__map { background: var(--blanco); border-radius: var(--r); padding: 16px; }
.promo__map img { width: 100%; height: auto; }
.promo__map svg { display: block; width: 100%; height: auto; }
.promo__map svg path { fill: var(--azul); stroke: var(--blanco); stroke-width: 1.5; }
@media (max-width: 720px) { .promo { min-height: 0; } .promo--tinta { padding: 24px; } .promo__panel { margin: 12px; padding: 20px; } }

/* Cifras */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border-top: 1px solid currentColor; }
.stats > div { padding: 20px 20px 0 0; display: flex; flex-direction: column; gap: 6px; }
.stats > div + div { border-left: 1px solid var(--linea); padding-left: 20px; }
.section--tinta .stats > div + div { border-left-color: #4A5B7E; }
.stats__num { font-family: var(--display); font-size: clamp(56px, 6vw, 80px); line-height: 1; }
.stats__label { font-size: 14px; color: var(--texto-3); }
.section--tinta .stats__label { color: var(--texto-claro); }

/* ---------- Banda Afíliate (azul, nunca amarilla) ---------- */
.cta-band { background: var(--azul); color: var(--blanco); overflow: hidden; }
.cta-band__inner { padding-block: 80px; }
.cta-band .lead { color: #D5E0F2; }
.cta-band__media { display: flex; justify-content: center; align-items: center; }
/* Trama de puntos: «gente como tú». Un único punto amarillo como acento. */
.cta-trama {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(10px, 1.6vw, 18px);
    width: 100%; max-width: 380px;
}
.cta-trama__p { aspect-ratio: 1; border-radius: 50%; }
.cta-trama__p--f { background: var(--cielo); opacity: .85; }
.cta-trama__p--m { background: var(--azul-oscuro); box-shadow: inset 0 0 0 1px rgba(158, 216, 255, .18); }
.cta-trama__p--o { box-shadow: inset 0 0 0 2px rgba(158, 216, 255, .55); }
.cta-trama__p--y {
    background: var(--amarillo); transform: scale(1.18);
    animation: cta-trama-pulso 2.8s ease-in-out infinite;
}
@keyframes cta-trama-pulso {
    0%, 100% { box-shadow: 0 0 0 6px rgba(247, 212, 23, .18); }
    50% { box-shadow: 0 0 0 14px rgba(247, 212, 23, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .cta-trama__p--y { animation: none; box-shadow: 0 0 0 8px rgba(247, 212, 23, .16); }
}
@media (max-width: 720px) { .cta-trama { max-width: 300px; margin-inline: auto; } }
@media (max-width: 720px) { .cta-band__inner { padding-block: 56px; } }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; }
.input, .select {
    min-height: 52px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--linea-fuerte);
    background: var(--blanco); font-size: 16px; color: var(--tinta); width: 100%;
}
.input--soft { background: var(--niebla); }
.input:focus, .select:focus { outline: none; border: 2px solid var(--azul); }
.filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.filters .field--grow { flex: 1 1 320px; }
.segmented { display: inline-flex; gap: 4px; padding: 4px; background: var(--niebla); border-radius: 999px; }
.segmented a, .segmented button {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px;
    font-size: 15px; font-weight: 700; color: var(--texto-2); text-decoration: none; border: 0; background: transparent; cursor: pointer;
}
.segmented [aria-current], .segmented [aria-pressed="true"] { background: var(--blanco); color: var(--tinta); box-shadow: 0 1px 3px rgba(11, 27, 58, .18); }

/* ---------- Paginación ---------- */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 56px; }
.pagination a, .pagination span {
    min-width: 48px; height: 48px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--linea-fuerte);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--tinta); text-decoration: none;
}
.pagination a:hover { border-color: var(--tinta); }
.pagination [aria-current] { background: var(--tinta); border-color: var(--tinta); color: var(--blanco); }
.pagination span.gap { border: 0; min-width: 24px; }

/* ---------- Artículo ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--texto-3); }
.breadcrumb a { color: var(--texto-3); }
.article-head { max-width: 1040px; margin: 0 auto; padding: 56px var(--gutter) 40px; display: flex; flex-direction: column; gap: 24px; }
.article-title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(40px, 6vw, 88px); line-height: 0.94; }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; border-top: 1px solid var(--linea); padding-top: 20px; }
.share { display: flex; gap: 8px; }
.icon-btn {
    width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--linea-fuerte);
    display: inline-flex; align-items: center; justify-content: center; color: var(--tinta); background: transparent; cursor: pointer; padding: 0;
}
.icon-btn:hover { border-color: var(--tinta); color: var(--tinta); }
.icon-btn svg { width: 20px; height: 20px; }
.on-dark .icon-btn, .site-footer .icon-btn { border-color: #4A5B7E; color: var(--blanco); }
.article-cover { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.article-cover .media { aspect-ratio: 21 / 9; border-radius: var(--r-lg); background: var(--niebla); }
@media (max-width: 720px) { .article-cover .media { aspect-ratio: 4 / 3; } }
/* Foto entera (elegido en el panel): sin recortar, ideal para fotos verticales. */
.article-cover--completa .media { aspect-ratio: auto; display: flex; justify-content: center; align-items: center; background: var(--niebla); }
.article-cover--completa .media img { width: auto; max-width: 100%; height: auto; max-height: min(85vh, 960px); object-fit: contain; }

.prose { max-width: 768px; margin: 0 auto; padding: 56px var(--gutter) 80px; font-size: 18px; line-height: 1.7; color: #1F2B44; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -0.4px; color: var(--tinta); margin-top: 1.6em; }
.prose h3 { font-size: 22px; line-height: 1.3; font-weight: 700; color: var(--tinta); margin-top: 1.4em; }
.prose img { border-radius: var(--r); margin-block: 1.4em; }
.prose blockquote { margin: 1.6em 0; border-top: 3px solid var(--amarillo); padding-top: 16px; font-family: var(--display); font-size: 36px; line-height: 1.04; text-transform: uppercase; color: var(--tinta); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose iframe { max-width: 100%; }

/* ---------- Bloques varios ---------- */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; border-top: 1px solid var(--tinta); }
.steps li { padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.steps__num { font-family: var(--display); font-size: 64px; line-height: 1; color: var(--azul); }
.steps strong { font-size: 22px; }
.steps span:last-child { color: var(--texto-2); }

.panel { border-radius: 20px; padding: 40px; display: flex; flex-direction: column; gap: 20px; }
.panel--tinta { background: var(--tinta); color: var(--blanco); }
.panel--azul { background: var(--azul); color: var(--blanco); }
.panel--line { border: 1px solid var(--linea); background: var(--blanco); }
.panel--niebla { background: var(--niebla); }
@media (max-width: 720px) { .panel { padding: 28px 24px; } }
.check-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: center; }
.check-list svg { width: 18px; height: 18px; color: var(--amarillo); flex-shrink: 0; }
.file-link {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 0 20px;
    border: 1.5px solid var(--tinta); border-radius: 14px; color: var(--tinta); font-weight: 700; text-decoration: none;
}
.file-link:hover { background: var(--tinta); color: var(--blanco); }
.file-link--soft { border-color: transparent; background: var(--niebla); }

.faq { border-top: 1px solid var(--tinta); }
.faq details { border-bottom: 1px solid var(--linea); padding: 22px 0; }
.faq summary { font-size: 19px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 24px; line-height: 1; color: var(--azul); }
.faq details[open] summary::after { content: '–'; }
.faq p { margin-top: 12px; color: var(--texto-2); }

.dl { display: flex; flex-direction: column; }
.dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--linea); font-size: 15px; }
.dl dt { color: var(--texto-3); }
.dl dd { margin: 0; font-weight: 700; text-align: right; }
.on-dark .dl > div, .panel--tinta .dl > div { border-top-color: var(--linea-oscura); }
.panel--tinta .dl dt { color: var(--texto-claro); }

.vote-group { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--linea-oscura); }
.vote-group__label { font-size: 13px; color: var(--texto-claro); display: flex; align-items: center; gap: 8px; }
.vote-group__label i { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
.party-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 14px; font-weight: 600; }
.party-chip--pp { background: var(--blanco); color: var(--tinta); }

/* Mapa de juntas locales */
.map-box { background: var(--niebla); border-radius: var(--r-lg); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
/* Mapa: mismas reglas que juntas_locales.php. Se aplican a TODOS los trazados del SVG
   (también a la capa de contornos), que es lo que lo deja limpio, sin bordes negros. */
.map-box [data-juntas-map] { display: flex; justify-content: center; align-items: center; }
.map-box svg { width: 100%; height: auto; max-height: 550px; display: block; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .1)); }
.map-box svg path {
    fill: #E2E8F0; stroke: var(--blanco); stroke-width: 1.5;
    transition: all .3s ease; cursor: pointer;
}
.map-box svg path.is-junta { fill: var(--azul); }
.map-box svg path.is-junta:hover, .map-box svg path.is-junta:focus-visible { fill: var(--amarillo); transform: translateY(-2px); outline: none; }
.map-box svg path.is-junta.is-selected { fill: var(--amarillo); filter: drop-shadow(0 0 10px rgba(247, 212, 23, .5)); }
.map-box svg path.is-inactive { fill: #D1D5DB; cursor: default; }
@media (prefers-reduced-motion: reduce) {
    .map-box svg path { transition: none; }
    .map-box svg path.is-junta:hover { transform: none; }
}
.legend { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; color: var(--texto-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.junta-panel { background: var(--tinta); color: var(--blanco); border-radius: var(--r-lg); padding: 32px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (min-width: 961px) { .junta-panel { position: sticky; top: 112px; align-self: flex-start; } }
/* El tamaño final lo ajusta nngg.js para que nombres largos («San Martín del Rey Aurelio») quepan enteros */
.junta-panel__name {
    font-family: var(--display); font-weight: 400; font-size: 64px; line-height: 0.92; text-transform: uppercase;
    max-width: 100%; overflow-wrap: break-word; hyphens: auto;
}
.junta-panel [data-junta-panel]:not([hidden]) { animation: fade-up .3s ease-out; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .junta-panel [data-junta-panel]:not([hidden]) { animation: none; } }
@media (max-width: 720px) { .map-box, .junta-panel { padding: 20px; } }

/* Hemiciclo */
.seat-legend { list-style: none; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--tinta); }
.seat-legend li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.seat-legend li span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.seat-legend i { width: 14px; height: 14px; border-radius: 999px; display: inline-block; }
.seat-legend .is-pp { font-weight: 800; }

/* Índice lateral (legal) */
.toc { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--tinta); padding-top: 16px; }
.toc a { min-height: 40px; display: flex; align-items: center; color: var(--texto-2); text-decoration: none; border-left: 3px solid transparent; padding-left: 12px; }
.toc a:hover { color: var(--tinta); border-left-color: var(--linea-fuerte); }
@media (min-width: 961px) { .toc { position: sticky; top: 120px; } }

/* ---------- Pie ---------- */
.site-footer { background: var(--tinta); color: var(--blanco); }
.site-footer__inner { padding-block: 64px 28px; display: flex; flex-direction: column; gap: 48px; }
.site-footer__claim { font-family: var(--display); font-size: clamp(52px, 8.8vw, 126px); line-height: 1.02; letter-spacing: -.025em; text-transform: uppercase; }
.site-footer__statement { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-bottom: 48px; border-bottom: 1px solid #FFFFFF26; }
.site-footer__symbol { display: grid; place-items: center; flex: 0 0 clamp(120px, 17vw, 224px); aspect-ratio: 1; color: var(--amarillo); border: 1px solid #FFFFFF33; border-radius: 50%; }
.site-footer__symbol svg { width: 72%; height: 72%; stroke-width: 1.2; }
.site-footer__directory { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 64px; }
.site-footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.site-footer__logo { height: 40px; width: auto; max-width: 100%; object-fit: contain; }
.site-footer__caption { color: var(--texto-claro); font-size: 14px; line-height: 1.6; }
.site-footer__cols { flex: 2 1 520px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 32px; }
.site-footer__cols h2 { font-size: 12px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: var(--amarillo); margin-bottom: 8px; }
.site-footer__cols ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.site-footer__cols a { color: var(--blanco); text-decoration: none; font-size: 15px; min-height: 36px; display: flex; align-items: center; }
.site-footer__cols a:hover { text-decoration: underline; }
.site-footer__bottom { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; border-top: 1px solid var(--linea-oscura); padding-top: 28px; font-size: 14px; color: var(--texto-claro); }
.site-footer__bottom a { color: var(--texto-claro); }
.partner-logos { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.partner-logos a { min-height: 48px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; transition: transform .2s ease, opacity .2s ease; }
.partner-logos a:hover, .partner-logos a:focus-visible { transform: translateY(-3px) scale(1.04); opacity: .85; }
.partner-logos img { height: 30px; width: auto; }
.socials { display: flex; gap: 10px; }

/* Utilidades */
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }
.center { text-align: center; }
.empty { padding: 48px 0; font-size: 18px; color: var(--texto-3); }

/* Ajustes de contraste e iconos dentro de componentes */
.panel--tinta .lead, .panel--azul .lead { color: var(--texto-claro); }
.file-link svg, .follow-card svg, .btn-row .badge svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Evita cortes de texto con zoom y en móviles estrechos. */
.btn, .file-link { padding-block: 12px; overflow-wrap: anywhere; }
.article-title, .card-feature__title { line-height: 1.08; overflow-wrap: anywhere; }
.junta-panel__name { line-height: 1.08; }
@media (max-width: 380px) {
    .site-header__inner { gap: 8px; }
    .site-header__logo img { max-width: 132px; height: auto; }
    .site-header .btn--sm { padding-inline: 12px; }
    .site-header .btn--sm svg { display: none; }
    .mobile-menu nav a { font-size: 36px; }
}
/* Movimiento reducido: ver el bloque «Movimiento» al final del archivo. */

/* ---------- Contacto: el formulario como carta ---------- */
:root { --error: #B42318; }
.carta {
    position: relative;
    background: var(--blanco); border-radius: 20px;
    padding: clamp(28px, 5vw, 56px);
    display: flex; flex-direction: column; gap: 12px;
}
.carta__frase {
    font-size: clamp(20px, 2.3vw, 27px); line-height: 2.05; font-weight: 500;
    letter-spacing: -0.3px; color: var(--tinta); max-width: 30em;
}
.carta__input {
    width: min(var(--w, 14ch), 100%);
    border: 0; border-bottom: 2px solid var(--linea-fuerte); border-radius: 0;
    background: transparent; padding: 0 4px 2px; margin-inline: 2px;
    font-size: inherit; font-weight: 700; line-height: 1.3; color: var(--azul);
    transition: border-color .15s ease, background-color .15s ease;
}
.carta__input::placeholder { color: var(--texto-3); font-weight: 500; opacity: .8; }
.carta__input:hover { border-bottom-color: var(--tinta); }
.carta__input:focus { outline: none; border-bottom-color: var(--azul); background: var(--niebla); }
.carta__input:focus-visible { outline: none; }
.carta__select { position: relative; display: inline-block; }
.carta__select select {
    -webkit-appearance: none; appearance: none; cursor: pointer; width: auto; padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E4A90' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 4px center; background-size: 20px;
}
.carta__mensaje {
    width: 100%; min-height: 200px; resize: vertical; margin-block: 6px 4px;
    border: 2px solid transparent; border-radius: var(--r); background: var(--niebla);
    padding: 20px 22px; font-size: 18px; line-height: 1.6; color: var(--tinta);
}
.carta__mensaje::placeholder { color: var(--texto-3); }
.carta__mensaje:focus { outline: none; border-color: var(--azul); background: var(--blanco); }
.carta [aria-invalid="true"] { border-bottom-color: var(--error); }
.carta__mensaje[aria-invalid="true"] { border-color: var(--error); }
.carta__error {
    display: flex; gap: 8px; align-items: flex-start;
    font-size: 15px; font-weight: 600; line-height: 1.45; color: var(--error); margin-top: -4px;
}
.carta__error svg, .carta__estado svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.carta__trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.carta__pie { margin-top: 20px; padding-top: 28px; border-top: 1px solid var(--linea); }
.carta__enviar { display: flex; flex-direction: column; gap: 20px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--texto-2); max-width: 60ch; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--azul); cursor: pointer; }
.check input[aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; }
.carta__acciones { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
.carta__estado { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; line-height: 1.45; color: var(--texto-3); flex: 1 1 260px; max-width: 52ch; }
.carta__estado:empty { display: none; }
.carta__estado[data-state="error"] { color: var(--error); font-weight: 600; }

.btn[aria-busy="true"] { cursor: progress; opacity: .85; transform: none; }
.btn[aria-busy="true"]::before {
    content: ""; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35); border-top-color: var(--blanco);
    animation: girar .8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* Estado enviado: la carta queda fijada y recibe el sello */
.carta.is-sent .carta__input, .carta.is-sent .carta__mensaje {
    border-color: transparent; color: var(--tinta); -webkit-text-fill-color: var(--tinta); opacity: 1;
}
.carta.is-sent .carta__mensaje { background: transparent; padding-inline: 0; resize: none; min-height: 0; }
.carta.is-sent .carta__select select { background-image: none; padding-right: 4px; }
.carta__enviado { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.carta__enviado:focus { outline: none; }
.carta__confirmacion { font-size: 17px; line-height: 1.55; color: var(--texto-2); max-width: 52ch; overflow-wrap: anywhere; }
.carta__confirmacion strong { color: var(--tinta); }

.sello {
    position: absolute; z-index: 2; top: -36px; right: clamp(16px, 4vw, 48px);
    width: 148px; aspect-ratio: 1; border-radius: 50%;
    display: grid; place-content: center; gap: 4px; text-align: center;
    background: var(--amarillo); color: var(--tinta);
    outline: 2px dashed var(--tinta); outline-offset: -11px;
    transform: rotate(-9deg);
    pointer-events: none;
}
.sello__titulo { font-family: var(--display); font-size: 32px; line-height: 1; text-transform: uppercase; letter-spacing: .5px; }
.sello__fecha { font-size: 13px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.sello.is-landing { animation: sellar .55s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes sellar {
    0% { opacity: 0; transform: rotate(-24deg) scale(1.9); }
    70% { opacity: 1; transform: rotate(-7deg) scale(.94); }
    100% { opacity: 1; transform: rotate(-9deg) scale(1); }
}
@media (max-width: 720px) {
    .sello { width: 112px; top: -28px; right: 12px; }
    .sello__titulo { font-size: 24px; }
    .sello__fecha { font-size: 11px; }
    .carta__frase { line-height: 1.9; }
    .carta__acciones .btn { width: 100%; }
}

.contacto__otras { gap: 40px; padding: clamp(28px, 4vw, 40px); }
.contacto__otras .h3 { color: var(--blanco); }
.contacto__nota { color: var(--texto-claro); font-size: 16px; line-height: 1.55; }
.contacto__correos { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.contacto__correos a {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
    color: var(--blanco); font-weight: 700; text-decoration: underline;
    text-underline-offset: 5px; text-decoration-color: var(--linea-oscura); overflow-wrap: anywhere;
}
.contacto__correos a:hover { text-decoration-color: var(--amarillo); color: var(--blanco); }
.contacto__correos svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--amarillo); }
/* Los campos crecen con lo escrito, para que la frase se lea seguida */
@supports (field-sizing: content) {
    .carta__input { field-sizing: content; width: auto; min-width: 5ch; max-width: 100%; }
    .carta.is-sent .carta__mensaje { field-sizing: content; }
}
.carta.is-sent .carta__frase:first-of-type { padding-right: 150px; }
@media (max-width: 720px) { .carta.is-sent .carta__frase:first-of-type { padding-right: 96px; } }
.carta__input::-webkit-calendar-picker-indicator { display: none !important; }
.carta__confirmacion .correo { white-space: nowrap; }
@media (max-width: 720px) {
    .carta.is-sent { padding-top: 112px; }
    .carta.is-sent .carta__frase:first-of-type { padding-right: 0; }
    .sello { top: -20px; }
}

/* ==========================================================================
   Plan de mejoras v2 (4/11/2026): bloques nuevos
   ========================================================================== */

/* Móvil: la foto del hero se funde con el fondo (evita la línea de corte) */
@media (max-width: 720px) {
    .hero-photo__img img {
        -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
    }
}

/* ---------- Lo que defendemos ---------- */
.causas {
    list-style: none; padding: 0;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.causa-card a {
    height: 100%; display: flex; flex-direction: column; gap: 12px;
    padding: 28px; border-radius: 20px; border: 1px solid var(--linea);
    background: var(--blanco); color: var(--tinta); text-decoration: none;
    transition: border-color .2s ease, transform .2s ease;
}
.causa-card a:hover { border-color: var(--azul); color: var(--tinta); transform: translateY(-2px); }
.causa-card__num { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--azul); }
.causa-card__title {
    font-family: var(--display); font-weight: 400; text-transform: uppercase;
    font-size: clamp(28px, 2.6vw, 40px); line-height: 1.05;
}
.causa-card__text { color: var(--texto-2); max-width: 46ch; }
.causa-card__more { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--azul); }
.causa-card__more svg { width: 18px; height: 18px; }
.causa-card--lead { grid-row: span var(--filas, 1); }
.causa-card--lead a {
    background: var(--azul); border-color: var(--azul); color: var(--blanco);
    padding: clamp(28px, 4vw, 48px); justify-content: flex-end; min-height: 420px;
}
.causa-card--lead a:hover { color: var(--blanco); border-color: var(--amarillo); }
.causa-card--lead .causa-card__num { color: var(--amarillo); font-size: 64px; margin-bottom: auto; padding-bottom: 32px; }
.causa-card--lead .causa-card__title { font-size: clamp(44px, 5vw, 80px); }
.causa-card--lead .causa-card__text { color: #D5E0F2; font-size: 19px; }
.causa-card--lead .causa-card__more { color: var(--amarillo); margin-top: 8px; }
.causas--compactas { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (max-width: 760px) {
    .causas { grid-template-columns: 1fr; }
    .causa-card--lead { grid-row: auto; }
    .causa-card--lead a { min-height: 0; }
}
/* Portada: cuatro carteles ilustrados, con el mismo peso visual. */
.causas--visuales { gap: 24px; }
.causas--visuales .causa-card a {
    display: grid; grid-template-columns: minmax(130px, .8fr) minmax(0, 1.5fr);
    gap: 0; padding: 0; overflow: hidden; border-radius: 24px;
}
.causa-card__art {
    display: flex; align-items: center; justify-content: center;
    padding: 20px 12px; background: #E5EFFB;
    background-image: radial-gradient(circle at 30% 25%, #FFFFFF80 0 28%, transparent 28.5%);
}
.causa-card__art svg { width: 100%; max-width: 200px; height: auto; }
.causa-card--empleo .causa-card__art { background-color: #DDF2FF; }
.causa-card--rural .causa-card__art { background-color: #E5EEDF; }
.causa-card--educacion .causa-card__art { background-color: #FFE8DE; }
.causa-card__content {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 14px; padding: 28px; min-width: 0;
}
.causas--visuales .causa-card__num {
    font-family: var(--sans); font-size: 13px; font-weight: 800; letter-spacing: .12em;
    border-bottom: 3px solid var(--amarillo); padding-bottom: 6px;
}
.causas--visuales .causa-card__title { font-size: clamp(28px, 2.6vw, 38px); }
.causas--visuales .causa-card__text { font-size: 16px; line-height: 1.6; }
.causas--visuales .causa-card__more { padding-top: 6px; }
.causas--visuales .causa-card a:focus-visible { outline: 3px solid var(--azul); outline-offset: 5px; }
@media (min-width: 761px) and (max-width: 1000px) {
    .causas--visuales .causa-card a { grid-template-columns: 1fr; }
    .causa-card__art { padding: 12px; }
    .causa-card__art svg { max-width: 150px; }
    .causa-card__content { flex: 1; }
}
@media (max-width: 480px) {
    .causas--visuales { gap: 16px; }
    .causas--visuales .causa-card a { grid-template-columns: 96px minmax(0, 1fr); }
    .causa-card__art { padding: 10px 4px; }
    .causa-card__content { padding: 22px 18px; gap: 12px; }
    .causas--visuales .causa-card__title { font-size: 28px; }
}
.tag-draft {
    align-self: flex-start; display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px;
    border-radius: 6px; background: var(--coral); color: var(--tinta);
    font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
}
.aviso-borrador { background: var(--coral); color: var(--tinta); padding: 12px 16px; border-radius: var(--r-sm); font-size: 15px; max-width: 720px; }

/* Página de causa */
.causa-cuerpo { display: flex; flex-wrap: wrap; gap: 48px; padding-block: 16px 56px; align-items: flex-start; }
.causa-cuerpo > section:first-child { flex: 1 1 420px; max-width: 680px; }
.causa-cuerpo > .panel { flex: 1 1 380px; }
.causa-cuerpo__p { font-size: 19px; line-height: 1.7; color: #1F2B44; }
.panel--tinta .eyebrow, .panel--azul .eyebrow { color: var(--amarillo); }
.propuestas { list-style: none; padding: 0; display: flex; flex-direction: column; }
.propuestas li {
    display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--linea-oscura);
    font-size: 18px; font-weight: 600; line-height: 1.45;
}
.propuestas__num { font-family: var(--display); font-size: 28px; line-height: 1; color: var(--amarillo); flex-shrink: 0; width: 40px; }

/* ---------- Tu junta local (portada) ---------- */
.territorio {
    display: flex; flex-wrap: wrap; gap: 40px; align-items: center;
    background: var(--tinta); color: var(--blanco);
    border-radius: var(--r-lg); padding: clamp(28px, 5vw, 64px);
}
.territorio__text { flex: 1 1 380px; }
.territorio .eyebrow { color: var(--amarillo); }
.territorio .lead { color: var(--texto-claro); }
.territorio__pregunta { font-size: 19px; color: var(--blanco); }
.territorio__pregunta strong { color: var(--amarillo); }
.territorio :focus-visible { outline-color: var(--amarillo); }
.territorio__map { flex: 1.3 1 420px; display: block; }
.territorio__map svg path.is-inactive { fill: #D1D5DB; }
@media (max-width: 720px) { .territorio { gap: 28px; } .territorio__map { flex-basis: 100%; } }

/* ---------- Participa a tu medida ---------- */
.participa__pasos {
    list-style: none; padding: 0;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
}
.paso {
    display: flex; flex-direction: column; gap: 12px;
    padding: 28px; border-radius: 20px; background: var(--blanco); border: 1px solid var(--linea);
}
.paso__num { font-family: var(--display); font-size: 56px; line-height: 1; color: var(--azul); }
.paso__title { font-size: 24px; font-weight: 800; line-height: 1.2; }
.paso__text { color: var(--texto-2); }
.paso__accion { margin-top: auto; padding-top: 8px; }
.paso--destacado { background: var(--azul); border-color: var(--azul); color: var(--blanco); }
.paso--destacado .paso__num { color: var(--amarillo); }
.paso--destacado .paso__text { color: #D5E0F2; }
.paso--destacado :focus-visible { outline-color: var(--amarillo); }
.paso__sub { color: var(--blanco); font-size: 14px; text-underline-offset: 4px; }
.paso__sub:hover { color: var(--amarillo); }
@media (max-width: 1080px) { .participa__pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .participa__pasos { grid-template-columns: 1fr; } .paso { padding: 24px; } }

/* ---------- Juntas locales ---------- */
.junta-noticias { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--linea-oscura); padding-top: 16px; }
.junta-noticias ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.junta-noticias a {
    display: block; color: var(--blanco); font-weight: 700; line-height: 1.35;
    text-decoration: underline; text-decoration-color: var(--linea-oscura); text-underline-offset: 4px;
}
.junta-noticias a:hover { text-decoration-color: var(--amarillo); }
.junta-noticias span { font-size: 13px; color: var(--texto-claro); }
.junta-panel .icon-btn { border-color: #4A5B7E; color: var(--blanco); }
.map-box svg path.is-inactive { cursor: pointer; }
.sin-junta { background: var(--niebla); border-radius: 12px; padding: 14px 18px; font-size: 16px; }

/* ---------- Noticias ---------- */
.chip__count { font-weight: 600; opacity: .6; margin-left: 6px; font-size: 13px; }
.filtro-estado { margin-top: 20px; color: var(--texto-2); }
.card-news__excerpt { color: var(--texto-2); font-size: 16px; line-height: 1.5; margin-top: -4px; }
.article-place { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--texto-2); font-weight: 600; }
.article-place svg { width: 18px; height: 18px; color: var(--azul); }

/* ---------- Estatutos (Conócenos) ---------- */
.estatutos { margin: 0; display: flex; flex-direction: column; border-top: 1px solid var(--tinta); }
.estatutos > div {
    display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 24px;
    padding: 20px 0; border-bottom: 1px solid var(--linea-fuerte);
}
.estatutos dt { font-weight: 800; }
.estatutos dd { margin: 0; color: var(--texto-2); }
.estatutos .muted { font-size: 13px; margin-left: 4px; white-space: nowrap; }
@media (max-width: 600px) { .estatutos > div { grid-template-columns: 1fr; } }

/* ==========================================================================
   Identidad visual (4/11/2026): duotono, caras, frase y mapa
   ========================================================================== */

/* ---------- Duotono azul ----------
   Unifica fotos de procedencia muy distinta (móvil, WhatsApp, prensa):
   sombras en tinta y luces en azul claro. Se aplica a las imágenes
   secundarias; la noticia principal, el hero y los retratos del
   organigrama conservan su color. */
.duo,
.card-news:not(.card-news--lead) .card-news__img,
.cara__foto {
    position: relative; isolation: isolate; background: #A9C8F2;
}
.duo img,
.card-news:not(.card-news--lead) .card-news__img img,
.cara__foto img {
    filter: grayscale(1) contrast(1.12) brightness(1.04);
    mix-blend-mode: multiply;
}
.duo::after,
.card-news:not(.card-news--lead) .card-news__img::after,
.cara__foto::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: var(--tinta); mix-blend-mode: lighten;
}

/* ---------- Frase de portada ---------- */
.frase { padding-block: clamp(72px, 12vw, 160px); text-align: left; }
.frase__texto { margin: 0; }
.frase__ligera {
    display: block; font-family: var(--sans); font-weight: 200;
    font-size: clamp(32px, 5.4vw, 80px); line-height: 1.05; letter-spacing: -0.03em; color: var(--texto-2);
}
.frase__fuerte {
    display: block; font-family: var(--display); font-weight: 400; text-transform: uppercase;
    font-size: clamp(48px, 9.6vw, 152px); line-height: 1; color: var(--tinta); margin-top: .08em; max-width: 15ch;
}

/* ---------- Caras de NNGG ---------- */
.caras { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.cara { display: flex; flex-direction: column; gap: 14px; }
.cara__foto { border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 5; }
.cara__foto img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cara__frase {
    font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--tinta);
    border-top: 3px solid var(--amarillo); padding-top: 12px;
}
.cara__frase--pendiente { color: var(--texto-3); font-weight: 500; font-style: italic; }
.cara__quien { font-size: 14px; color: var(--texto-3); }
.cara__quien strong { color: var(--tinta); }
@media (max-width: 600px) { .caras { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .cara__frase { font-size: 15px; } }

/* ---------- Cierre editorial: tipografía y dirección ---------- */
.site-footer { position: relative; overflow: hidden; }
.site-footer::before {
    content: ""; display: block; height: 5px;
    background: linear-gradient(to right, var(--amarillo) 0 16%, var(--azul) 16% 100%);
}
@media (max-width: 900px) {
    .site-footer__directory { grid-template-columns: 1fr; gap: 36px; }
    .site-footer__brand { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px 24px; }
    .site-footer__brand .socials { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 600px) {
    .site-footer__inner { padding-block: 40px 24px; gap: 32px; }
    .site-footer__statement { gap: 12px; padding-bottom: 32px; }
    .site-footer__claim { font-size: clamp(42px, 10vw, 60px); }
    .site-footer__symbol { flex-basis: 56px; }
    .site-footer__brand { display: flex; align-items: flex-start; gap: 18px; }
    .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
    .site-footer__cols h2 { letter-spacing: 2px; }
    .site-footer__bottom { gap: 24px; font-size: 12px; }
}

/* ==========================================================================
   Movimiento (4/11/2026)
   Momento principal: el mapa «se enciende» junta a junta, de oeste a este.
   Seña de marca: el subrayado amarillo se dibuja una vez, como un rotulador.
   El resto es respuesta: flechas que avanzan en su dirección, subrayados
   que se deslizan, pulsación de botones, confirmación al copiar.
   ========================================================================== */
:root {
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --nudge: 4px;
    --lift: 2px;
}

/* Superficies del navegador con la paleta */
::selection { background: var(--amarillo); color: var(--tinta); }
input, textarea { caret-color: var(--azul); }
html { scrollbar-color: var(--linea-fuerte) transparent; }

/* ---------- Botones ---------- */
.btn {
    transition: background-color .2s var(--ease-out), color .2s var(--ease-out),
                border-color .2s var(--ease-out), transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.btn:hover { transform: translateY(calc(var(--lift) * -1)); }
.btn--primary:hover, .btn--dark:hover { box-shadow: 0 8px 18px -8px rgba(11, 27, 58, .45); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .08s; box-shadow: none; }
/* Cada icono avanza hacia donde lleva */
.btn svg, .link-arrow svg, .file-link svg, .causa-card__more svg {
    transition: transform .3s var(--ease-out);
}
:is(.btn, .link-arrow, .file-link, .causa-card a):hover svg[data-icon="arrow"],
:is(.btn, .link-arrow, .file-link, .causa-card a):focus-visible svg[data-icon="arrow"] { transform: translateX(var(--nudge)); }
:is(.btn, .link-arrow, .file-link):hover svg[data-icon="arrow-out"],
:is(.btn, .link-arrow, .file-link):focus-visible svg[data-icon="arrow-out"] { transform: translate(calc(var(--nudge) * .75), calc(var(--nudge) * -.75)); }
:is(.btn, .link-arrow, .file-link):hover svg[data-icon="download"],
:is(.btn, .link-arrow, .file-link):focus-visible svg[data-icon="download"] { transform: translateY(calc(var(--nudge) * .75)); }

/* ---------- Enlaces de texto ---------- */
/* Enlace con flecha: el subrayado pasa de tenue a pleno y se acerca al texto */
.link-arrow {
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    transition: text-decoration-color .25s var(--ease-out), text-underline-offset .25s var(--ease-out), color .2s;
}
.link-arrow:hover { text-decoration-color: currentColor; text-underline-offset: 4px; }

/* Enlaces dentro de texto */
:is(.prose, .faq, .lead, .muted, .filtro-estado, .article-place, .sin-junta, .estatutos, .breadcrumb, .page-hero) a:not(.btn):not(.chip):not(.link-arrow) {
    text-decoration-line: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    transition: text-decoration-color .2s var(--ease-out), text-underline-offset .2s var(--ease-out), color .2s;
}
:is(.prose, .faq, .lead, .muted, .filtro-estado, .article-place, .sin-junta, .estatutos, .breadcrumb, .page-hero) a:not(.btn):not(.chip):not(.link-arrow):hover {
    text-decoration-color: var(--amarillo); text-underline-offset: 5px;
}
.breadcrumb a { text-decoration-line: none !important; }
.breadcrumb a:hover { color: var(--tinta); text-decoration-line: underline !important; }

/* Pie: un trazo que se dibuja de izquierda a derecha */
.site-footer__cols a {
    width: fit-content;
    background: linear-gradient(var(--amarillo), var(--amarillo)) no-repeat 0 calc(50% + .85em) / 0 2px;
    transition: background-size .35s var(--ease-out);
}
.site-footer__cols a:hover, .site-footer__cols a:focus-visible { text-decoration: none; background-size: 100% 2px; }
.site-footer__bottom a { text-underline-offset: 3px; transition: color .2s; }
.site-footer__bottom a:hover { color: var(--blanco); }

/* Navegación: la barra crece desde el centro; amarilla en la página actual */
.nav-links a { position: relative; border-bottom-color: transparent !important; }
.nav-links a::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0;
    background: var(--blanco); opacity: .45; transform: scaleX(0);
    transition: transform .35s var(--ease-out), opacity .2s;
}
.nav-links a:hover::after, .nav-links a:focus-visible::after { transform: scaleX(1); }
.nav-links a[aria-current="page"]::after { background: var(--amarillo); opacity: 1; transform: scaleX(1); }

/* Menú móvil: se despliega de arriba abajo y los enlaces llegan en lista */
.mobile-menu:not([hidden]) { animation: menu-abrir .45s var(--ease-out); }
.mobile-menu:not([hidden]) nav li, .mobile-menu:not([hidden]) .mobile-menu__sub, .mobile-menu:not([hidden]) .mobile-menu__cta {
    animation: menu-item .5s var(--ease-out) backwards;
}
.mobile-menu:not([hidden]) nav li:nth-child(1) { animation-delay: .08s; }
.mobile-menu:not([hidden]) nav li:nth-child(2) { animation-delay: .12s; }
.mobile-menu:not([hidden]) nav li:nth-child(3) { animation-delay: .16s; }
.mobile-menu:not([hidden]) nav li:nth-child(4) { animation-delay: .2s; }
.mobile-menu:not([hidden]) nav li:nth-child(5) { animation-delay: .24s; }
.mobile-menu:not([hidden]) .mobile-menu__sub { animation-delay: .28s; }
.mobile-menu:not([hidden]) .mobile-menu__cta { animation-delay: .3s; }
@keyframes menu-abrir { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes menu-item { from { opacity: 0; transform: translateY(14px); } }
.mobile-menu nav a { transition: color .2s; }
.mobile-menu nav a:hover { color: var(--amarillo); }

/* ---------- Controles pequeños ---------- */
.chip { transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out), color .2s var(--ease-out), transform .2s var(--ease-out); }
.chip:active { transform: scale(.96); transition-duration: .08s; }
.icon-btn { transition: border-color .2s var(--ease-out), color .2s var(--ease-out), background-color .2s var(--ease-out), transform .2s var(--ease-out); }
.icon-btn:active { transform: scale(.92); transition-duration: .08s; }
.file-link { transition: background-color .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out); }
.pagination a { transition: border-color .2s, background-color .2s, color .2s; }

/* Copiar enlace: confirmación visible y anunciada */
.icon-btn[data-copy-url] { position: relative; }
.icon-btn.is-copied { background: var(--amarillo); border-color: var(--amarillo); color: var(--tinta); }
.icon-btn[data-copy-url]::after {
    content: "Enlace copiado"; position: absolute; left: 50%; bottom: calc(100% + 10px);
    padding: 6px 10px; border-radius: 6px; background: var(--tinta); color: var(--blanco);
    font-size: 13px; font-weight: 700; white-space: nowrap; pointer-events: none;
    opacity: 0; transform: translate(-50%, 6px);
    transition: opacity .2s var(--ease-out), transform .3s var(--ease-out);
}
.icon-btn.is-copied::after { opacity: 1; transform: translate(-50%, 0); }
.junta-panel .icon-btn[data-copy-url]::after { background: var(--blanco); color: var(--tinta); }

/* ---------- Tarjetas ---------- */
.card-news__img img { transition: transform .7s var(--ease-out), filter .5s var(--ease-out); }
.card-news:hover .card-news__img img { transform: scale(1.04); }
.card-news__title { transition: color .2s var(--ease-out); }
/* El duotono se retira al pasar por encima: la foto recupera su color */
.card-news:not(.card-news--lead) .card-news__img { transition: background-color .5s var(--ease-out); }
.card-news:not(.card-news--lead) .card-news__img::after { transition: opacity .5s var(--ease-out); }
.card-news:not(.card-news--lead):is(:hover, :focus-visible) .card-news__img { background-color: var(--blanco); }
.card-news:not(.card-news--lead):is(:hover, :focus-visible) .card-news__img img { filter: none; }
.card-news:not(.card-news--lead):is(:hover, :focus-visible) .card-news__img::after { opacity: 0; }
.card-feature__img { overflow: hidden; }
.card-feature__img img { transition: transform .8s var(--ease-out); }
.card-feature:hover .card-feature__img img { transform: scale(1.03); }

.causa-card a { transition: border-color .25s var(--ease-out), transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.causa-card a:hover { transform: translateY(calc(var(--lift) * -2)); box-shadow: 0 18px 32px -20px rgba(11, 27, 58, .45); }
.causa-card a:active { transform: translateY(0); transition-duration: .1s; }

.promo > img { transition: transform .9s var(--ease-out); }
.promo:hover > img { transform: scale(1.04); }

.partner-logos a { transition: transform .3s var(--ease-out), opacity .2s; }
.partner-logos a:hover, .partner-logos a:focus-visible { transform: translateY(calc(var(--lift) * -1.5)) scale(1.04); }

/* Juntas: los estados del panel entran con la misma curva */
.junta-panel [data-junta-panel]:not([hidden]), .junta-panel [data-junta-none]:not([hidden]) { animation: fade-up .45s var(--ease-out); }
.map-box svg path { transition: fill .25s var(--ease-out), transform .3s var(--ease-out), filter .3s var(--ease-out); }

/* ---------- Preguntas frecuentes: se abren con altura real ---------- */
.faq summary::after { transition: transform .3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details[open] > p { animation: faq-texto .4s var(--ease-out); }
@keyframes faq-texto { from { opacity: 0; transform: translateY(-6px); } }
@supports (interpolate-size: allow-keywords) {
    .faq { interpolate-size: allow-keywords; }
    .faq details::details-content {
        block-size: 0; overflow: clip;
        transition: block-size .4s var(--ease-out), content-visibility .4s allow-discrete;
    }
    .faq details[open]::details-content { block-size: auto; }
}

/* ---------- Seña de marca: el subrayado amarillo se dibuja ---------- */
.hl { background-repeat: no-repeat; background-size: 100% 100%; }
.hl.hl--espera { background-size: 0% 100%; }
.hl.hl--dibuja { transition: background-size .8s var(--ease-out) .12s; }

/* ---------- Momento principal: el mapa se enciende ---------- */
[data-juntas-map].mapa--apagado svg path.is-junta { fill: #D1D5DB; }
[data-juntas-map].mapa--encendiendo svg path.is-junta {
    animation: encender .9s var(--ease-out) var(--d, 0s) backwards;
}
@keyframes encender {
    0% { fill: #D1D5DB; }
    35% { fill: var(--amarillo); }
    100% { fill: var(--azul); }
}

/* ---------- Continuidad entre páginas (navegadores que la admiten) ---------- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: cabecera; }
::view-transition-old(root) { animation: vt-salida .18s var(--ease-in-out) both; }
::view-transition-new(root) { animation: vt-entrada .32s var(--ease-out) both; }
@keyframes vt-salida { to { opacity: 0; } }
@keyframes vt-entrada { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Movimiento reducido ----------
   Sin desplazamientos ni escalados; se mantienen los cambios de color y
   opacidad que confirman una acción o un estado. */
@media (prefers-reduced-motion: reduce) {
    :root { --nudge: 0px; --lift: 0px; }
    html { scroll-behavior: auto; }
    @view-transition { navigation: none; }
    .card-news:hover .card-news__img img, .card-feature:hover .card-feature__img img,
    .promo:hover > img, .btn:active, .chip:active, .icon-btn:active,
    .partner-logos a:hover, .partner-logos a:focus-visible,
    .map-box svg path.is-junta:hover { transform: none; }
    .nav-links a::after { transition: opacity .2s; }
    .mobile-menu:not([hidden]), .mobile-menu:not([hidden]) nav li,
    .mobile-menu:not([hidden]) .mobile-menu__sub, .mobile-menu:not([hidden]) .mobile-menu__cta { animation: none; }
    .junta-panel [data-junta-panel]:not([hidden]), .junta-panel [data-junta-none]:not([hidden]),
    .faq details[open] > p { animation: fundido .2s ease-out; }
    .sello.is-landing { animation: fundido .2s ease-out both; }
    .icon-btn[data-copy-url]::after { transform: translate(-50%, 0); }
    .faq details::details-content { transition: none; }
}
@keyframes fundido { from { opacity: 0; } }

/* ---------- Redes y compartir: la burbuja ----------
   Al pasar por encima, el círculo se llena desde el centro (azul sobre
   fondo claro, amarillo sobre oscuro) y el icono da un pequeño salto.
   Vale para todos los .icon-btn: redes del pie, Participa, Contacto,
   Conócenos, diputados y botones de compartir. */
.icon-btn { position: relative; isolation: isolate; }
.icon-btn::before {
    content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit;
    background: var(--azul); opacity: 0; transform: scale(.2);
    transition: transform .4s var(--ease-out), opacity .25s var(--ease-out);
}
.icon-btn:is(:hover, :focus-visible)::before { opacity: 1; transform: scale(1); }
.icon-btn:is(:hover, :focus-visible) { color: var(--blanco); border-color: var(--azul); }
.icon-btn:is(:hover, :focus-visible) svg { animation: icono-salto .45s var(--ease-out); }
@keyframes icono-salto {
    0% { transform: none; }
    40% { transform: translateY(-3px) rotate(-8deg); }
    100% { transform: none; }
}
/* Sobre superficies oscuras, la burbuja es amarilla y el icono tinta */
:is(.site-footer, .on-dark, .junta-panel, .paso--destacado, .territorio, .section--tinta, .section--azul) .icon-btn::before { background: var(--amarillo); }
:is(.site-footer, .on-dark, .junta-panel, .paso--destacado, .territorio, .section--tinta, .section--azul) .icon-btn:is(:hover, :focus-visible) {
    color: var(--tinta); border-color: var(--amarillo);
}
/* Copiado: manda el estado de confirmación */
.icon-btn.is-copied::before { opacity: 0; }
.icon-btn.icon-btn.is-copied { color: var(--tinta); border-color: var(--amarillo); }

@media (prefers-reduced-motion: reduce) {
    .icon-btn::before { transform: none; transition: opacity .2s; }
    .icon-btn:is(:hover, :focus-visible) svg { animation: none; }
}

/* ==========================================================================
   Aviso de cookies (banner fijo abajo + panel de configuración)
   Aceptar y Rechazar tienen el mismo peso visual, como pide la AEPD.
   ========================================================================== */
.link-btn {
    background: none; border: 0; padding: 0; cursor: pointer;
    color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}
.link-btn:hover { text-decoration-color: currentColor; }
.site-footer__bottom .link-btn { color: var(--texto-claro); min-height: 24px; }

.cookie-banner {
    position: fixed; inset: auto 0 0 0; z-index: 55;
    background: var(--tinta); color: var(--blanco);
    border-top: 3px solid var(--amarillo);
    box-shadow: 0 -12px 32px -12px rgba(11, 27, 58, .45);
}
.cookie-banner__inner {
    max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter);
    display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; justify-content: space-between;
}
.cookie-banner__text { flex: 1 1 520px; display: flex; flex-direction: column; gap: 6px; }
.cookie-banner__title { font-size: 17px; font-weight: 800; letter-spacing: -0.2px; }
.cookie-banner__text p { font-size: 15px; line-height: 1.5; color: var(--texto-claro); max-width: 78ch; }
.cookie-banner__text a { color: var(--blanco); text-underline-offset: 3px; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner :focus-visible { outline-color: var(--amarillo); }
@media (max-width: 720px) {
    .cookie-banner__inner { padding-block: 16px; }
    .cookie-banner__text p { font-size: 14px; }
    .cookie-banner__actions { width: 100%; }
    .cookie-banner__actions .btn { flex: 1 1 auto; min-height: 44px; padding-inline: 14px; }
}
@media (prefers-reduced-motion: no-preference) {
    .cookie-banner:not([hidden]) { animation: cookie-in .45s var(--ease-out, ease-out) both; }
    @keyframes cookie-in { from { transform: translateY(100%); } }
}

.cookie-dialog {
    width: min(560px, calc(100% - 32px)); max-height: calc(100% - 32px);
    padding: 32px; border: 0; border-radius: var(--r-lg);
    background: var(--blanco); color: var(--texto);
    box-shadow: 0 24px 64px -16px rgba(11, 27, 58, .5);
}
.cookie-dialog::backdrop { background: rgba(11, 27, 58, .6); }
.cookie-dialog[open] { display: flex; flex-direction: column; gap: 20px; }
.cookie-dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cookie-dialog__title { font-family: var(--display); font-weight: 400; font-size: 36px; line-height: 1; text-transform: uppercase; color: var(--tinta); }
.cookie-dialog__close {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 999px; padding: 0; cursor: pointer;
    border: 1px solid var(--linea-fuerte); background: transparent; color: var(--tinta);
    display: inline-flex; align-items: center; justify-content: center;
}
.cookie-dialog__close:hover { border-color: var(--tinta); }
.cookie-dialog__close svg { width: 20px; height: 20px; }
.cookie-dialog__intro { font-size: 15px; line-height: 1.55; color: var(--texto-2); }
.cookie-dialog__intro a { text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.cookie-cat { border-top: 1px solid var(--linea); padding-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.cookie-cat__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cookie-cat h3 { font-size: 17px; font-weight: 700; color: var(--tinta); }
.cookie-cat p { font-size: 14px; line-height: 1.5; color: var(--texto-3); }
.cookie-cat__fixed { font-size: 13px; font-weight: 700; color: var(--azul); white-space: nowrap; }
.cookie-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--linea); padding-top: 20px; }
.cookie-dialog__actions .btn { flex: 1 1 auto; }
@media (max-width: 520px) {
    .cookie-dialog { padding: 24px 20px; }
    .cookie-dialog__title { font-size: 30px; }
    .cookie-dialog__actions .btn { flex-basis: 100%; }
}

/* Interruptor accesible sobre un checkbox nativo */
.switch {
    appearance: none; -webkit-appearance: none; margin: 0; flex-shrink: 0; cursor: pointer;
    position: relative; width: 52px; height: 30px; border-radius: 999px;
    background: var(--linea-fuerte); transition: background-color .2s ease;
}
.switch::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
    background: var(--blanco); box-shadow: 0 1px 3px rgba(11, 27, 58, .3); transition: transform .2s var(--ease-out, ease-out);
}
.switch:checked { background: var(--azul); }
.switch:checked::after { transform: translateX(22px); }
.switch:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; }

/* Tabla de cookies (página de política) */
.cookie-table-wrap { overflow-x: auto; border: 1px solid var(--linea); border-radius: var(--r); }
.cookie-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; min-width: 620px; }
.cookie-table th, .cookie-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-top: 1px solid var(--linea); }
.cookie-table thead th { border-top: 0; background: var(--niebla); color: var(--tinta); font-size: 13px; text-transform: uppercase; letter-spacing: .4px; }
.cookie-table td:first-child { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 14px; white-space: nowrap; color: var(--tinta); }
