/* =====================================================================
   Reproductor de presentaciones para TV (Habitap)
   Escenario fijo de 1920×1080 (o 1080×1920) que se escala a la pantalla:
   se ve igual en cualquier televisor. Sin "gap" en flex ni sintaxis nueva,
   para que funcione en navegadores de Smart TV viejos.
   ===================================================================== */

html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
body { font-family: "Montserrat", "Segoe UI", Roboto, Arial, sans-serif; color: #fff; -webkit-font-smoothing: antialiased; }
body.sin-cursor, body.sin-cursor * { cursor: none !important; }

#tv { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #000; }
.escenario { position: absolute; left: 50%; top: 50%; overflow: hidden; background: #0b0f14;
  -webkit-transform-origin: 50% 50%; transform-origin: 50% 50%; }
.tv-h .escenario { width: 1920px; height: 1080px; margin: -540px 0 0 -960px; } /* el tamaño real lo pone tv.js según el formato */
.tv-v .escenario { width: 1080px; height: 1920px; margin: -960px 0 0 -540px; }

/* ---------- Escenas (una por propiedad) ---------- */
.escena { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0;
  -webkit-transition: opacity 1.4s ease; transition: opacity 1.4s ease; }
.escena.activa { opacity: 1; }

.fotos { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; background: #111820; }
.tv-v .fotos { height: 1180px; }
.foto { position: absolute; top: -2%; left: -2%; width: 104%; height: 104%; background-size: cover; background-position: center; opacity: 0;
  -webkit-transition: opacity 1.6s ease; transition: opacity 1.6s ease; will-change: transform, opacity; }
.foto.activa { opacity: 1; }
.foto.kb1 { -webkit-animation: kb1 14s linear both; animation: kb1 14s linear both; }
.foto.kb2 { -webkit-animation: kb2 14s linear both; animation: kb2 14s linear both; }
.foto.kb3 { -webkit-animation: kb3 14s linear both; animation: kb3 14s linear both; }
.foto.kb4 { -webkit-animation: kb4 14s linear both; animation: kb4 14s linear both; }
@-webkit-keyframes kb1 { from { -webkit-transform: scale(1.02) translate(0, 0); } to { -webkit-transform: scale(1.14) translate(-2%, -1.5%); } }
@keyframes kb1 { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.14) translate(-2%, -1.5%); } }
@-webkit-keyframes kb2 { from { -webkit-transform: scale(1.14) translate(2%, 1%); } to { -webkit-transform: scale(1.02) translate(0, 0); } }
@keyframes kb2 { from { transform: scale(1.14) translate(2%, 1%); } to { transform: scale(1.02) translate(0, 0); } }
@-webkit-keyframes kb3 { from { -webkit-transform: scale(1.04) translate(1.5%, -1%); } to { -webkit-transform: scale(1.15) translate(-1.5%, 1%); } }
@keyframes kb3 { from { transform: scale(1.04) translate(1.5%, -1%); } to { transform: scale(1.15) translate(-1.5%, 1%); } }
@-webkit-keyframes kb4 { from { -webkit-transform: scale(1.15) translate(-1.5%, 1.5%); } to { -webkit-transform: scale(1.03) translate(1%, 0); } }
@keyframes kb4 { from { transform: scale(1.15) translate(-1.5%, 1.5%); } to { transform: scale(1.03) translate(1%, 0); } }
.sin-foto { position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 70% 30%, var(--primario, #1e3a5f), #0b0f14 75%); }

/* Sombras para que el texto se lea sobre cualquier foto */
.velo { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.tv-h .velo { background:
  linear-gradient(90deg, rgba(5, 9, 14, .86) 0%, rgba(5, 9, 14, .62) 34%, rgba(5, 9, 14, .1) 62%, rgba(5, 9, 14, 0) 75%),
  linear-gradient(0deg, rgba(5, 9, 14, .55) 0%, rgba(5, 9, 14, 0) 30%),
  linear-gradient(180deg, rgba(5, 9, 14, .55) 0%, rgba(5, 9, 14, 0) 20%); }
.tv-v .velo { height: 1180px; background:
  linear-gradient(180deg, rgba(5, 9, 14, .6) 0%, rgba(5, 9, 14, 0) 22%),
  linear-gradient(0deg, #0b0f14 0%, rgba(11, 15, 20, 0) 30%); }

/* ---------- Información ---------- */
.info { position: absolute; }
.tv-h .info { left: 110px; bottom: 120px; width: 900px; }
.tv-v .info { left: 80px; right: 80px; top: 1130px; bottom: 120px; }

.etiquetas-op { margin-bottom: 26px; }
.pill { display: inline-block; vertical-align: middle; font-weight: 800; font-size: 30px; letter-spacing: .06em; text-transform: uppercase;
  padding: 12px 24px 11px; border-radius: 8px; margin-right: 18px; }
.pill-op { background: var(--secundario, #f2a541); color: var(--sobre-secundario, #1d2329); }
.pill-res { background: rgba(255, 255, 255, .16); color: #fff; }
.tipo { display: inline-block; vertical-align: middle; font-size: 32px; font-weight: 600; color: rgba(255, 255, 255, .85); }

.titulo { font-size: 74px; line-height: 1.06; font-weight: 800; letter-spacing: -.015em; margin: 0 0 22px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.tv-v .titulo { font-size: 70px; -webkit-line-clamp: 2; }
.ubicacion { font-size: 34px; font-weight: 500; color: rgba(255, 255, 255, .9); margin: 0 0 30px; }
.ubicacion .tv-icono { width: 36px; height: 36px; vertical-align: -6px; margin-right: 10px; }
.caract { margin: 0 0 34px; padding: 0; list-style: none; font-size: 32px; font-weight: 600; }
.caract li { display: inline-block; margin: 0 40px 12px 0; white-space: nowrap; }
.caract .tv-icono { width: 40px; height: 40px; vertical-align: -9px; margin-right: 12px; color: var(--secundario, #f2a541); }
.desc { font-size: 29px; line-height: 1.45; color: rgba(255, 255, 255, .82); margin: 0 0 30px; max-width: 880px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.precio { font-size: 104px; font-weight: 800; letter-spacing: -.02em; line-height: 1; margin: 0; white-space: nowrap; }
.precio.consultar { font-size: 64px; }
.tv-v .precio { font-size: 96px; }
.codigo { font-size: 26px; font-weight: 600; color: rgba(255, 255, 255, .6); margin-top: 22px; letter-spacing: .04em; }

/* Entrada escalonada del texto en cada propiedad */
.entra { opacity: 0; -webkit-transform: translateY(46px); transform: translateY(46px); }
.escena.activa .entra { -webkit-animation: entra 1s cubic-bezier(.2, .7, .2, 1) both; animation: entra 1s cubic-bezier(.2, .7, .2, 1) both; }
.escena.activa .d1 { -webkit-animation-delay: .35s; animation-delay: .35s; }
.escena.activa .d2 { -webkit-animation-delay: .5s; animation-delay: .5s; }
.escena.activa .d3 { -webkit-animation-delay: .65s; animation-delay: .65s; }
.escena.activa .d4 { -webkit-animation-delay: .8s; animation-delay: .8s; }
.escena.activa .d5 { -webkit-animation-delay: .95s; animation-delay: .95s; }
.escena.activa .d6 { -webkit-animation-delay: 1.1s; animation-delay: 1.1s; }
@-webkit-keyframes entra { from { opacity: 0; -webkit-transform: translateY(46px); } to { opacity: 1; -webkit-transform: none; } }
@keyframes entra { from { opacity: 0; transform: translateY(46px); } to { opacity: 1; transform: none; } }

/* QR */
.qr { position: absolute; background: #fff; border-radius: 22px; padding: 18px 18px 12px; text-align: center; color: #1d2329;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.tv-h .qr { right: 110px; bottom: 120px; width: 250px; }
.tv-v .qr { right: 80px; top: 860px; width: 230px; } /* sobre el borde inferior de la foto, sin tapar el texto */
.qr svg { display: block; width: 100%; height: auto; }
.qr span { display: block; font-size: 20px; font-weight: 700; margin-top: 8px; line-height: 1.2; }
.escena.activa .qr.entra { -webkit-animation-delay: 1.2s; animation-delay: 1.2s; }

/* ---------- Marco fijo: logo, contador y barra de progreso ---------- */
.marco-logo { position: absolute; z-index: 5; top: 70px; left: 110px; max-width: 420px; opacity: 1; transition: opacity .9s ease; }
.marco-logo.oculto { opacity: 0; }
.tv-v .marco-logo { top: 70px; left: 80px; }
.marco-logo img { display: block; max-width: 420px; max-height: 120px; }
.marco-logo.placa { background: #fff; border-radius: 16px; padding: 16px 22px; }
.marco-logo.placa img { max-height: 96px; }
.marco-logo .nombre { font-size: 42px; font-weight: 800; letter-spacing: -.01em; text-shadow: 0 2px 20px rgba(0, 0, 0, .4); }
.contador { position: absolute; z-index: 5; top: 82px; right: 110px; font-size: 28px; font-weight: 700; color: rgba(255, 255, 255, .85);
  background: rgba(0, 0, 0, .35); padding: 10px 22px; border-radius: 40px; letter-spacing: .05em; }
.tv-v .contador { right: 80px; }
.progreso { position: absolute; z-index: 5; left: 0; bottom: 0; height: 8px; width: 0; background: var(--secundario, #f2a541); }

/* ---------- Pantalla de cierre ---------- */
.cierre { background: radial-gradient(circle at 78% 18%, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 45%),
  linear-gradient(135deg, var(--primario, #1e3a5f), #0b0f14 120%); color: var(--sobre-primario, #fff); }
.cierre-contenido { position: absolute; left: 140px; right: 140px; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); }

.cierre .logo-cierre { margin-bottom: 70px; }
.cierre .logo-cierre img { max-width: 620px; max-height: 200px; display: block; }
.cierre .logo-cierre.placa { display: inline-block; background: #fff; border-radius: 22px; padding: 26px 34px; }
.cierre .logo-cierre .nombre { font-size: 88px; font-weight: 800; }
.cierre h1 { font-size: 92px; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; margin: 0 0 54px; max-width: 1100px; }
.cierre-apilado h1 { font-size: 86px; }
.cierre .contacto { font-size: 52px; font-weight: 700; margin: 0 0 26px; }
.cierre .contacto .tv-icono { width: 58px; height: 58px; vertical-align: -12px; margin-right: 22px; color: var(--secundario, #f2a541); }
.cierre .sitio { font-size: 38px; font-weight: 600; opacity: .85; margin-top: 46px; }
.cierre .qr { right: 140px; bottom: auto; top: 50%; width: 330px; margin-top: -190px; }
.cierre-apilado .qr { position: static; display: inline-block; margin-top: 70px; width: 300px !important; }

/* =====================================================================
   Estilos de diseño (se eligen en cada presentación). "cine" es el de arriba.
   ===================================================================== */
.info { z-index: 1; }                     /* contexto propio: la tarjeta / banda va detrás del texto */
.tarjeta-fondo, .info .panel-color, .info .panel-linea { position: absolute; z-index: -1; }
.panel-color { position: absolute; background: var(--primario, #1e3a5f); }
.panel-linea { position: absolute; background: var(--secundario, #f2a541); }

/* ---------- Panel de color ---------- */
.est-panel .velo, .est-tarjeta .velo { background: linear-gradient(180deg, rgba(5, 9, 14, .55) 0%, rgba(5, 9, 14, 0) 24%); }
.est-panel .info { color: var(--sobre-primario, #fff); }
.est-panel .titulo { text-shadow: none; }
.est-panel .tipo, .est-panel .ubicacion { color: var(--sobre-primario, #fff); opacity: .9; }
.est-panel .desc { color: var(--sobre-primario, #fff); opacity: .82; }
.est-panel .codigo { color: var(--sobre-primario, #fff); opacity: .6; }
.est-panel .caract .tv-icono { color: var(--acento-sobre-primario, #f2a541); }
.est-panel .pill-res { background: rgba(0, 0, 0, .22); color: #fff; }
.est-panel.panel-lateral .marco-logo .nombre { text-shadow: none; color: var(--sobre-primario, #fff); }
.est-panel .cierre { background: var(--primario, #1e3a5f); }
.cierre-franja { position: absolute; background: var(--secundario, #f2a541); }

/* ---------- Tarjeta clara ---------- */
.tarjeta-fondo { background: var(--fondo, #fff); box-shadow: 0 30px 80px rgba(0, 0, 0, .38); }
.est-tarjeta .info { color: var(--sobre-fondo, #1d2329); }
.est-tarjeta .titulo { text-shadow: none; }
.est-tarjeta .tipo, .est-tarjeta .ubicacion { color: var(--sobre-fondo, #1d2329); opacity: .78; }
.est-tarjeta .desc { color: var(--sobre-fondo, #1d2329); opacity: .75; }
.est-tarjeta .codigo { color: var(--sobre-fondo, #1d2329); opacity: .55; }
.est-tarjeta .precio { color: var(--primario-sobre-fondo, #1e3a5f); }
.est-tarjeta .caract .tv-icono { color: var(--acento-sobre-fondo, #f2a541); }
.est-tarjeta .pill-res { background: rgba(0, 0, 0, .08); color: var(--sobre-fondo, #1d2329); }
.est-tarjeta .cierre { background: var(--fondo, #fff); color: var(--sobre-fondo, #1d2329); }
.est-tarjeta .cierre h1 { color: var(--primario-sobre-fondo, #1e3a5f); }
.est-tarjeta .cierre .contacto .tv-icono { color: var(--acento-sobre-fondo, #f2a541); }
.est-tarjeta .cierre .logo-cierre.placa-color { background: var(--primario, #1e3a5f); }
.cierre-circulo { position: absolute; border-radius: 50%; background: var(--primario, #1e3a5f); opacity: .08; }

/* ---------- Avisos ---------- */
.aviso-tv { position: absolute; z-index: 10; left: 50%; bottom: 60px; -webkit-transform: translateX(-50%); transform: translateX(-50%);
  background: rgba(0, 0, 0, .75); color: #fff; font-size: 26px; font-weight: 600; padding: 18px 34px; border-radius: 60px;
  -webkit-transition: opacity .8s; transition: opacity .8s; white-space: nowrap; }
.aviso-tv.oculto { opacity: 0; }
.mensaje-tv { position: absolute; top: 50%; left: 0; right: 0; text-align: center; font-size: 46px; font-weight: 700;
  -webkit-transform: translateY(-50%); transform: translateY(-50%); padding: 0 100px; }

.tv-icono { display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  .foto.kb1, .foto.kb2, .foto.kb3, .foto.kb4 { -webkit-animation: none; animation: none; }
}
