/* HYBRID NORTE · Sección de estaciones. Todo el CSS está acotado a .hn-est y .hn-modal */
@font-face { font-family: 'HN Display'; src: url('fonts/barlow-condensed-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'HN Display'; src: url('fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'HN Text'; src: url('fonts/barlow-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'HN Text'; src: url('fonts/barlow-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }

.hn-est, .hn-modal {
  --hn-bg: #071827;
  --hn-bg-2: #0b1f31;
  --hn-ink: #f2f4f6;
  --hn-mute: #9db0c2;
  --hn-line: rgba(255, 255, 255, 0.1);
  --hn-blue: #01a6ff;
  --hn-yellow: #ffe00b;
  --hn-red: #fa0129;
  --hn-display: 'HN Display', 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --hn-text: 'HN Text', 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--hn-ink);
  font-family: var(--hn-text);
  -webkit-font-smoothing: antialiased;
}
.hn-est *, .hn-modal * { box-sizing: border-box; }
/* reserva espacio mientras se monta la sección (evita desplazar lo que hay debajo) */
[data-hn-estaciones]:not([data-hn-mounted]) { min-height: 100vh; background: #071827; }

.hn-est {
  background: radial-gradient(120% 60% at 80% 0%, #0d2740 0%, var(--hn-bg) 55%);
  padding: clamp(56px, 9vw, 120px) clamp(18px, 5vw, 64px);
  position: relative;
  overflow: hidden;
}
.hn-est__inner { max-width: 1320px; margin: 0 auto; }

/* Cabecera */
.hn-est__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 48px; align-items: end; margin-bottom: clamp(28px, 4vw, 44px); }
.hn-est__eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font: 700 13px/1 var(--hn-display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--hn-mute); }
.hn-est__eyebrow::before { content: ''; width: 42px; height: 4px; background: linear-gradient(90deg, var(--hn-blue) 0 33%, var(--hn-yellow) 33% 66%, var(--hn-red) 66%); transform: skewX(-20deg); }
.hn-est__title { margin: 0; font: italic 800 clamp(46px, 7.4vw, 104px)/0.86 var(--hn-display); text-transform: uppercase; letter-spacing: -0.01em; }
.hn-est__title b { color: var(--hn-blue); font-weight: 800; }
.hn-est__lead { margin: 18px 0 0; max-width: 56ch; color: var(--hn-mute); font-size: clamp(16px, 1.5vw, 18px); line-height: 1.5; }

/* Selectores */
.hn-est__controls { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.hn-seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--hn-line); }
.hn-seg button { appearance: none; border: 0; background: transparent; color: var(--hn-mute); font: 700 15px/1 var(--hn-display); letter-spacing: 0.06em; text-transform: uppercase; padding: 10px 16px; border-radius: 999px; cursor: pointer; transition: background 0.2s, color 0.2s; white-space: nowrap; }
.hn-seg button[aria-pressed='true'] { background: var(--hn-ink); color: #071827; }
.hn-seg button:focus-visible, .hn-est button:focus-visible, .hn-modal button:focus-visible { outline: 2px solid var(--hn-yellow); outline-offset: 2px; }

/* Recorrido */
.hn-route { list-style: none; margin: 0 0 clamp(26px, 3.5vw, 40px); padding: 0; display: flex; align-items: center; gap: 0; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--hn-line); border-bottom: 1px solid var(--hn-line); }
.hn-route::-webkit-scrollbar { display: none; }
.hn-route li { flex: 1 0 auto; display: flex; align-items: baseline; gap: 8px; padding: 14px 18px; font: 700 15px/1 var(--hn-display); text-transform: uppercase; letter-spacing: 0.05em; color: var(--hn-mute); position: relative; white-space: nowrap; }
.hn-route li + li::before { content: ''; position: absolute; left: -4px; top: 50%; width: 8px; height: 8px; border-top: 2px solid rgba(255,255,255,.25); border-right: 2px solid rgba(255,255,255,.25); transform: translateY(-50%) rotate(45deg); }
.hn-route li span { color: var(--hn-ink); }
.hn-route li.is-run span, .hn-route li.is-end span { color: var(--hn-yellow); }

/* Rejilla */
.hn-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
@media (max-width: 1080px) { .hn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .hn-grid { grid-template-columns: minmax(0, 1fr); } .hn-est__head { grid-template-columns: 1fr; } .hn-est__controls { align-items: stretch; } .hn-seg { display: flex; } .hn-seg button { flex: 1; padding: 11px 8px; } }

