/* =========================================================
   Dinámica NBA League Pass — promocionesmovistar.mx
   Colores tomados del XD aprobado (estructura). Ajustar con arte final.
   ========================================================= */
:root {
  --azul-movi: #019df4;
  --navy: #0b2739;
  --card: #0b5a8f;
  --verde: #5bb318;
  --verde-hover: #4e9c14;
  --blanco: #fff;
  --gris-input: #9aa5ae;
  --error: #ff6b6b;
  --ok: #5bb318;
  --radius-card: 40px;
  --radius-input: 6px;
  --nav-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Telefonica", Arial, sans-serif;
  font-weight: 300;
  color: var(--blanco);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}
.container--narrow { max-width: 820px; }

.text-center { text-align: center; }
.txt-azul { color: var(--azul-movi); }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  min-width: 180px;
  padding: 10px 28px;
  border: 0;
  border-radius: 30px;
  font: inherit;
  font-size: 18px;
  font-weight: normal;
  color: var(--blanco);
  cursor: pointer;
  transition: background-color .2s, opacity .2s;
}
.btn--verde { background: var(--verde); }
.btn--verde:hover:not(:disabled) { background: var(--verde-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--azul-movi); outline-offset: 3px; }

/* ---------- Header ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--azul-movi);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.nav__logo img { width: 44px; height: auto; }
.nav__menu { display: flex; gap: 32px; }
.nav__menu a {
  font-size: 13px;
  font-weight: normal;
  text-decoration: none;
}
.nav__menu a:hover { text-decoration: underline; }
.nav__toggle { display: none; }

@media (min-width: 768px) {
  :root { --nav-h: 96px; }
  .nav__logo img { width: 56px; }
}

@media (max-width: 767px) {
  .nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .nav__toggle span {
    display: block;
    height: 2px;
    background: var(--blanco);
    transition: transform .2s, opacity .2s;
  }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav__menu {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--azul-movi);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .nav__menu.is-open { max-height: 240px; }
  .nav__menu a {
    padding: 14px 16px;
    font-size: 15px;
    border-top: 1px solid rgb(255 255 255 / 20%);
  }
}

/* ---------- Pantallas ---------- */
.screen { display: none; padding: 32px 0 48px; }
.screen.is-active { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.screen__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
}
.screen__title--xl { font-size: 28px; }
.screen__subtitle {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: normal;
  text-align: center;
}

@media (min-width: 768px) {
  .screen__title { font-size: 26px; }
  .screen__title--xl { font-size: 34px; }
  .screen__subtitle { font-size: 20px; }
}

/* ---------- Pantalla 1: Hero ---------- */
.screen--hero { padding: 0; }
.hero {
  display: grid;
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 40px;
}
.hero__title {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: normal;
  line-height: 1.2;
}
.hero__title .txt-azul { font-weight: bold; }
.pill {
  display: inline-block;
  margin: 0 0 20px;
  padding: 6px 18px;
  border: 1px solid var(--azul-movi);
  border-radius: 20px;
  color: var(--azul-movi);
  font-weight: bold;
}
.steps {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 15px;
}
.steps__num { flex: 0 0 26px; width: 26px; height: 26px; } /* ícono del arte (img/pasos) */
.legal-mini { margin: 20px 0 0; font-size: 12px; }
/* El arte ya trae esquinas redondeadas y borde: sin radio extra */
.hero__art img { margin: 0 auto; width: 100%; max-width: 599px; height: auto; }

/* Mobile / tablet (XD mobile): arte arriba pegado al menú, texto centrado, pasos con el número arriba */
@media (max-width: 899px) {
  .hero { padding-top: 0; gap: 20px; }
  .hero__art { order: -1; }
  .hero__art img { max-width: 480px; }
  .hero__copy { text-align: center; }
  .steps li { flex-direction: column; gap: 4px; margin-bottom: 14px; }
  .aviso-vigencia { margin-left: auto; margin-right: auto; }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
    min-height: 500px;
  }
  .hero__title { font-size: 36px; }
  .hero__art { align-self: start; }
}

