/* ============================================================
   Anuncio de lanzamiento (21-09-2026): cuenta regresiva al
   28-09-2026 en el sitio publico y en las dos aulas.
   Tres piezas, todas pintadas por Js/util/anuncio-lanzamiento.js:
     .anuncio-lz        ventana emergente (imagen + contador en vivo)
     .anuncio-lz-flot   boton flotante que queda al cerrar la ventana
                        (encima del boton de WhatsApp cuando existe)
     .landing-shell-promo__*  contenido de la barra de anuncio del sitio (logo, celdas del contador, X)
   Paleta del sitio: azul #003450 / #00121d, cian #0FEFD9.
   No depende de Landing2.css porque las aulas no la cargan.
   Se apila por debajo de Aviso (1000010) y por encima de blockUI.
   ============================================================ */

/* ---------- Ventana emergente ---------- */
.anuncio-lz {
  position: fixed; inset: 0; z-index: 1000005;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  font-family: Montserrat, Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  opacity: 0; transition: opacity .2s ease;
}
.anuncio-lz *, .anuncio-lz *::before, .anuncio-lz *::after { box-sizing: border-box; }
.anuncio-lz--visible { opacity: 1; }
.anuncio-lz__fondo { position: absolute; inset: 0; background: rgba(0, 18, 29, .7); backdrop-filter: blur(3px); }
/* Caja blanca: la foto arriba a todo el ancho y el contador debajo.
   21-09-2026: la imagen se muestra SIEMPRE completa, sin recortar ni deformar. En pantallas bajas la caja entera
   se achica: su ancho maximo sale del alto disponible por la proporcion de la imagen (--ratio = ancho/alto, la
   pone el script al cargar la imagen; .8 es el valor de la imagen 1080x1350). 200px = contador + margenes. */
