/* =============================================================
   IGP Lechazo de Castilla y León — Sistema de diseño
   "Iberian Heritage Excellence"
   Newsreader (títulos) + Montserrat (texto)
   ============================================================= */

/* ---------- Fuentes autoalojadas (RGPD-friendly) ---------- */
/* Newsreader variable (pesos 600–700, tamaño óptico 12–72): se afina en grande y gana cuerpo en pequeño */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('../fonts/newsreader-latin-opsz-600-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('../fonts/newsreader-latin-ext-opsz-600-700.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/montserrat-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/montserrat-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/montserrat-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/montserrat-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/montserrat-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/montserrat-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  /* Color */
  --c-primary: #006782;          /* cian profundo: acciones, enlaces, marca */
  --c-primary-bright: #00b5e2;   /* cian vivo del logo: acentos */
  --c-primary-deep: #004d61;     /* cian oscuro: estados hover (contraste AA) */
  --c-primary-soft: #baeaff;
  --c-mustard: #ffb81c;          /* mostaza: chips, sellos, destacados */
  --c-mustard-deep: #7d5700;
  --c-mustard-soft: #ffdeaa;
  --c-bg: #f9f8f1;               /* crema base */
  --c-surface: #ffffff;
  --c-surface-alt: #f1f4f5;
  --c-ink: #181c1d;
  --c-ink-strong: #2d3132;
  --c-muted: #3d484e;
  --c-outline: #bcc8cf;
  --c-outline-soft: rgba(45, 49, 50, 0.12);
  --c-teal-deep: #004d62;        /* bandas oscuras */

  /* Tipografía */
  --f-serif: 'Newsreader', 'Georgia', serif;
  --f-sans: 'Montserrat', 'Segoe UI', 'Helvetica Neue', sans-serif;

  /* Ritmo */
  --container: 1200px;
  --gutter: 24px;
  --radius: 0.5rem;
  --radius-sm: 0.25rem;
  --section-gap: clamp(56px, 9vw, 112px);

  /* Sombra ambiental */
  --shadow-ambient: 0 12px 32px rgba(0, 50, 60, 0.07);
}

/* ---------- Reset ligero ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); }
a:hover { color: var(--c-primary-deep); }

h1, h2, h3, .serif {
  font-family: var(--f-serif);
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-ink-strong);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); letter-spacing: -0.015em; line-height: 1.1; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 600; }
p { margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, var(--gutter));
}

/* Etiqueta "sello" en versalitas */
.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-ink-strong);
  background: var(--c-mustard);
  padding: 0.35em 1em;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.eyebrow--plain {
  background: none;
  color: var(--c-primary);
  padding: 0;
  border-radius: 0;
}

.lead { font-size: 1.125rem; color: var(--c-muted); }

.center { text-align: center; }
.section { padding-block: var(--section-gap); }
.section--surface { background: var(--c-surface); }
.section--alt { background: var(--c-surface-alt); }
.section--teal { background: var(--c-teal-deep); color: #eef1f2; }
.section--teal h2, .section--teal h3 { color: #ffffff; }

.section-head { max-width: 720px; margin-inline: auto; text-align: center; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .rule {
  width: 64px; height: 3px; background: var(--c-mustard);
  margin: 1rem auto 0; border-radius: 2px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-align: center;
  padding: 0.8em 1.8em;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, top 0.2s ease, box-shadow 0.2s ease;
}
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-deep); color: #fff; }
.btn--outline { border-color: currentColor; color: var(--c-primary); background: transparent; }
.btn--outline:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn--mustard { background: var(--c-mustard); color: var(--c-ink-strong); }
.btn--mustard:hover { background: var(--c-mustard-soft); color: var(--c-ink-strong); }
.btn--ghost-light { border-color: rgba(255,255,255,0.7); color: #fff; background: transparent; }
.btn--ghost-light:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 248, 241, 0.96);
  border-bottom: 1px solid var(--c-outline-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}
.brand__text { white-space: nowrap; }
.brand img { height: 56px; width: auto; }
.brand__text { line-height: 1.15; }
.brand__title {
  font-family: var(--f-serif);
  font-optical-sizing: auto;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--c-ink-strong);
  display: block;
}
.brand__sub {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-primary);
  display: block;
}

.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a { text-decoration: none; }
.nav > ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  display: inline-block;
  padding: 0.6em 0.85em;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--c-ink-strong);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav__link:hover, .nav__item.is-open > .nav__link { color: var(--c-primary); background: rgba(0, 103, 130, 0.07); }
.nav__link[aria-current] { color: var(--c-primary); font-weight: 700; }
.dropdown a[aria-current] { color: var(--c-primary); font-weight: 700; }

