/* ======================================================
   REDISEÑO DE LA LANDING (se carga después de estilo.css,
   curso.css y oscuro.css; todo cuelga de body.rd)
   ====================================================== */

body.rd {
  --rd-verde: #00a650;
  --rd-naranja: #ff6a00;
  --rd-borde: rgba(255, 255, 255, 0.14);
  --rd-tenue: rgba(255, 255, 255, 0.66);
}

body.rd.rd-con-barra {
  padding-bottom: 84px;
}

/* ---------- Cabecera ---------- */

body.rd .cabecera {
  position: relative;
  text-align: left;
}

body.rd .cabecera img {
  margin: 0;
  height: 22px;
}

body.rd .rd-mis-numeros {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 12px;
  border: 1px solid var(--rd-borde);
  border-radius: 999px;
  color: #fff;
  font: 600 13px/1 Inter, sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Portada ---------- */

body.rd .rd-hero {
  padding: 14px 4px 6px;
}

body.rd .rd-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--rd-naranja);
  font: 700 12.5px/1.3 Inter, sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.rd .rd-vivo {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

body.rd .rd-hero h1 {
  margin: 0 0 12px;
  color: #fff;
  font: 800 25px/1.18 Poppins, sans-serif;
  letter-spacing: -0.01em;
  text-align: left;
}

body.rd .rd-hero h1 span {
  color: var(--rd-naranja);
  white-space: nowrap;
}

body.rd .rd-motos {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: 6px;
  height: 232px;
  margin: 0 0 10px;
}

body.rd .rd-moto {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #111;
}

body.rd .rd-moto-1 {
  grid-row: 1 / span 3;
}

body.rd .rd-moto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.rd .rd-moto figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 8px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.86));
  color: #fff;
  font: 700 12px/1.15 Poppins, sans-serif;
}

body.rd .rd-moto-1 figcaption {
  font-size: 16px;
  padding: 26px 10px 9px;
}

body.rd .rd-moto:not(.rd-moto-1) figcaption {
  font-size: 11.5px;
  padding: 14px 7px 5px;
}

body.rd .rd-moto:not(.rd-moto-1) figcaption small {
  display: inline;
  margin-right: 4px;
}

body.rd .rd-moto figcaption small {
  display: block;
  margin-bottom: 1px;
  color: var(--rd-naranja);
  font: 700 10px/1.2 Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.rd .rd-confianza {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--rd-tenue);
  font: 500 12.5px/1.4 Inter, sans-serif;
}

body.rd .rd-confianza li::before {
  content: "✓ ";
  color: var(--rd-verde);
  font-weight: 800;
}

body.rd .rd-confianza b {
  color: #fff;
}

/* ---------- Packs en lista ---------- */

body.rd .chances {
  margin-top: 14px;
  padding-top: 0;
  scroll-margin-top: 12px;
}

body.rd .rd-titulo-packs {
  margin: 0 0 4px;
  font: 800 21px/1.2 Poppins, sans-serif;
  text-align: left;
}

body.rd .rd-bajada-packs {
  margin: 0 0 12px;
  color: var(--rd-tenue);
  font: 400 13.5px/1.45 Inter, sans-serif;
  text-align: left;
}

body.rd .packs-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

body.rd .packs-grid .pack-card {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  grid-template-areas:
    "radio cantidad precio"
    "radio incluye  precio";
  column-gap: 12px;
  row-gap: 1px;
  align-items: center;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 12px 14px;
  border: 1.5px solid var(--rd-borde);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
  transform: none;
  text-align: left;
  cursor: pointer;
  animation: none;
}

body.rd .packs-grid .pack-card::before {
  content: "";
  grid-area: radio;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  box-sizing: border-box;
}

body.rd .packs-grid .pack-card::after {
  display: none;
}

body.rd .packs-grid .pack-card.rd-elegido {
  border-color: var(--rd-verde);
  background: rgba(0, 166, 80, 0.13);
}

body.rd .packs-grid .pack-card.rd-elegido::before {
  border-color: var(--rd-verde);
  background: radial-gradient(circle, var(--rd-verde) 0 45%, transparent 50%);
}

body.rd .packs-grid .pack-card.rd-extra {
  display: none;
}

body.rd .packs-grid.rd-todos .pack-card.rd-extra {
  display: grid;
}

/* Tapas con mockups y nombre del curso: fuera de la lista */
body.rd .packs-grid .curso-tapa,
body.rd .packs-grid .pack-card h3,
body.rd .packs-grid .precio-anterior {
  display: none;
}

