/**
 * ESTILOS DE LA CALCULADORA - TU CASA CON CATA (ArkiBuilders)
 * Paleta de marca de alta gama, tipografía Montserrat, diseño mobile-first.
 */

:root {
  /* Paleta Oficial */
  --teal-100: #9AD5D6;
  --teal-200: #7BCACA;
  --teal-300: #5FBDBD;
  --teal-500: #11918F;
  --teal-700: #0D6E6D;
  --teal-900: #07585A;
  
  --ink: #0B2F30;
  --ink-soft: #234E4F;
  --ink-muted: #5C7E7F;
  
  --paper: #F7FAFA;
  --white: #FFFFFF;
  --card-bg: #FFFFFF;
  --border-light: #E2ECEC;
  --border-focus: #5FBDBD;
  
  --gold-accent: #C5A059;
  --success: #059669;
  --error: #DC2626;

  /* Sombras y elevaciones */
  --shadow-sm: 0 2px 8px rgba(11, 47, 48, 0.04);
  --shadow-md: 0 8px 24px rgba(11, 47, 48, 0.08);
  --shadow-lg: 0 16px 40px rgba(11, 47, 48, 0.12);
  --shadow-glow: 0 0 0 3px rgba(17, 145, 143, 0.2);

  /* Radios */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transiciones */
  --transition-fast: 0.18s ease-out;
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset y caja */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Contenedor central */
.calculator-wrapper {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  padding: 1rem 1rem 3rem 1rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ================= ENCABEZADO Y MARCA ================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 250, 250, 0.95);
  backdrop-filter: blur(8px);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal-900);
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal-900);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-icon-pill:hover, .btn-icon-pill:focus-visible {
  border-color: var(--teal-500);
  background: var(--teal-100);
  outline: none;
}

.btn-icon-pill .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--teal-900);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
}

.btn-text-muted {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  text-decoration: underline;
  transition: var(--transition-fast);
}

.btn-text-muted:hover {
  color: var(--error);
}

/* Barra de Progreso */
.progress-bar-wrapper {
  margin-top: 0.85rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal-900);
  margin-bottom: 0.35rem;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-300), var(--teal-500));
  border-radius: var(--radius-full);
  transition: width 0.35s ease;
}

/* ================= PASOS Y TARJETAS ================= */
.app-main {
  flex: 1;
}

.wizard-step {
  animation: fadeIn 0.3s ease-out;
}

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

.step-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.step-header {
  margin-bottom: 1.75rem;
}

.step-counter-chip {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background: var(--teal-100);
  color: var(--teal-900);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.step-heading {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--teal-900);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.step-desc {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ================= PASO 1: HERO / BIENVENIDA ================= */
.hero-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--teal-100);
  color: var(--teal-900);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--teal-900);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto 2.25rem auto;
  line-height: 1.6;
}

.trust-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 640px;
  margin: 0 auto 2.5rem auto;
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.feature-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.feature-desc strong {
  display: block;
  font-size: 0.95rem;
  color: var(--teal-900);
  margin-bottom: 0.2rem;
}

.feature-desc span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.hero-cta-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.microcopy-lock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* ================= BOTONES ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.65rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-normal);
  text-decoration: none;
  border: 1px solid transparent;
  min-height: 48px;
}

.btn-primary {
  background: var(--teal-500);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(17, 145, 143, 0.25);
}

.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--teal-700);
  box-shadow: 0 6px 18px rgba(17, 145, 143, 0.35);
  outline: none;
}

.btn-secondary {
  background: var(--white);
  border-color: var(--border-light);
  color: var(--ink);
}

.btn-secondary:hover, .btn-secondary:focus-visible {
  background: var(--paper);
  border-color: var(--teal-300);
  outline: none;
}

.btn-whatsapp {
  background: #25D366;
  color: var(--white);
}

.btn-whatsapp:hover, .btn-whatsapp:focus-visible {
  background: #1EBE5D;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  outline: none;
}

.btn-outline-teal {
  background: transparent;
  border: 1.5px solid var(--teal-500);
  color: var(--teal-900);
}

.btn-outline-teal:hover {
  background: var(--teal-100);
}

.btn-error {
  background: var(--error);
  color: var(--white);
}

.btn-lg {
  padding: 1.05rem 2.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  min-height: 36px;
}