.nav__item { position: relative; }
.nav__item--dropdown > .nav__link::after {
  content: '';
  display: inline-block;
  margin-left: 0.45em;
  width: 0.45em; height: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 280px;
  background: var(--c-surface);
  border: 1px solid var(--c-outline-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-ambient);
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  display: none;
}
.nav__item.is-open > .dropdown { display: block; }
/* Puente invisible entre el título y el submenú: el ratón no lo cierra al bajar */
.dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
/* Teclado en escritorio: el submenú se muestra al llegar con el tabulador */
@media (hover: hover) and (pointer: fine) and (min-width: 1180px) {
  .nav__item--dropdown:focus-within > .dropdown { display: block; }
}
.dropdown a {
  display: block;
  padding: 0.55em 0.8em;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-ink-strong);
  border-radius: var(--radius-sm);
}
.dropdown a:hover { background: var(--c-bg); color: var(--c-primary); }

.header-cta { margin-left: 0.5rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--c-outline);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: '';
  display: block;
  width: 20px; height: 2px;
  background: var(--c-ink-strong);
  transition: transform 0.2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }

@media (max-width: 1179px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 76px 0 0 auto;
    width: min(360px, 100%);
    background: var(--c-surface);
    border-left: 1px solid var(--c-outline-soft);
    box-shadow: var(--shadow-ambient);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s 0.25s;
    overflow-y: auto;
    padding: 1rem;
  }
  body.nav-open .nav { transform: translateX(0); visibility: visible; transition: transform 0.25s ease; }
  .nav { flex-direction: column; align-items: stretch; }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link { display: block; padding: 0.8em 0.75em; font-size: 1rem; }
  .dropdown {
    position: static;
    display: none;
    border: none;
    box-shadow: none;
    background: var(--c-bg);
    min-width: 0;
  }
  .header-cta { margin: 0.75rem 0 0; display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(78vh, 640px);
  background: linear-gradient(160deg, #0b5468 0%, #006782 55%, #0a7d94 100%);
}
.hero__media {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4, 40, 51, 0.55) 0%, rgba(4, 40, 51, 0.25) 45%, rgba(4, 40, 51, 0.65) 100%);
}
.hero__content {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  padding-block: clamp(64px, 12vw, 128px);
}
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255, 255, 255, 0.88); font-size: clamp(1rem, 2vw, 1.1875rem); max-width: 620px; margin-inline: auto; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 2rem; }

/* ---------- Tarjetas ---------- */
.card-grid {
  display: grid;
  gap: clamp(16px, 2.5vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-outline-soft);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { top: -3px; box-shadow: var(--shadow-ambient); }
.card--featured { border-top: 4px solid var(--c-mustard); }
.card__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: var(--c-surface-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  color: var(--c-primary);
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.375rem; }
.card p { color: var(--c-muted); font-size: 0.9375rem; flex-grow: 1; }
.card__link {
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--c-primary);
}
.card__link::after { content: ' →'; }

/* ---------- Cita / banda destacada ---------- */
.quote-band { text-align: center; }
.quote-band blockquote {
  font-family: var(--f-serif);
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--c-ink-strong);
  max-width: 860px;
  margin: 0 auto 1rem;
}
.section--teal .quote-band blockquote { color: #fff; }
.quote-band .attribution {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-mustard-deep);
}
.section--teal .quote-band .attribution { color: var(--c-mustard); }

/* ---------- FAQ (details/summary) ---------- */
.faq { max-width: 860px; margin-inline: auto; }
.faq details {
  background: var(--c-surface);
  border: 1px solid var(--c-outline-soft);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-family: var(--f-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--c-ink-strong);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-family: var(--f-sans);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--c-primary);
  line-height: 1;
  flex-shrink: 0;
}
.faq details[open] summary::after { content: '–'; }
.faq details[open] summary { color: var(--c-primary); }
.faq .faq__body { padding: 0 1.25rem 1.25rem; color: var(--c-muted); }
.faq .faq__body ul { padding-left: 1.2em; margin: 0.5em 0; }

/* ---------- Testimonios ---------- */
.testimonial {
  background: var(--c-surface);
  border: 1px solid var(--c-outline-soft);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
}
.testimonial blockquote {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--c-muted);
  flex-grow: 1;
}
.testimonial blockquote::before { content: '“'; font-family: var(--f-serif); font-size: 2rem; color: var(--c-mustard); display: block; line-height: 0.6; margin-bottom: 0.5rem; }
.testimonial cite {
  font-style: normal;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--c-ink-strong);
}