body.rd .packs-grid .cantidad-chances {
  grid-area: cantidad;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #fff;
  font: 800 17px/1.2 Poppins, sans-serif;
  text-align: left;
}

body.rd .packs-grid .cantidad-chances b {
  display: inline;
  margin: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
}

/* Mientras la lista de packs está en pantalla, los flotantes se
   esconden para no tapar precios (rediseno.js pone la clase) */
body.rd.rd-en-packs .wp-float,
body.rd.rd-en-packs .ayuda-float {
  opacity: 0;
  pointer-events: none;
}

body.rd .packs-grid .curso-incluye {
  grid-area: incluye;
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--rd-tenue);
  font: 400 12px/1.35 Inter, sans-serif;
  text-align: left;
}

body.rd .packs-grid .curso-incluye li {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
}

body.rd .packs-grid .curso-incluye li + li::before {
  content: " · ";
}

body.rd .packs-grid .precio-pack {
  grid-area: precio;
  display: block;
  margin: 0;
  padding: 0;
  text-align: right;
}

body.rd .packs-grid .precio-actual {
  color: #fff;
  font: 800 17px/1 Poppins, sans-serif;
  white-space: nowrap;
}

body.rd .packs-grid .pack-cinta {
  position: static;
  grid-column: 2 / -1;
  grid-row: auto;
  justify-self: start;
  order: -1;
  margin: 0 0 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--rd-verde);
  color: #fff;
  font: 700 10.5px/1.5 Inter, sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transform: none;
  box-shadow: none;
}

body.rd .packs-grid .pack-card.pack-recomendado {
  grid-template-areas:
    "radio cinta    cinta"
    "radio cantidad precio"
    "radio incluye  precio";
}

body.rd .packs-grid .pack-card.pack-recomendado .pack-cinta {
  grid-area: cinta;
}

body.rd .rd-ver-todos {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  padding: 11px;
  border: 1px dashed var(--rd-borde);
  border-radius: 12px;
  background: none;
  color: #fff;
  font: 600 13.5px/1 Inter, sans-serif;
  cursor: pointer;
}

body.rd .rd-clave {
  margin: 12px 0 0;
  text-align: center;
}

body.rd .rd-clave summary {
  display: inline-block;
  color: var(--rd-tenue);
  font: 500 13px/1.4 Inter, sans-serif;
  text-decoration: underline;
  cursor: pointer;
  list-style: none;
}

body.rd .rd-clave summary::-webkit-details-marker {
  display: none;
}

body.rd .rd-clave .palabra-clave {
  margin-top: 10px;
}

/* ---------- Barra fija ---------- */

body.rd .barra-compra {
  display: none !important;
}

body.rd .rd-barra {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rd-borde);
  background: rgba(10, 14, 24, 0.97);
}

body.rd .rd-barra[hidden],
body.rd.modal-open .rd-barra,
body.rd.participaciones-cerradas .rd-barra {
  display: none;
}

body.rd .rd-barra-resumen {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: var(--rd-tenue);
  font: 500 12px/1.2 Inter, sans-serif;
}

body.rd .rd-barra-resumen b {
  color: #fff;
  font: 800 18px/1 Poppins, sans-serif;
}

body.rd .rd-barra-btn {
  flex: 1;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--rd-verde);
  color: #fff;
  font: 800 16px/1 Poppins, sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
}

/* Los botones flotantes suben para no pisar la barra, y se achican
   para no tapar los precios de la lista */
body.rd.rd-con-barra .wp-float,
body.rd.rd-con-barra .ayuda-float {
  bottom: 88px;
}

body.rd .wp-float {
  width: 44px;
  height: 44px;
  right: 10px;
}

body.rd .wp-float svg {
  width: 24px;
  height: 24px;
}

body.rd .ayuda-float {
  left: 10px;
  padding: 7px 11px;
  font-size: 11.5px;
}

/* ---------- Bloques de abajo, más compactos ---------- */

body.rd .cuenta {
  margin-top: 18px;
}

body.rd #ranking {
  display: none !important;
}

@media (min-width: 620px) {
  body.rd .rd-motos {
    height: 320px;
  }
  body.rd .rd-hero h1 {
    font-size: 30px;
  }
}

/* ---------- Ajuste fino de las filas (una sola línea por título) ---------- */

body.rd .chances {
  padding-left: 12px;
  padding-right: 12px;
}

