/* ============================================================
   funnel.css — Sistema de diseño del portal de contratación
   Paleta: Naranja #FF560C  |  Azul oscuro #061640  |  Azul claro #F2F5FA  |  Amarillo #F8CD00  |  Gris #666666
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@font-face {
  font-family: 'Omnes';
  src: url('../fonts/Omnes Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Omnes';
  src: url('../fonts/Omnes Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Omnes';
  src: url('../fonts/Omnes SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Omnes';
  src: url('../fonts/Omnes Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Omnes';
  src: url('../fonts/Omnes Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
}

:root {
  --color-primary:    #FF560C;
  --color-primary-d:  #D94700;
  --color-navy:       #061640;
  --color-navy-light: #0a2258;
  --color-bg:         #F2F5FA;
  --color-white:      #ffffff;
  --color-border:     #E1E1E1;
  --color-text:       #061640;
  --color-muted:      #666666;
  --color-error:      #D93025;
  --color-success:    #1E8E3E;
  --color-warning-bg: #FFF8D6;
  --color-warning:    #F8CD00;
  --radius:           40px;
  --radius-sm:        20px;
  --shadow:           0 2px 10px rgba(0,0,0,0.05);
  --shadow-md:        0 10px 30px rgba(0,0,0,0.1);
  --transition:       all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font:             'Omnes', system-ui, -apple-system, sans-serif;
  --bg-gradient:      linear-gradient(180deg, #FFFFFF 0%, #F2F5FA 100%);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-gradient);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

/* ── Header ───────────────────────────────────────────────── */
.header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: .875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.header__logo-icon { width: 32px; height: 32px; }
.header__logo-img { height: 60px; width: auto; display: block; }

.header__brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: -.01em;
}

.btn-llamada {
  display: flex;
  align-items: center;
  gap: .375rem;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 999px;
  padding: .5rem 1.125rem;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.btn-llamada:hover { background: var(--color-primary-d); transform: translateY(-1px); }

/* ── Stepper ──────────────────────────────────────────────── */
.stepper {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
}

.stepper__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
}

.stepper__step {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.stepper__circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8125rem;
  border: 2px solid var(--color-border);
  color: var(--color-muted);
  background: var(--color-white);
  transition: all var(--transition);
}

.stepper__label {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: color var(--transition);
  white-space: nowrap;
}

.stepper__connector {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  margin: 0 .75rem;
  transition: background var(--transition);
}

/* Active step */
.stepper__step--active .stepper__circle {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 0 0 4px rgba(255,86,12,.2);
}
.stepper__step--active .stepper__label { color: var(--color-primary); font-weight: 600; }

/* Done step */
.stepper__step--done .stepper__circle {
  background: var(--color-success);
  border-color: var(--color-success);
  color: var(--color-white);
}
.stepper__step--done .stepper__label { color: var(--color-success); }
.stepper__step--done + .stepper__connector { background: var(--color-success); }
.stepper__step--done {
  cursor: pointer;
}
.stepper__step--done:hover .stepper__circle {
  opacity: 0.85;
  transform: scale(1.08);
}
.stepper__step--done:hover .stepper__label {
  text-decoration: underline;
}

/* ── Layout ───────────────────────────────────────────────── */
.layout {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .price-sidebar { order: -1; }
}

/* ── Form Area / Step Panels ──────────────────────────────── */
.form-area {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.step-panel { animation: fadeIn .3s ease; }
.step-panel.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-panel__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--color-bg);
}

/* ── Form Grid ────────────────────────────────────────────── */
.form-row { margin-bottom: 1rem; }
.form-row--2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row--4col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

@media (max-width: 600px) {
  .form-row--2col, .form-row--4col { grid-template-columns: 1fr; }
}

/* ── Segmented Control ────────────────────────────────────── */
.segmented-control {
  position: relative;
  display: flex;
  background: #f0f2f7;
  border-radius: 999px;
  padding: 3px;
  margin: 0.25rem 0;
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
  max-width: 100%;
  width: 100%;
}

