/* =====================================================================
   Pasos Efectivos · Registro con grupo de WhatsApp · portada (diseño Código Digital)
   Plantilla «Registro con grupo de WhatsApp»: Panel › Landings › Página.
   Copia propia de la portada del quiz (css/landing-codigo-digital.css):
   se puede cambiar aquí sin tocar el quiz. Fondo negro, dorados
   #C9A227 / #F0D060, Montserrat, portada con la foto que invade hacia
   abajo, formulario de registro y pie con la firma.
   Página independiente: no carga los estilos del sitio.
   ===================================================================== */
:root {
  /* Cada elemento con su color: los campos color de Panel › Landings › Página (secciones grupo_*)
     los pisan con App\Support\Grupo::colores. Los de abajo son los del diseño. */
  --mf-fondo: #000000;
  --mf-badge-texto: #F0D060; --mf-badge-borde: #C9A227; --mf-punto: #00FF91;
  --mf-titulo: #FFFFFF; --mf-titulo-destacado: #F0D060;
  --mf-sub: #CFCFCF; --mf-sub-negrita: #F0D060; --mf-linea: #C9A227;
  --mf-aviso: #F0D060; --mf-aviso-borde: #C9A227;
  --mf-invitacion: #FFFFFF; --mf-nota: #CFCFCF;
  --mf-form: #181309; --mf-etiqueta: #FFFFFF; --mf-asterisco: #F0D060;
  --mf-campo: #000000; --mf-campo-borde: #F0D060; --mf-campo-texto: #FFFFFF; --mf-campo-icono: #F0D060;
  --mf-boton-1: #F0D060; --mf-boton-2: #C9A227; --mf-boton-3: #8B6914; --mf-boton-texto: #1A1408;
  --mf-pie: #000000; --mf-pie-linea: #C9A227;
  /* Paleta del diseño (partes del quiz que esta portada no usa) */
  --mf-boton:   #1A1408;
  --mf-gold:    #C9A227;
  --mf-gold-2:  #F0D060;
  --mf-gold-3:  #8B6914;
  --mf-white:   #ffffff;
  --mf-muted:   #cfcfcf;
  --mf-green:   #00ff91;
  --mf-border:  color-mix(in srgb, var(--mf-gold) 34%, transparent);
  --mf-bleed:   520px;
  --mf-top:     clamp(22px, 3.2vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--mf-fondo); }
body { margin: 0; background: transparent; overflow-x: hidden; font-family: 'Montserrat', sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
button { font: inherit; }
[hidden] { display: none !important; }

/* ══ ANIMACIONES ══ */
@keyframes mfFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes mfPulseDot {
  0%, 100% { box-shadow: 0 0 8px var(--mf-punto); }
  50%      { box-shadow: 0 0 18px var(--mf-punto), 0 0 30px color-mix(in srgb, var(--mf-punto) 30%, transparent); }
}

/* Márgenes laterales de la columna del original (fila + columna) */
.cd-principal { padding: 0 10px; }

/* ══ HERO ══ */
#mf-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: var(--mf-top) 20px 14px;
  text-align: center;
  overflow: visible;
  font-family: 'Montserrat', sans-serif;
  color: var(--mf-titulo);
}

#mf-hero > *:not(.mf-fondo) {
  position: relative;
  z-index: 2;
  animation: mfFadeUp 0.8s ease both;
}

/* ══ IMAGEN DE FONDO QUE INVADE HACIA ABAJO ══ */
.mf-fondo {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(100% + var(--mf-bleed));
  z-index: -1;
  background-image: url('../img/codigo-digital/fondo-hero.webp');
  background-size: cover;
  background-position: center 14%;
  background-repeat: no-repeat;
  mix-blend-mode: screen;
  opacity: 0.44;
  filter: brightness(1.22);
  pointer-events: none;
  transition: opacity 0.4s ease;
  mask-image: linear-gradient(to bottom, #000 0%, #000 40%, rgba(0,0,0,0.45) 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 40%, rgba(0,0,0,0.45) 72%, transparent 100%);
}

/* ══ HERO COLAPSADO (al empezar la encuesta) ══ */
#mf-hero.mf-compact { padding: 26px 20px 8px; }

#mf-hero.mf-compact .mf-headline,
#mf-hero.mf-compact .mf-sub,
#mf-hero.mf-compact .mf-divider,
#mf-hero.mf-compact .mf-social,
#mf-hero.mf-compact .mf-play,
#mf-hero.mf-compact .mf-microcopy {
  display: none !important;
}