/* ---------- Pantalla 2: Registro ---------- */
.form-note { margin: 0 0 8px; font-size: 14px; }
.card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 24px 20px 28px;
}
.card__title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 300;
}
@media (min-width: 768px) {
  .card { padding: 32px 60px 40px; }
  .card__title { font-size: 28px; }
  #form-registro .field { max-width: 500px; }
}

.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: normal; }
.field__control { position: relative; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field select {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 12px;
  border: 2px solid transparent;
  border-radius: var(--radius-input);
  background: var(--blanco);
  color: #333;
  font: inherit;
  font-size: 15px;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='none' stroke='%23333' stroke-width='2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.field select:disabled { background-color: #e6e9ec; cursor: not-allowed; }
.field input::placeholder { color: var(--gris-input); }
.field input:focus,
.field select:focus { outline: none; border-color: var(--azul-movi); }

/* Estado de validación (✓ verde / error) */
.field.is-valid .field__control::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M1 4l3 3 5-6'/%3E%3C/svg%3E") no-repeat center;
  pointer-events: none;
}
.field.is-valid select { background-image: none; }
.field.is-invalid input,
.field.is-invalid select { border-color: var(--error); }
.field__help { display: block; margin-top: 6px; font-size: 12px; }
.field__error { display: block; margin-top: 4px; font-size: 12px; color: var(--error); min-height: 0; }
.field__error:empty { display: none; }

/* Radios: ¿Cómo te enteraste? */
.field--radios { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.field--radios legend { padding: 0; margin-bottom: 8px; font-size: 15px; font-weight: normal; }
.radios { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.radios label { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.radios input { width: 18px; height: 18px; margin: 0; accent-color: var(--verde); }

/* Campo trampa anti-bots: fuera de pantalla (no display:none, algunos bots lo detectan) */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Contenido programado por fecha: showOnDateTime muestra el bloque vigente y elimina los demás */
.programContent { display: none; }

/* Aviso de vigencia (próximamente / finalizada) */
.aviso-vigencia {
  margin: 8px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--azul-movi);
  border-radius: 16px;
  background: rgb(1 157 244 / 10%);
  max-width: 480px;
}
.aviso-vigencia p { margin: 0; font-size: 16px; font-weight: normal; line-height: 1.4; }
.aviso-vigencia .aviso-vigencia__titulo { margin-bottom: 6px; font-size: 22px; font-weight: bold; color: var(--azul-movi); }

.field--check { margin-bottom: 10px; }
.field--check label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.field--check input { width: 18px; height: 18px; margin: 0; accent-color: var(--verde); }

.form-msg {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: var(--radius-input);
  background: rgb(255 107 107 / 15%);
  color: #ffd2d2;
  font-size: 14px;
  text-align: center;
}

/* ---------- Pantalla 3: Trivia ---------- */
#screen-trivia { padding-top: 0; }
.trivia__head {
  margin: 0;
  padding: 18px 16px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}
.progress { height: 10px; background: #43535f; }
.progress__bar {
  height: 100%;
  width: 20%;
  background: var(--azul-movi);
  border-radius: 0 6px 6px 0;
  transition: width .3s ease;
}
.trivia__count { margin: 20px 0 16px; font-size: 16px; }
.trivia__timer-label { margin: 0; font-size: 17px; font-weight: normal; }
.trivia__timer {
  margin: 4px 0 24px;
  font-size: 26px;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}
.trivia fieldset { border: 0; margin: 0; padding: 0; }
.trivia__question {
  width: 100%;
  margin: 0 0 20px;
  padding: 0;
  font-size: 20px;
  font-weight: 300;
}
.trivia__question img { display: inline; height: 1em; vertical-align: -0.1em; }
.trivia__options {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 28px;
  text-align: left;
}
.trivia__options label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  cursor: pointer;
}
.trivia__options input { width: 16px; height: 16px; margin: 0; accent-color: var(--azul-movi); }

@media (min-width: 768px) {
  .trivia__head { font-size: 24px; }
  .trivia__timer { font-size: 28px; }
  .trivia__question { font-size: 24px; }
}

/* ---------- Pantalla 4: Gracias ---------- */
.gracias__txt { margin: 0 auto 24px; max-width: 800px; font-size: 16px; font-weight: normal; line-height: 1.4; }
.card--resultado { max-width: 540px; margin: 0 auto; padding: 20px 20px 28px; border-radius: 20px; }
.card--resultado p { margin: 0; font-size: 16px; font-weight: normal; }
.card--resultado .card__title { margin-bottom: 16px; font-size: 24px; font-weight: bold; }
.resultado__grid { display: grid; gap: 16px; margin-bottom: 20px; }
.resultado__dato { margin-top: 6px !important; font-weight: bold !important; font-size: 18px !important; letter-spacing: .5px; }
.resultado__nota { margin: 24px 0 8px !important; font-size: 14px !important; font-weight: 300 !important; }
@media (min-width: 600px) {
  .resultado__grid { grid-template-columns: 1fr 1fr; }
  .gracias__txt { font-size: 18px; }
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(11 39 57 / 60%);
  backdrop-filter: blur(12px);
}
.modal[hidden] { display: none; }
.modal__box {
  position: relative;
  width: 100%;
  max-width: 700px;
  padding: 36px 24px 24px;
  border-radius: 16px;
  background: rgb(235 240 244 / 95%);
  color: var(--navy);
  text-align: center;
}
.modal__box p { margin: 0 0 14px; font-size: 16px; font-weight: normal; }
.modal__title { font-size: 22px !important; font-weight: 300 !important; }
.modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--navy);
  border-radius: 50%;
  background: none;
  color: var(--navy);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Footer ---------- */
.footer {
  padding: 28px 16px;
  border-top: 1px solid var(--azul-movi);
  text-align: center;
  font-size: 14px;
}
.footer p { margin: 0; }

/* ---------- Páginas legales (preguntas-frecuentes/, aviso-de-privacidad/) ---------- */
.legal { padding: 28px 0 48px; }
.legal__volver { margin: 0 0 12px; font-size: 14px; }
.legal__volver a { color: var(--azul-movi); text-decoration: none; }
.legal__volver a:hover { text-decoration: underline; }
.legal__titulo { margin: 0 0 24px; font-size: 26px; font-weight: bold; }
.legal__subtitulo { margin: 28px 0 8px; font-size: 18px; font-weight: bold; }
.legal__texto p, .faq__body p, .faq__body li { font-size: 16px; font-weight: normal; line-height: 1.6; }
.legal__texto p { margin: 0 0 16px; }
.legal a, .faq a { color: var(--azul-movi); overflow-wrap: anywhere; }
.nav__menu a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

.faq__item { border-bottom: 1px solid rgb(255 255 255 / 15%); }
.faq__item summary {
  position: relative;
  padding: 18px 40px 18px 0;
  font-size: 17px;
  font-weight: bold;
  list-style: none;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--azul-movi);
  font-size: 26px;
  font-weight: normal;
}
.faq__item[open] summary::after { content: "−"; }
.faq__item summary:focus-visible { outline: 3px solid var(--azul-movi); outline-offset: 2px; }
.faq__body { padding: 0 0 18px; }
.faq__body p { margin: 0 0 12px; }
.faq__body ol, .faq__body ul { margin: 0 0 12px; padding-left: 22px; }
.faq__body li { margin-bottom: 8px; }
.faq__premios { list-style: none; padding-left: 0 !important; }

@media (min-width: 768px) {
  .legal { padding: 40px 0 64px; }
  .legal__titulo { font-size: 32px; }
  .faq__item summary { font-size: 19px; }
}