.segmented-control__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.segmented-control__label {
  position: relative;
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-navy);
  cursor: pointer;
  z-index: 2;
  transition: color 0.3s var(--transition);
  border-radius: 999px;
}

.segmented-control__label:hover {
  color: var(--color-primary);
}

.segmented-control__input:checked + .segmented-control__label {
  color: var(--color-white);
}

.segmented-control__slider {
  position: absolute;
  top: 3px;
  left: 3px;
  height: calc(100% - 6px);
  width: calc(50% - 3px);
  background: var(--color-navy);
  border-radius: 999px;
  transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  z-index: 1;
  box-shadow: 0 4px 10px rgba(6, 22, 64, 0.2);
}

#tipo-residencial:checked ~ .segmented-control__slider { transform: translateX(0); }
#tipo-autonomo:checked ~ .segmented-control__slider { transform: translateX(100%); }
#view-user:checked ~ .segmented-control__slider { transform: translateX(0); }
#view-it:checked ~ .segmented-control__slider { transform: translateX(100%); }
#view-precios:checked ~ .segmented-control__slider { transform: translateX(200%); }
#view-config:checked ~ .segmented-control__slider { transform: translateX(300%); }

@media (max-width: 480px) {
  .segmented-control { flex-direction: row; border-radius: var(--radius-sm); max-width: 100%; }
  .segmented-control__label { font-size: 0.8rem; padding: 0.5rem 0.25rem; }
  .segmented-control__slider { display: none; }
  .segmented-control__input:checked + .segmented-control__label {
    background: var(--color-navy);
  }
}

/* ── Field ────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: .25rem; }

.field__label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-navy);
}

.field__required { color: var(--color-primary); }

.field__input {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: .875rem 1.125rem;
  font-size: 1.0625rem;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-white);
  transition: var(--transition);
  width: 100%;
}

.field__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(255, 86, 12, 0.1);
}

.field__input:disabled, .field__input[disabled] {
  background: var(--color-bg);
  cursor: not-allowed;
  opacity: .7;
}

.field__input--error { border-color: var(--color-error) !important; }

.field__error {
  font-size: .8125rem;
  color: var(--color-error);
  min-height: 1.1em;
}

/* Error destacado para avisos importantes (ej: CUPS de electricidad) */
.field__error--warning {
  background: #FFF3E0;
  border-left: 3px solid var(--color-primary);
  border-radius: 6px;
  padding: .5rem .75rem;
  color: #B84300;
  font-size: .875rem;
  font-weight: 500;
  margin-top: .25rem;
}

.field__hint {
  font-size: .8rem;
  color: var(--color-muted);
}

.field__input-group {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.field__status { font-size: 1rem; }

/* ── Checkbox ─────────────────────────────────────────────── */
.check-field { margin: 1rem 0; }
.check-field__label {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  cursor: pointer;
  font-size: .9rem;
}
.check-field__input {
  appearance: none;
  -webkit-appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  margin-top: .1rem;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.check-field__input:checked {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%23FF560C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") center/85% no-repeat;
  border-color: var(--color-primary);
}
.check-field__input:checked::after {
  display: none;
}
.check-field__input:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ── Info Box ─────────────────────────────────────────────── */
.info-box {
  background: #EBF5FB;
  border-left: 4px solid #2E86C1;
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-size: .875rem;
  color: #1A5276;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
}

/* ── Alert ────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  margin: .75rem 0;
}
.alert--warning { background: var(--color-warning-bg); color: #7D5D00; border-left: 4px solid var(--color-warning); }

/* ── Código Amigo ─────────────────────────────────────────── */
.codigo-amigo-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--color-border);
}
.section-subtitle { font-size: .9375rem; font-weight: 600; color: var(--color-navy); margin-bottom: .75rem; }
.field--inline { flex-direction: row !important; align-items: center; gap: .625rem; }
.field--inline .field__input { flex: 1; }

