/* Novedades — línea de tiempo. Hero compacto, riel horizontal con cursor arrastrable y,
   debajo, la edición elegida en filas imagen + texto. Usa los tokens de site.css. */

/* Hero compacto */
.tl-hero { position: relative; padding: 64px 0 8px; overflow: hidden; }
.tl-hero .wrap { position: relative; }
.tl-hero .sub { max-width: 560px; }

/* ---- Línea de tiempo ---- */
.tl { padding: 32px 0 8px; }
.tl-bar { display: grid; grid-template-columns: 44px 1fr 44px; gap: 16px; align-items: start; }
.tl-arrow {
  width: 44px; height: 44px; margin-top: 42px;
  border: 1px solid var(--line-2); border-radius: 50%; background: #fff;
  display: grid; place-items: center; color: var(--ink-2);
  transition: border-color .2s ease, color .2s ease;
}
.tl-arrow:hover { border-color: var(--ink); color: var(--ink); }
.tl-arrow:disabled { opacity: .35; cursor: default; }
.tl-arrow:disabled:hover { border-color: var(--line-2); color: var(--ink-2); }
.tl-arrow svg { width: 16px; height: 16px; }

.tl-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 0 90px; } /* medio ancho de etiqueta: los nodos de las puntas quedan centrados sin salirse */
.tl-scroll::-webkit-scrollbar { display: none; }
/* Cuando hay más ediciones de las que entran, los bordes se desvanecen para sugerir que sigue */
.tl-scroll.scrollable {
  -webkit-mask-image: linear-gradient(to right, transparent, black 56px, black calc(100% - 56px), transparent);
  mask-image: linear-gradient(to right, transparent, black 56px, black calc(100% - 56px), transparent);
}

/* El riel: la línea, los nodos y el cursor comparten este contenedor */
.tl-track {
  position: relative; height: 150px;
  min-width: max(100%, calc(var(--tl-n, 3) * 200px)); /* con muchas ediciones, scrollea */
  cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y;
}
.tl-track:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; border-radius: 12px; }
.tl-track.dragging { cursor: grabbing; }
.tl-line { position: absolute; left: 0; right: 0; top: 64px; height: 2px; background: var(--line-2); }
.tl-line-fill { position: absolute; left: 0; top: 64px; height: 2px; background: var(--blue); transition: width .2s ease; }
.tl-track.dragging .tl-line-fill { transition: none; }

.tl-node { position: absolute; top: 0; height: 150px; width: 0; display: flex; flex-direction: column; align-items: center; }
.tl-node-dot {
  position: absolute; top: 59px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--line-2);
  transition: border-color .2s ease, background .2s ease;
}
.tl-node.passed .tl-node-dot { border-color: var(--blue); }
.tl-node.active .tl-node-dot { border-color: var(--blue); background: var(--blue); }
.tl-node-label { position: absolute; top: 86px; width: 180px; text-align: center; color: var(--ink-3); transition: color .2s ease; }
.tl-node-month { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.tl-node-title {
  display: -webkit-box; margin-top: 4px; font-size: 13px; line-height: 1.3; color: var(--ink-3);
  overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.tl-node.active .tl-node-title { color: var(--ink); }
.tl-node.active .tl-node-month { color: var(--blue); }

/* El cursor que se arrastra */
.tl-knob {
  position: absolute; top: 45px; width: 40px; height: 40px; margin-left: -20px;
  border-radius: 50%; background: var(--ink); color: #fff; box-shadow: var(--shadow);
  display: grid; place-items: center;
  transition: left .2s ease, transform .2s ease;
}
.tl-knob svg { width: 16px; height: 16px; }
.tl-track:hover .tl-knob { transform: scale(1.06); }
.tl-track.dragging .tl-knob { transition: transform .2s ease; transform: scale(1.12); }
.tl-hint { margin-top: 2px; text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

/* ---- Edición elegida ---- */
.tl-edition { padding: 48px 0 112px; }
.tl-edition-head { max-width: 780px; }
.tl-when { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--ink-3); }
.tl-when .sep { width: 1px; height: 12px; background: var(--line-2); }
.tl-when .new { color: var(--blue); font-weight: 500; }

.tl-rows { margin-top: 48px; display: flex; flex-direction: column; gap: 20px; }
.tl-row {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center;
  padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 22px;
}
.tl-row.flip { grid-template-columns: 1fr 1.15fr; }
.tl-row.flip .tl-row-media { order: 2; }
.tl-row-media { aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--bg-3); border: 1px solid var(--line); }
.tl-row-media img { width: 100%; height: 100%; object-fit: cover; }
.tl-row.no-media { grid-template-columns: 1fr; }
.tl-row.no-media .tl-row-text { max-width: 760px; }
.tl-row .icon { width: 40px; height: 40px; border-radius: 12px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; }
.tl-row .icon svg { width: 19px; height: 19px; }
.tl-row-area { display: inline-block; margin-top: 18px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.tl-row h3 { margin-top: 8px; font-size: clamp(21px, 1.9vw, 26px); font-weight: 600; line-height: 1.2; letter-spacing: -.025em; }
.tl-row p { margin-top: 12px; font-size: 16px; line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.tl-row .nv-guia { display: inline-block; margin-top: 16px; font-size: 15px; font-weight: 500; color: var(--blue); }
.tl-row .nv-guia:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Entrada al cambiar de edición */
.tl-anim { animation: panelIn .4s var(--ease) both; }

@media (max-width: 980px) {
  .tl-hero { padding: 40px 0 0; }
  .tl-bar { grid-template-columns: 1fr; gap: 0; }
  .tl-arrow { display: none; }
  .tl-node-label { width: 160px; }
  .tl-row, .tl-row.flip { grid-template-columns: 1fr; gap: 20px; padding: 18px; }
  .tl-row.flip .tl-row-media { order: 0; }
}

/* Celular: el riel se recorre con el dedo. Los meses quedan como marcas y solo
   la edición activa muestra su título, así entran varios en pantalla. */
@media (max-width: 640px) {
  .tl { padding: 20px 0 8px; }
  .tl-scroll { padding: 0 56px; } /* medio ancho de la etiqueta del mes */
  /* El título de la edición activa ya se lee entero abajo, en el encabezado:
     en el riel alcanza con el mes, y así nada se corta contra los bordes. */
  .tl-track { height: 110px; min-width: max(100%, calc(var(--tl-n, 3) * 104px)); }
  .tl-node { height: 110px; }
  .tl-node-label { width: 104px; }
  .tl-node-title { display: none; }
  .tl-hint { font-size: 10px; letter-spacing: .06em; padding: 0 8px; }
  .tl-edition { padding: 32px 0 80px; }
  .tl-rows { margin-top: 28px; }
}