#mf-hero.mf-compact .mf-badge { margin-bottom: 0; }

#mf-hero.mf-compact .mf-fondo {
  --mf-bleed: 200px;
  opacity: 0.07;
}

.mf-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border: 1px solid color-mix(in srgb, var(--mf-badge-borde) 34%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--mf-badge-borde) 11%, transparent);
  color: var(--mf-badge-texto);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
  box-shadow: 0 0 26px color-mix(in srgb, var(--mf-badge-borde) 12%, transparent);
}

.mf-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--mf-punto);
  border-radius: 50%;
  flex-shrink: 0;
  animation: mfPulseDot 2s ease-in-out infinite;
}

.mf-headline {
  font-size: clamp(21px, 4.6vw, 34px);
  font-weight: 900;
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  max-width: 720px;
  margin: 0 0 10px;
  color: var(--mf-titulo);
}

.mf-headline em,
.mf-headline .mf-hl {
  font-style: normal;
  color: var(--mf-titulo-destacado);
  text-shadow: 0 0 32px color-mix(in srgb, var(--mf-titulo-destacado) 28%, transparent);
}

.mf-sub {
  font-size: clamp(14.5px, 3.9vw, 17px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--mf-sub);
  max-width: 560px;
  margin: 0 0 2px;
}

.mf-sub strong { color: var(--mf-sub-negrita); }

.mf-divider {
  width: 56px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--mf-linea), transparent);
  margin: 10px auto;
}

.mf-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--mf-aviso-borde) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--mf-aviso-borde) 22%, transparent);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--mf-aviso);
  font-weight: 600;
  max-width: 620px;
  margin-bottom: 10px;
}

.mf-social::before { content: "★"; font-size: 11px; }

.mf-play {
  font-size: 14px;
  font-weight: 700;
  color: var(--mf-invitacion);
  letter-spacing: 0.3px;
  margin: 0 0 4px;
}

.mf-microcopy {
  margin: 0;
  font-size: 12px;
  color: color-mix(in srgb, var(--mf-nota) 65%, transparent);
}

/* ══════════════════════════════════════════════
   ENCUESTA
   ══════════════════════════════════════════════ */
.cd-encuesta { padding: 0 30px; font-family: 'Montserrat', sans-serif; }
/* Espacio antes del pie de página */
.cd-encuesta::after { content: ""; display: block; height: 40px; }

.cd-caja { max-width: 800px; margin: 0 auto 12px; }

/* ══ BARRA DE PROGRESO PROPIA ══ */
#mfm-progress {
  width: 100%;
  max-width: 660px;
  margin: 0 auto 28px;
  display: none;
}
#mfm-progress.visible { display: block; }

.mfm-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  color: var(--mf-muted);
  font-weight: 600;
}

.mfm-progress-meta strong,
.mfm-progress-pct,
.mfm-progress-pct-inline {
  color: var(--mf-gold-2);
  font-weight: 800;
}

.mfm-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
}

.mfm-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mf-gold-3), var(--mf-gold), var(--mf-gold-2));
  border-radius: 999px;
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 18px color-mix(in srgb, var(--mf-gold) 50%, transparent);
}

/* ══ UNA SOLA SUPERFICIE ══ */
.cd-form {
  margin: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--mf-form) 92%, transparent) 0%, color-mix(in srgb, color-mix(in srgb, var(--mf-form) 25%, var(--mf-fondo)) 96%, transparent) 100%);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.72);
  padding: 34px 30px;
}

.cd-paso { display: none; }
.cd-paso.es-actual { display: block; }

.cd-campo { margin-bottom: 16px; }
.cd-campo-cuerpo { margin-bottom: 20px; }

/* ══ SLIDE 1 — nombre y email lado a lado ══ */
.cd-paso-datos.es-actual { display: flex; flex-wrap: wrap; gap: 14px; }
.cd-paso-datos .cd-campo { flex: 0 1 calc(50% - 7px); max-width: calc(50% - 7px); width: calc(50% - 7px); }
/* WhatsApp (Quiz · Paso 1 › Pedir WhatsApp): debajo, a todo el ancho */
.cd-paso-datos .cd-campo-completo { flex-basis: 100%; max-width: 100%; width: 100%; }
/* Los datos solo se separan con el gap: sin los márgenes de las preguntas */
.cd-paso-datos .cd-campo,
.cd-paso-datos .cd-campo-cuerpo { margin-bottom: 0; }