.codigo-amigo-resultado {
  margin-top: .5rem;
  font-size: .875rem;
  font-weight: 600;
  padding: .5rem .875rem;
  border-radius: var(--radius-sm);
}
.codigo-amigo-resultado--ok { background: #E8F5E9; color: var(--color-success); }
.codigo-amigo-resultado--ko { background: #FDECEA; color: var(--color-error); }

/* ── Tooltip button ───────────────────────────────────────── */
.tooltip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-muted);
  color: var(--color-white);
  font-size: .7rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  margin-left: .25rem;
  vertical-align: middle;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
  padding: .875rem 2rem;
  font-size: 1.0625rem;
  border-radius: 999px; /* Pill shape like corporate site */
}
.btn--primary:hover { 
  background: var(--color-primary-d); 
  transform: translateY(-2px); 
  box-shadow: 0 4px 15px rgba(255,86,12,0.3);
}
.btn--primary:disabled { background: #E1E1E1; color: #999; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--secondary {
  background: transparent;
  color: var(--color-navy);
  border: 1.5px solid var(--color-border);
}
.btn--secondary:hover { background: var(--color-bg); }

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  padding: .6rem 1rem;
}
.btn--outline:hover { background: rgba(255,86,12,.06); }

.btn--cta {
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 1.1875rem;
  padding: 1.125rem;
  width: 100%;
  border-radius: 999px;
  justify-content: center;
}
.btn--cta:hover { 
  background: var(--color-primary-d); 
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,86,12,0.4);
}

/* ── Step Actions ─────────────────────────────────────────── */
.step-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-bg);
}
.step-actions--center { justify-content: center; }

/* ── Inline message ─────────────────────────────────────────*/
.mensaje-inline {
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-size: .875rem;
  margin-top: .75rem;
}
.mensaje-inline--error { background: #FDECEA; color: var(--color-error); border-left: 4px solid var(--color-error); }
.mensaje-inline--ok    { background: #E8F5E9; color: var(--color-success); border-left: 4px solid var(--color-success); }

/* ── Resumen card (paso 4) ─────────────────────────────────*/
.resumen-card {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: .9rem;
  line-height: 2;
}
.resumen-card strong { color: var(--color-navy); }

/* ── Pantalla final ───────────────────────────────────────── */
.pantalla-final { text-align: center; padding: 3rem 1.5rem; }
.pantalla-final__icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.25rem;
}
.pantalla-final__icon--ok    { background: #E8F5E9; color: var(--color-success); }
.pantalla-final__icon--error { background: #FDECEA; color: var(--color-error); }
.pantalla-final h2 { font-size: 1.5rem; color: var(--color-navy); margin-bottom: .5rem; }
.pantalla-final p  { color: var(--color-muted); }

/* ── Price Sidebar ────────────────────────────────────────── */
.price-sidebar { position: sticky; top: 80px; }

.price-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-white);
}

.price-card__header {
  display: flex;
  align-items: center;
  gap: .875rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.price-card__icon { width: 36px; height: 36px; }

.price-card__label { font-size: .75rem; color: var(--color-muted); font-weight: 500; }

.price-card__name { font-size: 1rem; font-weight: 700; color: var(--color-navy); }

/* toggle impuestos */
.price-card__toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  margin-bottom: 1rem;
  font-size: .8125rem;
  color: var(--color-muted);
}
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle__slider {
  position: absolute; inset: 0;
  background: var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition);
}
.toggle__slider::before {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
}
.toggle input:checked + .toggle__slider { background: var(--color-primary); }
.toggle input:checked + .toggle__slider::before { transform: translateX(18px); }