.btn-arrow {
  font-size: 1.15rem;
  transition: transform var(--transition-fast);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-text-teal {
  background: none;
  border: none;
  color: var(--teal-700);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.step-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.step-nav-footer .btn-back {
  min-width: 110px;
}

.step-nav-footer .btn-next {
  min-width: 140px;
  margin-left: auto;
}

/* ================= GRID DE TARJETAS DE SELECCIÓN ================= */
.card-selection-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card-selection-grid.cols-2 {
  grid-template-columns: 1fr;
}

.card-selection-grid.cols-3 {
  grid-template-columns: 1fr;
}

.selection-card {
  position: relative;
  display: block;
  cursor: pointer;
}

.selection-card input[type="radio"],
.selection-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.selection-card .card-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  min-height: 76px;
}

.selection-card:hover .card-inner {
  border-color: var(--teal-300);
  background: rgba(154, 213, 214, 0.08);
}

.selection-card input:checked + .card-inner {
  border-color: var(--teal-500);
  background: rgba(154, 213, 214, 0.15);
  box-shadow: var(--shadow-glow);
}

.card-icon-pill {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 0.15rem;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.card-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: transparent;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.selection-card input:checked + .card-inner .card-check {
  background: var(--teal-500);
  border-color: var(--teal-500);
  color: var(--white);
}

/* Modificador de tarjeta pequeña */
.selection-card.small .card-inner {
  padding: 1rem;
  min-height: 64px;
}

.selection-card.small .card-title {
  font-size: 0.92rem;
}

/* ================= FORMULARIOS, INPUTS Y SELECTS ================= */
.form-fieldset {
  border: none;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group.mb-lg {
  margin-bottom: 1.85rem;
}

.input-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal-900);
  margin-bottom: 0.5rem;
}

.btn-help-inline {
  background: none;
  border: none;
  color: var(--teal-500);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.select-wrapper {
  position: relative;
}

.form-select {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background-color: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2311918F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.1em;
  min-height: 48px;
}

.form-select:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: var(--shadow-glow);
}

.currency-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal-900);
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.2rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background-color: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  min-height: 48px;
}

.form-input:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: var(--shadow-glow);
}

.input-hint {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 0.4rem;
}

.checkbox-simple-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 0.75rem;
}

.checkbox-simple-label input {
  margin-top: 0.2rem;
  accent-color: var(--teal-500);
  width: 18px;
  height: 18px;
}

/* ================= PASO 3: SUB-BLOQUES DE TERRENO ================= */
.substep-block {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.zone-options-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.option-pill-card {
  position: relative;
  display: block;
  cursor: pointer;
}

.option-pill-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-pill-inner {
  padding: 0.9rem 1.1rem;
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.option-pill-card:hover .option-pill-inner {
  border-color: var(--teal-300);
}

.option-pill-card input:checked + .option-pill-inner {
  border-color: var(--teal-500);
  background: rgba(154, 213, 214, 0.15);
}

.pill-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 0.15rem;
}

.pill-desc {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.3;
}

/* ================= PASO 4: PANEL DE SQFT Y PISOS ================= */
.sqft-control-panel {
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.sqft-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.sqft-numeric-badge {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  background: var(--white);
  border: 1.5px solid var(--teal-300);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.85rem;
}

.input-sqft-synced {
  font-family: inherit;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--teal-900);
  border: none;
  background: none;
  width: 100px;
  text-align: right;
  appearance: textfield;
}

.input-sqft-synced::-webkit-inner-spin-button,
.input-sqft-synced::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sqft-unit {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal-500);
}

/* Estilos de Rango (Slider) */
.form-range {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-light);
  outline: none;
  accent-color: var(--teal-500);
  cursor: pointer;
  margin: 0.75rem 0;
}

.range-labels-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.sqft-visual-indicator {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--white);
  border-left: 3px solid var(--teal-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.indicator-icon {
  font-size: 1.25rem;
}

.indicator-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--teal-900);
}

/* Control Segmentado de Pisos */
.segmented-control {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.segment-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
}

.segment-btn:hover {
  border-color: var(--teal-300);
}

.segment-btn.active {
  border-color: var(--teal-500);
  background: rgba(154, 213, 214, 0.15);
  box-shadow: var(--shadow-glow);
}

.segment-btn strong {
  font-size: 0.95rem;
  color: var(--teal-900);
  margin-bottom: 0.15rem;
}

.segment-btn small {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ================= PASO 5: TARJETAS DE ACABADO ================= */
.finish-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.finish-card-label {
  position: relative;
  display: block;
  cursor: pointer;
}

.finish-card-label input {
  position: absolute;
  opacity: 0;
}

.finish-card-inner {
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  background: var(--white);
  transition: var(--transition-fast);
  position: relative;
}

.finish-card-label:hover .finish-card-inner {
  border-color: var(--teal-300);
}

.finish-card-label input:checked + .finish-card-inner {
  border-color: var(--teal-500);
  background: #FAFDFD;
  box-shadow: var(--shadow-glow);
}

.finish-badge-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--teal-100);
  color: var(--teal-900);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.finish-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.finish-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal-900);
}