/* ══ LABELS ══ */
.cd-etiqueta {
  display: block;
  margin: 0 0 16px;
  color: var(--mf-etiqueta);
  font-family: "Montserrat", sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
}
.cd-paso-datos .cd-etiqueta { margin-bottom: 12px; }
.cd-etiqueta span { color: var(--mf-asterisco); }

/* ══ CAMPOS CON CONTRASTE REAL ══ */
.cd-entrada { position: relative; display: flex; align-items: center; }

.cd-entrada input {
  display: block;
  width: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background-color: color-mix(in srgb, var(--mf-campo) 55%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--mf-campo-borde) 22%, transparent);
  border-radius: 12px;
  color: var(--mf-campo-texto);
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  padding: 15px 18px;
  height: auto;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.45);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.cd-entrada input[type=email],
.cd-entrada input[type=tel] { padding-left: 36px; }

.cd-entrada input::placeholder { color: color-mix(in srgb, var(--mf-campo-texto) 34%, transparent); font-weight: 400; }

.cd-entrada input:hover {
  border-color: color-mix(in srgb, var(--mf-campo-borde) 40%, transparent);
  background-color: color-mix(in srgb, var(--mf-campo) 62%, transparent);
}

.cd-entrada input:focus {
  border-color: var(--mf-campo-borde);
  background-color: color-mix(in srgb, var(--mf-campo) 72%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mf-campo-borde) 16%, transparent), inset 0 2px 12px rgba(0, 0, 0, 0.5);
  outline: none;
  color: var(--mf-campo-texto);
}

.cd-entrada input:-webkit-autofill,
.cd-entrada input:-webkit-autofill:hover,
.cd-entrada input:-webkit-autofill:focus,
.cd-entrada input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--mf-campo-texto);
  -webkit-box-shadow: 0 0 0 1000px color-mix(in srgb, var(--mf-form) 50%, var(--mf-fondo)) inset;
  box-shadow: 0 0 0 1000px color-mix(in srgb, var(--mf-form) 50%, var(--mf-fondo)) inset;
  caret-color: var(--mf-campo-texto);
  transition: background-color 9999s ease-in-out 0s;
}

.cd-entrada svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  z-index: 1;
  pointer-events: none;
  color: color-mix(in srgb, var(--mf-campo-icono) 55%, transparent);
}

.cd-error {
  display: block;
  margin-top: 4px;
  color: #ff5c5c;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
}

/* ══ OPCIONES A / B / C ══ */
.cd-opciones { display: flex; flex-direction: column; counter-reset: opcion; }

.cd-opcion {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 6px 11px 0;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.045);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  counter-increment: opcion;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .cd-opcion:hover {
    border-color: color-mix(in srgb, var(--mf-gold-2) 45%, transparent);
    background: color-mix(in srgb, var(--mf-gold-2) 7%, transparent);
  }
}

.cd-opcion:has(input:checked) {
  border-color: var(--mf-gold);
  background: color-mix(in srgb, var(--mf-gold) 13%, transparent);
  box-shadow: 0 0 26px color-mix(in srgb, var(--mf-gold) 16%, transparent);
}

.cd-opcion::before {
  content: counter(opcion, upper-alpha);
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--mf-muted);
  order: -1;
  transition: all 0.2s ease;
}

.cd-opcion:has(input:checked)::before {
  background: linear-gradient(135deg, var(--mf-gold-2), var(--mf-gold));
  border-color: var(--mf-gold);
  color: var(--mf-boton);
  box-shadow: 0 0 14px color-mix(in srgb, var(--mf-gold) 45%, transparent);
}

.cd-opcion input[type=radio] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.cd-opcion span {
  flex: 1;
  margin: 0;
  color: var(--mf-white);
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1.5;
}

/* ══ BOTONES ══ */
.cd-botones {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 22px 0 0;
}

.cd-siguiente {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  margin: 0;
  padding: 0 28px;
  background: linear-gradient(135deg, var(--mf-boton-1) 0%, var(--mf-boton-2) 45%, var(--mf-boton-3) 100%);
  color: var(--mf-boton-texto);
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  font-size: 14.5px;
  line-height: 18px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 14px 36px color-mix(in srgb, var(--mf-boton-2) 34%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .cd-siguiente:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 48px color-mix(in srgb, var(--mf-boton-2) 46%, transparent);
  }
}

.cd-siguiente:active { transform: scale(0.985); }
.cd-siguiente:disabled { opacity: 0.7; cursor: wait; }