.price-line {
  display: flex;
  align-items: baseline;
  gap: .375rem;
  padding: .5rem 0;
  border-bottom: none;
}
.price-line:last-child { border-bottom: none; }
.price-line__label { font-size: .8125rem; color: var(--color-muted); flex: 1; }
.price-line__value { font-size: 1.125rem; font-weight: 700; color: var(--color-primary); display: flex; align-items: baseline; gap: 0.25rem;}
.price-line__value--strikethrough {
  text-decoration: line-through;
  color: var(--color-muted);
  font-size: 0.85em;
  font-weight: 500;
}
.price-line__unit  { font-size: .75rem; color: #FF560C; }

.discount-badge {
  display: inline-block;
  background: rgba(255,86,12,.15);
  color: var(--color-primary-d);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  letter-spacing: -0.02em;
}
.discount-badge--promo {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
}

.price-card__bullets {
  list-style: none;
  padding: 1rem 0 0.5rem 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.price-card__bullet {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--color-navy);
}

.price-card__bullet-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.price-card__bullet::before {
  display: none;
}

.price-card__seguridad {
  margin-top: 1rem;
  padding-top: .875rem;
  border-top: 1px solid var(--color-bg);
  font-size: .8rem;
  color: var(--color-muted);
  text-align: center;
}

/* ── Utility ──────────────────────────────────────────────── */
.hidden { display: none !important; }

/* Loading spinner inside buttons */
.btn--loading {
  pointer-events: none;
  opacity: .8;
}

/* ── Accessibility focus visible ──────────────────────────── */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ── SIPS Loading Overlay ─────────────────────────────── */
.sips-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(3px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
}
.sips-overlay.hidden { display: none; }

.sips-overlay__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 2.5rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  text-align: center;
}