/* ---------- Noticias ---------- */
.news-card {
  background: var(--c-surface);
  border: 1px solid var(--c-outline-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.news-card:hover { top: -3px; box-shadow: var(--shadow-ambient); }
.news-card__media { aspect-ratio: 16 / 10; background: var(--c-surface-alt); }
.news-card__media > * { width: 100%; height: 100%; object-fit: cover; }
.news-card__body { padding: 1.25rem; display: flex; flex-direction: column; flex-grow: 1; }
.news-card__meta {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 0.5rem;
}
.news-card h3 { font-size: 1.125rem; }
.news-card h3 a { text-decoration: none; color: inherit; }
.news-card h3 a:hover { color: var(--c-primary); }
.news-card time { font-size: 0.8125rem; color: var(--c-muted); margin-top: auto; }

/* ---------- Colaboradores ---------- */
.logo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(12px, 2vw, 24px);
  align-items: stretch;
}
.logo-strip figure {
  margin: 0;
  padding: 1rem 0.75rem 0.85rem;
  border: 1px solid var(--c-outline-soft);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  text-align: center;
}
.logo-strip img { max-height: 56px; max-width: 100%; width: auto; object-fit: contain; }
.logo-strip a { text-decoration: none; display: block; height: 100%; }
.logo-strip a figure { height: 100%; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.logo-strip a:hover figure { top: -2px; box-shadow: var(--shadow-ambient); }
.logo-strip a:hover figcaption { color: var(--c-primary); }
.logo-strip figcaption {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--c-muted);
  line-height: 1.35;
  margin-top: auto;
}

/* ---------- Franja CTA ---------- */
.cta-band { text-align: center; }
.cta-band .btn { margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-ink-strong);
  color: #cfd8db;
  font-size: 0.9rem;
  margin-top: 0;
}
.site-footer a { color: #cfd8db; text-decoration: none; }
.site-footer a:hover { color: var(--c-mustard); }
.site-footer__grid {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding-block: clamp(40px, 6vw, 64px);
}
.site-footer h4,
.site-footer__title {
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 1rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer__brand .brand__title { color: #fff; }
.site-footer__brand .brand__sub { color: var(--c-primary-bright); }
.site-footer__brand p { margin-top: 1rem; font-size: 0.85rem; color: #a9b6bb; }
.social { display: flex; gap: 0.6rem; margin-top: 1rem; }
.social a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
}
.social a:hover { border-color: var(--c-mustard); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.site-footer__legal {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-block: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: #a9b6bb;
}
.site-footer__legal ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; }

/* ---------- Placeholders de imagen (temporal) ---------- */
.ph {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, rgba(0,103,130,0.06) 0 12px, rgba(0,103,130,0.10) 12px 24px),
    linear-gradient(160deg, #dfe9ec, #cfe0e5);
  color: var(--c-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  border-radius: var(--radius-sm);
  min-height: 120px;
  width: 100%;
  height: 100%;
}

/* ---------- Cabecera de página interior ---------- */
.page-header {
  position: relative;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(160deg, #0b5468 0%, #006782 60%, #0a7d94 100%);
}
.page-header__media {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.45;
}
.page-header__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4,40,51,0.5) 0%, rgba(4,40,51,0.35) 60%, rgba(4,40,51,0.6) 100%);
}
.page-header__content {
  position: relative;
  max-width: 780px;
  padding-block: clamp(48px, 8vw, 96px);
}
.page-header h1 { color: #fff; }
.page-header .lead { color: rgba(255,255,255,0.88); }
.breadcrumb {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.75rem;
}
.breadcrumb a { color: rgba(255,255,255,0.9); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-mustard); }

/* ---------- Tablas de datos ---------- */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-outline-soft);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.9375rem;
}
.data-table caption {
  caption-side: top;
  text-align: left;
  font-family: var(--f-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--c-ink-strong);
  padding: 0 0 0.75rem;
}
.data-table th, .data-table td {
  padding: 0.7em 1em;
  text-align: left;
  border-bottom: 1px solid var(--c-outline-soft);
}
.data-table thead th {
  background: var(--c-primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.data-table tbody tr:last-child th, .data-table tbody tr:last-child td { border-bottom: none; }
.data-table thead th:first-child { border-top-left-radius: calc(var(--radius) - 1px); }
.data-table thead th:last-child { border-top-right-radius: calc(var(--radius) - 1px); }
.data-table tbody tr:last-child > *:first-child { border-bottom-left-radius: calc(var(--radius) - 1px); }
.data-table tbody tr:last-child > *:last-child { border-bottom-right-radius: calc(var(--radius) - 1px); }
.data-table tbody th { font-weight: 500; color: var(--c-ink-strong); }
.data-table td { color: var(--c-muted); }
.data-table tbody tr:nth-child(even) { background: var(--c-surface-alt); }

/* ---------- Lista de especificaciones ---------- */
.spec {
  background: var(--c-surface);
  border: 1px solid var(--c-outline-soft);
  border-left: 4px solid var(--c-mustard);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.35rem;
}
.spec__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--c-surface-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
  color: var(--c-primary);
}
.spec__icon img { max-width: 44px; max-height: 44px; }
.spec__icon svg { width: 30px; height: 30px; }
.spec h3 { font-size: 1.125rem; margin-bottom: 0.4rem; }
.spec p, .spec ul { font-size: 0.9375rem; color: var(--c-muted); margin: 0; }
.spec ul { padding-left: 1.1em; }
.spec li { margin-bottom: 0.25em; }
.spec-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- Badges de razas ---------- */
.razas-badges { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1.25rem; }
.badge-raza {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-mustard-deep);
  background: var(--c-mustard-soft);
  border: 1px solid var(--c-mustard);
  border-radius: 999px;
  padding: 0.4em 1em;
}
.badge-raza::before {
  content: '';
  width: 0.5em; height: 0.5em;
  border-radius: 999px;
  background: var(--c-mustard);
}