.cd-botones svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  vertical-align: middle;
}
.cd-siguiente svg { margin-left: 2px; stroke: var(--mf-boton-texto); color: var(--mf-boton-texto); }
/* En el primer paso el original dejaba un hueco extra antes de la flecha */
.cd-siguiente.es-inicio svg { margin-left: 12px; }

.cd-atras {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 56px;
  margin: 0;
  padding: 0 22px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  opacity: 0.8;
  cursor: pointer;
}
.cd-atras svg { stroke: rgba(255, 255, 255, 0.55); color: rgba(255, 255, 255, 0.55); }

@media (hover: hover) {
  .cd-atras:hover { border-color: color-mix(in srgb, var(--mf-gold-2) 40%, transparent); color: var(--mf-gold-2); }
}

/* Mensaje de gracias (Quiz · Al terminar › «Mostrar un mensaje de gracias») */
.cd-gracias b { display: block; font-weight: 800; }
.cd-gracias {
  margin: 0;
  color: var(--mf-white);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}
.cd-gracias span { display: block; margin-top: 8px; color: var(--mf-muted); font-size: 14.5px; font-weight: 500; }

/* ══ PIE CON LA FIRMA ══ */
.cd-pie { padding: 0; }
.cd-pie-contenedor { max-width: 1170px; margin: 0 auto; padding: 0 10px 12px; }

#mf-footer {
  background: var(--mf-pie);
  width: 100%;
  padding: 28px 20px;
  text-align: center;
  border-top: 1px solid color-mix(in srgb, var(--mf-pie-linea) 18%, transparent);
  position: relative;
  z-index: 2;
}

#mf-footer img {
  height: 52px;
  width: auto;
  max-width: 100%;
  opacity: 0.88;
  display: inline-block;
  vertical-align: middle;
}

/* ══ RESPONSIVE ══ */
@media (max-width: 768px) {
  :root {
    --mf-bleed: 340px;
    --mf-top:   clamp(20px, 3vw, 40px);
  }
  .mf-fondo { background-position: 65% 16%; opacity: 0.20; }
}

@media (max-width: 520px) {
  :root {
    --mf-bleed: 230px;
    --mf-top:   18px;
  }

  #mf-hero            { padding: var(--mf-top) 16px 8px; }
  #mf-hero.mf-compact { padding: 20px 16px 6px; }

  .mf-fondo { background-position: 70% 14%; opacity: 0.14; }

  .mf-badge {
    font-size: 10px;
    letter-spacing: 1.4px;
    padding: 6px 14px;
    margin-bottom: 8px;
  }

  .mf-badge-dot { width: 7px; height: 7px; }

  .mf-headline {
    font-size: 19.5px;
    line-height: 1.14;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
  }

  .mf-sub {
    font-size: 13.5px;
    line-height: 1.45;
    margin-bottom: 2px;
  }

  .mf-divider { margin: 6px auto; }

  /* La píldora larga pasa a bloque para no romperse */
  .mf-social {
    display: block;
    text-align: center;
    border-radius: 16px;
    padding: 8px 13px;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 8px;
  }

  .mf-social::before { margin-right: 6px; }

  /* Redundante con el formulario que va justo debajo */
  .mf-play { display: none !important; }

  .mf-microcopy { font-size: 11px; }

  /* Formulario más compacto en móvil: los datos, uno bajo otro, sin márgenes dobles */
  .cd-form { padding: 20px 16px; border-radius: 20px; }
  .cd-etiqueta { font-size: 17px; margin-bottom: 14px; }
  .cd-paso-datos.es-actual { gap: 14px; }
  .cd-paso-datos .cd-campo { flex-basis: 100%; max-width: 100%; width: 100%; }
  .cd-paso-datos .cd-etiqueta { font-size: 15px; margin-bottom: 7px; }
  .cd-entrada input { padding-top: 13px; padding-bottom: 13px; }

  .cd-opcion { padding: 14px 15px; gap: 12px; border-radius: 14px; margin-bottom: 9px; }
  .cd-opcion::before { width: 31px; height: 31px; font-size: 12px; }
  .cd-opcion span { font-size: 13.5px; line-height: 1.45; }

  .cd-siguiente { height: 52px; font-size: 13px; padding: 0 18px; }
  .cd-atras { height: 52px; padding: 0 16px; font-size: 12px; }

  #mf-footer     { padding: 22px 16px; }
  #mf-footer img { height: 42px; }
}

/* «Destacar» del subtítulo: dorado como la negrita */
.mf-sub em { font-style: normal; color: var(--mf-sub-negrita); }
