@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Surfaces (elevation scale) ── */
  --bg: #f4f7fb;
  --surface-0: #f4f7fb;       /* page canvas */
  --surface-1: #ffffff;       /* cards, panels */
  --surface-2: #f8fafc;       /* inset areas, inputs */
  --surface-3: #f1f5f9;       /* hover states, wells */
  --card-bg: var(--surface-1);
  --header-bg: #0b2240;

  /* ── Text hierarchy ── */
  --title-color: #0b2240;
  --text: #1e293b;
  --text-dim: #475569;
  --text-muted: #94a3b8;
  --text-disabled: #cbd5e1;

  /* ── Brand ── */
  --accent: #0f62fe;
  --accent-hover: #0b4fd4;
  --accent-light: #eff6ff;
  --accent-border: #bfdbfe;
  --green: #25d366;
  --green-hover: #1fba59;

  /* ── Borders (progression: soft → standard → emphasis) ── */
  --border-soft: rgba(0,0,0,0.04);
  --border: rgba(0,0,0,0.08);
  --border-emphasis: rgba(0,0,0,0.14);
  --border-focus: rgba(15,98,254,0.35);

  /* ── Depth ── */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.03);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);

  /* ── Spacing scale (4px base) ── */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;

  /* ── Transitions ── */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
}

html { scroll-behavior: smooth; }
body {
  min-height: 100vh; background: var(--bg);
  font-family: 'Inter', system-ui, sans-serif; color: var(--text);
  display: flex; flex-direction: column; align-items: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* ═══ HEADER ═══ */
header {
  width: 100%; padding: 12px 24px;
  background: var(--header-bg); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-logo {
  width: 36px; height: 36px; border-radius: 8px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--accent); font-weight: 900;
}
.header-text { display: flex; flex-direction: column; }
.agent-label { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,0.7); font-weight: 600; }
.agent-name { font-size: 15px; font-weight: 700; }
.theme-toggle {
  background: transparent; border: none; color: #fff;
  cursor: pointer; padding: 6px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.theme-toggle:hover { background: rgba(255,255,255,0.1); }

.wsp-btn {
  background: var(--green); color: #fff; border: none; border-radius: 20px;
  padding: 8px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
  text-decoration: none; display: flex; align-items: center; gap: 8px;
}

/* ═══ PAGE LAYOUT & HERO ═══ */
.page-wrapper {
  width: 100%; position: relative; display: flex; flex-direction: column; align-items: center;
}
.hero-image-container {
  width: 100%; height: 500px; position: absolute; top: 0; left: 0; z-index: 0;
}
.hero-image-container img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
}
.hero-image-container::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to right, rgba(244,247,251,0.95) 0%, rgba(244,247,251,0.7) 40%, transparent 100%);
}
@media (max-width: 768px) {
  .hero-image-container::after {
    background: linear-gradient(to bottom, rgba(244,247,251,0.85) 0%, rgba(244,247,251,0.95) 100%);
  }
}

.content-grid {
  width: 100%; max-width: 900px; position: relative; z-index: 10;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px 20px;
  align-items: flex-start;
}
@media (max-width: 768px) {
  .content-grid { grid-template-columns: 1fr; gap: 20px; padding: 20px 16px; }
}

/* ═══ TEXT SIDE (LEFT) ═══ */
.hero-text-side { padding-top: 20px; }
.progress-meta { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
h1 { font-size: 42px; font-weight: 800; line-height: 1.1; color: var(--title-color); margin-bottom: 16px; letter-spacing: -0.8px; }
h1 em { color: var(--accent); font-style: normal; }
.hero-desc { font-size: 15px; color: var(--text-dim); line-height: 1.65; margin-bottom: 32px; font-weight: 450; }

.trust-features { display: flex; flex-direction: column; gap: 20px; }
.feature-item { display: flex; align-items: flex-start; gap: 14px; }
.feature-icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--accent);
}
.feature-text { display: flex; flex-direction: column; gap: 2px; }
.feature-title { font-size: 14px; font-weight: 700; color: var(--title-color); }
.feature-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ═══ CARD SIDE (RIGHT/BOTTOM) ═══ */
.form-side { display: flex; flex-direction: column; gap: 16px; }

.card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--sp-6); width: 100%;
  box-shadow: var(--shadow-md);
  transition: opacity var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
}
.card.hiding { opacity: 0; transform: translateY(12px); }
.card-header { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: var(--sp-3); }
.card-icon { font-size: 22px; }
.card-title { font-size: 19px; font-weight: 700; color: var(--title-color); letter-spacing: -0.3px; }
.card-sub { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: var(--sp-6); line-height: 1.5; }