/* ---------- Línea temporal ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; max-width: 780px; margin-inline: auto; }
.timeline::before {
  content: '';
  position: absolute;
  left: 11px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--c-outline);
}
.timeline li { position: relative; padding: 0 0 2rem 3rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: '';
  position: absolute;
  left: 3px; top: 6px;
  width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--c-mustard);
  border: 3px solid var(--c-bg);
  box-shadow: 0 0 0 2px var(--c-mustard);
}
.timeline__year {
  font-family: var(--f-serif);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--c-primary);
  display: block;
  margin-bottom: 0.25rem;
}
.timeline p { color: var(--c-muted); margin: 0; }

/* ---------- Banda de imagen ancha ---------- */
.img-band { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-ambient); }
.img-band img { width: 100%; }
.img-band figcaption {
  font-size: 0.8125rem;
  color: var(--c-muted);
  text-align: center;
  padding: 0.6rem 1rem;
  background: var(--c-surface);
}

/* ---------- Pasos numerados ---------- */
.steps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step {
  background: var(--c-surface);
  border: 1px solid var(--c-outline-soft);
  border-radius: var(--radius);
  padding: 1.25rem;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--c-primary);
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.step--accent::before { background: var(--c-mustard); color: var(--c-ink-strong); }
.step h3 { font-size: 1.0625rem; margin-bottom: 0.35rem; }
.step p, .step ul { font-size: 0.9rem; color: var(--c-muted); margin: 0; }
.step ul { padding-left: 1.1em; }

/* ---------- Lista de comprobación ---------- */
.check-grid { display: grid; gap: 0.75rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); list-style: none; margin: 0; padding: 0; }
.check-grid li { position: relative; padding-left: 2rem; color: var(--c-muted); }
.check-grid li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.2em;
  width: 1.1em; height: 1.1em;
  border-radius: 999px;
  background: var(--c-mustard);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.2 14.4-4-4 1.7-1.7 2.3 2.3 5-5 1.7 1.7-6.7 6.7z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.2 14.4-4-4 1.7-1.7 2.3 2.3 5-5 1.7 1.7-6.7 6.7z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Organigrama (árbol jerárquico con conectores) ---------- */
.org-tree-wrap { overflow-x: auto; padding-bottom: 0.5rem; }
.org-tree { min-width: 760px; display: flex; justify-content: center; }
.org-tree ul {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  list-style: none;
  margin: 0;
  padding: 1.5rem 0 0;
  position: relative;
}
.org-tree > ul { padding-top: 0; }
.org-tree li {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 1.5rem 0.6rem 0;
}
.org-tree > ul > li { padding-top: 0; }
/* Conectores: cada hijo dibuja su media barra horizontal (::before izquierda,
   ::after derecha) y el bajante vertical vive en ::after (left:50%), de modo
   que cada esquina es una única L del mismo pseudo-elemento — sin empalmes. */
.org-tree li::before,
.org-tree li::after {
  content: '';
  position: absolute;
  top: 0; right: 50%;
  width: 50%; height: 1.5rem;
  border-top: 2px solid var(--c-outline);
}
.org-tree li::after {
  right: auto; left: 50%;
  border-left: 2px solid var(--c-outline);
}
.org-tree li:first-child::before { display: none; }   /* sin barra a su izquierda */
.org-tree li:last-child::after { border-top: none; }  /* sin barra a su derecha */
.org-tree li:only-child::before { display: none; }    /* hijo único: solo bajante */
.org-tree li:only-child::after { border-top: none; }
.org-tree > ul > li::before, .org-tree > ul > li::after { display: none; } /* raíz */
/* bajante del padre hasta la barra de sus hijos */
.org-tree ul ul::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 0; height: 1.5rem;
  border-left: 2px solid var(--c-outline);
}