.finish-rate-tag {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal-500);
}

.finish-summary {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.finish-checklist {
  list-style: none;
  display: grid;
  gap: 0.4rem;
  border-top: 1px dashed var(--border-light);
  padding-top: 0.85rem;
}

.finish-checklist li {
  font-size: 0.8rem;
  color: var(--ink-soft);
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.finish-checklist li::before {
  content: "✦";
  color: var(--teal-500);
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* ================= PASO 6: EXTRAS Y AMENIDADES ================= */
.extras-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.extra-card-label {
  position: relative;
  display: block;
  cursor: pointer;
}

.extra-card-label input {
  position: absolute;
  opacity: 0;
}

.extra-card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.extra-card-label:hover .extra-card-inner {
  border-color: var(--teal-300);
}

.extra-card-label input:checked + .extra-card-inner {
  border-color: var(--teal-500);
  background: rgba(154, 213, 214, 0.12);
}

.extra-card-content {
  flex: 1;
}

.extra-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 0.2rem;
}

.extra-desc {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.3;
}

.extra-cost-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal-700);
  background: var(--paper);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* ================= PASO 8: CONTINGENCIA ================= */
.contingency-panel {
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
}

.contingency-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.contingency-pct-tag {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--teal-900);
  line-height: 1;
}

.contingency-usd-box {
  text-align: right;
}

.usd-label {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.usd-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--teal-500);
}

.info-alert-box {
  display: flex;
  gap: 0.75rem;
  background: var(--white);
  border-left: 3px solid var(--teal-500);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 1.5rem;
}

.alert-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.alert-text {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ================= PASO 9: RESULTADOS ================= */
.step-result {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-hero-card {
  background: linear-gradient(135deg, var(--teal-900) 0%, #0A3E40 100%);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.25rem 1.75rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.result-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

.result-badge {
  background: rgba(154, 213, 214, 0.2);
  color: var(--teal-100);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-date {
  color: var(--teal-100);
  opacity: 0.8;
}

.result-heading-sub {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--teal-100);
  margin-bottom: 0.75rem;
}

.result-total-range {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.result-stats-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.stat-lbl {
  color: var(--teal-100);
}

.stat-val {
  color: var(--white);
}

.result-disclaimer-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
}

/* Barra de Acciones y Conversión */
.actions-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0 0 2.5rem 0;
}

.btn-cta-primary {
  width: 100%;
  font-size: 1.08rem;
  font-weight: 700;
  padding: 1.15rem 2rem;
  min-height: 56px;
  background: linear-gradient(135deg, var(--teal-500) 0%, var(--teal-700) 100%);
  color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 22px rgba(17, 145, 143, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-decoration: none;
  border: none;
  transition: var(--transition-normal);
}

.btn-cta-primary:hover, .btn-cta-primary:focus-visible {
  background: linear-gradient(135deg, var(--teal-700) 0%, #084849 100%);
  box-shadow: 0 10px 28px rgba(17, 145, 143, 0.38);
  transform: translateY(-2px);
  outline: none;
}

.secondary-actions-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 580px) {
  .secondary-actions-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem;
  }
}

.secondary-actions-row .btn-action {
  width: 100%;
  min-height: 52px;
  padding: 0.95rem 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.secondary-actions-row .btn-whatsapp {
  background: #25D366;
  color: var(--white);
  border: 1px solid #1EBE5D;
}

.secondary-actions-row .btn-whatsapp:hover {
  background: #1EBE5D;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
  transform: translateY(-2px);
}

.secondary-actions-row .btn-secondary {
  background: var(--white);
  color: var(--ink);
  border: 1.5px solid var(--border-light);
}

.secondary-actions-row .btn-secondary:hover {
  background: var(--paper);
  border-color: var(--teal-300);
  transform: translateY(-2px);
}

/* Comparativa entre Ciudades */
.city-compare-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.compare-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--teal-500);
  letter-spacing: 0.05em;
}

.compare-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-top: 0.2rem;
  margin-bottom: 0.35rem;
}

.compare-desc {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Gráfico de Distribución de Presupuesto */
.budget-distribution-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.card-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 0.25rem;
}

.card-section-sub {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
}

.distribution-stacked-bar {
  display: flex;
  height: 20px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 1rem;
  background: var(--border-light);
}

.dist-bar-segment {
  height: 100%;
  transition: width 0.5s ease;
}

.distribution-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.legend-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Desglose Detallado */
.breakdown-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.breakdown-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-fast);
}