/* ═══ CHIPS / GRID ═══ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 10px; }
.chip {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 12px; font-size: 14px; font-weight: 600; color: var(--text);
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all var(--duration-normal) var(--ease-out); box-shadow: var(--shadow-sm);
  position: relative;
}
.chip:hover { border-color: var(--border-emphasis); color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.chip:active { transform: scale(0.97); box-shadow: var(--shadow-sm); }
.chip.selected {
  border-color: var(--accent); background: var(--accent-light); color: var(--accent);
  border-width: 2px; padding: 13px 11px;
  box-shadow: 0 0 0 3px rgba(15,98,254,0.08);
}

/* ═══ UPLOAD ZONE (MOCKUP STYLE) ═══ */
.upload-box {
  border: 1px dashed #94a3b8; border-radius: 12px; padding: 24px 20px;
  text-align: center; cursor: pointer; transition: all 0.2s;
  background: #f8fafc; margin-bottom: 16px; position: relative;
}
.upload-box:hover { border-color: var(--accent); background: var(--accent-light); }
.upload-icon { font-size: 40px; color: var(--accent); margin-bottom: 12px; }
.upload-title { font-size: 15px; font-weight: 700; color: var(--title-color); margin-bottom: 4px; }
.upload-sub { font-size: 13px; color: var(--accent); margin-bottom: 16px; }
.upload-formats { font-size: 11px; color: var(--text-muted); background: #fff; border: 1px solid var(--border); padding: 4px 12px; border-radius: 20px; display: inline-block; }
.privacy-note { font-size: 11px; color: var(--text-muted); text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 16px; }
.tip-box {
  background: var(--accent-light); border-radius: 8px; padding: 12px 16px;
  display: flex; gap: 10px; align-items: flex-start;
}
.tip-icon { font-size: 16px; }
.tip-text { font-size: 12px; color: var(--accent); line-height: 1.4; font-weight: 500; }

/* ═══ FIELDS ═══ */
.field-group { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.field-group.full { grid-template-columns: 1fr; }
.field-wrap { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--title-color); }
.field {
  width: 100%; padding: 13px 16px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 15px; color: var(--text);
  font-family: inherit; transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.field::placeholder { color: var(--text-disabled); }
.field:hover { border-color: var(--border-emphasis); }
.field:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(15,98,254,0.1); background: var(--surface-1); }
.prima-wrap { position: relative; }
.prima-prefix { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 18px; font-weight: 700; color: var(--text-muted); pointer-events: none; }
.prima-field {
  width: 100%; padding: 15px 16px 15px 36px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 20px; font-weight: 700; color: var(--title-color);
  font-family: inherit; transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.prima-field:hover { border-color: var(--border-emphasis); }
.prima-field:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(15,98,254,0.1); background: var(--surface-1); }

/* ═══ BUTTONS ═══ */
.btn-next {
  width: 100%; margin-top: var(--sp-4); padding: 15px;
  background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
  box-shadow: 0 2px 8px rgba(15,98,254,0.2);
  transition: all var(--duration-normal) var(--ease-out);
  letter-spacing: 0.01em;
}
.btn-next:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(15,98,254,0.25); }
.btn-next:active:not(:disabled) { transform: translateY(0); box-shadow: 0 1px 4px rgba(15,98,254,0.2); }
.btn-next:disabled { background: var(--surface-3); color: var(--text-disabled); cursor: not-allowed; box-shadow: none; }

.btn-secondary {
  width: 100%; padding: 13px; margin-top: 10px;
  background: var(--surface-3); color: var(--text-dim); border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: all var(--duration-fast);
}
.btn-secondary:hover { background: var(--surface-2); color: var(--title-color); }
.btn-secondary:active { transform: scale(0.98); }

/* ═══ TRUST FOOTER ═══ */
.trust-footer {
  width: 100%; max-width: 900px; margin: 20px auto 40px; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px;
}
.trust-footer-item { display: flex; align-items: flex-start; gap: 12px; }
.tf-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.tf-text { display: flex; flex-direction: column; gap: 2px; }
.tf-title { font-size: 12px; font-weight: 700; color: var(--title-color); }
.tf-desc { font-size: 11px; color: var(--text-muted); line-height: 1.3; }