.org-card {
  background: var(--c-surface);
  border: 1px solid var(--c-outline-soft);
  border-top: 3px solid var(--c-primary);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  min-width: 150px;
  max-width: 230px;
  text-align: center;
}
.org-card--root { border-top-color: var(--c-mustard); background: var(--c-surface-alt); }
.org-card--muted { border-top-color: var(--c-outline); }
.org-card h3 {
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  color: var(--c-ink-strong);
}
.org-card p { font-size: 0.8125rem; color: var(--c-muted); margin: 0.3rem 0 0; }
.org-card ul { font-size: 0.8125rem; color: var(--c-muted); margin: 0.3rem 0 0; padding: 0 0 0 1.1em; text-align: left; display: block; list-style: disc; position: static; }
.org-card ul::before { display: none !important; }
.org-card ul li { display: list-item; padding: 0; position: static; }
.org-card ul li::before, .org-card ul li::after { display: none !important; }

/* ---------- Listados de inscritos ---------- */
.listado-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}
.listado-toolbar input[type="search"],
.listado-toolbar select {
  font-family: var(--f-sans);
  font-size: 0.9375rem;
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1px solid var(--c-outline);
  border-radius: var(--radius-sm);
  padding: 0.6em 0.9em;
}
.listado-toolbar input[type="search"] { flex: 1 1 260px; }
.listado-toolbar input[type="search"]:focus,
.listado-toolbar select:focus { outline: 2px solid var(--c-primary-bright); outline-offset: 1px; border-color: var(--c-primary); }
.listado-contador {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-primary);
  white-space: nowrap;
}
.listado-wrap { overflow-x: auto; border-radius: var(--radius); }
.listado-wrap .data-table { min-width: 560px; }

/* ---------- Tarjetas de descarga ---------- */
.doc-card {
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--c-surface);
  border: 1px solid var(--c-outline-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.doc-card:hover { top: -2px; box-shadow: var(--shadow-ambient); }
.doc-card__icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--c-surface-alt);
  border-radius: var(--radius-sm);
  color: var(--c-primary);
}
.doc-card__icon svg { width: 22px; height: 22px; }
.doc-card__body h3 {
  font-family: var(--f-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0;
  color: var(--c-ink-strong);
}
.doc-card__body p { margin: 0.15rem 0 0; font-size: 0.8125rem; color: var(--c-muted); }
.doc-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: stretch; }
.doc-columns { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.doc-col h2 { font-size: 1.5rem; text-align: center; }
.doc-col .rule { width: 64px; height: 3px; background: var(--c-mustard); margin: 0.5rem auto 1.5rem; border-radius: 2px; }
.doc-col > .doc-card { margin-bottom: 1rem; }
.doc-col > .doc-card:last-child { margin-bottom: 0; }

/* ---------- Vídeo embebido ---------- */
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-ambient);
  background: var(--c-ink-strong);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Prosa (páginas legales y artículos) ---------- */
.prose { max-width: 800px; margin-inline: auto; }
.prose h2 { font-size: 1.5rem; margin-top: 2.5rem; }
.prose h3 { font-size: 1.1875rem; margin-top: 1.75rem; }
.prose p, .prose li { color: var(--c-muted); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 0.4em; }
.article-meta {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 1rem;
}
.article-figure { margin: 0 0 2rem; }
.article-figure img { border-radius: var(--radius); box-shadow: var(--shadow-ambient); width: 100%; object-fit: cover; max-height: 480px; }

/* ---------- Diagrama de flujo horizontal (control de calidad) ---------- */
.flow-wrap { overflow-x: auto; padding-bottom: 0.5rem; }
.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 980px;
}
.flow__node {
  flex-shrink: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-outline-soft);
  border-top: 3px solid var(--c-primary);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  max-width: 170px;
  text-align: center;
}
.flow__node--root { border-top-color: var(--c-mustard); background: var(--c-surface-alt); }
.flow__node h3 {
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  color: var(--c-ink-strong);
}
.flow__node p { font-size: 0.78rem; color: var(--c-muted); margin: 0.3rem 0 0; }
.flow__hline {
  flex-shrink: 0;
  width: 2rem; height: 0;
  border-top: 2px solid var(--c-outline);
}
.flow__branches {
  flex-shrink: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-inline: 1.5rem;
}
/* las líneas de conexión de las ramas las dibuja un único SVG superpuesto */
.flow__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--c-outline);
  pointer-events: none;
}
.flow__branch {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-outline-soft);
  border-left: 4px solid var(--c-primary);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  width: 330px;
  height: 8.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.flow__branch--alt { border-left-color: var(--c-mustard); }
