/* TestLatinos — estilo principal (mobile-first) */
:root {
  --morado: #7c3aed;
  --morado-oscuro: #5b21b6;
  --rosa: #ec4899;
  --naranja: #f97316;
  --amarillo: #fbbf24;
  --fondo: #faf7ff;
  --texto: #1f1b2e;
  --texto-suave: #5b5670;
  --blanco: #ffffff;
  --gradiente-hero: linear-gradient(135deg, #7c3aed 0%, #ec4899 55%, #f97316 100%);
  --gradiente-boton: linear-gradient(90deg, #ec4899, #f97316);
  --sombra: 0 10px 30px rgba(124, 58, 237, 0.14);
  --radio: 18px;
  --fuente: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--fuente);
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--morado); text-decoration: none; }
a:hover { text-decoration: underline; }

.contenedor { width: min(1100px, 92%); margin: 0 auto; }

/* ---------- Encabezado ---------- */
.encabezado {
  background: var(--blanco);
  box-shadow: 0 2px 14px rgba(0,0,0,0.06);
  position: sticky; top: 0; z-index: 50;
}
.barra-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 0;
}
.logo {
  font-weight: 800; font-size: 1.5rem;
  background: var(--gradiente-hero);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.menu { display: flex; gap: 1.2rem; list-style: none; }
.menu a { font-weight: 600; color: var(--texto); font-size: 0.95rem; }
.menu a:hover { color: var(--rosa); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  background: var(--gradiente-hero);
  color: #fff; text-align: center;
  padding: 4rem 0 3.4rem;
  border-radius: 0 0 36px 36px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: "✨🧠🎉💡📊";
  position: absolute; top: 12px; left: 0; right: 0;
  font-size: 1.6rem; opacity: 0.35; letter-spacing: 1.2rem;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; margin-bottom: 0.6rem; }
.hero p { font-size: clamp(1rem, 2.6vw, 1.25rem); max-width: 640px; margin: 0 auto 1.6rem; opacity: 0.95; }

.boton {
  display: inline-block;
  background: var(--gradiente-boton);
  color: #fff; font-weight: 700;
  padding: 0.85rem 2rem; border-radius: 999px;
  box-shadow: 0 8px 22px rgba(236, 72, 153, 0.4);
  border: none; cursor: pointer; font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none; text-align: center;
}
.boton:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(236,72,153,0.5); text-decoration: none; color: #fff; }
.boton-secundario {
  background: #fff; color: var(--morado);
  border: 2px solid var(--morado); box-shadow: none;
}
.boton-secundario:hover { background: var(--morado); color: #fff; box-shadow: var(--sombra); }
.boton-whatsapp { background: linear-gradient(90deg, #22c55e, #16a34a); box-shadow: 0 8px 22px rgba(34,197,94,0.4); }

/* ---------- Secciones ---------- */
.seccion { padding: 3rem 0; }
.seccion-titulo {
  font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800;
  text-align: center; margin-bottom: 0.4rem;
}
.seccion-sub {
  text-align: center; color: var(--texto-suave);
  margin-bottom: 2rem; max-width: 620px; margin-left: auto; margin-right: auto;
}

/* ---------- Tarjetas ---------- */
.grid-tarjetas {
  display: grid; gap: 1.3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid-tarjetas { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-tarjetas { grid-template-columns: repeat(4, 1fr); } }

.tarjeta {
  background: var(--blanco); border-radius: var(--radio);
  padding: 1.6rem 1.3rem; box-shadow: var(--sombra);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border-top: 5px solid transparent;
  border-image: linear-gradient(90deg, var(--morado), var(--rosa), var(--naranja)) 1;
}
.tarjeta:hover { transform: translateY(-6px); box-shadow: 0 16px 36px rgba(124,58,237,0.2); }
.tarjeta-emoji { font-size: 3rem; margin-bottom: 0.7rem; }
.tarjeta h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.tarjeta p { color: var(--texto-suave); font-size: 0.92rem; margin-bottom: 1.1rem; flex: 1; }
.etiqueta {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.25rem 0.7rem; border-radius: 999px; margin-bottom: 0.8rem;
}
.etiqueta-test { background: #ede9fe; color: var(--morado-oscuro); }
.etiqueta-calc { background: #fff7ed; color: #c2410c; }

/* ---------- Artículos ---------- */
.tarjeta-articulo { align-items: flex-start; text-align: left; }
.tarjeta-articulo .fecha { font-size: 0.8rem; color: var(--texto-suave); margin-bottom: 0.3rem; }
.tarjeta-articulo h3 { margin-bottom: 0.4rem; }
.tarjeta-articulo p { margin-bottom: 1rem; }

/* ---------- Tests interactivos ---------- */
.quiz { max-width: 680px; margin: 0 auto; }
.pregunta-card {
  background: var(--blanco); border-radius: var(--radio);
  box-shadow: var(--sombra); padding: 1.8rem 1.4rem; margin-bottom: 1.2rem;
}
.pregunta-card h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.pregunta-num { font-size: 0.8rem; font-weight: 700; color: var(--rosa); text-transform: uppercase; letter-spacing: 0.05em; }
.opciones { list-style: none; display: grid; gap: 0.7rem; }
.opcion {
  display: block; width: 100%; text-align: left;
  background: var(--fondo); border: 2px solid #e9e2f5;
  border-radius: 12px; padding: 0.85rem 1rem;
  font-size: 1rem; font-family: var(--fuente); cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.opcion:hover { border-color: var(--morado); background: #f3effe; }
.barra-progreso { height: 10px; background: #e9e2f5; border-radius: 999px; overflow: hidden; margin-bottom: 1.4rem; }
.barra-progreso > div { height: 100%; width: 0; background: var(--gradiente-hero); border-radius: 999px; transition: width 0.3s ease; }

.resultado {
  background: var(--blanco); border-radius: var(--radio);
  box-shadow: var(--sombra); padding: 2.2rem 1.6rem; text-align: center;
}
.resultado .emoji-grande { font-size: 4rem; margin-bottom: 0.6rem; }
.resultado h2 { font-size: 1.6rem; margin-bottom: 0.6rem; }
.resultado .dato-destacado {
  font-size: 2.6rem; font-weight: 800;
  background: var(--gradiente-hero);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 0.4rem 0 0.8rem;
}
.resultado p { color: var(--texto-suave); margin-bottom: 1.4rem; }
.botones-resultado { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Formularios / calculadoras ---------- */
.form-card {
  background: var(--blanco); border-radius: var(--radio);
  box-shadow: var(--sombra); padding: 2rem 1.6rem;
  max-width: 560px; margin: 0 auto;
}
.campo { margin-bottom: 1.2rem; }
.campo label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.campo input {
  width: 100%; padding: 0.8rem 1rem; font-size: 1.05rem;
  border: 2px solid #e9e2f5; border-radius: 12px; font-family: var(--fuente);
}
.campo input:focus { outline: none; border-color: var(--morado); }
.campo .ayuda { font-size: 0.82rem; color: var(--texto-suave); margin-top: 0.25rem; }

.desglose { display: grid; gap: 0.9rem; margin-top: 1.4rem; }
.item-desglose {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--fondo); border-radius: 12px; padding: 0.9rem 1.1rem;
}
.item-desglose .nombre { font-weight: 600; }
.item-desglose .nombre small { display: block; font-weight: 400; color: var(--texto-suave); font-size: 0.8rem; }
.item-desglose .monto { font-weight: 800; font-size: 1.2rem; color: var(--morado-oscuro); }
.item-desglose.destacado { background: linear-gradient(90deg, #ede9fe, #fce7f3); border: 2px solid var(--rosa); }

/* ---------- Blog ---------- */
.articulo { max-width: 760px; margin: 0 auto; }
.articulo h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); margin-bottom: 0.4rem; line-height: 1.3; }
.articulo .meta { color: var(--texto-suave); font-size: 0.9rem; margin-bottom: 1.6rem; }
.articulo h2 { font-size: 1.35rem; margin: 1.8rem 0 0.6rem; color: var(--morado-oscuro); }
.articulo p { margin-bottom: 1rem; }
.articulo ul, .articulo ol { margin: 0 0 1rem 1.4rem; }
.articulo li { margin-bottom: 0.5rem; }
.llamado {
  background: linear-gradient(90deg, #ede9fe, #fce7f3);
  border-left: 5px solid var(--rosa);
  border-radius: 0 14px 14px 0;
  padding: 1.1rem 1.3rem; margin: 1.6rem 0;
}

/* ---------- Migas / encabezado de página ---------- */
.pagina-hero {
  background: var(--gradiente-hero); color: #fff;
  text-align: center; padding: 2.6rem 0;
  border-radius: 0 0 30px 30px; margin-bottom: 2rem;
}
.pagina-hero h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin-bottom: 0.3rem; }
.pagina-hero p { opacity: 0.92; max-width: 600px; margin: 0 auto; }
.migas { font-size: 0.85rem; color: var(--texto-suave); margin-bottom: 1.2rem; }

/* ---------- Pie ---------- */
.pie {
  background: #171226; color: #cfc9e3;
  margin-top: 3rem; padding: 2.6rem 0 1.6rem;
}
.pie-grid { display: grid; gap: 1.6rem; grid-template-columns: 1fr; margin-bottom: 1.8rem; }
@media (min-width: 720px) { .pie-grid { grid-template-columns: 2fr 1fr 1fr; } }
.pie h4 { color: #fff; margin-bottom: 0.7rem; font-size: 1rem; }
.pie ul { list-style: none; }
.pie li { margin-bottom: 0.45rem; }
.pie a { color: #cfc9e3; font-size: 0.92rem; }
.pie a:hover { color: #fff; }
.pie-logo { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 0.5rem; }
.pie-nota { font-size: 0.82rem; opacity: 0.75; }
.pie-base {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.2rem; font-size: 0.82rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
}

@media (max-width: 560px) {
  .menu { gap: 0.8rem; }
  .menu a { font-size: 0.85rem; }
  .botones-resultado .boton { width: 100%; }
}

/* ---------- Tema oscuro ---------- */
html[data-theme="dark"] {
  --fondo: #120e1d;
  --texto: #f2edfb;
  --texto-suave: #b3abd0;
  --blanco: #1d1730;
  --sombra: 0 10px 30px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] body { transition: background-color 0.3s ease, color 0.3s ease; }
html[data-theme="dark"] a { color: #c4b5fd; }
html[data-theme="dark"] .encabezado { box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4); }
html[data-theme="dark"] .boton-secundario { background: var(--blanco); }
html[data-theme="dark"] .boton-secundario:hover { background: var(--morado); color: #fff; }
html[data-theme="dark"] .opcion { background: #241d3a; border-color: #3a3355; color: var(--texto); }
html[data-theme="dark"] .opcion:hover { border-color: var(--morado); background: #2e2650; }
html[data-theme="dark"] .barra-progreso { background: #3a3355; }
html[data-theme="dark"] .campo input { background: #241d3a; border-color: #3a3355; color: var(--texto); }
html[data-theme="dark"] .etiqueta-test { background: #3b2f63; color: #d8b4fe; }
html[data-theme="dark"] .etiqueta-calc { background: #4a2f1d; color: #fdba74; }
html[data-theme="dark"] .llamado { background: linear-gradient(90deg, #2a2145, #3a2340); }
html[data-theme="dark"] .item-desglose { background: #241d3a; }
html[data-theme="dark"] .item-desglose .monto { color: #d8b4fe; }
html[data-theme="dark"] .item-desglose.destacado { background: linear-gradient(90deg, #2a2145, #3a2340); }
html[data-theme="dark"] .articulo h2 { color: #c4b5fd; }

/* ---------- Botón de tema ---------- */
.menu li { display: flex; align-items: center; }
.tema-boton {
  background: none; border: 2px solid #e9e2f5; border-radius: 999px;
  width: 40px; height: 40px; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, transform 0.2s;
}
.tema-boton:hover { border-color: var(--morado); transform: rotate(15deg); }
.tema-boton svg { width: 19px; height: 19px; stroke: var(--texto); }
.tema-boton .icono-sol { display: none; }
html[data-theme="dark"] .tema-boton { border-color: #3a3355; }
html[data-theme="dark"] .tema-boton .icono-sol { display: block; }
html[data-theme="dark"] .tema-boton .icono-luna { display: none; }

/* ---------- Promo página de ofertas ---------- */
.nav-ofertas {
  display: inline-block;
  background: var(--gradiente-boton);
  color: #fff !important;
  font-weight: 700;
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
  text-decoration: none !important;
  white-space: nowrap;
}
.nav-ofertas:hover { transform: translateY(-1px); text-decoration: none !important; }
.cta-ofertas-caja {
  background: var(--gradiente-hero);
  border-radius: var(--radio);
  padding: 2.6rem 2rem;
  text-align: center;
  color: #fff;
  box-shadow: var(--sombra);
}
.cta-ofertas-caja h2 { color: #fff; margin-bottom: 0.6rem; font-size: 1.7rem; }
.cta-ofertas-caja p { color: rgba(255,255,255,0.93); margin-bottom: 1.3rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.boton-blanco { background: #fff; color: var(--morado-oscuro); box-shadow: 0 8px 22px rgba(0,0,0,0.18); }
.boton-blanco:hover { color: var(--morado-oscuro); }
