/*
 * Museo del Ferroviario de Cistierna · web
 * Mismo sistema que la visita virtual. El recorrido de cada página se dibuja
 * como una línea de ferrocarril: cada bloque es una parada.
 */

@font-face { font-family: "Sofia Sans Condensed"; src: url("../fonts/sofia-sans-condensed-latin-wght-normal.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: "Sofia Sans"; src: url("../fonts/sofia-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  --navy: #172a3f;
  --navy-2: #22384f;
  --amber: #e8a33d;
  --green: #1f5b45;
  --green-hover: #174636;
  --red: #b23a2c;
  --paper: #f1f2ee;
  --paper-2: #e5e7e1;
  --buff: #e4d4a6;
  --ink: #1c2630;
  --muted: #55626d;
  --line: #cfd4cb;
  --rail: #9aa4a0;
  --white: #fff;

  --display: "Sofia Sans Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --ui: "Sofia Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --read: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --rail-x: 11px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
svg { display: block; }
a { color: var(--green); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--green-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-wide { width: min(1440px, 100%); margin-inline: auto; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--white); color: var(--navy); font-weight: 700; }
.skip:focus { top: 12px; }

/* --------------------------------------------------------------- Botones */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.button {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 20px;
  border-radius: 4px;
  font-family: var(--ui); font-size: 1rem; font-weight: 700;
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { background: var(--green); color: var(--white); }
.button-primary:hover { background: var(--green-hover); color: var(--white); }
.button-quiet { box-shadow: inset 0 0 0 1.5px var(--navy); color: var(--navy); }
.button-quiet:hover { background: rgba(23, 42, 63, 0.07); color: var(--navy); }
.text-link { font-weight: 700; }

/* --------------------------------------------------------------- Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 18px rgba(10, 20, 32, 0.18);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.site-brand { display: inline-flex; align-items: center; margin-right: auto; }
.brand-logo { width: auto; height: 60px; }

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav > ul { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nav-group { position: relative; display: flex; align-items: center; }
.nav-top {
  display: inline-block; padding: 10px 10px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650; text-decoration: none;
  border-radius: 4px;
}
.nav-top:hover { color: var(--white); background: rgba(255, 255, 255, 0.08); }
.nav-group.is-current > .nav-top { color: var(--amber); }
.nav-sub-toggle { display: grid; place-items: center; width: 28px; height: 36px; margin-left: -6px; border: 0; background: none; color: rgba(255, 255, 255, 0.8); cursor: pointer; border-radius: 4px; }
.nav-sub-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.nav-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-sub {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 220px; margin: 0; padding: 8px; list-style: none;
  background: var(--white); border-radius: 6px;
  box-shadow: 0 14px 34px rgba(10, 20, 32, 0.24);
  display: none;
}
.nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub, .nav-sub.is-open { display: block; }
.nav-sub a { display: block; padding: 10px 12px; border-radius: 4px; color: var(--navy); font-weight: 650; text-decoration: none; }
.nav-sub a:hover, .nav-sub a[aria-current="page"] { background: var(--paper); color: var(--green); }

.tour-cta {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 18px 0 14px;
  border-radius: 999px;
  background: var(--amber); color: var(--navy);
  font-weight: 800; text-decoration: none;
}
.tour-cta:hover { background: #f0b457; color: var(--navy); }
.tour-cta-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--navy); box-shadow: inset 0 0 0 5px var(--navy), inset 0 0 0 9px var(--amber); }

.menu-toggle { display: none; }

@media (max-width: 960px) {
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 44px; padding: 0 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.4); border-radius: 4px;
    background: none; color: var(--white); font: inherit; font-weight: 700; cursor: pointer;
  }
  .menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 1px; position: relative; }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
  .menu-bars::before { top: -6px; }
  .menu-bars::after { top: 6px; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 12px var(--gutter) 24px;
    background: var(--navy);
    box-shadow: 0 16px 30px rgba(10, 20, 32, 0.3);
  }
  .site-nav.is-open { display: flex; }
  .site-nav > ul { flex-direction: column; gap: 0; }
  .nav-group { flex-wrap: wrap; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
  .nav-top { flex: 1; padding: 14px 0; font-size: 1.1rem; }
  .nav-sub-toggle { width: 48px; height: 48px; }
  .nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub { display: none; }
  .nav-sub { position: static; flex-basis: 100%; min-width: 0; padding: 0 0 10px 12px; background: none; box-shadow: none; }
  .site-nav .nav-group .nav-sub.is-open { display: block; }
  .nav-sub a { color: rgba(255, 255, 255, 0.86); }
  .nav-sub a:hover, .nav-sub a[aria-current="page"] { background: rgba(255, 255, 255, 0.08); color: var(--amber); }
  .tour-cta { justify-content: center; min-height: 50px; }
}

/* ----------------------------------------------------- Cabecera de página */
.page-head { padding: 28px 0 32px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--rail); }
.crumbs a { color: var(--muted); }
.page-head h1 {
  max-width: 18ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.005em;
  color: var(--navy);
  text-wrap: balance;
}
.subtitle {
  max-width: 52ch;
  margin: 14px 0 0;
  font-family: var(--read);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-style: italic;
  line-height: 1.3;
  color: var(--muted);
}
.lead { max-width: 62ch; margin-top: 22px; }
.lead p { margin: 0 0 1em; font-family: var(--read); font-size: clamp(1.1rem, 1.6vw, 1.25rem); line-height: 1.6; font-variation-settings: "opsz" 20; }

.hero-photo { padding: 0 var(--gutter); }
.photo { margin: 0; }
.photo .zoom { display: block; cursor: zoom-in; border-radius: 4px; overflow: hidden; background: var(--paper-2); }
.photo img { width: 100%; }
.photo figcaption { margin-top: 8px; font-size: 0.875rem; line-height: 1.45; color: var(--muted); max-width: 70ch; }
.photo.hero img { max-height: 74vh; object-fit: cover; }
.photo.is-portrait .zoom { width: fit-content; max-width: 100%; margin-inline: auto; }
.photo.is-portrait img { max-height: min(78vh, 720px); width: auto; }
.stop-photos .photo.is-portrait img { max-height: min(70vh, 620px); }
/* Miniaturas recortadas: siempre llenan su caja */
.card-photo .zoom, .step-photo .zoom, .timeline-photo .zoom, .doc-photo .zoom, .gallery .zoom { width: 100% !important; }
.card-photo img, .step-photo img, .timeline-photo img, .doc-photo img, .gallery img { width: 100% !important; max-height: none !important; object-fit: cover; }

/* ----------------------------------------------------- La línea y sus paradas */
.line {
  --line-pad: 64px;
  --dot: 22px;
  position: relative;
  padding: 48px 0 24px var(--line-pad);
}
.line::before {
  content: "";
  position: absolute;
  left: var(--rail-x); top: 0; bottom: 0;
  width: 5px;
  border-radius: 3px;
  background: repeating-linear-gradient(to bottom, var(--rail) 0 18px, transparent 18px 26px);
  opacity: 0.7;
}
.stop-block { position: relative; padding: 8px 0 56px; }
.stop-block::before {
  content: "";
  position: absolute;
  left: calc(var(--rail-x) + 2.5px - var(--dot) / 2 - var(--line-pad));
  top: 17px;
  width: var(--dot); height: var(--dot);
  border-radius: 50%;
  background: var(--paper);
  border: 5px solid var(--navy);
  box-sizing: border-box;
}
.stop-block h2 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 780;
  line-height: 1.04;
  color: var(--navy);
  text-wrap: balance;
}
.stop-text p, .stop-text li { font-family: var(--read); font-size: 1.125rem; line-height: 1.65; font-variation-settings: "opsz" 18; }
.stop-text p { margin: 0 0 1em; max-width: 64ch; }
.sub { margin-top: 28px; }
.sub h3 { margin: 0 0 8px; font-family: var(--display); font-size: 1.6rem; font-weight: 720; color: var(--navy); }
.stop-photos { display: grid; gap: 14px; margin-top: 6px; }
.stop-photos .photo + .photo { width: 72%; justify-self: end; }
@media (min-width: 900px) {
  .stop-block.has-photo { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start; }
}

/* Puntos de la visita relacionados con el bloque */
.in-tour { margin-top: 26px; max-width: 64ch; }
.in-tour-title { margin: 0 0 8px; font-family: var(--ui) !important; font-size: 0.95rem !important; font-weight: 700; color: var(--navy); }
.in-tour ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.in-tour li { border-bottom: 1px solid var(--line); font-family: var(--ui) !important; font-size: 1rem !important; }
.in-tour a { display: flex; align-items: center; gap: 14px; padding: 10px 2px; color: var(--ink); text-decoration: none; font-weight: 650; line-height: 1.3; }
.in-tour a:hover span:last-child { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.ticket-mini {
  flex: none;
  min-width: 70px;
  padding: 3px 8px 4px;
  border-radius: 2px;
  background: var(--buff);
  color: var(--red);
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 820;
  text-align: center;
  box-shadow: inset -6px 0 0 -4.5px rgba(28, 38, 48, 0.25);
}

/* ------------------------------------------------------------- Ampliaciones */
.ampliacion {
  position: relative;
  margin: 0 0 64px;
  padding: 32px clamp(20px, 4vw, 44px) 36px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(28, 38, 48, 0.08), 0 12px 32px rgba(23, 42, 63, 0.08);
  border-top: 6px solid var(--amber);
}
.ampliacion::before {
  content: "";
  position: absolute;
  left: calc(var(--rail-x) + 2.5px - 11px - var(--line-pad));
  top: 30px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 5px var(--paper);
}
.ampliacion .ampliacion-kind { font-family: var(--ui); margin: 0 0 6px; font-size: 0.95rem; font-weight: 700; color: var(--amber-text, #8f5a0b); }
.ampliacion h3 { margin: 0; font-family: var(--display); font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 780; line-height: 1.04; color: var(--navy); max-width: 24ch; }
.ampliacion-question { margin: 10px 0 0; font-family: var(--read); font-style: italic; font-size: 1.25rem; line-height: 1.4; color: var(--muted); max-width: 46ch; }
.ampliacion-intro { max-width: 64ch; margin-top: 20px; }
.ampliacion p { font-family: var(--read); font-size: 1.0625rem; line-height: 1.62; margin: 0 0 1em; font-variation-settings: "opsz" 16; }
.ampliacion h4 { margin: 22px 0 6px; font-family: var(--display); font-size: 1.45rem; font-weight: 720; color: var(--navy); line-height: 1.1; }
.ampliacion-cols { display: grid; gap: 28px; }
@media (min-width: 900px) { .ampliacion-cols { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; gap: 40px; } }
.ampliacion-photos { display: grid; gap: 14px; margin-top: 20px; }
.ampliacion-note { font-size: 0.95rem !important; color: var(--muted); font-style: italic; }

.cards { display: grid; gap: 14px; margin: 28px 0 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .cards-2, .cards-4 { grid-template-columns: repeat(2, 1fr); } .cards-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .cards-4 { grid-template-columns: repeat(4, 1fr); } }
.cards li { padding: 18px 18px 6px; border-radius: 6px; background: var(--paper); border-left: 5px solid var(--navy); }
.cards h4 { margin-top: 0; }
.cards p { font-size: 1rem; }
.card-photo { margin: -18px -18px 14px -18px; }
.card-photo .zoom { border-radius: 6px 6px 0 0; }
.card-photo img { aspect-ratio: 4 / 3; object-fit: cover; }
.cards li:has(.card-photo) { border-left: 0; }
.cards-4 li { display: flex; flex-direction: column; }

/* N01: los cuatro pasos del billete (secuencia real) */
.steps { display: grid; gap: 18px; margin: 26px 0 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { position: relative; padding: 18px 18px 8px; border-radius: 4px; background: var(--buff); }
.steps li::after { content: ""; position: absolute; right: 14px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); box-shadow: inset 0 1px 2px rgba(28, 38, 48, 0.4); }
.step-num { display: block; font-family: var(--display); font-size: 2.6rem; font-weight: 820; line-height: 1; color: var(--red); }
.steps h4 { margin: 6px 0 8px; }
.steps p { font-size: 1rem; }
.step-photo { margin: 6px -6px 10px; }
.step-photo img { aspect-ratio: 4 / 3; object-fit: cover; }
.step-photo figcaption { display: none; }

/* N05: anchos de vía */
.gauge-figure { margin: 26px 0 20px; padding: 24px; border-radius: 6px; background: var(--navy); color: var(--white); }
.gauges { width: 100%; max-width: 640px; margin: 0 auto; height: auto; }
.gauges .sleepers rect { fill: #4a5d70; }
.gauges .rail { fill: #d9dee3; }
.gauges .dim { stroke: var(--amber); stroke-width: 2.5; fill: none; }
.gauges text { fill: var(--white); font-family: var(--display); font-size: 22px; font-weight: 760; }
.gauges .transfer path { stroke: var(--amber); stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.gauges .transfer rect { fill: var(--amber); }
.gauges .transfer text { fill: var(--amber); }
.gauge-figure figcaption p { color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; margin: 14px 0 0; }
.gauge-legend { display: grid; gap: 12px; margin: 22px 0 0; }
@media (min-width: 700px) { .gauge-legend { grid-template-columns: repeat(3, 1fr); } }
.gauge-legend dt { font-family: var(--display); font-size: 1.3rem; font-weight: 760; color: var(--amber); }
.gauge-legend dd { margin: 2px 0 0; color: rgba(255, 255, 255, 0.88); line-height: 1.45; }

/* N06: cronología (secuencia de fechas) */
.timeline { position: relative; display: grid; gap: 22px; margin: 30px 0 0; padding: 0; list-style: none; }
@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(4, 1fr); padding-top: 26px; }
  .timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 5px; border-radius: 3px; background: var(--navy); }
  .timeline li::before { content: ""; position: absolute; top: -26px; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 5px solid var(--navy); }
}
.timeline li { position: relative; }
.year { display: block; font-family: var(--display); font-size: 3rem; font-weight: 820; line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; }
.timeline h4 { margin-top: 6px; }
.timeline p { font-size: 1rem; }
.timeline-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.timeline-photo figcaption { display: none; }
.timeline-photo img { aspect-ratio: 1; object-fit: cover; }

/* N03: receta */
.recipe { margin-top: 30px; padding: 26px; border-radius: 6px; background: var(--paper); }
.recipe-title { margin-top: 0 !important; }
.recipe-tag { display: inline-block; margin: 0 0 12px !important; padding: 3px 10px; border-radius: 999px; background: var(--buff); font-family: var(--ui) !important; font-size: 0.85rem !important; font-weight: 700; color: #5c5236; }
.recipe-note { max-width: 64ch; }
.recipe-meta { display: grid; gap: 10px; margin: 18px 0; }
@media (min-width: 700px) { .recipe-meta { grid-template-columns: 0.6fr 1.4fr 1.6fr; } }
.recipe-meta div { padding: 12px 14px; border-radius: 4px; background: var(--white); }
.recipe-meta dt { font-weight: 800; color: var(--navy); }
.recipe-meta dd { margin: 2px 0 0; line-height: 1.45; font-size: 0.95rem; }
.recipe-cols { display: grid; gap: 28px; margin-top: 10px; }
@media (min-width: 900px) { .recipe-cols { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 44px; } }
.recipe h5 { margin: 10px 0 10px; font-family: var(--display); font-size: 1.35rem; font-weight: 760; color: var(--navy); }
.ingredients { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ingredients li { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.qty { font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }
.recipe-steps { margin: 0; padding: 0; list-style: none; counter-reset: rs; }
.recipe-steps li { position: relative; padding: 0 0 4px 52px; counter-increment: rs; }
.recipe-steps li::before { content: counter(rs); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--white); font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.recipe-steps h6 { margin: 6px 0 4px; font-family: var(--ui); font-size: 1.05rem; font-weight: 800; color: var(--navy); }
.recipe-pending { font-size: 0.9rem !important; color: var(--muted); font-style: italic; margin-top: 18px !important; }

/* Esquema de la red */
.network { margin: 24px 0 18px; padding: 22px 22px 16px; border-radius: 6px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.network svg { width: 100%; height: auto; }
.network .main-line { stroke: var(--navy); stroke-width: 10; stroke-linecap: round; fill: none; }
.network .branch { stroke: var(--green); stroke-width: 7; stroke-linecap: round; fill: none; }
.network .mine { stroke: var(--green); stroke-width: 4; stroke-dasharray: 2 9; stroke-linecap: round; fill: none; }
.network .stop { fill: var(--white); stroke: var(--navy); stroke-width: 5; }
.network .stop.key { fill: var(--amber); }
.network .mine-stop { stroke: var(--green); }
.network text { font-family: var(--display); font-size: 21px; font-weight: 720; fill: var(--ink); }
.network .key-label { font-size: 26px; font-weight: 820; fill: var(--navy); }
.network .legend-label { font-family: var(--ui); font-size: 14px; font-weight: 600; fill: var(--muted); }
.network figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 8px; }

/* Datos prácticos */
.practical { display: grid; gap: 0; margin: 18px 0 8px; border-top: 2px solid var(--navy); max-width: 64ch; }
@media (min-width: 700px) { .practical { grid-template-columns: repeat(2, 1fr); column-gap: 28px; } }
.practical div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.practical dt { font-weight: 800; color: var(--navy); font-family: var(--ui); }
.practical dd { margin: 2px 0 0; font-family: var(--read); font-size: 1.05rem; }
.practical .is-pending dd { display: inline-block; margin-top: 6px; padding: 1px 10px; border: 1.5px dashed var(--rail); border-radius: 3px; font-family: var(--ui); font-size: 0.9rem; color: var(--muted); }
.practical-note { font-family: var(--ui) !important; font-size: 0.9rem !important; color: var(--muted); }

/* Documentos */
.docs { padding: 24px 0 8px; border-top: 2px solid var(--navy); }
.docs h2, .more-photos h2, .chooser h2 { margin: 0 0 18px; font-family: var(--display); font-size: 2rem; font-weight: 780; color: var(--navy); }
.docs ul { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 800px) { .docs ul { grid-template-columns: repeat(3, 1fr); } }
.docs li { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; }
.docs h3 { margin: 0 0 4px; font-family: var(--display); font-size: 1.3rem; font-weight: 720; color: var(--navy); line-height: 1.1; }
.doc-date { margin: 0 0 8px; color: var(--muted); }
.doc-photo img { aspect-ratio: 1; object-fit: cover; }

/* Más imágenes */
.more-photos { padding: 32px 0 8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.gallery .photo img { aspect-ratio: 4 / 3; object-fit: cover; }
.gallery .photo.is-portrait img { width: 100%; max-height: none; }

/* Selector de escenas (Visita virtual) */
.chooser { padding: 32px 0 24px; border-top: 2px solid var(--navy); }
.chooser-intro { margin: -8px 0 22px; color: var(--muted); }
.chooser-lines { display: grid; gap: 28px; }
.chooser-group h3 { margin: 0 0 12px; font-family: var(--display); font-size: 1.5rem; font-weight: 760; color: var(--green); }
.chooser-group ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.chooser-group a { display: flex; flex-direction: column; gap: 2px; color: var(--ink); text-decoration: none; }
.chooser-group img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; margin-bottom: 8px; }
.chooser-name { font-weight: 800; line-height: 1.25; }
.chooser-place { font-size: 0.9rem; color: var(--muted); }
.chooser-group a:hover .chooser-name { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ Inicio */
.home-hero { background: var(--navy); color: var(--white); padding: 44px 0 56px; }
.home-hero-inner { position: relative; }
.home-badge { position: absolute; right: 0; top: 50%; width: clamp(200px, 22vw, 278px); height: auto; transform: translateY(-50%); }
@media (max-width: 1000px) { .home-badge { position: static; transform: none; width: 132px; margin: 0 0 24px; } }
.nameplate {
  display: inline-block;
  max-width: 100%;
  padding: 14px 26px 18px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 7px var(--navy), inset 0 0 0 9.5px rgba(255, 255, 255, 0.85);
}
.nameplate h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 820;
  line-height: 0.95;
  letter-spacing: -0.005em;
  text-wrap: balance;
  max-width: 16ch;
}
.home-sub { margin: 26px 0 0; font-family: var(--read); font-style: italic; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.25; color: var(--amber); max-width: 32ch; }
.home-hero .lead p { color: rgba(255, 255, 255, 0.9); }
.home-hero .button-quiet { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.8); color: var(--white); }
.home-hero .button-quiet:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.home-hero .button-primary { background: var(--amber); color: var(--navy); }
.home-hero .button-primary:hover { background: #f0b457; }
.home-photo .photo.hero img { max-height: 78vh; border-radius: 0; }
.home-photo .photo .zoom { border-radius: 0; }
.home-photo figcaption { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.three { padding: 24px 0 24px; }
.three h2 { margin: 0; font-family: var(--display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--navy); }
.three-intro { max-width: 62ch; font-family: var(--read); font-size: 1.15rem; line-height: 1.6; }
.three-list { display: grid; gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
@media (min-width: 860px) { .three-list { grid-template-columns: repeat(3, 1fr); } }
.three-list a {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding: 24px; border-radius: 8px;
  background: var(--white); color: var(--ink); text-decoration: none;
  border-bottom: 5px solid var(--navy);
  transition: border-color .15s;
}
.three-list a:hover { border-bottom-color: var(--amber); }
.three-mark svg { width: 48px; height: 48px; fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.three-title { font-family: var(--display); font-size: 1.7rem; font-weight: 780; line-height: 1.05; color: var(--navy); }
.three-desc { font-family: var(--read); line-height: 1.5; color: var(--muted); }

/* ----------------------------------------------------------- Fuentes */
.sources-list { padding-bottom: 64px; }
.sources-list section { padding: 18px 0; border-top: 2px solid var(--navy); }
.sources-list h2 { margin: 0 0 10px; font-family: var(--display); font-size: 1.7rem; font-weight: 760; color: var(--navy); }
.sources-list ul { margin: 0; padding-left: 20px; }
.sources-list li { margin-bottom: 10px; line-height: 1.4; }
.sources-list li span { display: block; color: var(--muted); font-size: 0.92rem; }
.sources-list p { max-width: 64ch; font-family: var(--read); font-size: 1.05rem; line-height: 1.6; }

/* ------------------------------------------------------------------ Pie */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, 0.86); padding: 44px 0 26px; margin-top: 24px; }
.footer-inner { display: grid; gap: 28px; }
@media (min-width: 800px) { .footer-inner { grid-template-columns: 2fr 1fr; } }
.footer-name { margin: 0 0 6px; font-family: var(--display); font-size: 1.6rem; font-weight: 780; color: var(--white); }
.site-footer p { margin: 0 0 8px; max-width: 52ch; line-height: 1.5; }
.footer-address { color: rgba(255, 255, 255, 0.7); }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-block; padding: 6px 0; color: var(--white); font-weight: 700; }
.footer-links a:hover { color: var(--amber); }
.footer-logos { margin-top: 32px; padding: 16px 20px; background: var(--white); border-radius: 6px; }
.footer-logos img { display: block; width: 100%; max-width: 560px; height: auto; margin-inline: auto; }
.site-footer .footer-note { max-width: none; margin-top: 26px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }

/* ------------------------------------------------------------------ Visor */
.viewer { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 56px 16px 20px; background: rgba(8, 14, 22, 0.94); }
.viewer figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.viewer img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.viewer figcaption { max-width: 760px; margin-top: 12px; color: rgba(255, 255, 255, 0.86); font-size: 0.95rem; line-height: 1.45; text-align: center; }
.viewer-close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: none; color: var(--white); cursor: pointer; }
.viewer-close:hover { background: rgba(255, 255, 255, 0.12); }
.viewer-close svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* --------------------------------------------------------------- Móvil */
@media (max-width: 700px) {
  :root { --rail-x: 4px; }
  .line { --line-pad: 30px; --dot: 18px; }
  .stop-block::before { border-width: 4px; top: 12px; }
  .ampliacion { margin-right: calc(-1 * var(--gutter) + 6px); padding-left: 18px; padding-right: 18px; border-radius: 6px 0 0 6px; }
  .stop-photos .photo + .photo { width: 100%; }
  .docs li { grid-template-columns: 88px 1fr; }
  .brand-logo { height: 50px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