.sips-overlay__spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f0f0f0;
  border-top-color: var(--color-primary, #FF560C);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.sips-overlay__text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-navy, #1a1a2e);
  margin: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.step-panel { position: relative; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
   ══════════════════════════════════════════════════════════ */

@media (max-width: 600px) {

  /* Header */
  .header__inner { padding: .75rem 1rem; }
  .header__brand-name { font-size: 1rem; }
  .btn-llamada span { display: none; } /* solo icono en móvil */
  .btn-llamada { padding: .5rem .75rem; }

  /* Stepper: ocultar labels, solo círculos */
  .stepper { padding: .75rem 1rem; }
  .stepper__label { display: none; }
  .stepper__step--active .stepper__label { display: block; font-size: .75rem; }
  .stepper__circle { width: 28px; height: 28px; font-size: .75rem; }
  .stepper__connector { margin: 0 .375rem; }

  /* Layout */
  .layout { margin: 1rem auto; padding: 0 .75rem; gap: 1rem; }

  /* Form area */
  .form-area { padding: 1.25rem 1rem; border-radius: .75rem; }
  .step-panel__title { font-size: 1.5rem; }

  /* Grids de formulario */
  .form-row--2col,
  .form-row--4col { grid-template-columns: 1fr; }

  /* Segmented control (tipo cliente) */
  .segmented-control { width: 100%; }
  .segmented-control__option { flex: 1; text-align: center; }

  /* Botones de acción */
  .step-actions { flex-direction: row; gap: .75rem; }
  .step-actions .btn { width: auto; justify-content: center; }
  .step-actions .btn--primary { flex: 1; }
  .step-actions .btn--back { flex: 0 0 auto; padding-left: 1rem; padding-right: 1rem; }
  .btn__back-label { display: none; }

  /* Price sidebar en móvil: compacto */
  .price-card { padding: 1rem; }
  .price-card__header { gap: .5rem; }
  .price-card__name { font-size: .9rem; }
  .price-card__bullets { display: none; } /* ocultar bullets en móvil para ahorrar espacio */
  .price-card__seguridad { font-size: .7rem; }
  .price-card__header { display: none; } /* nombre ya aparece en el botón toggle */

  /* SIPS overlay */
  .sips-overlay__box { padding: 1.5rem 1.25rem; margin: 0 1rem; }

  /* Info box */
  .info-box { font-size: .8rem; padding: .625rem .875rem; }

  /* Campos inline */
  .field--inline { flex-direction: column; align-items: flex-start; }
  .field--inline .field__input { width: 100%; }

  /* Campos más compactos en móvil */
  .field { gap: 0.1rem; }
  .field__label { font-size: 0.8rem; }
  .field__input { padding: 0.55rem 0.875rem; font-size: 0.9rem; }
  .field__error { font-size: 0.75rem; min-height: 0; }
  .form-area { gap: 0.4rem; }

  /* Mensajes */
  .mensaje-inline { font-size: .85rem; }
}

@media (max-width: 380px) {
  .header__brand-name { display: none; }
  .layout { padding: 0 .5rem; }
  .form-area { padding: 1rem .75rem; }
}

/* ── Price toggle (mobile only) ──────────────────────────── */
.price-toggle-btn {
  display: none; /* oculto en desktop */
}

@media (max-width: 820px) {
  /* La sidebar deja de ser sticky y se convierte en bloque colapsable */
  .price-sidebar {
    position: static !important;
    order: 2;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  /* Botón toggle fijo en la parte inferior de la pantalla */
  .price-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: 0.75rem;
    left: 1rem;
    right: 1rem;
    z-index: 200;
    width: auto;
    padding: .875rem 1.25rem;
    background: #FF560C;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    color: #ffffff;
    gap: .5rem;
    box-shadow: 0 4px 16px rgba(255,86,12,0.45);
  }

  /* Añadir padding al body para que el contenido no quede tapado */
  .funnel-layout, .layout {
    padding-bottom: 60px;
  }

  .price-toggle-btn__left {
    display: flex;
    align-items: center;
    gap: .5rem;
  }

  .price-toggle-btn__right {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #ffffff;
    font-weight: 700;
  }

  .price-toggle-btn__chevron {
    transition: transform .25s ease;
  }

  .price-toggle-btn[aria-expanded="true"] .price-toggle-btn__chevron {
    transform: rotate(180deg);
  }

  /* Price card: panel desplegable sobre el botón fijo */
  .price-card {
    display: none;
    position: fixed;
    bottom: 4.5rem;
    left: 1rem;
    right: 1rem;
    z-index: 199;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    border-radius: 1.25rem;
    max-height: 70vh;
    overflow-y: auto;
    padding: 1rem;
  }

  .price-card.is-open {
    display: block;
  }
}

/* ── Fecha nacimiento (3 selectores) ─────────────────────── */
.fecha-nac-group {
  display: grid;
  grid-template-columns: 80px 1fr 100px;
  gap: .5rem;
}
@media (max-width: 400px) {
  .fecha-nac-group { grid-template-columns: 1fr 1fr 1fr; }
}

/* ── Footer Condiciones ──────────────────────────────────── */
.conditions-footer {
  background: #061640;
  color: white;
  padding: 1.5rem 2rem;
  font-size: 0.8rem;
  line-height: 1.6;
}

.conditions-footer__content {
  max-width: 1100px;
  margin: 0 auto;
  text-align: justify;
  color: rgba(255, 255, 255, 0.85);
}

.conditions-footer__content p {
  margin: 0;
}

@media (max-width: 768px) {
  .conditions-footer {
    padding: 1rem 1rem;
    font-size: 0.75rem;
  }
  .conditions-footer__content {
    text-align: left;
  }
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: linear-gradient(90deg, #FF560C 0%, #FF8C00 50%, #F8CD00 100%);
  color: white;
  margin-top: auto;
  font-size: 0.875rem;
}

.site-footer__top {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.9rem 2rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-footer__left {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.95;
}

.site-footer__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-footer__trustpilot {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #1a1a1a;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  background: white;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  transition: background 0.2s;
}

.site-footer__trustpilot:hover {
  background: #f0f0f0;
}

.site-footer__social {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
}

.site-footer__social a {
  color: white;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
}

.site-footer__social a:hover {
  opacity: 1;
  transform: scale(1.15);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  padding: 0.6rem 2rem;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.08);
}

.site-footer__bottom a {
  color: white;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.site-footer__bottom a:hover {
  opacity: 1;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .site-footer__top {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }
  .site-footer__bottom {
    padding: 0.6rem 1rem;
    gap: 0.25rem 0.75rem;
  }
  .site-footer__conditions p {
    margin-left: 0.75rem !important;
    margin-right: 0.75rem !important;
  }
}

/* ── Price card: botones de condiciones ─────────────────── */
.price-card__links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.75rem 1rem 0.25rem;
  border-top: 1px solid var(--color-border);
  margin-top: 0.75rem;
}

.price-card__link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--color-navy);
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s;
}

.price-card__link:hover {
  color: var(--color-primary);
}

/* ── Modal condiciones ───────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-condiciones {
  background: white;
  border-radius: var(--radius-sm);
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-condiciones__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.modal-condiciones__header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}

.modal-condiciones__close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--color-muted);
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.modal-condiciones__close:hover {
  color: var(--color-text);
}

.modal-condiciones__body {
  padding: 1.5rem;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-text);
}

.modal-condiciones__body p {
  margin: 0 0 1rem;
}

.modal-condiciones__body p:last-child {
  margin-bottom: 0;
}

/* ── Banner general del funnel ───────────────────────────── */
.funnel-banner {
  background: linear-gradient(90deg, #FF560C 0%, #FF8C00 50%, #F8CD00 100%);
  color: white;
  text-align: center;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.funnel-banner strong {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.funnel-banner span {
  font-size: 1.125rem;
  opacity: 0.9;
}

/* ── Introducción de cada paso ───────────────────────────── */
.step-intro {
  margin-bottom: 1.5rem;
}

.step-intro .step-panel__title {
  margin-bottom: 0.35rem;
  border-bottom: none;
  padding-bottom: 0;
}

.step-intro__desc {
  font-size: 16px;
  color: var(--color-muted);
  margin: 0;
  line-height: 1.5;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--color-bg);
}

/* ── Price line: nuevo layout apilado ───────────────────── */
.price-line--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.75rem;
  background: #F2F5FA;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.price-line__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
}

.price-line__label--bold {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--color-navy);
  font-size: 0.875rem;
}

.price-line__value--stacked {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.price-line__value--stacked > span:first-child {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-primary);
}

.price-line__value--stacked .price-line__value--strikethrough {
  font-size: 0.8rem;
  color: var(--color-muted);
  text-decoration: line-through;
  font-weight: 400;
}

/* Toggle debajo de precios: más compacto */
.price-card__toggle {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

/* ── Descripción de tarifa en price card ─────────────────── */
.price-card__descripcion {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.5;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 107, 26, 0.07);
  margin-top: 0.25rem;
}
}

