/* ForceNet TV, igual en la página pública y en la pestaña TV del portal. Pensado primero para el celular.
   T78: diseño «C» de la página principal (azul marino + naranja amanecer, letra Sora, radios 12–22px). Claro de día y oscuro de noche
   (data-tv-tema lo pone tema_auto.js, sin botón). La pantalla del video y la tapa ForceNet quedan oscuras siempre. */
@font-face { font-family: "Sora"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fuentes/sora-latin.woff2") format("woff2"); }

:root {
  --tv-fondo: #ffffff; --tv-superficie: #f6f7fa; --tv-borde: #dde2ec; --tv-texto: #14213d; --tv-suave: #56617a;
  --tv-acento: #e8572a; --tv-acento-letra: #c2410c; --tv-acento-texto: #ffffff; --tv-marino: #14213d;
  --tv-verde: #0e8a5f; --tv-aviso-fondo: #fff1d6; --tv-aviso-texto: #7a4a00;
  --tv-radio: 16px; --tv-radio-chico: 12px; --tv-radio-grande: 22px;
  --tv-letra: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
:root[data-tv-tema="oscuro"] {
  --tv-fondo: #0f1626; --tv-superficie: #172036; --tv-borde: #2a3550; --tv-texto: #eef1f7; --tv-suave: #a3adc2;
  --tv-acento: #ff7a45; --tv-acento-letra: #ff9a6e; --tv-acento-texto: #1b0d05; --tv-marino: #1d2b4f;
  --tv-verde: #3dd39c; --tv-aviso-fondo: #3b2a0b; --tv-aviso-texto: #fde68a;
}
.tv, .tv-pagina, .tv-dialogo, .tv-recargas { color-scheme: light; }
:root[data-tv-tema="oscuro"] :is(.tv, .tv-pagina, .tv-dialogo, .tv-recargas) { color-scheme: dark; }
.tv, .tv-pagina, .tv-dialogo, .tv-recargas { font-family: var(--tv-letra); }
.tv-pagina h1, .tv h2, .tv-pagina h2, .tv-dialogo h2 { letter-spacing: -.03em; }

/* ---------- página pública ---------- */
main.centrado:has(.tv-pagina) { display: block; padding: 0; min-height: 100vh; background: var(--tv-fondo); }
.tv-pagina { color: var(--tv-texto); background: var(--tv-fondo); min-height: 100vh; padding-bottom: 2rem; }
.tv-pagina > * { max-width: 1100px; margin-inline: auto; padding-inline: 1rem; }
.tv-barra { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem; }
.tv-logo { display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; }
.tv-logo b { font-weight: 800; letter-spacing: -.03em; }
.tv-logo b span { color: var(--tv-acento-letra); }
.tv-logo img { height: 32px; width: auto; border-radius: 6px; }
.tv-logo-tv { background: var(--tv-acento); color: var(--tv-acento-texto); font-weight: 800; font-size: .75rem; padding: .15rem .45rem; border-radius: 6px; letter-spacing: .05em; }
.tv-portada { display: grid; gap: 1.5rem; align-items: center; padding-block: 1.25rem 1rem; }
.tv-portada h1 { font-size: clamp(1.6rem, 6vw, 2.5rem); font-weight: 800; line-height: 1.15; margin: 0 0 .6rem; }
.tv-resalta { color: var(--tv-acento-letra); }
.tv-portada p { color: var(--tv-suave); margin: .3rem 0; max-width: 40rem; line-height: 1.5; }
.tv-portada .tv-sello { color: var(--tv-verde); font-weight: 600; font-size: .88rem; }
/* en la computadora, las cifras ocupan el lado derecho de la portada */
.tv-cifras { display: none; }
@media (min-width: 880px) {
  .tv-portada { grid-template-columns: minmax(0, 1fr) 340px; }
  .tv-cifras { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; list-style: none; margin: 0; padding: 1.1rem; background: var(--tv-marino); color: #fff; border-radius: var(--tv-radio-grande); }
  .tv-cifras li { background: rgb(255 255 255 / .1); border-radius: var(--tv-radio); padding: .9rem; font-size: .82rem; }
  .tv-cifras b { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; color: #ffb48f; }
  .tv-cifras .tv-cifras-ancha { grid-column: 1 / -1; text-align: center; font-weight: 600; }
}
.tv-pagina > .tv-cta { max-width: calc(1100px - 2rem); width: calc(100% - 2rem); margin-top: 1.5rem; text-align: center; padding: 1.75rem 1.25rem;
  background: var(--tv-marino); color: #fff; border-radius: var(--tv-radio-grande); }
.tv-cta h2 { margin: 0 0 .3rem; font-size: 1.35rem; font-weight: 800; }
.tv-cta p { margin: 0 0 1rem; opacity: .85; }
.tv-cta .tv-boton-sec { color: #fff; border-color: rgb(255 255 255 / .45); }
.tv-cta .tv-boton-sec:hover { border-color: #fff; }

/* ---------- botones ---------- */
.tv-boton, .tv-boton-sec { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: var(--tv-radio); font-weight: 700;
  padding: .65rem 1.3rem; min-height: 44px; text-decoration: none; cursor: pointer; border: 0; font: inherit; font-weight: 700; }
.tv-boton { background: var(--tv-acento); color: var(--tv-acento-texto); }
.tv-boton-sec { background: transparent; color: var(--tv-texto); border: 1.5px solid var(--tv-borde); }
.tv-boton:hover { filter: brightness(1.1); } .tv-boton-sec:hover { border-color: var(--tv-suave); }
.tv-cerrar { background: rgb(0 0 0 / .55); color: #fff; border: 0; width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; flex: none; }

/* ---------- sección TV (también en el portal) ---------- */
.tv { color: var(--tv-texto); background: var(--tv-fondo); border-radius: var(--tv-radio-grande); padding: 1rem 0; }
.tv-pagina > .tv { padding-inline: 1rem; }
.cliente-panel .tv { padding: 1rem; border: 1px solid var(--tv-borde); }
/* en el portal (columna flex) los carruseles no deben ensanchar la página: se deslizan dentro */
.cliente-panel [data-panel="tv"], .tv, .tv-fila, .tv-carrusel { min-width: 0; max-width: 100%; }
.tv-buscar { display: flex; align-items: center; gap: .5rem; background: var(--tv-superficie); border: 1px solid var(--tv-borde); border-radius: 999px; padding: .2rem 1rem; margin-bottom: 1rem; }
.tv-buscar input { flex: 1; background: transparent; border: 0; color: var(--tv-texto); font: inherit; padding: .55rem 0; min-width: 0; outline: none; }
.tv-buscar:focus-within { border-color: var(--tv-acento); }
.tv-fila { margin-bottom: 1.25rem; }
.tv-fila h2 { font-size: 1.1rem; font-weight: 800; margin: 0 0 .6rem; }
.tv-carrusel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 42%); gap: .7rem; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: .4rem; scrollbar-width: thin; }
@media (min-width: 700px) { .tv-carrusel { grid-auto-columns: 220px; } }
.cliente-panel .tv-carrusel { grid-auto-columns: minmax(150px, 44%); }
.tv-tarjeta { scroll-snap-align: start; display: flex; flex-direction: column; text-align: left; background: var(--tv-superficie); color: var(--tv-texto);
  border: 1px solid var(--tv-borde); border-radius: var(--tv-radio); overflow: hidden; padding: 0; cursor: pointer; font: inherit; transition: transform .15s, border-color .15s; }
.tv-tarjeta:hover, .tv-tarjeta:focus-visible { transform: translateY(-2px); border-color: var(--tv-acento); }
.tv-tarjeta img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #000; }
.tv-tarjeta-pie { display: flex; flex-direction: column; gap: .15rem; padding: .55rem .65rem .65rem; }
.tv-tarjeta-pie b { font-size: .86rem; font-weight: 600; line-height: 1.3; }
.tv-tarjeta-pie small { color: var(--tv-suave); font-size: .78rem; }
.tv-cargando, .tv-sin-resultados { color: var(--tv-suave); text-align: center; padding: 2rem 0; }
.tv-legal { color: var(--tv-suave); font-size: .8rem; text-align: center; margin: .5rem 0 0; }

/* ---------- ventanas: ficha y reproductor ---------- */
.tv-dialogo { color: var(--tv-texto); background: var(--tv-fondo); border: 1px solid var(--tv-borde); border-radius: var(--tv-radio-grande); padding: 0;
  width: min(760px, 100vw - 1rem); max-height: calc(100dvh - 1rem); overflow-y: auto; }
.tv-dialogo::backdrop { background: rgb(9 14 28 / .78); }
.tv-detalle-cabeza { position: relative; }
.tv-detalle-cabeza img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #000;
  mask-image: linear-gradient(#000 60%, transparent); -webkit-mask-image: linear-gradient(#000 60%, transparent); }
.tv-detalle-cabeza .tv-cerrar { position: absolute; top: .6rem; right: .6rem; }
.tv-detalle-cuerpo { padding: 0 1.1rem 1.2rem; margin-top: -2.5rem; position: relative; }
.tv-detalle-cuerpo h2 { margin: 0 0 .25rem; font-size: 1.4rem; font-weight: 800; }
.tv-meta { color: var(--tv-suave); font-size: .85rem; margin: 0 0 .6rem; }
.tv-detalle-cuerpo > p { margin: 0 0 1rem; }
.tv-temporadas { display: flex; gap: .4rem; overflow-x: auto; margin: 1.1rem 0 .4rem; padding-bottom: .2rem; }
.tv-chip { background: transparent; color: var(--tv-texto); border: 1px solid var(--tv-borde); border-radius: 999px; padding: .4rem .9rem; font: inherit; font-size: .88rem; white-space: nowrap; cursor: pointer; }
.tv-chip.activo { background: var(--tv-acento); color: var(--tv-acento-texto); border-color: var(--tv-acento); font-weight: 700; }
.tv-capitulos { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.tv-capitulo { display: flex; gap: .75rem; align-items: center; width: 100%; text-align: left; background: transparent; color: var(--tv-texto);
  border: 1px solid transparent; border-radius: var(--tv-radio-chico); padding: .35rem; cursor: pointer; font: inherit; }
.tv-capitulo:hover, .tv-capitulo:focus-visible { background: var(--tv-superficie); border-color: var(--tv-borde); }
.tv-capitulo.visto { border-color: var(--tv-acento); }
.tv-capitulo img { width: 132px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; background: #000; }
.tv-capitulo span { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.tv-capitulo b { font-size: .86rem; font-weight: 600; line-height: 1.35; }
.tv-capitulo small { color: var(--tv-suave); font-size: .78rem; }
.tv-capitulo em { color: var(--tv-acento-letra); font-size: .75rem; font-style: normal; font-weight: 700; }

.tv-reproductor { width: min(1100px, 100vw); max-width: 100vw; border-radius: 0; background: #000; }
@media (min-width: 700px) { .tv-reproductor { border-radius: var(--tv-radio-grande); } }
.tv-video { aspect-ratio: 16 / 9; background: #000; }
.tv-video iframe, .tv-video > div { width: 100%; height: 100%; border: 0; display: block; }
.tv-aviso { margin: 0; padding: .55rem .9rem; background: var(--tv-aviso-fondo); color: var(--tv-aviso-texto); font-size: .88rem; }
/* reproductor escondido que prueba los bloqueos por país (sin sonido, fuera de la pantalla) */
.tv-probador { position: fixed; left: -10000px; top: 0; width: 200px; height: 113px; opacity: 0; pointer-events: none; }
.tv-reproductor-barra { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; background: var(--tv-fondo); }
.tv-reproductor-barra > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tv-reproductor-barra small { color: var(--tv-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Recargas (próximamente, en gris) ---------- */
.tv-recargas { color: var(--tv-suave); background: var(--tv-superficie); border: 1px dashed var(--tv-borde); border-radius: var(--tv-radio-grande);
  padding: 1.1rem 1.2rem; margin-top: 1.25rem; filter: grayscale(1); opacity: .7; user-select: none; }
.tv-pagina > .tv-recargas { max-width: calc(1100px - 2rem); margin-inline: auto; }
@media (max-width: 1132px) { .tv-pagina > .tv-recargas { margin-inline: 1rem; } }
.tv-recargas-cabeza { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.tv-recargas h2 { margin: 0; font-size: 1.1rem; color: var(--tv-texto); }
.tv-recargas p { margin: .5rem 0 .8rem; }
.tv-pronto { border: 1px solid currentColor; border-radius: 999px; padding: .15rem .6rem; font-size: .72rem; font-weight: 800; letter-spacing: .06em; }
.tv-operadoras { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.tv-operadoras li { border: 1px solid var(--tv-borde); border-radius: 8px; padding: .3rem .7rem; font-size: .85rem; }

/* pestañas del portal */
.cliente-tabs .cliente-tab-tv { color: #c2410c; }
[data-tema="oscuro"] .cliente-tabs .cliente-tab-tv { color: #ff9a6e; }
.cliente-tabs .cliente-tab-pronto { opacity: .45; filter: grayscale(1); }
.cliente-tabs .cliente-tab-pronto::after { content: "PRONTO"; display: block; font-size: .58rem; font-weight: 700; letter-spacing: .05em; margin-top: -.15rem; }
.cliente-tabs a { padding-inline: .35rem; }

@media (prefers-reduced-motion: reduce) { .tv-tarjeta { transition: none; } }

/* selector Series / Recargas arriba a la derecha (página pública): se cambia de sección sin bajar */
.tv-selector { display: flex; background: var(--tv-superficie); border: 1px solid var(--tv-borde); border-radius: 999px; padding: 3px; gap: 2px; flex: none; }
.tv-selector a { padding: .4rem .65rem; border-radius: 999px; text-decoration: none; color: var(--tv-suave); font-weight: 700; font-size: .84rem; white-space: nowrap; min-height: 36px; display: flex; align-items: center; }
.tv-selector a.activo { background: var(--tv-acento); color: var(--tv-acento-texto); }
.tv-selector a.tv-selector-pronto:not(.activo) { opacity: .6; }
.tv-soy-cliente { margin-top: .9rem; min-height: 40px; padding: .45rem 1rem; font-size: .9rem; }
.tv-pagina [data-tv-panel="recargas"] .tv-recargas { margin-top: 1rem; }
@media (max-width: 360px) { .tv-logo b { display: none; } }
.tv-barra { gap: .5rem; }
@media (max-width: 400px) { .tv-logo { font-size: 1rem; gap: .35rem; } }

/* la pantalla del video y la tapa ForceNet: oscuras siempre, de día también */
.tv-pantalla { --tv-superficie: #1a2540; --tv-texto: #eef1f7; --tv-suave: #a3adc2; --tv-acento: #ff7a45; --tv-acento-texto: #1b0d05; color-scheme: dark; }

/* controles de ForceNet: debajo del video (nunca encima) */
.tv-pantalla { background: #000; display: flex; flex-direction: column; }
.tv-pantalla:fullscreen { justify-content: center; }
.tv-pantalla:fullscreen .tv-video { aspect-ratio: auto; flex: 1; }
.tv-controles { display: flex; align-items: center; gap: .5rem; padding: .45rem .7rem; background: #0f1626; color: var(--tv-texto); }
.tv-controles[hidden] { display: none; }
.tv-controles button { background: transparent; border: 0; color: var(--tv-texto); font-size: 1.15rem; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; flex: none; }
.tv-controles button:hover, .tv-controles button:focus-visible { background: var(--tv-superficie); }
.tv-controles input[type=range] { flex: 1; min-width: 60px; accent-color: var(--tv-acento); height: 28px; cursor: pointer; }
.tv-tiempo { font-size: .78rem; color: var(--tv-suave); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 400px) { .tv-tiempo { display: none; } }

/* reproductor arriba del todo y los capítulos debajo (como una app de series) */
.tv-reproductor { margin: 0 auto auto; height: 100dvh; max-height: 100dvh; overflow: hidden; }
.tv-reproductor[open] { display: flex; flex-direction: column; }
.tv-reproductor > .tv-pantalla, .tv-reproductor > .tv-aviso, .tv-reproductor > .tv-reproductor-barra { flex: none; }
.tv-r-lista { flex: 1; overflow-y: auto; background: var(--tv-fondo); padding: 0 .9rem 1rem; border-top: 1px solid var(--tv-borde); }
.tv-r-lista .tv-temporadas { margin: .8rem 0 .2rem; }
.tv-capitulo[aria-current] { background: var(--tv-superficie); }
/* en la computadora el ancho se limita según el alto, para que debajo del video siempre quepan los capítulos */
@media (min-width: 700px) { .tv-reproductor { margin-top: 1rem; height: calc(100dvh - 2rem); max-height: calc(100dvh - 2rem); width: min(1100px, 100vw - 2rem, max(640px, (100dvh - 22rem) * 16 / 9)); } }

/* pantalla de pausa de ForceNet (cubre el video solo cuando está en pausa) */
.tv-video-caja { position: relative; }
.tv-pantalla:fullscreen .tv-video-caja { flex: 1; display: flex; }
.tv-pantalla:fullscreen .tv-video-caja .tv-video { flex: 1; }
.tv-pausa { position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: #000; color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .6rem; overflow: hidden; font: inherit; }
.tv-pausa[hidden] { display: none; }
.tv-pausa img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.45) blur(1px); }
.tv-pausa-play { position: relative; width: 72px; height: 72px; border-radius: 50%; background: var(--tv-acento); color: var(--tv-acento-texto);
  display: flex; align-items: center; justify-content: center; font-size: 1.9rem; padding-left: 6px; box-shadow: 0 6px 24px rgb(0 0 0 / .5); }
.tv-pausa b { position: relative; max-width: 90%; text-align: center; font-size: .95rem; text-shadow: 0 1px 4px #000; }

.tv-cta-botones { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; align-items: center; }

/* Menú ☰ del sitio (mismo menú que forcenetec.com y el acceso de clientes) */
.fn-menu { position: relative; flex: none; }
.fn-menu > summary { list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--tv-borde);
  background: var(--tv-superficie); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.fn-menu > summary::-webkit-details-marker { display: none; }
.fn-menu > summary span { width: 18px; height: 2px; border-radius: 2px; background: var(--tv-texto); }
.fn-menu > nav { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 230px; padding: 6px; border-radius: 16px;
  background: var(--tv-fondo); border: 1px solid var(--tv-borde); box-shadow: 0 12px 32px rgba(0, 0, 0, .25); display: grid; gap: 2px; }
.fn-menu > nav a { display: flex; align-items: center; gap: .5rem; min-height: 46px; padding: 0 .8rem; border-radius: 11px; color: var(--tv-texto);
  text-decoration: none; font-weight: 700; font-size: .95rem; }
.fn-menu > nav a:hover { background: var(--tv-superficie); }
.fn-menu > nav a.activo { background: var(--tv-acento); color: var(--tv-acento-texto); }
.fn-menu > nav small { margin-left: auto; font-size: .68rem; font-weight: 700; padding: .1rem .4rem; border-radius: 6px; background: var(--tv-superficie); color: var(--tv-suave); }
.fn-menu > nav a.activo small { background: rgba(255, 255, 255, .25); color: inherit; }