.flow__branch h3 {
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.25rem;
  color: var(--c-primary);
}
.flow__branch--alt h3 { color: var(--c-mustard-deep); }
.flow__branch p { font-size: 0.8125rem; color: var(--c-muted); margin: 0; }


/* ---------- Ventajas agrupadas ---------- */
.ventaja-card { text-align: left; }
.ventaja-card .check-grid { margin-top: 0.75rem; }
.ventaja-card .check-grid li { font-size: 0.9375rem; }
.ventaja-card .check-grid strong { color: var(--c-ink-strong); }

/* ---------- Compartir ---------- */
.share-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-outline-soft);
}
.share-row__label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-right: 0.25rem;
}
.share-row a, .share-row button {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--c-outline);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-primary);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.share-row a:hover, .share-row button:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.share-row svg { width: 18px; height: 18px; fill: currentColor; }
.share-row .share-copiado { font-size: 0.8125rem; color: var(--c-primary); font-weight: 700; }

/* ---------- Cabecera partida (texto + mapa) ---------- */
.page-header__content--split {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 960px) {
  .page-header__content--split { grid-template-columns: 1fr; }
  .prov-mapa--header { margin-top: 0.5rem; }
}

/* ---------- Mapa de provincias (filtro de listados) ---------- */
.prov-mapa {
  margin-bottom: 1.75rem;
}
.prov-mapa--header { margin-bottom: 0; }
.prov-mapa--header .prov-mapa__head { display: block; margin-bottom: 0.75rem; }
.prov-mapa--header .prov-mapa__head h3,
.prov-mapa--header .prov-mapa__title { color: #fff; }
.prov-mapa--header .prov-mapa__hint { color: rgba(255, 255, 255, 0.8); }
.prov-mapa--header .prov-cell { border-color: transparent; }
.prov-mapa--header .prov-cell--empty {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.55);
  opacity: 1;
}
.prov-mapa--header .prov-cell--otras {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.prov-mapa__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.prov-mapa__head h3,
.prov-mapa__title { font-size: 1.125rem; margin: 0; }
.prov-mapa__hint { font-size: 0.8125rem; color: var(--c-muted); margin: 0; }
.prov-mapa__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 128px));
  gap: 6px;
  justify-content: start;
}
.prov-cell {
  font-family: var(--f-sans);
  border: 1px solid var(--c-outline-soft);
  border-radius: var(--radius-sm);
  background: var(--c-surface-alt);
  color: var(--c-ink-strong);
  padding: 0.55rem 0.6rem 0.5rem;
  cursor: pointer;
  text-align: left;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.12s ease, box-shadow 0.15s ease, outline-color 0.12s ease;
  outline: 3px solid transparent;
  outline-offset: 1px;
}
.prov-cell:hover:not(:disabled) { top: -2px; box-shadow: var(--shadow-ambient); }
.prov-cell:disabled { cursor: default; opacity: 0.55; }
.prov-cell.is-active { outline-color: var(--c-mustard); }
.prov-cell--dark { color: #fff; border-color: transparent; }
.prov-cell__name {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.prov-cell__n {
  font-family: var(--f-serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}
.prov-cell--otras {
  margin-top: 6px;
  aspect-ratio: auto;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  max-width: calc(3 * 128px + 12px);
  border-style: dashed;
}
.prov-cell--otras .prov-cell__n { font-size: 1.25rem; }

/* ---------- Utilidades ---------- */
.grid-2 { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Mejoras 16-11-2026 · rendimiento, accesibilidad y privacidad
   ========================================================================== */

/* Menú compacto en portátiles (1180–1439 px): evita el desbordamiento horizontal */
@media (min-width: 1180px) and (max-width: 1439px) {
  .nav, .nav > ul { gap: 0; }
  .nav__link { padding: 0.6em 0.6em; font-size: 0.875rem; }
  .header-cta { margin-left: 0.25rem; padding: 0.7em 1.1em; font-size: 0.875rem; }
}

/* Saltar al contenido (WCAG 2.4.1): visible solo al recibir el foco */
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 1000; background: var(--c-primary); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius-sm); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 1rem; color: #fff; }
main:focus { outline: none; }

/* Títulos del pie (ahora h2 por jerarquía; mismo aspecto que antes) */
.site-footer__title { line-height: 1.3; }

/* Listados: hueco reservado mientras carga el JSON (sin saltos de maquetación) */
.prov-mapa.is-pending { visibility: hidden; min-height: 354px; min-width: calc(3 * 128px + 12px); }
@media (max-width: 960px) { .prov-mapa.is-pending { min-height: 326px; min-width: 0; } }
.listado-wrap.is-loading { min-height: 100vh; }

/* <picture> (WebP con respaldo JPEG): mismo encuadre que la imagen sola */
.news-card__media > picture { display: block; }
.news-card__media > picture > img { width: 100%; height: 100%; object-fit: cover; display: block; }
picture > img { max-width: 100%; }

/* Casilla «Otras provincias»: ancho completo para que el número no se solape */
.prov-cell--otras { width: 100%; gap: 0.75rem; }

/* YouTube y Google Maps: no se cargan hasta que la persona lo pide */
.embed-consent { background: var(--c-ink-strong); display: flex; align-items: center; justify-content: center; color: #fff; text-align: center; }
.embed-consent__box { padding: clamp(1rem, 4vw, 2rem); max-width: 30rem; position: relative; }
/* Miniatura del vídeo (autoalojada) tras el aviso, oscurecida para mantener el contraste */
.embed-consent[style*="--thumb"] { background: linear-gradient(rgba(24, 28, 29, 0.72), rgba(24, 28, 29, 0.72)), var(--thumb) center / cover no-repeat, var(--c-ink-strong); }
.embed-consent__text { font-size: 0.875rem; line-height: 1.5; margin: 0 0 1rem; color: rgba(255, 255, 255, 0.9); }
.embed-consent__alt { display: block; margin-top: 0.85rem; font-size: 0.875rem; color: #fff; }
.embed-consent__alt:hover { color: var(--c-mustard-soft); }

/* ==========================================================================
   Animaciones 17-11-2026 (mockup v3.1 aprobado): subrayado que se afina,
   botones con elevación y pulsación, tarjetas con línea de marca y pulsación
   ========================================================================== */

/* Enlaces de texto: subrayado fino y separado que se engrosa y se acerca al texto */
main a:not([class]):not(.news-card a):not(.logo-strip a):not(.breadcrumb a) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.32em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: color 0.25s ease, text-decoration-color 0.25s ease, text-decoration-thickness 0.25s ease, text-underline-offset 0.25s ease;
}
main a:not([class]):not(.news-card a):not(.logo-strip a):not(.breadcrumb a):hover,
main a:not([class]):not(.news-card a):not(.logo-strip a):not(.breadcrumb a):focus-visible {
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  text-decoration-color: currentColor;
}
/* Menú: línea mostaza que aparece y sube hacia el texto */
.nav .nav__link, .nav .dropdown a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.6em;
  transition: color 0.25s ease, background-color 0.25s ease, text-decoration-color 0.25s ease, text-underline-offset 0.25s ease;
}
.nav .nav__link:hover, .nav .nav__link:focus-visible, .nav .nav__item.is-open > .nav__link, .nav .dropdown a:hover, .nav .dropdown a:focus-visible {
  text-decoration-color: var(--c-mustard);
  text-underline-offset: 0.35em;
}

/* Botones: elevación sutil al pasar y pulsación al hacer clic.
   Se mueven con `top` (píxeles enteros) y no con transform: así el texto no se
   rasteriza como imagen durante la transición y se mantiene nítido. */
.btn { position: relative; top: 0; }
.btn:hover { top: -2px; box-shadow: 0 8px 20px -8px rgba(4, 40, 51, 0.45); }
.btn:active { top: 1px; box-shadow: 0 2px 6px -2px rgba(4, 40, 51, 0.4); transition-duration: 0.08s; }

/* Tarjetas con imagen: zoom leve, línea de marca y pulsación */
/* La tarjeta también se mueve con `top` (texto nítido); el zoom solo afecta a la foto */
.news-card { top: 0; transition: top 0.3s ease, box-shadow 0.35s ease; }
.news-card:hover { top: -2px; transform: none; box-shadow: var(--shadow-ambient); }
.news-card:active { top: 1px; box-shadow: 0 2px 6px -2px rgba(4, 40, 51, 0.4); transition-duration: 0.08s; }
.news-card__media { position: relative; overflow: hidden; }
.news-card__media img { transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1); }
.news-card:hover .news-card__media img { transform: scale(1.025); }
.news-card__media::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--c-mustard);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.news-card:hover .news-card__media::after { opacity: 1; transform: translateY(0); }

/* Tarjeta entera como enlace: el enlace del título se extiende a toda la tarjeta
   (un solo enlace por tarjeta para lectores de pantalla y teclado) */
.news-card { position: relative; }
.news-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.news-card:has(h3 a:focus-visible) { outline: 3px solid var(--c-mustard); outline-offset: 3px; }
.news-card h3 a:focus-visible { outline: none; }
.news-card:hover h3 a { color: var(--c-primary); }

/* Quien pide menos movimiento en su sistema no ve desplazamientos ni zoom */
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn:active, .news-card:hover, .news-card:active { top: 0; }
  .news-card:hover .news-card__media img { transform: none; }
  .news-card__media::after { transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* Elevaciones con top (y no con transform) para que el texto no se emborrone */
.card, .doc-card, .logo-strip a figure, .prov-cell { position: relative; top: 0; transition-property: top, box-shadow, background-color, border-color, color, opacity; }
@media (prefers-reduced-motion: reduce) { .card:hover, .doc-card:hover, .logo-strip a:hover figure, .prov-cell:hover { top: 0; } }

/* Tamaño óptico fijo (36) en los títulos medianos y pequeños de Newsreader: así se ven
   con el mismo diseño que los titulares, sin perder cuerpo. h1 y h2 siguen en automático. */
h3, h4, .serif, .brand__title, .faq summary, .quote-band blockquote, .data-table caption, .timeline__year, .news-card h3 {
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 36;
}

/* ==========================================================================
   Portada: pase de imágenes de fondo (zoom lento alterno, 8 s por foto).
   La foto saliente conserva su movimiento mientras se funde (.leaving): sin saltos.
   ========================================================================== */
.hero--slider .slides { position: absolute; inset: 0; overflow: hidden; opacity: 0.55; }
.hero--slider .slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 70% center;
  opacity: 0; z-index: 0;
}
/* La entrante se funde por encima; la saliente queda debajo, entera, hasta que la cubre */
.hero--slider .slide.on { opacity: 1; z-index: 2; transition: opacity 2.2s ease-in-out; }
.hero--slider .slide.leaving { opacity: 1; z-index: 1; }
.hero--slider .slide.on:nth-child(odd), .hero--slider .slide.leaving:nth-child(odd) { animation: slideZoomIn 11s linear forwards; }
.hero--slider .slide.on:nth-child(even), .hero--slider .slide.leaving:nth-child(even) { animation: slideZoomOut 11s linear forwards; }
@keyframes slideZoomIn { from { transform: scale(1.02); } to { transform: scale(1.15); } }
@keyframes slideZoomOut { from { transform: scale(1.15); } to { transform: scale(1.02); } }
.hero--slider .hero__content { z-index: 2; }
@media (prefers-reduced-motion: reduce) { .hero--slider .slide { animation: none !important; } }

/* Cabeceras interiores: pictograma del apartado dentro de la etiqueta */
.eyebrow--picto { display: inline-flex; align-items: center; gap: 0.55em; padding: 0.45em 1.15em 0.45em 0.5em; }
.eyebrow--picto .picto { width: 26px; height: 26px; flex: none; padding: 2px; border-radius: 50%; background: rgba(45, 49, 50, 0.1); }

/* Contacto: mapa navegable (Leaflet + teselas de OpenStreetMap) */
.mapa-sede { margin: 0; }
.mapa-sede__mapa { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-ambient); background: #eef0ec; z-index: 0; }
.mapa-sede__mapa img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mapa-sede__mapa.is-mapa { font: inherit; }
.mapa-sede__mapa .leaflet-control-attribution { font-size: 0.6875rem; }
.mapa-sede__mapa .leaflet-popup-content { font-family: var(--f-sans); font-size: 0.875rem; line-height: 1.45; }
.mapa-sede__pin { background: none; border: 0; }
.mapa-sede__pin svg { width: 40px; height: 52px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3)); }
.mapa-sede__acciones { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

/* Contacto: verificación ALTCHA (sin cookies ni terceros) y avisos del envío */
.form-altcha { display: block; margin-top: 1rem; max-width: 320px; --altcha-border-radius: var(--radius-sm); --altcha-color-border: var(--c-outline); --altcha-color-base: var(--c-surface); --altcha-color-text: var(--c-ink-strong); --altcha-color-border-focus: var(--c-primary); --altcha-color-error-text: #b3261e; --altcha-max-width: 320px; font-size: 0.875rem; }
.form-estado { margin: 0.75rem 0 0; font-size: 0.9375rem; font-weight: 600; min-height: 1.4em; }
.form-estado--ok { color: #1e6b3a; }
.form-estado--error { color: #b3261e; }