/* ── Disclaimer para precios indexados ──────────────────── */
.price-card__disclaimer {
  font-size: 0.8rem;
  color: #999;
  line-height: 1.4;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}

/* ── Resumen paso 4 ──────────────────────────────────────── */
.resumen-datos-grid {
  background: #F2F5FA;
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.resumen-fila {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding-bottom: 0.5rem;
}

.resumen-fila:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.resumen-label {
  color: var(--color-muted);
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.resumen-valor {
  color: var(--color-navy);
  text-align: right;
  word-break: break-word;
}


/* ── Scoring Banner & Spinner ─────────────────────────────── */
.scoring-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  background-color: #E8F4F8;
  border-left: 4px solid var(--color-primary);
  border-radius: 0.5rem;
  font-size: 0.95rem;
  color: var(--color-navy);
}

.scoring-banner__spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #D0E8F2;
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.scoring-banner__text {
  font-weight: 500;
}

.scoring-result {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
}

.scoring-result.hidden {
  display: none;
}

.hidden {
  display: none !important;
}


/* ── Button Disabled State ────────────────────────────────── */
button:disabled,
.btn:disabled,
.btn--cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #CCCCCC !important;
  color: #666666 !important;
  border-color: #CCCCCC !important;
  pointer-events: none;
}

button:disabled:hover,
.btn:disabled:hover,
.btn--cta:disabled:hover {
  background-color: #CCCCCC !important;
  transform: none;
}