.breakdown-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.15rem;
  cursor: pointer;
  background: var(--white);
}

.breakdown-summary:hover {
  background: var(--paper);
}

.breakdown-item-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal-900);
}

.breakdown-item-cost {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal-700);
  margin-right: 0.5rem;
}

.breakdown-details {
  padding: 0.85rem 1.15rem;
  background: var(--paper);
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* Resumen de Respuestas */
.summary-answers-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.summary-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.summary-chip {
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  color: var(--teal-900);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Modo Avanzado */
.advanced-overrides-card {
  background: var(--white);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.advanced-summary {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal-900);
  cursor: pointer;
}

.advanced-content {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.advanced-desc {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.overrides-inputs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.overrides-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Checklist y Liquidez */
.checklist-reminder-card,
.liquidity-advice-card,
.express-contact-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.checklist-items-grid {
  display: grid;
  gap: 0.85rem;
}

.check-item {
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.check-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 0.2rem;
}

.check-item-desc {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.liquidity-badge {
  display: inline-block;
  background: #FEF3C7;
  color: #92400E;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.liquidity-amount-box {
  background: var(--paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.liq-lbl {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.liq-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--teal-700);
}

/* Formulario Express */
.express-badge {
  display: inline-block;
  background: var(--teal-100);
  color: var(--teal-900);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.express-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.result-legal-footer {
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.5;
  text-align: center;
  padding: 1rem 0;
}

/* ================= MODALES ACCESIBLES ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 47, 48, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-dialog {
  background: var(--white);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-dialog.modal-sm {
  max-width: 420px;
}

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

.modal-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal-900);
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.btn-close-modal:hover {
  color: var(--ink);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.glossary-item-block {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.glossary-item-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.glossary-term {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal-900);
  margin-bottom: 0.25rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background: var(--paper);
}

/* ================= MEDIA QUERIES (TABLET Y DESKTOP) ================= */
@media (min-width: 640px) {
  .calculator-wrapper {
    padding: 2rem 1.5rem 4rem 1.5rem;
  }

  .hero-title {
    font-size: 2.6rem;
  }

  .card-selection-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }

  .card-selection-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .zone-options-grid {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    grid-template-columns: 1fr 1fr;
  }

  .finish-cards-grid {
    grid-template-columns: 1fr;
  }

  .extras-grid {
    grid-template-columns: 1fr 1fr;
  }

  .city-compare-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .overrides-inputs-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .form-group-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .calculator-wrapper {
    max-width: 880px;
  }

  .hero-card {
    padding: 4rem 3rem;
  }
}

/* ================= PREFERS-REDUCED-MOTION ================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ================= ESTILOS DE IMPRESIÓN (@media print) ================= */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }

  .calculator-wrapper {
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* Ocultar elementos interactivos en impresión */
  .app-header,
  .progress-bar-wrapper,
  .actions-toolbar,
  .city-compare-card,
  .advanced-overrides-card,
  .express-contact-card,
  .modal-backdrop,
  .btn,
  .btn-text-teal,
  .step-nav-footer {
    display: none !important;
  }

  /* Mostrar solo resultados */
  .wizard-step {
    display: none !important;
  }

  .step-result {
    display: block !important;
  }

  .result-hero-card {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #07585A !important;
    box-shadow: none !important;
    padding: 1.5rem !important;
    page-break-after: avoid;
  }

  .result-total-range {
    color: #07585A !important;
  }

  .stat-pill {
    background: #f0f0f0 !important;
    color: #000 !important;
    border: 1px solid #ccc !important;
  }

  .stat-lbl, .stat-val {
    color: #000 !important;
  }

  .breakdown-card,
  .summary-answers-card,
  .checklist-reminder-card,
  .liquidity-advice-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    margin-top: 1rem !important;
    page-break-inside: avoid;
  }

  .breakdown-details {
    display: block !important;
    background: #fafafa !important;
  }
}

/* ==========================================================================
   Botón Flotante de WhatsApp
   ========================================================================== */
.floating-whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  z-index: 9999;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}

.floating-whatsapp-btn:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.6);
  color: #ffffff;
}

.floating-whatsapp-tooltip {
  position: absolute;
  right: 70px;
  background: rgba(11, 47, 48, 0.95);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.floating-whatsapp-btn:hover .floating-whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

@media print {
  .floating-whatsapp-btn {
    display: none !important;
  }
}