.footer-bottom {
  width: 100%; padding: 16px 24px; text-align: center;
  font-size: 13px; font-weight: 600; color: #fff;
  background: var(--header-bg); display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* ═══ RESULTADO & PERFIL ═══ */
.resultado-header { text-align: center; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.resultado-nombre { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.resultado-titulo { font-size: 26px; font-weight: 800; color: var(--title-color); margin-top: 4px; }
.resultado-titulo em { color: var(--accent); font-style: normal; }
.score-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; margin-bottom: 16px; }
.score-card { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; }
.score-card.winner { background: var(--accent-light); border-color: var(--accent-border); }
.score-card-name { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; letter-spacing: 1px; }
.score-num { font-size: 32px; font-weight: 800; line-height: 1; margin-bottom: 10px; }
.score-num.bad { color: #f59e0b; }
.score-num.good { color: var(--accent); }
.score-track { height: 6px; background: #e2e8f0; border-radius: 6px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 6px; }
.score-fill.bad { background: #f59e0b; }
.score-fill.good { background: var(--accent); }
.ahorro-real { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 16px; padding: 24px; text-align: center; margin-bottom: 24px; }
.ahorro-label-sm { font-size: 12px; font-weight: 700; color: #16a34a; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.ahorro-monto { font-size: 40px; font-weight: 900; color: #16a34a; line-height: 1; margin-bottom: 6px; }
.ahorro-sub { font-size: 13px; color: #15803d; margin-bottom: 14px; }
.ahorro-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #dcfce7; font-size: 14px; }
.ahorro-row:last-child { border-bottom: none; padding-bottom: 0; }
.ahorro-row-label { color: #166534; font-weight: 500; }
.ahorro-row-val { font-weight: 700; color: #16a34a; }
.section-title { font-size: 18px; font-weight: 800; color: var(--title-color); margin-bottom: 14px; margin-top: 28px; }

/* ═══ CLINICAS ═══ */
.clinicas-section { margin-top: 28px; margin-bottom: 20px; }
.clinicas-header { text-align: center; margin-bottom: 16px; }
.clinicas-title { font-size: 18px; font-weight: 800; color: var(--title-color); }
.clinicas-sub { font-size: 13px; color: var(--text-muted); }
.clinicas-slider { display: flex; overflow-x: auto; gap: 14px; padding-bottom: 12px; scrollbar-width: none; }
.clinicas-slider::-webkit-scrollbar { display: none; }
.clinica-card {
  min-width: 140px; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; text-align: center; flex-shrink: 0;
  box-shadow: var(--shadow-sm); transition: transform 0.2s, box-shadow 0.2s;
}
.clinica-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.clinica-icon-img { width: 48px; height: 48px; object-fit: contain; margin-bottom: 10px; }
.clinica-nombre { font-size: 13px; font-weight: 700; color: var(--title-color); margin-bottom: 3px; }
.clinica-desc { font-size: 10px; color: var(--text-muted); line-height: 1.4; }

/* ═══ CARTOLA / IMC / PREX ═══ */
.cartola-resultado { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 16px; display: flex; gap: 14px; margin-bottom: 20px; }
.cartola-resultado-icon { font-size: 24px; }
.cartola-resultado-text { font-size: 13px; color: #166534; line-height: 1.5; }
.imc-card { border: 1px solid; border-radius: 12px; padding: 16px; margin-bottom: 20px; }
.imc-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.imc-card-title { font-size: 14px; font-weight: 700; color: var(--title-color); }
.imc-card-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.imc-bar-wrap { height: 6px; background: rgba(0,0,0,0.05); border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.imc-bar-fill { height: 100%; border-radius: 6px; }
.imc-note { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.prex-wrap { margin-bottom: 20px; }
.prex-item { display: flex; align-items: flex-start; gap: 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; margin-bottom: 10px; }
.prex-icon { font-size: 24px; }
.prex-cond { font-size: 14px; font-weight: 700; color: var(--title-color); margin-bottom: 3px; }
.prex-desc { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.perdido-item { display: flex; align-items: flex-start; gap: 14px; background: #fff5f5; border: 1px solid #fed7d7; border-radius: 12px; padding: 16px; margin-bottom: 10px; }
.perdido-icon { font-size: 24px; }
.perdido-nombre { font-size: 14px; font-weight: 700; color: #9b2c2c; margin-bottom: 3px; }
.perdido-desc { font-size: 12px; color: #c53030; line-height: 1.5; }

/* ═══ PROFILE & DISCLAIMER ═══ */
.profile-card { background: #f8fafc; border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin-top: 24px; margin-bottom: 20px; }
.profile-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.profile-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text); }
.profile-row:last-child { border-bottom: none; }
.disclaimer { font-size: 12px; color: #92400e; line-height: 1.6; padding: 14px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; margin-bottom: 20px; }
.wsp-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 18px;
  background: var(--green); color: #fff; border-radius: 12px;
  font-size: 15px; font-weight: 700; text-decoration: none;
  box-shadow: 0 4px 16px rgba(37,211,102,0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}
.wsp-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(37,211,102,0.3); }
.cta-sub { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 10px; margin-bottom: 30px; }

/* ═══ FAQ ═══ */
details { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; }
details summary { font-size: 14px; font-weight: 600; cursor: pointer; color: var(--title-color); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details[open] summary { color: var(--accent); margin-bottom: 8px; }
details p { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin-top: 10px; }

/* ═══ PROGRESS BAR ═══ */
.progress-bar-wrap {
  width: 100%; height: 6px; background: #e2e8f0; border-radius: 6px;
  overflow: hidden; margin-bottom: 16px;
}
.progress-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), #38bdf8);
  border-radius: 6px; transition: width 0.5s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.progress-bar-fill::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.progress-text {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
.time-estimate {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-light); border: 1px solid var(--accent-border);
  padding: 4px 12px; border-radius: 20px; margin-bottom: 16px;
}

/* ═══ FLOATING WHATSAPP FAB ═══ */
.wsp-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.35), 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  animation: fabPulse 3s ease-in-out infinite;
}
.wsp-fab:hover {
  transform: scale(1.1); 
  box-shadow: 0 6px 24px rgba(37,211,102,0.45), 0 4px 8px rgba(0,0,0,0.15);
}
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(37,211,102,0.35); }
  50% { box-shadow: 0 4px 24px rgba(37,211,102,0.55), 0 0 0 8px rgba(37,211,102,0.1); }
}

/* ═══ SOCIAL PROOF ═══ */
.social-proof {
  width: 100%; max-width: 900px; margin: 0 auto 20px; padding: 0 20px;
}
.social-proof-counter {
  text-align: center; padding: 28px 20px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent-light), #f0fdf4);
  border: 1px solid var(--accent-border); border-radius: var(--radius);
}
.sp-number {
  font-size: 42px; font-weight: 900; color: var(--accent);
  line-height: 1; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent), #16a34a);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sp-label { font-size: 14px; font-weight: 600; color: var(--text-dim); }
.sp-testimonials.carousel {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch; gap: 16px;
  padding-bottom: 16px; /* space for scrollbar */
}
.sp-testimonials.carousel::-webkit-scrollbar { height: 6px; }
.sp-testimonials.carousel::-webkit-scrollbar-track { background: var(--border-soft); border-radius: 4px; }
.sp-testimonials.carousel::-webkit-scrollbar-thumb { background: var(--border-emphasis); border-radius: 4px; }

.sp-testimonial {
  flex: 0 0 340px; scroll-snap-align: start;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm); transition: transform 0.3s, box-shadow 0.3s;
}
.sp-testimonial:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.sp-stars { font-size: 14px; margin-bottom: 10px; }
.sp-quote {
  font-size: 13px; color: var(--text); line-height: 1.6;
  font-style: italic; margin-bottom: 10px;
}
.sp-author { font-size: 12px; font-weight: 700; color: var(--text-muted); }

/* ═══ BACK BUTTON ═══ */
.btn-back {
  width: 100%; padding: 12px; margin-top: 8px;
  background: transparent; color: var(--text-muted); border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  font-family: inherit;
}
.btn-back:hover { background: #f1f5f9; color: var(--title-color); border-color: var(--accent-border); }

/* ═══ HERO ANIMATION ═══ */
.hero-image-container img {
  animation: heroFadeIn 1.2s ease both;
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1); }
}

/* ═══ IMPROVED STEP TRANSITIONS ═══ */
.card {
  animation: slideIn 0.4s cubic-bezier(.4,0,.2,1) both;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.card.hiding { 
  animation: slideOut 0.25s ease forwards;
}
@keyframes slideOut {
  to { opacity: 0; transform: translateY(-12px) scale(0.98); }
}

/* ═══ ANIMATIONS ═══ */
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeSlideUp 0.4s ease both; }

/* ═══ IMPROVED CHIP ANIMATIONS ═══ */
.chip {
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
}
.chip:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.chip.selected {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(15,98,254,0.15);
}

/* ═══ FOCUS & ACCESSIBILITY ═══ */
.chip:focus-visible, .btn-next:focus-visible, .btn-back:focus-visible, .field:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
details summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ═══ IMC LIVE PREVIEW ═══ */
.imc-live {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 12px; margin: 14px 0;
}
.imc-live .imc-icon { font-size: 24px; }
.imc-live .imc-value { font-size: 22px; font-weight: 800; }
.imc-live .imc-label { font-size: 12px; color: var(--text-muted); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
  .content-grid { gap: 28px; padding: 30px 20px; }
}
@media (max-width: 768px) {
  /* Hero: minimal */
  .hero-image-container { height: 180px; }
  .hero-image-container::after {
    background: linear-gradient(to bottom, rgba(244,247,251,0.6) 0%, var(--bg) 100%) !important;
  }
  
  /* Layout: single column, tight */
  .content-grid { padding: 16px 14px; gap: 12px; }
  h1 { font-size: 24px; margin-bottom: 8px; }
  
  /* Hide decorative stuff on mobile */
  .hero-desc { display: none; }
  .trust-features { display: none; }
  .social-proof { display: none; }
  .trust-footer { display: none; }
  
  /* Card: full focus */
  .card { padding: 18px 14px; border-radius: 10px; }
  .card-title { font-size: 17px; }
  .card-sub { font-size: 12px; margin-bottom: 16px; }
  
  /* Hero text side: compact */
  .hero-text-side { padding-top: 4px; }
  .progress-text { font-size: 10px; margin-bottom: 4px; }
  .progress-bar-wrap { margin-bottom: 10px; }
  .time-estimate { font-size: 11px; padding: 3px 10px; margin-bottom: 10px; }
  
  /* Chips & buttons */
  .grid-2 { gap: 8px; }
  .chip { padding: 12px 10px; font-size: 13px; }
  .btn-next { padding: 14px; font-size: 14px; margin-top: 12px; }
  .btn-back { padding: 10px; font-size: 13px; margin-top: 6px; }
  
  /* FAB */
  .wsp-fab { bottom: 16px; right: 16px; width: 50px; height: 50px; }
  .wsp-fab svg { width: 24px; height: 24px; }
  
  /* Footer */
  .footer-bottom { font-size: 11px; padding: 12px 16px; }
  
  /* Testimonials carousel width on mobile */
  .sp-testimonial { flex: 0 0 85%; }
}

@media (max-width: 400px) {
  h1 { font-size: 22px; }
  .card { padding: 16px 12px; }
  .chip { padding: 10px 8px; font-size: 12px; }
  .field { padding: 12px 14px; font-size: 14px; }
  .prima-field { padding: 14px 14px 14px 34px; font-size: 18px; }
  .header-logo { width: 30px; height: 30px; font-size: 16px; }
  .agent-name { font-size: 13px; }
  .wsp-btn { padding: 6px 12px; font-size: 12px; }
}

/* ═══ DARK MODE ═══ */
[data-theme="dark"] {
  --bg: #0f172a;
    --surface-0: #0f172a;
    --surface-1: #1e293b;
    --surface-2: #162032;
    --surface-3: #253449;
    --card-bg: var(--surface-1);
    --header-bg: #020617;
    --title-color: #f1f5f9;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-light: rgba(59,130,246,0.1);
    --accent-border: rgba(59,130,246,0.25);
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --text-muted: #64748b;
    --text-disabled: #475569;
    --border-soft: rgba(255,255,255,0.04);
    --border: rgba(255,255,255,0.08);
    --border-emphasis: rgba(255,255,255,0.14);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  }
  .hero-image-container::after {
    background: linear-gradient(to right, rgba(15,23,42,0.95) 0%, rgba(15,23,42,0.7) 40%, transparent 100%) !important;
  }
  .upload-box { background: var(--surface-2); border-color: var(--border-emphasis); }
  .upload-box:hover { background: rgba(59,130,246,0.08); }
  .social-proof-counter { background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(22,163,106,0.08)); }
  .sp-testimonial { background: var(--surface-1); }
  .ahorro-real { background: rgba(22,163,106,0.06); border-color: rgba(22,163,106,0.15); }
  .disclaimer { background: rgba(146,64,14,0.08); border-color: rgba(253,230,138,0.15); color: #fbbf24; }
  details { background: var(--surface-1); border-color: var(--border); }
  .profile-card { background: var(--surface-0); }
  .score-card { background: var(--surface-0); }
  .clinica-card { background: var(--surface-1); }
  .prex-item { background: var(--surface-0); border-color: var(--border); }
  .perdido-item { background: rgba(239,68,68,0.04); border-color: rgba(239,68,68,0.12); }
  .footer-bottom { background: #020617; }

@media (max-width: 768px) {
  [data-theme="dark"] .hero-image-container::after {
    background: linear-gradient(to bottom, rgba(15,23,42,0.85) 0%, rgba(15,23,42,0.95) 100%) !important;
  }
}