.hn-card { background: linear-gradient(180deg, var(--hn-bg-2), #091a2a); border: 1px solid var(--hn-line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.25s, transform 0.25s; }
.hn-card:hover { border-color: rgba(1, 166, 255, 0.45); }
.hn-card__media { appearance: none; border: 0; padding: 0; margin: 0; display: block; width: 100%; position: relative; aspect-ratio: 16 / 10; background: #07101a; cursor: pointer; overflow: hidden; }
.hn-card__media video, .hn-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hn-card__num { position: absolute; left: 14px; top: 10px; font: italic 800 54px/1 var(--hn-display); color: rgba(255, 255, 255, 0.92); text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5); pointer-events: none; }
.hn-card__zoom { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; background: rgba(7, 16, 26, 0.72); backdrop-filter: blur(6px); font: 700 13px/1 var(--hn-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--hn-ink); pointer-events: none; opacity: 0.9; }
.hn-card__zoom svg { width: 14px; height: 14px; }
.hn-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.hn-card__lema { margin: 0; font: 700 13px/1 var(--hn-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--hn-blue); }
.hn-card__name { margin: 0; font: italic 800 clamp(30px, 2.6vw, 38px)/0.95 var(--hn-display); text-transform: uppercase; }
.hn-card__specs { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0; border-top: 1px solid var(--hn-line); border-bottom: 1px solid var(--hn-line); }
.hn-card__specs div { padding: 10px 0; }
.hn-card__specs div + div { padding-left: 18px; border-left: 1px solid var(--hn-line); margin-left: 18px; }
.hn-card__specs dt { font: 700 11px/1 var(--hn-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--hn-mute); margin-bottom: 6px; }
.hn-card__specs dd { margin: 0; font: 700 22px/1.05 var(--hn-display); }
.hn-card__std { margin: 0; color: var(--hn-mute); font-size: 15px; line-height: 1.45; flex: 1; }
.hn-card__more { align-self: flex-start; appearance: none; background: none; border: 0; padding: 4px 0; color: var(--hn-ink); font: 700 15px/1 var(--hn-display); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; border-bottom: 2px solid var(--hn-yellow); }
.hn-card__more:hover { color: var(--hn-yellow); }

.hn-est__foot { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; color: var(--hn-mute); font-size: 13px; line-height: 1.5; }
.hn-est__foot a { color: var(--hn-ink); }

/* Vista detallada */
.hn-modal { padding: 0; border: 0; background: transparent; width: min(1240px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); }
.hn-modal::backdrop { background: rgba(3, 8, 14, 0.82); backdrop-filter: blur(4px); }
.hn-modal__box { position: relative; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); background: var(--hn-bg); border: 1px solid var(--hn-line); border-radius: 16px; overflow: hidden; max-height: calc(100dvh - 24px); }
.hn-modal__stage { position: relative; background: #07101a; min-height: 0; display: flex; flex-direction: column; }
.hn-modal__view { position: relative; aspect-ratio: 16 / 10; width: 100%; }
.hn-modal__view canvas, .hn-modal__view video, .hn-modal__view img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.hn-modal__loading { position: absolute; inset: 0; display: grid; place-items: center; font: 700 14px/1 var(--hn-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--hn-mute); background: rgba(7, 16, 26, 0.55); }
.hn-modal__bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 12px 14px; border-top: 1px solid var(--hn-line); background: #08131f; }
.hn-modal__bar .hn-seg button { padding: 8px 12px; font-size: 13px; }
.hn-iconbtn { appearance: none; border: 1px solid var(--hn-line); background: rgba(255,255,255,.06); color: var(--hn-ink); width: 40px; height: 40px; border-radius: 999px; display: inline-grid; place-items: center; cursor: pointer; }
.hn-iconbtn svg { width: 18px; height: 18px; }
.hn-modal__group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hn-modal__info { padding: clamp(20px, 2.6vw, 34px); overflow-y: auto; max-height: calc(100dvh - 24px); }
.hn-modal__num { font: italic 800 72px/0.8 var(--hn-display); color: var(--hn-blue); margin: 0; }
.hn-modal__title { margin: 10px 0 4px; font: italic 800 clamp(34px, 3.4vw, 48px)/0.95 var(--hn-display); text-transform: uppercase; }
.hn-modal__lema { margin: 0 0 20px; color: var(--hn-mute); font: 700 14px/1 var(--hn-display); letter-spacing: 0.14em; text-transform: uppercase; }
.hn-modal table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 15px; }
.hn-modal th, .hn-modal td { text-align: left; padding: 9px 8px 9px 0; border-bottom: 1px solid var(--hn-line); vertical-align: top; }
.hn-modal th { font: 700 12px/1.2 var(--hn-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--hn-mute); width: 42%; }
.hn-modal td { font-weight: 600; }
.hn-modal h4 { margin: 20px 0 10px; font: 700 15px/1 var(--hn-display); letter-spacing: 0.14em; text-transform: uppercase; }
.hn-modal ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.hn-modal li { position: relative; padding-left: 22px; line-height: 1.45; color: #d8e1ea; }
.hn-modal li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 10px; height: 3px; background: var(--hn-blue); transform: skewX(-20deg); }
.hn-modal ul.is-bad li::before { background: var(--hn-red); }
.hn-modal__note { margin-top: 22px; font-size: 13px; color: var(--hn-mute); line-height: 1.5; }
.hn-modal__close { position: absolute; top: 12px; right: 12px; z-index: 3; }
.hn-modal__nav { display: flex; gap: 8px; margin-top: 24px; }
.hn-modal__nav button { flex: 1; appearance: none; border: 1px solid var(--hn-line); background: rgba(255,255,255,.04); color: var(--hn-ink); padding: 12px; border-radius: 10px; font: 700 14px/1 var(--hn-display); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.hn-modal__nav button:hover, .hn-iconbtn:hover { border-color: var(--hn-blue); }
@media (min-width: 901px) {
  .hn-modal__view { aspect-ratio: auto; flex: 1 1 auto; min-height: 440px; }
}
@media (max-width: 900px) {
  .hn-modal__box { grid-template-columns: 1fr; overflow-y: auto; }
  .hn-modal__info { max-height: none; overflow: visible; }
  .hn-modal { width: 100vw; max-height: 100dvh; margin: 0; }
  .hn-modal__box { border-radius: 0; max-height: 100dvh; min-height: 100dvh; align-content: start; }
}
@media (prefers-reduced-motion: reduce) {
  .hn-card, .hn-seg button { transition: none; }
}
.hn-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hn-modal__title:focus { outline: none; }
