/* =====================================================================
   Videoteca — General Pacheco Web — MODO NOCHE
   Se carga DESPUÉS de cultura/css/agenda.css y usa sus variables
   (--color-fondo-noche, --color-acento-principal, etc.).
   Todo queda dentro de .vt para no pisar header, footer ni otras páginas.
   ===================================================================== */

.vt {
  --vt-bg:        var(--color-fondo-noche, #12161e);
  --vt-surface:   var(--color-contenedor-noche, #1a202c);
  --vt-panel:     #232834;            /* mismo tono que filtros y hub de la Agenda */
  --vt-control:   #2a303d;            /* inputs y botones secundarios */
  --vt-line:      var(--color-borde-noche, #2d3748);
  --vt-line-2:    #404859;
  --vt-text:      #e0e0e0;
  --vt-muted:     var(--color-texto-claro, #a9b3c1);
  --vt-magenta:   var(--color-acento-principal, #B7245C);
  --vt-magenta-2: #9c1d4d;            /* magenta oscuro (hover) */
  --vt-naranja:   var(--color-acento-secundario, #FF8C42);
  --vt-blanco:    var(--color-blanco, #FFFFFF);
  --vt-radius:    12px;
  --vt-pad:       20px;

  display: block;
  color: var(--vt-text);
  font-family: var(--fuente-base, 'Poppins', sans-serif);
  padding-bottom: 8px;
}
.vt *, .vt *::before, .vt *::after { box-sizing: border-box; }
.vt img { max-width: 100%; display: block; }
.vt a { color: var(--vt-naranja); text-decoration: none; }
.vt a:hover { color: var(--vt-blanco); }
.vt :focus-visible { outline: 3px solid var(--vt-naranja); outline-offset: 2px; }
.vt h1, .vt h2, .vt h3 { font-family: inherit; }
.vt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* .page-wrapper tiene overflow-x:hidden, que anula position:sticky.
   "clip" corta igual el desborde horizontal pero deja funcionar el sticky.
   Solo en las páginas de la videoteca. */
.vt-body .page-wrapper { overflow-x: clip; }

.vt-wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--vt-pad); }

/* ---------- Encabezado (usa .pagina-header de Cultura) ---------- */
.vt-header .pagina-header {
  padding-bottom: 64px; /* que el buscador quede fuera del degradé inferior */
  background-image: linear-gradient(rgba(18, 22, 30, 0.80), rgba(18, 22, 30, 0.80));
  /* Para usar foto de fondo propia, subí /videoteca/fondo_videoteca.jpg y reemplazá la línea de arriba por:
  background-image: linear-gradient(rgba(18,22,30,.78), rgba(18,22,30,.78)), url('/videoteca/fondo_videoteca.jpg'); */
}
.vt-search {
  display: flex; gap: 8px; max-width: 560px; margin: 26px auto 0;
}
.vt-search input {
  flex: 1; min-width: 0; height: 48px; padding: 0 18px;
  background: var(--vt-control); border: 1px solid var(--vt-line-2); border-radius: 50px;
  color: var(--vt-blanco); font: inherit; font-size: 15px;
}
.vt-search input::placeholder { color: var(--vt-muted); }
.vt-search button {
  height: 48px; padding: 0 22px; border: 0; border-radius: 50px; cursor: pointer;
  background: var(--vt-magenta); color: var(--vt-blanco); font: inherit; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.vt-search button:hover { background: var(--vt-magenta-2); }

/* ---------- Destacado ---------- */
.vt-hero { max-width: 1200px; margin: 0 auto; padding: 0 var(--vt-pad); }
.vt-hero-inner {
  display: grid; grid-template-columns: 1fr; overflow: hidden;
  background: var(--vt-surface); border: 1px solid var(--vt-line); border-radius: var(--vt-radius);
}
.vt-hero-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.vt-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.vt-hero-text { padding: 20px var(--vt-pad) 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.vt-hero-tag {
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 50px;
  background: var(--vt-naranja); color: var(--vt-bg);
}
.vt-hero h2 { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.15; color: var(--vt-blanco); }
.vt-hero p { margin: 0; max-width: 56ch; font-size: 15px; line-height: 1.65; color: var(--vt-muted); }
.vt-hero .vt-btn { margin-top: 6px; }

@media (min-width: 900px) {
  .vt-hero-inner { grid-template-columns: 1.5fr 1fr; align-items: center; }
  .vt-hero-text { padding: 32px 36px; }
  .vt-hero h2 { font-size: 34px; }
}

/* Botón de play sobre portadas */
.vt-play {
  position: absolute; top: 50%; left: 50%; width: 70px; height: 70px; margin: -35px 0 0 -35px;
  border-radius: 50%; background: rgba(18, 22, 30, 0.72); border: 2px solid rgba(255, 255, 255, 0.85);
  transition: background-color .2s ease;
}
.vt-play::after {
  content: ""; position: absolute; top: 50%; left: 50%; margin: -12px 0 0 -6px;
  border-style: solid; border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent var(--vt-blanco);
}
.vt-hero-media:hover .vt-play, .vt-facade:hover .vt-play { background: var(--vt-magenta); }

/* Datos sueltos (año, lugar, duración) */
.vt-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--vt-muted); }

/* ---------- Botones ---------- */
.vt .vt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 24px; border-radius: 50px;
  background: var(--vt-magenta); color: var(--vt-blanco);
  font-size: 15px; font-weight: 700; text-decoration: none; border: 1px solid transparent;
  transition: background-color .2s ease, border-color .2s ease;
}
.vt .vt-btn:hover { background: var(--vt-magenta-2); color: var(--vt-blanco); }
.vt .vt-btn-line { background: var(--vt-control); border-color: var(--vt-line-2); color: var(--vt-text); }
.vt .vt-btn-line:hover { background: var(--vt-control); border-color: var(--vt-naranja); color: var(--vt-blanco); }
.vt-link { font-size: 14px; font-weight: 600; }

/* ---------- Filas ---------- */
.vt-rows { max-width: 1200px; margin: 0 auto; }
.vt-row { padding-top: 36px; }
.vt-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--vt-pad); }
.vt-row-head h2 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.3; color: var(--vt-blanco); }
.vt-row-sub { margin: 4px var(--vt-pad) 0; font-size: 14px; line-height: 1.5; color: var(--vt-muted); }
.vt-row-nav { display: none; gap: 6px; }
.vt-row-nav button {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  background: var(--vt-control); border: 1px solid var(--vt-line-2); color: var(--vt-text);
  font-size: 22px; line-height: 1;
}
.vt-row-nav button:hover:not(:disabled) { border-color: var(--vt-naranja); color: var(--vt-blanco); }
.vt-row-nav button:disabled { opacity: 0.3; cursor: default; }
@media (hover: hover) and (pointer: fine) { .vt-row-nav { display: flex; } }

.vt-rail {
  display: flex; gap: 16px; overflow-x: auto; padding: 14px var(--vt-pad) 8px;
  scroll-snap-type: x mandatory; scroll-padding: 0 var(--vt-pad);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.vt-rail::-webkit-scrollbar { display: none; }

/* ---------- Tarjeta ---------- */
.vt .vt-card {
  flex: 0 0 auto; width: 72vw; max-width: 260px; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 7px; color: var(--vt-text);
}
@media (min-width: 700px) { .vt .vt-card { width: 250px; } }
.vt-thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 10px; background: var(--vt-surface); border: 1px solid var(--vt-line);
  transition: border-color .2s ease;
}
.vt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vt-badge {
  position: absolute; right: 8px; bottom: 8px; padding: 2px 9px; border-radius: 50px;
  background: rgba(0, 0, 0, 0.75); color: var(--vt-blanco); font-size: 12px; font-weight: 600;
}
.vt-card-title { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--vt-blanco); }
.vt-card-meta { font-size: 13px; line-height: 1.4; color: var(--vt-muted); }
.vt .vt-card:hover { color: var(--vt-text); }
.vt .vt-card:hover .vt-thumb { border-color: var(--vt-naranja); }
.vt .vt-card:hover .vt-card-title { color: var(--vt-naranja); }