body.rd .packs-grid .pack-card {
  padding: 11px 12px;
  column-gap: 10px;
}

body.rd .packs-grid .cantidad-chances {
  font: 600 14px/1.2 Inter, sans-serif;
  white-space: nowrap;
}

body.rd .packs-grid .cantidad-chances b {
  margin-right: 2px;
  font: 800 19px/1 Poppins, sans-serif;
}

body.rd .packs-grid .precio-actual {
  font-size: 16px;
}

/* ---------- Gancho visual: el número de regalos en color ---------- */

body.rd .packs-grid .cantidad-chances b {
  display: inline-block;
  min-width: 34px;
  margin-right: 6px;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(255, 106, 0, 0.16);
  color: var(--rd-naranja);
  font: 800 20px/1 Poppins, sans-serif;
  text-align: center;
}

body.rd .packs-grid .pack-card.rd-elegido .cantidad-chances b {
  background: var(--rd-verde);
  color: #fff;
}

body.rd .packs-grid .curso-incluye {
  margin-top: 4px;
}

/* ---------- Formulario: "números de regalo" en vez de "chances" ---------- */

body.rd #selectedPack[data-rd] {
  font-size: 0;
}

body.rd #selectedPack[data-rd]::after {
  content: attr(data-rd);
  font-size: 14px;
}

/* ---------- Fila con precio por número, tachado y descuento ---------- */

body.rd .packs-grid .pack-card {
  grid-template-areas:
    "radio cantidad precio"
    "radio unitario precio"
    "radio incluye  precio";
  padding: 13px 14px;
}

body.rd .packs-grid .pack-card.pack-recomendado {
  grid-template-areas:
    "radio cinta    cinta"
    "radio cantidad precio"
    "radio unitario precio"
    "radio incluye  precio";
}

body.rd .packs-grid .rd-unitario {
  grid-area: unitario;
  color: var(--rd-tenue);
  font: 500 12.5px/1.3 Inter, sans-serif;
}

body.rd .packs-grid .precio-pack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

body.rd .packs-grid .rd-tachado {
  color: rgba(255, 255, 255, 0.5);
  font: 500 12.5px/1 Inter, sans-serif;
  text-decoration: line-through;
}

body.rd .packs-grid .precio-actual {
  font-size: 18px;
}

body.rd .packs-grid .rd-off {
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(0, 166, 80, 0.18);
  color: #4ade80;
  font: 800 11px/1.2 Inter, sans-serif;
  letter-spacing: 0.02em;
}

body.rd .packs-grid .curso-incluye {
  font-size: 11.5px;
  opacity: 0.85;
}

/* Con 3 cifras el texto no entra en una línea: baja al renglón de al lado de la ficha */
body.rd .packs-grid .cantidad-chances {
  display: flex;
  align-items: center;
  white-space: normal;
  line-height: 1.15;
}

body.rd .packs-grid .cantidad-chances b {
  flex: none;
}

body.rd .packs-grid .cantidad-chances {
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0;
}

/* Una línea hasta 2 cifras; con 3 cifras el texto puede partirse */
body.rd .packs-grid .cantidad-chances {
  white-space: nowrap;
}

body.rd .packs-grid .pack-card.rd-largo .cantidad-chances {
  white-space: normal;
}

/* ---------- Sin barra fija: cada fila abre el formulario ---------- */

body.rd.rd-sin-barra .packs-grid .pack-card {
  grid-template-columns: minmax(0, 1fr) auto 14px;
  grid-template-areas:
    "cantidad precio flecha"
    "unitario precio flecha"
    "incluye  precio flecha";
}

body.rd.rd-sin-barra .packs-grid .pack-card.pack-recomendado {
  grid-template-areas:
    "cinta    cinta  cinta"
    "cantidad precio flecha"
    "unitario precio flecha"
    "incluye  precio flecha";
}

body.rd.rd-sin-barra .packs-grid .pack-card::before {
  display: none;
}

body.rd.rd-sin-barra .packs-grid .pack-card::after {
  content: "›";
  display: block;
  position: static;
  grid-area: flecha;
  width: auto;
  height: auto;
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.55);
  font: 400 24px/1 Inter, sans-serif;
  transform: none;
  animation: none;
}

body.rd.rd-sin-barra .packs-grid .pack-card.rd-elegido::after {
  color: var(--rd-verde);
}

body.rd.rd-sin-barra .packs-grid .pack-cinta {
  grid-column: 1 / -1;
}