.anuncio-lz__caja {
  --ratio: .8;
  position: relative; width: 100%; max-width: 460px; max-height: calc(100vh - 40px); overflow: hidden;
  max-width: min(460px, calc((100vh - 200px) * var(--ratio)));
  display: flex; flex-direction: column;
  padding: 0 0 22px; border-radius: 20px; background: #fff; color: #003450;
  border: 0;
  text-align: center; line-height: 1.35;
  box-shadow: 0 30px 70px -24px rgba(0, 52, 80, .6);
  transform: translateY(10px) scale(.97); transition: transform .2s ease;
}
.anuncio-lz--visible .anuncio-lz__caja { transform: none; }
.anuncio-lz__x {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0, 18, 29, .55); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .16s, color .16s, transform .16s;
}
.anuncio-lz__x svg { width: 18px; height: 18px; display: block; }
.anuncio-lz__x:hover { background: #0fefd9; color: #001f30; transform: rotate(90deg); }
.anuncio-lz__x:focus-visible { outline: 2px solid #0fefd9; outline-offset: 2px; }
/* La imagen ocupa el ancho de la caja y conserva su proporcion (la caja ya viene limitada por el alto). */
.anuncio-lz__img {
  display: block; width: 100%; height: auto; flex: 0 0 auto;
  border-radius: 20px 20px 0 0; background: #fff;
}
.anuncio-lz__img[hidden] { display: none; }
.anuncio-lz__pie { padding: 18px 20px 0; }
.anuncio-lz__tit {
  margin: 0; font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: .02em; line-height: 1.2;
  text-transform: uppercase; color: #003450;
}
.anuncio-lz__tit--hoy { font-size: 26px; font-weight: 800; letter-spacing: -.01em; text-transform: none; color: #003450; }
.anuncio-lz__cnt { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.anuncio-lz__cnt[hidden] { display: none; }
/* Los bloques reparten el ancho (flex 1) para que la fila entre aunque la caja se achique en pantallas bajas. */
.anuncio-lz__blq {
  display: flex; flex-direction: column; align-items: center; flex: 1 1 0; min-width: 0; max-width: 72px; padding: 8px 6px 6px;
  border-radius: 12px; background: linear-gradient(135deg, #003450, #165a7f); color: #0fefd9;
}
.anuncio-lz__blq b { font-size: 26px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.anuncio-lz__blq small { margin-top: 4px; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; opacity: .75; }
.anuncio-lz__txt { margin: 12px 0 0; font-size: 13px; color: #4a7089; }

/* ---------- Boton flotante (queda al cerrar la ventana) ---------- */
.anuncio-lz-flot {
  position: fixed; right: 20px; bottom: 20px; z-index: 1100;
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 14px 0 6px; border: 0; border-radius: 999px;
  background: linear-gradient(90deg, #003450, #165a7f 55%, #06b8a6); color: #fff;
  font-family: Montserrat, Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 11px; font-weight: 700; line-height: 1.1; text-align: left; cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 18, 29, .3);
  transform: translateY(12px); opacity: 0; transition: transform .25s ease, opacity .25s ease, box-shadow .2s;
}
.anuncio-lz-flot--visible { transform: none; opacity: 1; }
.anuncio-lz-flot:hover, .anuncio-lz-flot:focus { color: #fff; box-shadow: 0 18px 36px rgba(0, 18, 29, .4); }
.anuncio-lz-flot:hover { transform: translateY(-2px); }
.anuncio-lz-flot:focus-visible { outline: 2px solid #0fefd9; outline-offset: 3px; }
.anuncio-lz-flot__num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 5px; border-radius: 50%;
  background: #0fefd9; color: #001f30; font-size: 15px; font-weight: 900;
}
.anuncio-lz-flot__txt { display: inline-block; }
.anuncio-lz-flot__txt small { display: block; margin-top: 2px; font-size: 9px; font-weight: 600; opacity: .85; letter-spacing: .04em; text-transform: uppercase; }
/* Sitio publico: se apila encima del boton de WhatsApp (.landing-whatsapp: 58px + 22px de margen),
   alineado a su borde derecho. */
.anuncio-lz-flot--sobre-wa { right: 22px; bottom: 92px; }

/* ---------- Barra de anuncio (solo sitio publico) ----------
   Este css carga ANTES que Landing2.css, por eso las reglas que deben ganarle llevan el prefijo .landing-shell-promo.
   Escritorio: [logo] | FALTAN [06 dias][08 hrs][19 min][44 seg] ........ Ver anuncio -> (x)
   Movil:      [logo] [6 dias][08 hrs][19 min] ............................ Ver -> (x)   (sin segundos ni etiqueta) */
.landing-shell-promo .landing-shell-promo__message { gap: 12px; }
.landing-shell-promo__logo { display: block; height: 28px; width: auto; }
.landing-shell-promo__sep { display: block; width: 1px; height: 22px; background: rgba(255, 255, 255, .22); }
.landing-shell-promo__lbl { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.landing-shell-promo__cnt { display: inline-flex; align-items: center; gap: 4px; }
.landing-shell-promo__cel {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 36px; height: 32px; padding: 0 4px; border-radius: 7px;
  background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(15, 239, 217, .22);
}
.landing-shell-promo__cel b { font-size: 14px; font-weight: 900; line-height: 1; color: #0fefd9; font-variant-numeric: tabular-nums; }
.landing-shell-promo__cel small { margin-top: 3px; font-size: 7.5px; font-weight: 700; line-height: 1; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.landing-shell-promo__hoy { font-size: 14px; font-weight: 900; color: #0fefd9; letter-spacing: .02em; }
.landing-shell-promo__cnt[hidden], .landing-shell-promo__lbl[hidden], .landing-shell-promo__hoy[hidden] { display: none; }
.landing-shell-promo__fin { display: inline-flex; align-items: center; gap: 8px; }
.landing-shell-promo__x {
  flex: 0 0 auto; width: 28px; height: 28px; padding: 0; margin-left: 4px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .16s;
}
.landing-shell-promo__x svg { width: 14px; height: 14px; display: block; }
.landing-shell-promo__x:hover { background: rgba(255, 255, 255, .28); }
.landing-shell-promo__x:focus-visible { outline: 2px solid #0fefd9; outline-offset: 2px; }
.landing-shell-promo__link.anuncio-lz-abrir { cursor: pointer; }

@media (max-width: 767px) {
  /* Landing2 oculta el mensaje en movil; aqui se mantiene visible en version compacta. */
  .landing-shell-promo .landing-shell-promo__message { display: inline-flex; gap: 8px; min-width: 0; }
  .landing-shell-promo .landing-shell-promo__inner { justify-content: space-between; gap: 10px; padding: 0 12px; }
  .landing-shell-promo__logo { height: 22px; }
  .landing-shell-promo__sep, .landing-shell-promo__lbl, .landing-shell-promo__cel--seg { display: none; }
  .landing-shell-promo__cel { min-width: 31px; height: 30px; padding: 0 3px; border-radius: 6px; }
  .landing-shell-promo__cel b { font-size: 12px; }
  .landing-shell-promo__cel small { font-size: 7px; margin-top: 2px; }
  .landing-shell-promo__hoy { font-size: 13px; }
  .landing-shell-promo .landing-shell-promo__link { gap: 5px; }
  .landing-shell-promo__fin { gap: 4px; }
  .landing-shell-promo__x { width: 26px; height: 26px; margin-left: 0; }
}
@media (max-width: 419px) {
  /* Telefonos angostos: el enlace queda en "Ver" para que entren logo, celdas y X. */
  .landing-shell-promo__link-ext, .landing-shell-promo__flecha { display: none; }
  .landing-shell-promo__logo { height: 20px; }
}

@media (max-width: 767px) {
  .anuncio-lz { padding: 14px; }
  .anuncio-lz__caja { border-radius: 16px; padding-bottom: 18px; max-width: min(100%, calc((100vh - 180px) * var(--ratio))); }
  .anuncio-lz__img { border-radius: 16px 16px 0 0; }
  .anuncio-lz__pie { padding: 14px 14px 0; }
  .anuncio-lz__tit { font-size: 13px; }
  .anuncio-lz__tit--hoy { font-size: 22px; }
  .anuncio-lz__cnt { gap: 8px; }
  .anuncio-lz__blq { max-width: 64px; }
  .anuncio-lz__blq b { font-size: 22px; }
  .anuncio-lz-flot { right: 16px; bottom: 16px; height: 40px; padding-right: 12px; font-size: 10px; }
  .anuncio-lz-flot__num { min-width: 28px; height: 28px; font-size: 13px; }
  /* WhatsApp en movil: 54px + 16px de margen */
  .anuncio-lz-flot--sobre-wa { right: 16px; bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .anuncio-lz, .anuncio-lz__caja, .anuncio-lz-flot { transition: none; }
}