/* ---------- Resultados de búsqueda ---------- */
.vt-results { padding-top: 8px; }
.vt-results h2 { font-size: 21px; font-weight: 700; color: var(--vt-blanco); margin: 0 0 18px; }
.vt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 16px; }
.vt .vt-grid .vt-card { width: auto; max-width: none; }
.vt-empty { font-size: 15px; line-height: 1.6; color: var(--vt-muted); max-width: 60ch; margin: 0 0 16px; }

/* ---------- Ficha ---------- */
.vt-back { padding-top: 22px; padding-bottom: 14px; }
.vt-ficha { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 0 32px; }
.vt-player-col { background: #000; }
.vt-player { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.vt-player.is-vertical { aspect-ratio: 9 / 16; max-width: 380px; margin: 0 auto; }
.vt-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vt-facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.vt-facade img { width: 100%; height: 100%; object-fit: cover; }
.vt-now { margin: 0; padding: 11px var(--vt-pad); background: var(--vt-panel); color: var(--vt-muted); font-size: 13px; }

.vt-info { padding: 22px var(--vt-pad) 0; }
.vt-info h1 { margin: 0 0 10px; font-size: 28px; font-weight: 800; line-height: 1.15; color: var(--vt-blanco); }
.vt-info-desc { margin: 16px 0 0; max-width: 62ch; font-size: 15px; line-height: 1.7; color: var(--vt-muted); }
.vt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.vt-clips-title { margin: 30px 0 12px; font-size: 18px; font-weight: 700; color: var(--vt-blanco); }
.vt-clips {
  list-style: none; margin: 0; padding: 0; overflow: hidden;
  background: var(--vt-surface); border: 1px solid var(--vt-line); border-radius: var(--vt-radius);
}
.vt-clips li + li { border-top: 1px solid var(--vt-line); }
.vt-clip {
  width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 8px 16px;
  border: 0; border-radius: 0; background: transparent; text-align: left;
  font: inherit; color: var(--vt-text); cursor: pointer;
}
.vt-clip:hover { background: var(--vt-panel); }
.vt-clip-n { width: 24px; flex: none; font-size: 13px; font-weight: 700; color: var(--vt-muted); }
.vt-clip-t { flex: 1; font-size: 14px; line-height: 1.35; }
.vt-clip-d { flex: none; font-size: 12px; color: var(--vt-muted); }
.vt-clip.is-current { background: rgba(183, 36, 92, 0.22); }
.vt-clip.is-current .vt-clip-n { color: var(--vt-naranja); }
.vt-clip.is-current .vt-clip-t { color: var(--vt-blanco); font-weight: 600; }

@media (min-width: 900px) {
  .vt-ficha { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); padding: 0 var(--vt-pad); align-items: start; }
  .vt-player-col { border-radius: var(--vt-radius); overflow: hidden; position: sticky; top: 16px; }
  .vt-info { padding: 0; }
  .vt-clips { max-height: 440px; overflow-y: auto; }
}

/* ---------- 404 ---------- */
.vt-intro { padding-top: 48px; padding-bottom: 24px; }
.vt-intro h1 { margin: 0 0 10px; font-size: 30px; font-weight: 800; color: var(--vt-blanco); }
.vt-intro p { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: var(--vt-muted); }

/* ---------- Navegación de Cultura (hub de agenda.css) ---------- */
.vt .hub-navegacion-final { margin-top: 56px; }
.vt .hub-nav-link { color: #e0e0e0; }
.vt .hub-nav-link:hover, .vt .hub-nav-link.active { color: var(--vt-blanco); }
.vt-hub-nota { margin: 22px auto 0; max-width: 56ch; font-size: 14px; line-height: 1.6; color: var(--vt-muted); }

@media (max-width: 576px) {
  .vt-search { flex-direction: column; }
  .vt-search button { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .vt-rail { scroll-behavior: auto; }
  .vt *, .vt *::before, .vt *::after { transition: none !important; }
}
