/* ==========================================================================
   APEX INNOVATIONS - ULTRA-MODERN CLEAN DESIGN SYSTEM
   Aesthetic: Minimalist Luxury Tech (Apple / Stripe style)
   Typography: Plus Jakarta Sans
   Palette: Crisp White (#FFFFFF), Slate Alabaster (#F8FAFC), Deep Navy (#0F172A), Cobalt (#2563EB), Gold (#D97706)
   ========================================================================== */

/* Las fuentes se cargan con <link> en el <head> de cada página (no @import: bloquea en cadena) */

:root {
  /* Surfaces */
  --bg-page: #F8FAFC;
  --bg-white: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-muted: #E2E8F0;

  /* Typography */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #566376;
  --text-white: #FFFFFF;

  /* Brand Accents */
  --color-navy: #0F172A;
  --color-navy-hover: #1E293B;
  --color-blue: #2563EB;
  --color-blue-soft: #EFF6FF;
  --color-blue-border: #BFDBFE;
  
  /* Highlights & Status */
  --color-gold: #B45309;
  --color-gold-text: #92400E;
  --color-gold-bg: #FEF3C7;
  --color-gold-border: #FDE68A;
  
  --color-emerald: #10B981;
  --color-emerald-text: #047857;
  --color-emerald-bg: #ECFDF5;
  --color-emerald-border: #A7F3D0;

  /* Borders & Shadows */
  --border-light: #E2E8F0;
  --border-card: #E5E7EB;
  --border-focus: #2563EB;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.02);
  --shadow-hover: 0 12px 30px -4px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-pill: 0 2px 8px rgba(15, 23, 42, 0.06);

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --trans-fast: 0.16s ease;
  --trans-smooth: 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  /* Resorte físico (rigidez 260, amortiguación 16, masa 1) muestreado a linear(); dura 0.77s */
  --resorte: linear(0, 0.0657, 0.2256, 0.43, 0.6395, 0.8264, 0.9751, 1.0793, 1.1404, 1.1647, 1.1609, 1.1385, 1.1061, 1.071, 1.0383, 1.0114, 0.9916, 0.9792, 0.9734, 0.9727, 0.9755, 0.9805, 0.9863, 0.992, 0.9968, 1.0005, 1.0029, 1.0042, 1.0046, 1.0043, 1.0035, 1.0026, 1.0016);
}

/* ==========================================================================
   RESET & BASE RULES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  /* La letra mide lo que dice el CSS: sin esto Chrome en tabletas Android agranda algunos
     textos a su antojo (y al regresar de "Pruébalo" ya no, y el celular de ejemplo brincaba)
     y el iPhone acostado infla otros. El zoom del usuario sigue funcionando */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Nada puede ser más ancho que la pantalla: en celular el navegador dejaría alejar toda la
   página (zoom out) y se vería descuadrada. clip, no hidden, para no romper position: sticky */
.view-tab,
.footer-clean {
  overflow-x: clip;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.badge-tag-dark {
  background: rgba(37, 99, 235, 0.2);
  color: #60A5FA;
  border: 1px solid rgba(96, 165, 250, 0.3);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
}

/* Main Navbar */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  /* Fondo sólido: un backdrop-filter se recalcula en cada cuadro del scroll y lo traba */
  background: #FFFFFF;
  transition: color var(--trans-smooth), background-color var(--trans-smooth), border-color var(--trans-smooth), box-shadow var(--trans-smooth), transform var(--trans-smooth), opacity var(--trans-smooth);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

/* Segmented Control Bar (Apple / Stripe style Tab Switcher) */
/* Barra simple: enlaces de texto; la sección activa lleva una raya gruesa debajo */
.tab-segmented-control {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.tab-btn {
  position: relative;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--trans-fast), background-color var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast), transform var(--trans-fast), opacity var(--trans-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--color-navy);
  font-weight: 700;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--color-blue);
}

.tab-btn.highlight-cotizar {
  color: var(--color-blue);
}

.tab-btn.highlight-cotizar.active {
  background: #FFFFFF;
  color: var(--color-blue);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  transition: color var(--trans-fast), background-color var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast), transform var(--trans-fast), opacity var(--trans-fast);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-navy);
  color: #FFFFFF;
  border: 1px solid var(--color-navy);
}

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

.btn-primary.active, .btn-primary[data-target-tab="tab-cotizador"].active {
  background: var(--color-blue);
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.btn-outline {
  background: #FFFFFF;
  color: var(--text-primary);
  border: 1.5px solid var(--border-card);
}

.btn-outline:hover {
  border-color: var(--text-primary);
  background: var(--bg-subtle);
}

.btn-whatsapp {
  background: #047857;
  color: #FFFFFF;
  font-weight: 700;
}

.btn-whatsapp:hover {
  background: #065F46;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.mobile-toggle span {
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
}

/* ==========================================================================
   VIEW TAB SYSTEM (SPA)
   ========================================================================== */
.view-tab {
  display: none;
}

.view-tab.active {
  display: block;
  animation: tabFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ==========================================================================
   HERO & PUNCHY SECTIONS
   ========================================================================== */
.hero-clean {
  background: #FFFFFF;
  padding: 4.5rem 0 3.5rem;
  text-align: center;
}

.hero-title-punchy {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 880px;
  margin: 0 auto 1.2rem;
}

.hero-sub-punchy {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--text-primary);
  max-width: 680px;
  margin: 0 auto 2.2rem;
  line-height: 1.6;
}

.hero-btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Trust Metric Bar */
.trust-bar-clean {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.trust-item-clean {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-right: 1px solid var(--border-light);
}

.trust-item-clean:last-child {
  border-right: none;
}

.trust-num-clean {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-navy);
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.trust-lbl-clean {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ==========================================================================
   MODULE CARDS (INICIO TAB)
   ========================================================================== */
.section-clean {
  padding: 4.5rem 0;
}

.section-head-clean {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.section-title-clean {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.2;
}

.section-desc-clean {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--text-primary);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

.pillar-price-pill {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 1.2rem;
}

.pillar-action-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-blue);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   PÁGINAS WEB TAB (CLEAN & ATTRACTIVE)
   ========================================================================== */
.hero-module-banner {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 3rem;
  margin-bottom: 3.5rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-mod-title {
  font-size: clamp(2rem, 3.2vw, 2.6rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.8rem;
}

.hero-mod-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.8rem;
}

/* Featured Price Card (Slide 5 inspiration) */
.featured-price-box {
  background: #0F172A;
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  text-align: center;
  position: relative;
}

.featured-price-tag {
  background: rgba(255, 255, 255, 0.1);
  color: #38BDF8;
  font-size: 0.8125rem;
  font-weight: 800;
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin-bottom: 1rem;
}

.featured-price-value {
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
  color: #FFFFFF;
  margin-bottom: 0.2rem;
}

.featured-price-lbl {
  font-size: 0.82rem;
  color: #94A3B8;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.featured-pills-row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feat-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: #E2E8F0;
}

/* Clean Feature List */
.bullets-clean {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.bullets-clean li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bullets-clean li svg {
  color: var(--color-blue);
  flex-shrink: 0;
}

/* Bundles Grid (Slide 7) */
.bundles-grid-clean {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.bundle-box-clean {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: color var(--trans-fast), background-color var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast), transform var(--trans-fast), opacity var(--trans-fast);
  position: relative;
}

.bundle-box-clean:hover {
  transform: translateY(-4px);
  border-color: var(--color-blue);
}

/* El recomendado se distingue por su campo de color, no por un adorno */
.bundle-box-clean.featured {
  border: 2px solid var(--color-gold);
  background: var(--color-gold-bg);
}

.badge-gold-top {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-gold);
  color: #FFFFFF;
  font-size: 0.8125rem;
  font-weight: 800;
  padding: 0.25rem 0.9rem;
  border-radius: var(--radius-pill);
}

.bundle-header-clean {
  margin-bottom: 1.2rem;
}

.bundle-title-clean {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0.2rem 0 0.8rem;
}

.bundle-price-clean {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--color-navy);
  line-height: 1;
}

.bundle-price-clean span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Compact Add-ons Grid (Slide 6) */
.addons-grid-clean {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  margin-bottom: 3.5rem;
}

.addon-card-clean {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: color var(--trans-fast), background-color var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast), transform var(--trans-fast), opacity var(--trans-fast);
}

.addon-card-clean:hover {
  border-color: var(--color-blue);
  transform: translateY(-2px);
}

.addon-cat-clean {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--color-gold);
  margin-bottom: 0.3rem;
}

.addon-name-clean {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.addon-desc-clean {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.addon-price-clean {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-navy);
}

.addon-price-clean span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   MARKETING TAB (3 CARDS)
   ========================================================================== */
.mktg-grid-clean {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  margin-bottom: 3rem;
}

.mktg-card-clean {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: color var(--trans-fast), background-color var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast), transform var(--trans-fast), opacity var(--trans-fast);
}

.mktg-card-clean:hover {
  transform: translateY(-4px);
}

.mktg-card-clean.featured {
  border: 2px solid var(--color-gold);
}

.mktg-plan-badge {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--text-muted);
}

.mktg-plan-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0.2rem 0 1rem;
}

.mktg-plan-price {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--color-navy);
  line-height: 1;
}

.mktg-plan-period {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0.2rem 0 1.5rem;
  display: block;
}

.mktg-note-box {
  background: var(--color-blue-soft);
  border: 1px solid var(--color-blue-border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.5rem;
  font-size: 0.88rem;
  color: var(--color-navy);
  line-height: 1.6;
}

/* ==========================================================================
   FINANZAS: TABLERO DE EJEMPLO
   ========================================================================== */

.kpi-grid-clean {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.kpi-card-clean {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.kpi-title-clean {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.kpi-val-clean {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--color-navy);
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.kpi-sub-clean {
  font-size: 0.75rem;
  color: var(--color-emerald-text);
  font-weight: 700;
}

/* ==========================================================================
   SOPORTE & EXTRAS TAB (3 COLUMNS & GOOGLE DEVICE)
   ========================================================================== */

/* Hardware Card Clean */

/* ==========================================================================
   COTIZADOR TAB (SIMPLE & FAST)
   ========================================================================== */
.calc-layout-clean {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 2.5rem;
  align-items: start;
}

.calc-section-box {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.8rem;
}

.calc-section-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.8rem;
}

.calc-section-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.calc-grid-clean {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.calc-option-clean {
  display: block;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  cursor: pointer;
  position: relative;
  transition: color var(--trans-fast), background-color var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast), transform var(--trans-fast), opacity var(--trans-fast);
}

.calc-option-clean:hover {
  border-color: var(--border-card);
  background: var(--bg-page);
}

.calc-option-clean.selected {
  border: 2px solid var(--color-blue);
  background: #F8FAFC;
}

.calc-opt-radio {
  position: absolute;
  top: 1rem;
  right: 1rem;
  accent-color: var(--color-blue);
}

.calc-opt-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  padding-right: 1.5rem;
}

.calc-opt-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.6rem;
}

.calc-opt-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-navy);
}

/* Sticky Summary Card */
.calc-summary-sticky {
  background: #0F172A;
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  position: sticky;
  top: 6rem;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.25);
}

.summary-head-clean {
  display: flex;
  flex-wrap: wrap; /* con la letra muy agrandada "1 servicio" baja de renglón */
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.summary-head-clean h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #FFFFFF;
}

.summary-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94A3B8;
}

.summary-list-clean {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #CBD5E1;
}

.summary-row .price-tag {
  color: #FFFFFF;
  font-weight: 700;
}

.summary-totals-box {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.2rem;
  margin-bottom: 1.5rem;
}

.total-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.total-lbl {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #94A3B8;
}

.total-val {
  font-size: 1.7rem;
  font-weight: 900;
  color: #38BDF8;
}

.total-val.recurring {
  color: #FBBF24;
  font-size: 1.3rem;
}

.total-line {
  gap: 0.75rem;
}

.total-val {
  white-space: nowrap;
}

/* FAQ Clean */
.faq-wrap-clean {
  max-width: 800px;
  margin: 3.5rem auto 0;
}

.faq-card-clean {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 0.8rem;
  overflow: hidden;
}

.faq-titulo {
  font-size: 1.8rem;
}

.faq-inicio {
  margin: 3rem auto;
}

.faq-inicio .faq-titulo {
  margin-bottom: 1.2rem;
  text-align: center;
}

.faq-mas {
  display: block;
  margin: 1rem auto 0;
  font-weight: 700;
  color: var(--color-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-trigger-clean {
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
}

.faq-trigger-clean::-webkit-details-marker {
  display: none;
}

.faq-trigger-clean:hover {
  color: var(--color-blue);
}

.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform var(--trans-fast);
}

.faq-card-clean[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer-clean {
  padding: 0 1.5rem 1.2rem;
  font-size: 1rem;
  color: var(--text-primary);
  max-width: 70ch;
  line-height: 1.6;
}

/* Abre y cierra con altura animada donde el navegador lo permite (si no, sin animación) */
@supports (interpolate-size: allow-keywords) {
  .faq-card-clean {
    interpolate-size: allow-keywords;
  }
  .faq-card-clean::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1), content-visibility 0.3s allow-discrete;
  }
  .faq-card-clean[open]::details-content {
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-card-clean::details-content,
  .faq-chevron {
    transition: none;
  }
}

/* ==========================================================================
   FOOTER CLEAN
   ========================================================================== */
.footer-clean {
  background: #0A1120;
  color: #94A3B8;
  padding: 4rem 0 2rem;
}

.footer-grid-clean {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-title-clean {
  font-size: 1rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 1.2rem;
}

.footer-links-clean {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.9375rem;
}

.footer-links-clean a {
  overflow-wrap: anywhere; /* el correo no cabe completo en celulares angostos */
}

.footer-links-clean a:hover {
  color: #FFFFFF;
}

.footer-bottom-clean {
  padding-top: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--trans-fast), visibility 0s linear 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity var(--trans-fast), visibility 0s;
}

.modal-titulo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.modal-enviar {
  width: 100%;
  padding: 0.85rem;
  margin-top: 0.5rem;
}

.form-opcional {
  font-weight: 500;
  color: var(--text-muted);
}

.modal-box-clean {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 2.2rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  position: relative;
}

.modal-close-clean {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.form-group-clean {
  margin-bottom: 1rem;
}

.form-lbl-clean {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.form-inp-clean {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: #FFFFFF;
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
}

.form-inp-clean:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.4);
}

[hidden] {
  display: none !important;
}

/* Saltar al contenido: invisible hasta que se llega con Tab */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.7rem 1rem;
  background: var(--text-primary);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Foco del teclado siempre visible (WCAG 2.4.7 / 1.4.11) */
:focus-visible {
  outline: 2px solid var(--border-focus, #2563EB);
  outline-offset: 2px;
}

/* Los títulos que reciben el foco al cambiar de pestaña no muestran anillo */
[tabindex="-1"]:focus {
  outline: none;
}

/* ==========================================================================
   PAQUETES, AHORRO Y MÓDULOS INCLUIDOS
   ========================================================================== */
.pkg-info-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 2rem;
  background: var(--color-blue-soft);
  border: 1px solid var(--color-blue-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.2rem;
  margin: 0 auto 2.5rem;
  max-width: 720px;
  font-size: 0.9rem;
  color: var(--text-primary);
  text-align: center;
}

.bundle-desc-clean {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 0.8rem;
}

.pkg-savings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem 0.8rem;
  background: var(--color-emerald-bg);
  border: 1px solid var(--color-emerald-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  margin-bottom: 1.2rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pkg-savings s {
  color: var(--text-muted);
}

.pkg-savings strong {
  color: #047857;
  font-weight: 800;
}

.pkg-footnote {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  margin: -2rem auto 3.5rem;
  max-width: 760px;
}

.addon-included-pill {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--color-blue);
  background: var(--color-blue-soft);
  border: 1px solid var(--color-blue-border);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.55rem;
  margin-bottom: 0.5rem;
}

.addon-included-pill.premium {
  color: var(--color-gold-text);
  background: var(--color-gold-bg);
  border-color: var(--color-gold-border);
}

/* Cotizador: chips, módulos incluidos y deshabilitados */
.calc-save-chip {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: #047857;
  background: var(--color-emerald-bg);
  border: 1px solid var(--color-emerald-border);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.6rem;
}

.calc-opt-price span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.calc-optional-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  padding: 0.1rem 0.5rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.calc-step-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.9rem;
}

.calc-included-tag {
  display: none;
}

.calc-option-clean.included {
  border: 2px solid var(--color-emerald);
  background: var(--color-emerald-bg);
  cursor: default;
}

.calc-option-clean.included .calc-opt-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.calc-option-clean.included .calc-included-tag {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #047857;
}

.calc-option-clean.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.calc-opt-radio:disabled {
  cursor: not-allowed;
}

/* Resumen agrupado: Sitio web / Módulos extra / Cada mes / Finanzas / Dispositivos / Cupón */
.summary-grupo > ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.summary-grupo + .summary-grupo {
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.summary-grupo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #64748B;
}

.summary-editar {
  background: none;
  border: none;
  padding: 0.1rem 0;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #38BDF8;
  cursor: pointer;
}

.summary-editar:hover {
  text-decoration: underline;
}

.summary-row {
  gap: 0.75rem;
}

.summary-row .price-tag {
  flex-shrink: 0;
  white-space: nowrap;
}

.summary-incluye details {
  font-size: 0.76rem;
  color: #94A3B8;
}

.summary-incluye summary {
  cursor: pointer;
  color: #34D399;
  font-weight: 700;
  list-style: none;
}

.summary-incluye summary::-webkit-details-marker {
  display: none;
}

.summary-incluye summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.35rem;
  transition: transform var(--trans-fast);
}

.summary-incluye details[open] summary::before {
  transform: rotate(90deg);
}

.summary-incluye ul {
  list-style: none;
  margin: 0.4rem 0 0 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.summary-empty {
  font-size: 0.82rem;
  font-style: italic;
  color: #94A3B8;
}

/* Botón "Siguiente" al pie de cada paso del cotizador */
.calc-next-btn {
  display: flex;
  margin: 1.1rem 0 0 auto;
  background: none;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 0.45rem 1rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-blue);
  cursor: pointer;
  transition: color var(--trans-fast), background-color var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast), transform var(--trans-fast), opacity var(--trans-fast);
}

.calc-next-btn:hover {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: #FFFFFF;
}

.calc-section-box,
.calc-summary-sticky {
  scroll-margin-top: 6rem;
}

/* Al llegar a un paso se ilumina un momento para que se note dónde quedaste */
.calc-section-box.paso-llegada {
  animation: pasoLlegada 1.2s ease-out;
}

.calc-summary-sticky.paso-llegada {
  animation: resumenLlegada 1.2s ease-out;
}

@keyframes resumenLlegada {
  0%, 30% { box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.6), 0 15px 35px rgba(15, 23, 42, 0.25); }
  100% { box-shadow: 0 15px 35px rgba(15, 23, 42, 0.25); }
}

@keyframes pasoLlegada {
  0%, 30% { box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.45), var(--shadow-sm); }
  100% { box-shadow: var(--shadow-sm); }
}

/* Escritorio: el resumen te sigue al bajar. La columna se estira a todo el alto
   del cotizador (si mide lo mismo que la tarjeta, sticky no tiene por dónde moverse).
   Si la tarjeta no cabe en la pantalla se desplaza por dentro y los totales y
   botones de pago quedan fijos abajo. */
@media (min-width: 1025px) {
  .calc-summary-col {
    align-self: stretch;
  }
  .calc-summary-sticky {
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    padding-bottom: 0;
  }
  .summary-footer {
    position: sticky;
    bottom: 0;
    background: #0F172A;
    margin: 0 -2.2rem;
    padding: 0 2.2rem 1.6rem;
    box-shadow: 0 -12px 16px -12px rgba(0, 0, 0, 0.6);
  }
  .calc-pasos-col {
    padding-bottom: var(--espacio-resumen, 0px);
  }
  /* La sugerencia de paquete vive en la parte fija: más compacta para no comerse la lista */
  .summary-footer .upsell-box {
    margin: 0.9rem 0 0.9rem;
    padding: 0.7rem 0.85rem;
    font-size: 0.76rem;
  }
  .summary-footer .btn-upsell {
    margin-top: 0.45rem;
    padding: 0.35rem 0.8rem;
    font-size: 0.76rem;
  }
}

@media (min-width: 1025px) and (max-height: 820px) {
  .savings-phrase {
    display: none;
  }
}

.savings-card {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  margin-bottom: 1.2rem;
}

.savings-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
  color: #CBD5E1;
  margin-bottom: 0.25rem;
}

.savings-row s {
  color: #94A3B8;
}

.savings-row strong {
  color: #FFFFFF;
}

.savings-amount {
  font-size: 1.15rem;
  white-space: nowrap;
  font-weight: 900;
  color: #34D399;
  margin-top: 0.3rem;
}

.savings-phrase {
  font-size: 0.76rem;
  color: #A7F3D0;
  line-height: 1.45;
  margin-top: 0.35rem;
}

.upsell-box {
  background: rgba(251, 191, 36, 0.1);
  border: 1px dashed rgba(251, 191, 36, 0.55);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 1.2rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #FDE68A;
}

.btn-upsell {
  margin-top: 0.6rem;
  background: #FBBF24;
  color: #0F172A;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

.btn-upsell:hover {
  background: #F59E0B;
}

.consumo-note {
  font-size: 0.75rem;
  color: #94A3B8;
  margin: -0.8rem 0 1rem;
}

/* Soporte: cajas fuera de menú y pasarela */

/* Proceso de Trabajo (4 pasos) */
.steps-grid-clean {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-module-banner, .calc-layout-clean {
    grid-template-columns: 1fr;
  }
  .addons-grid-clean, .kpi-grid-clean {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  /* Navbar en dos filas: logo + botón arriba, pestañas abajo */
  .nav-container {
    height: auto;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }
  .tab-segmented-control {
    order: 3;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none;
  }
  .steps-grid-clean {
    grid-template-columns: repeat(2, 1fr);
  }
  .bundles-grid-clean,
  .mktg-grid-clean {
    grid-template-columns: 1fr;
  }
  .footer-grid-clean {
    grid-template-columns: 1fr 1fr;
  }
  .trust-bar-clean {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .trust-item-clean {
    border-right: none;
  }
}

@media (max-width: 600px) {
  .addons-grid-clean, .kpi-grid-clean, .footer-grid-clean, .trust-bar-clean {
    grid-template-columns: minmax(0, 1fr);
  }
  .steps-grid-clean {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   MÓVIL: navegación inferior, barra de total y ajustes de legibilidad
   ========================================================================== */
.tab-ico {
  display: none;
}

.calc-mobile-bar {
  display: none;
}

.calc-grid-clean {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

/* Modal: centrado cuando cabe y desplazable en pantallas bajas (teclado abierto) */
.modal-overlay {
  overflow-y: auto;
  align-items: flex-start;
}

.modal-box-clean {
  margin: auto 0;
}

@media (max-width: 1024px) {
  .calc-mobile-bar.visible {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    z-index: 140;
    background: #0F172A;
    color: #FFFFFF;
    border-radius: var(--radius-md);
    padding: 0.7rem 0.8rem 0.7rem 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
  }
  .calc-mobile-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
  }
  .calc-mobile-lbl {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #CBD5E1;
  }
  .calc-mobile-info strong {
    font-size: 1.15rem;
    font-weight: 900;
    color: #38BDF8;
  }
  .calc-mobile-extra {
    font-size: 0.75rem;
    color: #6EE7B7;
  }
  .calc-mobile-extra:empty {
    display: none;
  }
  .calc-mobile-btn {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 1rem;
    border: none;
    border-radius: var(--radius-sm);
    background: #FFFFFF;
    color: #0F172A;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
  }
}

@media (max-width: 860px) {
  /* La barra de pestañas pasa a ser una navegación inferior fija con íconos:
     las 5 secciones siempre visibles, sin contenido escondido a la derecha. */
  .navbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .tab-segmented-control {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    order: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.15rem;
    width: auto;
    overflow: visible;
    background: rgba(255, 255, 255, 0.98);
    border: none;
    border-radius: 0;
    padding: 0.35rem 0.35rem calc(0.35rem + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.08);
  }
  .tab-segmented-control .tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 52px;
    padding: 0.3rem 0.1rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    color: var(--text-secondary);
    background: transparent;
    box-shadow: none;
    border-radius: var(--radius-sm);
  }
  .tab-segmented-control .tab-btn.active {
    color: var(--color-blue);
    background: var(--color-blue-soft);
    box-shadow: none;
    font-weight: 800;
  }
  .tab-segmented-control .tab-btn.active::after {
    display: none;
  }
  .tab-ico {
    display: block;
    width: 21px;
    height: 21px;
  }
  .lbl-long {
    display: none;
  }
  body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
  }
  .calc-mobile-bar.visible {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }

  /* Botones cómodos para el dedo */
  .btn {
    min-height: 44px;
  }
  .btn-sm {
    min-height: 40px;
  }
  #qty-minus,
  #qty-plus {
    min-width: 40px;
    min-height: 40px;
    font-size: 1.1rem;
  }

  /* Evita el zoom automático de iPhone al escribir */
  .form-inp-clean {
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  .btn {
    white-space: normal;
    text-align: center;
  }
  .container {
    padding: 0 1rem;
  }
  .bundle-box-clean,
  .calc-section-box {
    padding: 1.4rem;
  }
  .calc-summary-sticky {
    padding: 1.5rem;
  }
  .modal-box-clean {
    padding: 1.6rem 1.3rem;
  }

  /* Tabla de transacciones como tarjetas: nada queda oculto a la derecha */
}

/* ==========================================================================
   ÁREA DE CLIENTES: enlace "Mi cuenta" y barra "Tu propuesta está lista"
   ========================================================================== */
.nav-account-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.nav-account-link:hover {
  color: var(--color-blue);
}

.nav-account-link svg {
  width: 18px;
  height: 18px;
}

/* Barra fija inferior con texto en carrusel (la crea js/portal/comun.js) */
.proposal-ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 160;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 54px;
  padding: 0 1rem 0 1.25rem;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--color-navy);
  color: #FFFFFF;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.ticker-badge {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 800;
  background: var(--color-gold-bg);
  color: var(--color-gold-text);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
}

.ticker-track {
  flex: 1;
  min-width: 0;
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

/* Dos copias idénticas que se desplazan juntas: el ciclo no tiene saltos */
.ticker-run {
  display: flex;
  flex-shrink: 0;
  animation: ticker-scroll 26s linear infinite;
}

.ticker-item {
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 600;
  padding-right: 2.2rem;
}

.ticker-item::before {
  content: '●';
  color: #FBBF24;
  font-size: 0.55rem;
  vertical-align: middle;
  margin-right: 2.2rem;
}

.ticker-cta {
  flex-shrink: 0;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.proposal-ticker:hover .ticker-run,
.proposal-ticker:focus-visible .ticker-run {
  animation-play-state: paused;
}

.proposal-ticker:focus-visible {
  outline: 3px solid #FBBF24;
  outline-offset: -3px;
}

body.has-ticker {
  padding-bottom: 54px;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-run {
    animation: none;
  }
  .ticker-run + .ticker-run {
    display: none;
  }
}

@media (max-width: 860px) {
  .nav-account-link span {
    display: none;
  }
  .nav-account-link svg {
    width: 22px;
    height: 22px;
  }

  /* En móvil la barra se apoya justo encima de la navegación inferior */
  .proposal-ticker {
    bottom: calc(66px + env(safe-area-inset-bottom));
    height: 46px;
    padding: 0 0.6rem 0 0.8rem;
    gap: 0.6rem;
  }
  .ticker-badge {
    font-size: 0;
    padding: 0.3rem 0.45rem;
  }
  .ticker-badge::before {
    content: '📄';
    font-size: 0.9rem;
  }
  .ticker-item {
    font-size: 0.86rem;
  }
  .ticker-cta {
    font-size: 0.78rem;
    padding: 0.45rem 0.7rem;
  }
  body.has-ticker {
    padding-bottom: calc(66px + 46px + env(safe-area-inset-bottom));
  }
  /* En el cotizador manda la barra del total */
  .calc-mobile-bar.visible ~ .proposal-ticker {
    display: none;
  }

  /* Área de clientes: no hay navegación inferior */
  body.portal .proposal-ticker {
    bottom: 0;
    height: calc(52px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.portal.has-ticker {
    padding-bottom: calc(52px + env(safe-area-inset-bottom));
  }
}

/* Barra superior en celular: logo, "Mi cuenta" y "Cotizar" en un solo renglón */
@media (max-width: 600px) {
  .navbar .brand-logo-img {
    height: 30px;
  }
  .nav-container > div[style] {
    gap: 0.35rem !important;
  }
  .nav-account-link {
    padding: 0.35rem;
  }
  .nav-container .btn-sm {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 380px) {
  .navbar .brand-logo-img {
    height: 25px;
  }
  .nav-container .btn-sm {
    padding: 0.5rem 0.65rem;
  }
}

/* ==========================================================================
   INICIO SIMPLE + ANIMACIONES DE ENTRADA
   ========================================================================== */

/* Título: visible desde el primer cuadro, una sola tinta, en dos líneas */
.hero-palabras {
  font-size: clamp(2rem, 8.4vw, 3.8rem);
  text-wrap: balance;
}

/* Subtítulo, botones y franja de confianza entran en cascada después del título */
.entra {
  animation: aparecer 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--d) * 80ms + 100ms);
}

@keyframes aparecer {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* Aparición suave al bajar (la clase la pone js/app.js → initRevelar) */
[data-revelar].por-revelar {
  opacity: 0;
  transform: translateY(26px);
}

[data-revelar].por-revelar.revelado {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* ¿Qué necesitas? */
.seccion-servicios {
  scroll-margin-top: 5.5rem;
}

.servicio-precio {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--color-navy);
  line-height: 1.1;
  margin: 1.3rem 0 0.9rem;
}

.servicio-precio span {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.servicio-precio small {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Así de fácil */
.seccion-blanca {
  background: #FFFFFF;
}

.pasos-simples {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.pasos-simples li {
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.paso-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--color-navy);
  color: #FFFFFF;
  font-weight: 900;
  margin-bottom: 0.8rem;
}

.pasos-simples h3 {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.pasos-simples p {
  font-size: 1rem;
  color: var(--text-primary);
}

.pasos-pago {
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  margin-top: 1.8rem;
  font-size: 1rem;
  color: var(--text-primary);
}

.pasos-pago strong {
  color: var(--text-primary);
}

/* Servicios en bento: cada uno muestra algo de lo que entrega (no un ícono en un cuadro) */
.bento {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1.25rem;
}

.bento-celda {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  color: inherit;
  text-decoration: none;
  transition: background-color var(--trans-fast), transform var(--trans-fast);
}

.bento-celda:hover {
  background: #E9EEF6;
}

.bento-celda:active {
  transform: scale(0.99);
}

.bento-web {
  grid-row: span 2;
}

/* Las muestras llenan lo que quede de alto de la celda */
.bento-web .bento-muestras {
  flex: 1;
  min-height: 240px;
}

.bento-web .bento-muestras figure {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.bento-web .bento-muestras img {
  flex: 1;
  min-height: 0;
  height: 100%;
  aspect-ratio: auto;
}

.bento-mkt,
.bento-fin {
  flex-direction: row;
  align-items: center;
}

.bento-mkt .bento-texto,
.bento-fin .bento-texto {
  flex: 1;
}

.bento-titulo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.bento-web .bento-titulo {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
}

.bento-desc {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text-primary);
  max-width: 46ch;
}

.bento-muestras {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.bento-muestras figure {
  margin: 0;
}

.bento-muestras img,
.bento-post img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.bento-muestras figcaption {
  margin-top: 0.45rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.bento-post {
  flex: 0 0 38%;
  padding: 0.6rem;
  border-radius: var(--radius-md);
  background: #FFFFFF;
}

.bento-post img {
  aspect-ratio: 1;
  border-radius: calc(var(--radius-md) - 4px);
}

.bento-post p {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.bento-numero {
  flex: 0 0 38%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bento-numero-val {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--color-emerald-text, #047857);
  font-variant-numeric: tabular-nums;
}

.bento-numero-txt {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.bento-numero-txt em {
  font-style: normal;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .bento {
    grid-template-columns: 1fr;
  }
  .bento-web {
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .bento-celda {
    padding: 1.4rem;
  }
  .bento-mkt,
  .bento-fin {
    flex-direction: column;
    align-items: stretch;
  }
  .bento-post {
    flex-basis: auto;
    max-width: 220px;
  }
}

/* Cierre de Inicio: un campo plano de azul marino a todo lo ancho */
.cierre {
  background: var(--color-navy);
  color: #FFFFFF;
  padding: 5rem 0;
}

.cierre-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-final h2 {
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: 0.6rem;
}

.cta-final p {
  font-size: 1.125rem;
  color: #CBD5E1;
}

.cierre-botones {
  margin-bottom: 0;
}

.cierre .btn-primary {
  background: #FFFFFF;
  color: var(--color-navy);
  border-color: #FFFFFF;
}

/* Paquetes: 3 beneficios simples + "Ver todo lo que incluye" */
.beneficios {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  margin: 1.1rem 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.beneficios li {
  position: relative;
  padding-left: 1.7rem;
}

.beneficios li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--color-emerald-bg);
  color: var(--color-emerald-text);
  font-size: 0.72rem;
  font-weight: 900;
}

.pkg-detalle {
  border-top: 1px dashed var(--border-card);
  padding-top: 0.7rem;
  margin-bottom: 1.2rem;
}

.pkg-detalle summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-blue);
  min-height: 32px;
}

.pkg-detalle summary::-webkit-details-marker {
  display: none;
}

.pkg-detalle summary::after {
  content: '▾';
  transition: transform var(--trans-fast);
}

.pkg-detalle[open] summary::after {
  transform: rotate(180deg);
}

.pkg-detalle .bullets-clean {
  margin-top: 0.6rem;
}

/* Finanzas: tablero de ejemplo, fijo y simple */
.tablero-ejemplo {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.6rem 1.5rem 1.5rem;
}

.tablero-aviso {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}

.tablero-3 {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .pasos-simples {
    grid-template-columns: repeat(2, 1fr);
  }
  .tablero-3 {
    grid-template-columns: 1fr;
  }
  
  
  
  
}

@media (max-width: 600px) {
  .pasos-simples {
    grid-template-columns: 1fr;
  }
  .cierre {
    padding: 3.5rem 0;
  }
  .servicio-precio {
    font-size: 1.55rem;
  }
}

/* Sin animaciones para quien lo pidió en su sistema: todo visible de inmediato */
@media (prefers-reduced-motion: reduce) {
  .entra {
    animation: none;
  }
  
  [data-revelar].por-revelar {
    opacity: 1;
    transform: none;
  }
}

/* Solo para lectores de pantalla */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   COTIZADOR: CUPÓN Y BOTONES DE PAGO (tarjeta oscura del resumen)
   ========================================================================== */
.summary-row.descuento {
  color: #6EE7B7;
}

.summary-row.descuento .price-tag {
  color: #34D399;
}

.calc-cupon {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.1rem;
  margin-bottom: 1.3rem;
}

.calc-cupon-lbl {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #CBD5E1;
  margin-bottom: 0.5rem;
}

.calc-cupon-row {
  display: flex;
  gap: 0.5rem;
}

.calc-cupon.con-cupon .calc-cupon-toggle,
.calc-cupon.con-cupon .calc-cupon-row,
.calc-cupon-row[hidden] {
  display: none;
}

.calc-cupon-toggle {
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 0.5rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #CBD5E1;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}

.calc-cupon-input {
  flex: 1;
  width: 0; /* sin esto el campo no se encoge y ensancha la tarjeta en pantallas angostas */
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.65rem 0.8rem;
}

.calc-cupon-input::placeholder {
  color: #64748B;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}

.calc-cupon-input:focus {
  outline: 2px solid #38BDF8;
  outline-offset: 1px;
  border-color: transparent;
}

/* 16px en celular y en pantallas táctiles (iPad acostado, Galaxy Fold abierto): con menos,
   el iPhone y el iPad acercan la página al escribir el cupón */
@media (max-width: 860px), (pointer: coarse) {
  .calc-cupon-input {
    font-size: 16px;
  }
}

.calc-cupon-btn {
  flex-shrink: 0;
  background: #FFFFFF;
  color: var(--color-navy);
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0 1rem;
  cursor: pointer;
  transition: background var(--trans-fast);
}

.calc-cupon-btn:hover {
  background: #E2E8F0;
}

.calc-cupon-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.calc-cupon-activo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  background: rgba(16, 185, 129, 0.14);
  border: 1px dashed rgba(52, 211, 153, 0.6);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
}

.calc-cupon-activo[hidden] {
  display: none;
}

.calc-cupon-chip {
  font-size: 0.82rem;
  font-weight: 700;
  color: #A7F3D0;
  overflow-wrap: anywhere;
}

.calc-cupon-chip::before {
  content: '🏷️ ';
}

.calc-cupon-quitar {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #CBD5E1;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.2rem;
}

.calc-cupon-msg {
  font-size: 0.78rem;
  margin-top: 0.5rem;
  color: #94A3B8;
}

.calc-cupon-msg:empty {
  display: none;
}

.calc-cupon-msg[data-tipo="error"] { color: #FCA5A5; }
.calc-cupon-msg[data-tipo="ok"] { color: #6EE7B7; }
.calc-cupon-msg[data-tipo="nota"] { color: #FDE68A; }

.calc-acciones {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.calc-pagar-btn,
.calc-asesor-btn {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 1rem;
}

.calc-pagar-btn {
  font-weight: 800;
  color: var(--color-navy);
  background: #FBBF24;
  border: none;
}

.calc-pagar-btn:hover:not(:disabled) {
  color: var(--color-navy);
  transform: translateY(-1px);
}

.calc-pagar-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
  cursor: not-allowed;
}

.calc-pago-msg {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #FDE68A;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
}

.calc-pago-msg[data-tipo="ok"] {
  color: #A7F3D0;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
}

.calc-pago-msg a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

/* Pagar todo o anticipo del 50% */
.calc-anticipo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  border: 0;
  padding: 0;
  margin: 0;
}

/* Con la letra muy agrandada las dos opciones no caben lado a lado */
@media (max-width: 260px) {
  .calc-anticipo {
    grid-template-columns: minmax(0, 1fr);
  }
}

.calc-anticipo[hidden] { display: none; }

.calc-anticipo-opc {
  position: relative;
  cursor: pointer;
}

.calc-anticipo-opc input {
  position: absolute;
  opacity: 0;
}

.calc-anticipo-opc span {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  height: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  transition: border-color 0.2s, background 0.2s;
}

.calc-anticipo-opc small {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.calc-anticipo-opc .calc-anticipo-hoy {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

/* Desglose de cada opción: proyecto, 1er mes y lo que queda pendiente */
.calc-anticipo-opc .calc-anticipo-det {
  display: flex;
  flex-direction: column;
  margin-top: 0.2rem;
  padding: 0;
  border: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.55);
}

.calc-anticipo-opc .calc-anticipo-det span {
  display: block;
  padding: 0;
  border: 0;
  font-size: inherit;
  color: inherit;
}

.calc-anticipo-opc .calc-anticipo-det .resto {
  color: #FDE68A;
}

.calc-anticipo-nota {
  margin: -0.2rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #94A3B8;
}

.calc-anticipo-opc input:checked + span {
  border-color: #FBBF24;
  background: rgba(251, 191, 36, 0.12);
  color: #fff;
}

.calc-anticipo-opc input:focus-visible + span {
  outline: 2px solid #FBBF24;
  outline-offset: 2px;
}

/* ==========================================================================
   ASISTENTE DE PREGUNTAS FRECUENTES (js/bot.js)
   Fijo abajo a la derecha; --bot-offset lo calcula el JS para no tapar la
   navegación inferior del celular ni las barras fijas.
   ========================================================================== */
.apex-bot {
  --bot-offset: 0px;
  --bot-margen: 20px;
  position: fixed;
  right: var(--bot-margen);
  bottom: calc(var(--bot-offset) + var(--bot-margen));
  z-index: 180;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  pointer-events: none;
  font-family: var(--font-main);
}

.apex-bot > * {
  pointer-events: auto;
}

.bot-lanzador {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  color: #FFFFFF;
  background: var(--color-navy);
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.55);
  cursor: pointer;
  transition: transform var(--trans-smooth), box-shadow var(--trans-smooth);
}

.bot-lanzador:hover {
  transform: translateY(-2px) scale(1.04);
}

.bot-lanzador:focus-visible {
  outline: 3px solid #38BDF8;
  outline-offset: 4px;
}

.bot-lanzador svg {
  grid-area: 1 / 1;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.bot-ico-cerrar {
  opacity: 0;
  transform: rotate(-90deg);
}

.apex-bot.abierto .bot-ico-chat {
  opacity: 0;
  transform: rotate(90deg);
}

.apex-bot.abierto .bot-ico-cerrar {
  opacity: 1;
  transform: none;
}

/* Punto "en línea": en la esquina del botón, con un pulso suave */
.bot-en-linea {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #22C55E;
  border: 3px solid #FFFFFF;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
}

.bot-en-linea::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #22C55E;
  animation: bot-pulso 2.4s ease-out infinite;
}

@keyframes bot-pulso {
  0% { transform: scale(1); opacity: 0.7; }
  70%, 100% { transform: scale(1.9); opacity: 0; }
}

.apex-bot.abierto .bot-en-linea {
  display: none;
}

/* Mini salto de bienvenida */
.bot-lanzador.saltando {
  animation: bot-salto 0.9s cubic-bezier(0.28, 0.84, 0.42, 1);
}

@keyframes bot-salto {
  0% { transform: translateY(0) scale(1, 1); }
  18% { transform: translateY(0) scale(1.12, 0.88); }
  42% { transform: translateY(-22px) scale(0.94, 1.08); }
  62% { transform: translateY(0) scale(1.08, 0.92); }
  76% { transform: translateY(-6px) scale(0.98, 1.02); }
  100% { transform: translateY(0) scale(1, 1); }
}

/* Burbuja "¡Hola! ¿Te ayudo?" */
.bot-burbuja {
  position: relative;
  max-width: 220px;
  background: #FFFFFF;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
  border-radius: 16px;
  box-shadow: 0 12px 30px -8px rgba(15, 23, 42, 0.3);
  border: 1px solid var(--border-light);
  margin-right: 4px;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transform-origin: bottom right;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

/* Colita que apunta al centro del botón */
.bot-burbuja::after {
  content: '';
  position: absolute;
  right: 22px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: #FFFFFF;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  border-bottom-right-radius: 3px;
  transform: rotate(45deg);
}

.bot-burbuja.visible {
  opacity: 1;
  transform: none;
  visibility: visible;
}

.apex-bot.abierto .bot-burbuja {
  display: none;
}

/* Panel */
.bot-panel {
  width: min(370px, calc(100vw - 2 * var(--bot-margen)));
  height: min(560px, calc(100vh - var(--bot-offset) - 150px));
  height: min(560px, calc(100dvh - var(--bot-offset) - 150px));
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  transform-origin: bottom right;
  animation: bot-abrir 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bot-panel[hidden] {
  display: none;
}

@keyframes bot-abrir {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.bot-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 0.9rem 0.9rem 1.1rem;
  color: #FFFFFF;
  background: var(--color-navy);
}

.bot-head img {
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.bot-head div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.bot-head strong {
  font-size: 1rem;
}

.bot-head span {
  font-size: 0.76rem;
  color: #BFDBFE;
}

.bot-punto {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22C55E;
  margin-right: 0.25rem;
  vertical-align: 1px;
}

.bot-cerrar {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.bot-cerrar:hover {
  background: rgba(255, 255, 255, 0.2);
}

.bot-mensajes {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--bg-page);
}

.bot-mensajes:focus {
  outline: none;
}

.bot-msg {
  max-width: 88%;
  font-size: 0.88rem;
  line-height: 1.5;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  overflow-wrap: anywhere;
  animation: bot-msg 0.25s ease both;
}

@keyframes bot-msg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.bot-msg.bot {
  align-self: flex-start;
  background: #FFFFFF;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 4px;
}

.bot-msg.usuario {
  align-self: flex-end;
  background: var(--color-blue);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

.bot-msg ul {
  margin: 0.4rem 0;
  padding-left: 0;
  list-style: none;
}

.bot-msg li {
  margin: 0.2rem 0;
}

.bot-msg small {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.bot-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.bot-accion {
  display: inline-block;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-blue);
  background: var(--color-blue-soft);
  border: 1px solid var(--color-blue-border);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.8rem;
  text-decoration: none;
  cursor: pointer;
}

.bot-accion:hover {
  background: #DBEAFE;
}

.bot-accion.whatsapp {
  color: #FFFFFF;
  background: #047857;
  border-color: #047857;
}

.bot-accion.whatsapp:hover {
  background: #065F46;
}

/* Tres puntos de "escribiendo…" */
.bot-escribiendo {
  display: flex;
  gap: 4px;
  padding: 0.8rem 0.9rem;
}

.bot-escribiendo span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94A3B8;
  animation: bot-punto 1s ease-in-out infinite;
}

.bot-escribiendo span:nth-child(2) { animation-delay: 0.15s; }
.bot-escribiendo span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bot-punto {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Preguntas para tocar */
.bot-chips {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.bot-chips-titulo {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bot-chip {
  max-width: 92%;
  text-align: right;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-blue);
  background: #FFFFFF;
  border: 1.5px solid var(--color-blue-border);
  border-radius: 14px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  transition: background var(--trans-fast), border-color var(--trans-fast);
}

.bot-chip:hover {
  background: var(--color-blue-soft);
  border-color: var(--color-blue);
}

.bot-chip-mas {
  color: var(--text-secondary);
  border-style: dashed;
  border-color: var(--border-light);
}

.bot-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.7rem;
  border-top: 1px solid var(--border-light);
  background: #FFFFFF;
}

.bot-input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 16px; /* 16px evita que el iPhone haga zoom al escribir */
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1rem;
  background: var(--bg-page);
  color: var(--text-primary);
}

.bot-input:focus {
  outline: 2px solid var(--color-blue);
  outline-offset: 0;
  background: #FFFFFF;
}

.bot-enviar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #FFFFFF;
  background: var(--color-blue);
  cursor: pointer;
}

.bot-enviar:hover {
  background: #1D4ED8;
}

@media (max-width: 600px) {
  .apex-bot {
    --bot-margen: 14px;
  }
  .bot-lanzador {
    width: 56px;
    height: 56px;
  }
  .bot-burbuja::after {
    right: 19px;
  }
  .bot-panel {
    width: calc(100vw - 2 * var(--bot-margen));
  }
}

@media (prefers-reduced-motion: reduce) {
  .bot-lanzador.saltando,
  .bot-en-linea::after,
  .bot-panel,
  .bot-msg,
  .bot-escribiendo span {
    animation: none;
  }
  .bot-burbuja,
  .bot-lanzador,
  .bot-lanzador svg {
    transition: none;
  }
}

/* Asistente: sugerencias compactas, planes y lista de todas las preguntas
   ========================================================================== */
.bot-panel {
  position: relative;
}

.bot-chips.compactas {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.35rem;
  margin-top: 0;
}

.bot-chips.compactas .bot-chips-titulo {
  width: 100%;
  margin-bottom: 0.1rem;
}

.bot-chips.compactas .bot-chip {
  max-width: 100%;
  text-align: left;
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  border-width: 1px;
}

.bot-lista {
  margin: 0.45rem 0 0.55rem;
}

.bot-msg .bot-lista li {
  margin: 0.15rem 0;
}

.bot-lista-titulo {
  font-weight: 700;
  color: var(--text-secondary);
}

.bot-cobro {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.bot-plan {
  margin-top: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
}

.bot-plan.recomendado {
  border-color: var(--color-gold-border);
  background: #FFFBEB;
}

.bot-plan .bot-lista {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
}

.bot-etiqueta {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-gold-text);
  background: var(--color-gold-bg);
  border-radius: var(--radius-pill);
  padding: 0.05rem 0.45rem;
  vertical-align: 1px;
}

.bot-parte {
  margin-bottom: 0.2rem;
  color: var(--color-blue);
}

.bot-separador {
  border: none;
  border-top: 1px dashed var(--border-light);
  margin: 0.7rem 0;
}

/* Botón de "todas las preguntas" junto al campo */
.bot-menu {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--color-navy);
  background: #FFFFFF;
  cursor: pointer;
}

.bot-menu:hover,
.bot-menu[aria-expanded="true"] {
  background: var(--color-blue-soft);
  border-color: var(--color-blue-border);
  color: var(--color-blue);
}

/* Lista de todas las preguntas: se abre encima de la conversación */
.bot-hoja {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 64px;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  z-index: 2;
  animation: bot-hoja 0.22s ease both;
}

.bot-hoja[hidden] {
  display: none;
}

@keyframes bot-hoja {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.bot-hoja-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0.9rem 0.6rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
}

.bot-hoja-head strong {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.bot-hoja-cerrar {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.bot-hoja-lista {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.4rem 0.8rem 1rem;
}

.bot-hoja-grupo {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0.8rem 0.3rem 0.35rem;
}

.bot-hoja-item {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
  background: none;
  border: none;
  border-radius: 10px;
  padding: 0.55rem 0.6rem;
  cursor: pointer;
}

.bot-hoja-item:hover,
.bot-hoja-item:focus-visible {
  background: var(--color-blue-soft);
  color: var(--color-blue);
}

@media (prefers-reduced-motion: reduce) {
  .bot-hoja {
    animation: none;
  }
}

/* Asistente: pasos numerados y sugerencias armadas (giro, presupuesto) */
.bot-msg .bot-pasos {
  margin: 0.45rem 0 0.2rem;
  padding-left: 1.2rem;
  list-style: decimal;
}

.bot-msg .bot-pasos li {
  margin: 0.3rem 0;
}

.bot-msg .bot-sugerido li {
  margin: 0.5rem 0;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
}

.bot-msg .bot-sugerido small {
  display: block;
  margin-top: 0.15rem;
  line-height: 1.4;
}

/* ==========================================================================
   INICIO QUE CUENTA UNA HISTORIA
   Celular de ejemplo (sticky en computadora) + 3 pasos: giro → nombre → su
   página. El contenido del celular lo pinta js/historia.js.
   ========================================================================== */
.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;
}

.historia {
  padding: 3.5rem 0 4.5rem;
  text-align: left;
  background: #FFFFFF;
}

.historia-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  grid-template-areas:
    "texto cel"
    "pasos cel";
  column-gap: 3.5rem;
  align-items: start;
}

.historia-texto {
  grid-area: texto;
  padding-top: 1.5rem;
}

.historia .hero-palabras {
  font-size: clamp(2.2rem, 4.1vw, 3.75rem);
  line-height: 1.04;
  text-align: left;
  max-width: none;
  margin: 0 0 1.2rem;
}

.historia .hero-sub-punchy {
  margin: 0 0 2rem;
  max-width: 560px;
}

.historia .hero-btn-row {
  justify-content: flex-start;
  margin-bottom: 3rem;
}

/* ---- El celular ---- */
.cel-zona {
  grid-area: cel;
  position: sticky;
  top: 6.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1rem;
}

.cel-zona::before {
  content: '';
  position: absolute;
  z-index: 0;
  width: 340px;
  height: 340px;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: none;
  transition: background 0.6s;
}

.cel {
  position: relative;
  z-index: 1;
  width: 270px;
  height: 540px;
  padding: 11px;
  background: #0F172A;
  border-radius: 42px;
  box-shadow: inset 0 0 0 2px #334155;
  animation: cel-flotar 6s ease-in-out infinite;
  will-change: transform;
}

.cel::before {
  content: '';
  position: absolute;
  z-index: 3;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 20px;
  border-radius: 12px;
  background: #0F172A;
}

.cel-pantalla {
  --cel-color: #C2410C;
  --cel-suave: #FFEDD5;
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 32px;
  background: #F8FAFC;
}

.cel-sitio {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.cel-sitio.cambiando {
  opacity: 0;
  transform: translateY(12px) scale(0.98);
}

.cel-top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 2.5rem 1.1rem 0.7rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cel-color) 90%, #000), var(--cel-color));
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  transition: background 0.4s;
}

/* Logo: las iniciales del negocio (js/historia.js) */
.cel-logo {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--cel-color);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: color 0.4s;
}

.cel-nombre {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cel-banner {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  padding: 0.3rem 1.1rem 1.15rem;
  background: var(--cel-color);
  color: #FFFFFF;
  border-radius: 0 0 22px 22px;
  transition: background 0.4s;
}

/* Aro decorativo, apenas visible */
.cel-banner::after {
  content: '';
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 22px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.cel-banner > * {
  position: relative;
  z-index: 1;
}

.cel-estado {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.6rem;
  font-weight: 700;
}

.cel-estado::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.3);
}

.cel-banner b {
  display: block;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.cel-nota {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  opacity: 0.9;
}

.cel-ic {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cel-items {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  align-content: start;
  padding: 0.9rem 0.9rem 0.7rem;
  overflow: hidden;
}

.cel-item {
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid #EEF2F6;
  border-radius: 12px;
}

/* Foto del producto; detrás, el ícono del giro por si la foto no carga */
.cel-item .e {
  position: relative;
  display: grid;
  place-items: center;
  height: 74px;
  background: var(--cel-suave);
  color: var(--cel-color);
  font-size: 1.4rem;
  transition: background 0.4s;
}

.cel-item .e img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Precio en etiqueta sobre la foto */
.cel-item .p {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 0.6rem;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cel-item .n {
  padding: 0.45rem 0.6rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0F172A;
  /* Nombres largos ("Extensión de pestañas"): hasta 2 líneas */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Botón: lo que ese negocio haría en su página (pedir, pagar, agendar…) */
.cel-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-shrink: 0;
  margin: 0 0.9rem 1.1rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: var(--cel-color);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.78rem;
  text-align: center;
  transition: background 0.4s;
}

.cel-cta .cel-ic {
  font-size: 0.95rem;
}

.cel-cta.whatsapp {
  background: #1DA851;
}

.cel-cap {
  position: relative;
  z-index: 1;
  margin-top: 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  overflow-wrap: anywhere; /* "Así se vería la página de …" con un nombre largo sin espacios */
}

@keyframes cel-flotar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---- Los 3 pasos ---- */
.historia-pasos {
  grid-area: pasos;
  list-style: none;
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.h-paso {
  display: flex;
  gap: 1rem;
  padding: 1.4rem;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  scroll-margin-top: 6.5rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.h-num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--color-navy);
  color: #FFFFFF;
  font-weight: 900;
  transition: background 0.3s;
}

.h-paso.hecho .h-num {
  background: var(--color-emerald);
  font-size: 0;
}

.h-paso.hecho .h-num::after {
  content: '✓';
  font-size: 1rem;
}

.h-cuerpo {
  flex: 1;
  min-width: 0;
}

.h-tit {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0.25rem 0 0.2rem;
  overflow-wrap: anywhere; /* "Paquete PRO para …" con el nombre del negocio */
}

.h-txt {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
}

.giros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.giro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.75rem 0.4rem;
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-radius: 14px;
  font: 700 0.85rem var(--font-main);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.giro span {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-blue);
  transition: transform 0.3s;
}

/* Iconos de línea en el texto: miden lo que la letra que los rodea */
.ico {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

.calc-reco {
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--color-gold-bg);
  color: var(--color-gold-text);
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}

/* Solo con mouse: en pantallas táctiles el :hover se queda "pegado" después de tocar */
@media (hover: hover) {
  .giro:hover {
    transform: translateY(-2px);
  }

  .giro:hover span {
    transform: scale(1.15) rotate(-6deg);
  }
}

.giro[aria-pressed="true"] {
  border-color: var(--color-blue);
  background: var(--color-blue-soft);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.giro:focus-visible,
.color:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

.h-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  font: 600 1rem var(--font-main);
  color: var(--text-primary);
  background: #FFFFFF;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.h-input:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.4);
}

.colores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.color {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #FFFFFF;
  background: var(--c);
  box-shadow: 0 0 0 1px var(--border-light);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.color[data-color=""] {
  background: conic-gradient(#C2410C, #0E7490, #BE185D, #7C3AED, #C2410C);
}

@media (hover: hover) {
  .color:hover {
    transform: scale(1.1);
  }
}

.color[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--text-primary);
}

/* Paso 3: su recomendación */
.h-paso.listo {
  border-color: var(--color-blue-border);
}

.h-reco {
  animation: aparecer 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.h-reco-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-bottom: 0.4rem;
}

.h-reco-head > div {
  min-width: 0;
}

.h-reco-head small {
  display: block;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--color-blue);
}

.h-precio b {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--text-primary);
}

.h-precio span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.h-lista {
  list-style: none;
  display: grid;
  gap: 0.45rem;
  margin: 0.9rem 0 1.2rem;
  padding: 0;
}

.h-lista li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.h-lista li::before {
  content: '✓';
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--color-emerald);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 900;
}

.h-tip {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: -0.4rem 0 1.1rem;
}

.h-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ---- "Así de fácil": línea que se llena al bajar ---- */

.pasos-linea {
  position: relative;
  padding-top: 1.4rem;
}

.pasos-linea::before,
.pasos-linea::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  border-radius: 6px;
  background: var(--bg-muted);
}

.pasos-linea::after {
  background: var(--color-blue);
  transform: scaleX(var(--avance, 0));
  transform-origin: left center;
  transition: transform 0.2s linear;
}

.pasos-linea .paso-num {
  transition: background 0.3s, transform 0.3s;
}

.pasos-linea li.alcanzado .paso-num {
  background: var(--color-blue);
  transform: scale(1.08);
}

/* ---- Celular y tableta ---- */
@media (max-width: 860px) {
  .historia {
    padding: 2.5rem 0 3rem;
  }
  .historia-grid {
    grid-template-columns: minmax(0, 1fr); /* con 1fr, lo que no se encoge ensancharía la página */
    grid-template-areas:
      "texto"
      "cel"
      "pasos";
  }
  .historia-texto {
    padding-top: 0;
    text-align: center;
  }
  .historia .hero-palabras {
    font-size: clamp(2rem, 8.4vw, 3rem);
    text-align: center;
  }
  .historia .hero-sub-punchy {
    margin: 0 auto 1.6rem;
  }
  .historia .hero-btn-row {
    justify-content: center;
    margin-bottom: 1.5rem;
  }
  .cel-zona {
    position: static;
    padding: 0.8rem 0 0.4rem;
  }
  .cel {
    width: 240px;
    height: 480px;
  }
  .cel-item .e {
    height: 62px;
  }
  .cel-banner b {
    font-size: 1.05rem;
  }
  /* En celular: paso 1 → celular → pasos 2 y 3, así ven el cambio justo abajo de donde tocan */
  .historia-grid {
    row-gap: 1rem;
  }
  .historia-pasos {
    display: contents;
  }
  .historia-texto { order: 1; }
  #paso-giro { order: 2; }
  .cel-zona { order: 3; }
  #paso-nombre { order: 4; }
  #paso-tuya { order: 5; }
  .h-paso {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .h-paso {
    padding: 1.1rem;
    gap: 0.8rem;
  }
  .h-num {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.9rem;
  }
  .giro {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cel,
  .h-reco {
    animation: none;
  }
  .cel-sitio,
  .giro,
  .giro span,
  .pasos-linea::after {
    transition: none;
  }
}

/* ---- Inicio en dos pantallas, en el mismo lugar (js/historia.js pone las clases; sin JS
   se ve todo como lista):
   1) .cerrada: el mensaje, los botones y el celular.
   2) .abierta: "Pruébalo con tu negocio" cambia el mensaje por los pasos, uno a la vez y
      grandes, junto al celular. "← Volver" regresa al mensaje. ---- */
.historia.cerrada .historia-grid,
.historia.abierta .historia-grid {
  align-items: center;
  min-height: calc(100vh - 12rem);
}
.historia.cerrada .historia-grid {
  grid-template-areas: "texto cel";
}
.historia.cerrada .historia-pasos {
  display: none;
}
.historia.cerrada .hero-btn-row {
  margin-bottom: 0;
}
.historia.abierta .historia-grid {
  grid-template-areas: "pasos cel";
}
.historia.abierta .historia-texto {
  display: none;
}
.historia.cerrada .cel-zona,
.historia.abierta .cel-zona {
  position: relative;
  top: 0;
}
.historia.abierta .historia-pasos {
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
  align-self: center;
}
.historia.abierta .h-paso:not(.actual) {
  display: none;
}

/* Paso ya completado: solo la palomita en su círculo */
.historia.abierta .h-paso.hecho .h-num {
  font-size: 0;
}

/* Barra de arriba: "← Volver" y 1 · 2 · 3 */
.h-nav {
  display: none;
}
.historia.abierta .h-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.h-volver {
  padding: 0.4rem 0;
  border: 0;
  background: none;
  font: 700 0.92rem var(--font-main);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}
.h-volver:hover {
  color: var(--color-blue);
}
.h-puntos {
  display: flex;
  gap: 0.4rem;
}
.h-punto {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem 0.35rem 0.35rem;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: #FFFFFF;
  font: 700 0.8rem var(--font-main);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.h-punto span {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-primary);
  font-size: 0.75rem;
  transition: background 0.25s, color 0.25s;
}
.h-punto[aria-current="step"] {
  border-color: var(--color-blue);
  background: var(--color-blue-soft);
  color: var(--color-blue);
}
.h-punto[aria-current="step"] span {
  background: var(--color-blue);
  color: #FFFFFF;
}
.h-punto.hecho span {
  background: var(--color-emerald);
  color: #FFFFFF;
}

/* El paso, grande como el mensaje del inicio */
.historia.abierta .h-paso {
  padding: 2.2rem;
  gap: 1.3rem;
  border-radius: 24px;
}
.historia.abierta .h-num {
  width: 2.8rem;
  height: 2.8rem;
  font-size: 1.15rem;
}
.historia.abierta .h-tit {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.15;
  margin-bottom: 0.45rem;
}
.historia.abierta .h-txt {
  font-size: 1.05rem;
  margin-bottom: 1.4rem;
}
.historia.abierta .giros {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}
.historia.abierta .giro {
  padding: 1.1rem 0.5rem;
  font-size: 1rem;
}
.historia.abierta .giro span {
  font-size: 2.2rem;
}
.historia.abierta .h-input {
  padding: 1rem 1.1rem;
  font-size: 1.1rem;
}

/* Cada paso entra suave al llegar a él */
.h-paso.aparece {
  animation: h-paso-entra 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes h-paso-entra {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* "Ver mi recomendación" en el paso 2 (por si no eligen color) */
.h-continuar {
  display: inline-flex;
  margin-top: 1.2rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-blue);
  cursor: pointer;
  transition: color var(--trans-fast), background-color var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast), transform var(--trans-fast), opacity var(--trans-fast);
}
@media (hover: hover) {
  .h-continuar:hover {
    background: var(--color-blue);
    border-color: var(--color-blue);
    color: #FFFFFF;
  }
}

/* Botón "Pruébalo con tu negocio": dos saltitos con un aro que se expande y se detiene
   (el aro es verde para no confundirse con el anillo de foco azul) */
.btn-llamativo {
  position: relative;
  animation: llamativo-salto 2.6s ease-in-out 0.8s 2;
}
.btn-llamativo::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid var(--color-emerald, #10B981);
  opacity: 0;
  pointer-events: none;
  animation: llamativo-aro 2.6s ease-out 0.8s 2;
}
.btn-llamativo .flecha {
  display: inline-block;
  animation: llamativo-flecha 1.3s ease-in-out 0.8s 4;
}

@keyframes llamativo-salto {
  0%, 70%, 100% { transform: none; }
  78% { transform: translateY(-3px) scale(1.04); }
  86% { transform: none; }
  92% { transform: translateY(-1px); }
}
@keyframes llamativo-aro {
  0% { opacity: 0.7; transform: scale(1); }
  60%, 100% { opacity: 0; transform: scale(1.12, 1.5); }
}
@keyframes llamativo-flecha {
  0%, 100% { transform: none; }
  50% { transform: translateY(3px); }
}

@media (max-width: 860px) {
  .historia.cerrada .historia-grid,
  .historia.abierta .historia-grid {
    min-height: 0;
  }
  .historia.cerrada .historia-grid {
    grid-template-areas:
      "texto"
      "cel";
  }
  /* En celular: el paso arriba y el celular (un poco más chico) abajo */
  .historia.abierta .historia-grid {
    grid-template-areas:
      "pasos"
      "cel";
  }
  .historia.abierta .historia-pasos {
    display: grid;
    order: 1;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }
  .historia.abierta .cel-zona {
    order: 2;
    padding-top: 0.2rem;
  }
  .historia.abierta .cel {
    transform: scale(0.6);
    transform-origin: top center;
    margin-bottom: -192px;
    animation: none;
  }
  .historia.abierta .h-paso {
    padding: 1.4rem;
    gap: 0.9rem;
  }
  .h-punto {
    padding: 0.3rem;
    font-size: 0;
  }
  .h-punto span {
    font-size: 0.75rem;
  }
}

@media (max-width: 600px) {
  .historia.abierta .h-tit {
    font-size: 1.45rem;
  }
  .historia.abierta .h-num {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 0.95rem;
  }
  .historia.abierta .giro {
    padding: 0.85rem 0.3rem;
    font-size: 0.85rem;
  }
  .historia.abierta .giro span {
    font-size: 1.7rem;
  }
  .historia.abierta .h-paso {
    padding: 1.2rem;
    gap: 0.8rem;
  }
  .historia.abierta .h-txt {
    font-size: 0.98rem;
    margin-bottom: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-llamativo,
  .btn-llamativo::after,
  .btn-llamativo .flecha,
  .h-paso.aparece {
    animation: none;
  }
}

/* Mientras recorren los 3 pasos (js/historia.js pone body.pasos-en-curso) no hay nada
   abajo a qué bajar: se ocultan las demás secciones del Inicio y el pie de página hasta
   que llegan al paso 3 o regresan con "← Volver". */
body.pasos-en-curso #tab-inicio > section:not(#tu-negocio),
body.pasos-en-curso:has(#tab-inicio.active) .footer-clean {
  display: none;
}

/* En pantallas altas (tableta de pie, navegador alejado) debajo de los pasos queda espacio
   libre: del mismo blanco que la sección, no una franja gris */
html:has(body.pasos-en-curso #tab-inicio.active),
body.pasos-en-curso:has(#tab-inicio.active) {
  background-color: #FFFFFF;
}

/* En celular el asistente se esconde mientras "¿Listo para empezar?" está a la vista
   (js/historia.js), para no tapar su botón de WhatsApp; en el cotizador tampoco, mientras
   se ve la barra del total (tapaba las opciones de la derecha) */
@media (max-width: 860px) {
  .apex-bot {
    transition: opacity 0.3s, transform 0.3s;
  }
  body.cierre-a-la-vista .apex-bot:not(.abierto),
  .calc-mobile-bar.visible ~ .apex-bot:not(.abierto) {
    opacity: 0;
    transform: translateY(24px);
    pointer-events: none;
  }
  body.cierre-a-la-vista .apex-bot:not(.abierto) *,
  .calc-mobile-bar.visible ~ .apex-bot:not(.abierto) * {
    pointer-events: none !important;
  }
}

/* Los pasos se encienden conforme avanza la línea (js/historia.js pone --avance) */
.pasos-linea::after {
  transition: transform 0.12s linear;
}
.pasos-linea li {
  transition: border-color 0.35s, transform 0.35s, background 0.35s;
}
.pasos-linea li.alcanzado {
  border-color: var(--color-blue-border);
  background: #FFFFFF;
  transform: translateY(-4px);
}

/* El cierre como franja: texto a la izquierda y botones a la derecha */

/* Tableta: las 3 tarjetas siguen lado a lado (caben) */

/* Cotizador en laptops de pantalla baja: la parte fija del resumen (sugerencia, totales y
   pago) se compacta para que la lista de servicios conserve espacio. */
@media (min-width: 1025px) and (max-height: 820px) {
  .calc-summary-sticky {
    padding-top: 1.4rem;
  }
  .summary-head-clean {
    margin-bottom: 0.7rem;
    padding-bottom: 0.6rem;
  }
  .summary-footer {
    padding-bottom: 1.1rem;
  }
  .summary-footer .upsell-box {
    margin: 0.7rem 0;
    padding: 0.55rem 0.75rem;
    font-size: 0.75rem;
  }
  .summary-footer .btn-upsell {
    margin-top: 0.35rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
  }
  .summary-totals-box {
    padding-top: 0.7rem;
    margin-bottom: 0.7rem;
  }
  .total-line {
    margin-bottom: 0.15rem;
  }
  .total-val {
    font-size: 1.35rem;
  }
  .total-val.recurring {
    font-size: 1.1rem;
  }
  .summary-footer .consumo-note {
    font-size: 0.75rem;
    margin: -0.4rem 0 0.6rem;
  }
  /* Pagar y asesor lado a lado */
  .calc-acciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .calc-acciones > .calc-anticipo,
  .calc-acciones > .calc-anticipo-nota,
  .calc-acciones > .calc-pago-msg {
    grid-column: 1 / -1;
  }
  .calc-pagar-btn,
  .calc-asesor-btn {
    padding: 0.65rem 0.5rem;
    font-size: 0.86rem;
  }
}

/* ==========================================================================
   CELULAR: el Inicio cabe en la pantalla (sin cortes) para que las animaciones
   se vean completas. Solo aplica en celular; la computadora no cambia.
   - El celular de ejemplo se encoge con zoom (js/historia.js pone --cel-zoom).
   - Textos cortos: .lbl-long se oculta y .lbl-corto aparece en ≤860px.
   ========================================================================== */
.lbl-corto {
  display: none;
}

@media (max-width: 860px) {
  .lbl-corto {
    display: inline;
  }
  

  /* ---- El celular de ejemplo: el mismo de la computadora, del tamaño que quepa ---- */
  .cel {
    width: 270px;
    height: 540px;
    zoom: var(--cel-zoom, 0.55); /* 0.55 mientras carga el JS: tamaño típico, sin brincos */
  }
  .cel-zona::before {
    width: calc(340px * var(--cel-zoom, 0.55));
    height: calc(340px * var(--cel-zoom, 0.55));
  }
  .historia.abierta .cel {
    transform: none;
    margin-bottom: 0;
  }

  /* ---- Pantalla 1: mensaje + botones + celular, todo a la vista ---- */
  .historia.cerrada,
  .historia.abierta {
    padding: 1rem 0 0.6rem;
  }
  .historia.cerrada .historia-grid,
  .historia.abierta .historia-grid {
    row-gap: 0.6rem;
  }
  
  .historia .hero-palabras {
    font-size: clamp(1.75rem, min(7.6vw, 5.2svh), 2.6rem);
    line-height: 1.1;
    margin-bottom: 0.6rem;
  }
  .historia .hero-sub-punchy {
    font-size: 0.98rem;
    line-height: 1.45;
    margin-bottom: 0.9rem;
    max-width: 30ch;
  }
  .historia.cerrada .hero-btn-row {
    flex-wrap: nowrap;
    gap: 0.6rem;
    margin-bottom: 0;
  }
  .historia.cerrada .hero-btn-row .btn {
    width: auto;
    padding: 0.75rem 1.2rem;
    font-size: 0.95rem;
    white-space: nowrap;
  }
  .historia.cerrada .cel-zona {
    padding: 0.5rem 0 0;
  }
  .historia.cerrada .cel-cap {
    margin-top: 0.5rem;
    font-size: 0.78rem;
  }
  /* El pie del celular siempre en un renglón ("…" si no cabe): en dos, el celular de ejemplo
     se volvería a medir más chico al regresar de "Pruébalo" con un nombre largo */
  .cel-cap {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ---- Pantalla 2: el paso compacto arriba y el celular completo abajo ---- */
  .historia.abierta .historia-pasos {
    gap: 0.6rem;
  }
  .historia.abierta .cel-zona {
    padding-top: 0;
  }
  .historia.abierta .cel-cap {
    display: none;
  }
  .h-volver {
    padding: 0.2rem 0;
    font-size: 0.88rem;
  }
  .h-punto span {
    width: 1.35rem;
    height: 1.35rem;
  }
  .historia.abierta .h-paso {
    padding: 0.95rem 1rem 1rem;
    border-radius: 18px;
  }
  .historia.abierta .h-num {
    display: none; /* ya están los puntos 1 · 2 · 3 arriba */
  }
  .historia.abierta .h-tit {
    font-size: 1.25rem;
    margin: 0 0 0.25rem;
  }
  .historia.abierta .h-txt {
    font-size: 0.9rem;
    margin-bottom: 0.7rem;
  }
  /* Paso 1: los 6 giros en 3 × 2, ícono junto al nombre */
  .historia.abierta .giros {
    gap: 0.45rem;
  }
  .historia.abierta .giro {
    flex-direction: row;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.55rem 0.2rem;
    font-size: 0.8rem;
    border-radius: 12px;
  }
  .historia.abierta .giro span {
    font-size: 1.2rem;
  }
  /* Paso 2: nombre, colores y botón en menos alto */
  .historia.abierta .h-input {
    padding: 0.65rem 0.9rem;
    /* 16px o más a la vista aunque el paso se reduzca (--pasos-letra = --pasos-zoom, ver
       js/historia.js): con menos, el iPhone acerca la página al escribir el nombre y todo se
       descuadra (16.5 por los redondeos) */
    font-size: calc(16.5px / var(--pasos-letra, 1));
  }
  .historia.abierta .colores {
    gap: 0.45rem;
    margin-top: 0.6rem;
  }
  .historia.abierta .color {
    width: 30px;
    height: 30px;
  }
  .historia.abierta .h-continuar {
    margin-top: 0.7rem;
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
  }
  /* Paso 3: su recomendación compacta y los dos botones en una fila */
  .historia.abierta .h-reco-head {
    margin-bottom: 0.2rem;
  }
  .historia.abierta .h-lista {
    gap: 0.3rem;
    margin: 0.5rem 0 0.8rem;
  }
  .historia.abierta .h-lista li {
    font-size: 0.85rem;
    line-height: 1.35;
  }
  .historia.abierta .h-tip {
    display: none;
  }
  .historia.abierta .h-btns {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
  .historia.abierta .h-btns .btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding: 0.7rem 0.6rem;
    font-size: 0.86rem;
    white-space: nowrap;
  }

  /* El botón del asistente no tapa el celular mientras recorren los pasos */
  body.historia-a-la-vista:has(.historia.abierta) .apex-bot:not(.abierto) {
    opacity: 0;
    transform: translateY(24px);
    pointer-events: none;
  }
  body.historia-a-la-vista:has(.historia.abierta) .apex-bot:not(.abierto) * {
    pointer-events: none !important;
  }

  /* ---- "Cómo trabajamos": la pantalla fija cabe completa con su línea ---- */
  
  
  
  
  
  
  
  
  
  
  
  
}

/* "Nuestros servicios" compacto en todos los celulares (antes solo hasta 420px) */
@media (min-width: 421px) and (max-width: 639px) {
  .seccion-servicios {
    min-height: 0;
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
}

/* Celulares de pantalla baja (iPhone con la barra de Safari, Android chicos) */
@media (max-width: 860px) and (max-height: 760px) {
  .historia.abierta .h-txt {
    display: none;
  }
  .historia.abierta .h-lista li:nth-child(n+2) {
    display: none;
  }
  
}

@media (max-width: 860px) and (max-height: 680px) {
  
  
  
  .historia.cerrada .cel-cap {
    display: none;
  }
  
  
}

/* ==========================================================================
   CELULAR: acomodo automático según el tamaño de la pantalla
   (js/historia.js elige .cel-lado cuando el celular de ejemplo queda más grande
   a la derecha que abajo: celular acostado, o de pie y bajito mientras eligen)
   ========================================================================== */
@media (max-width: 860px) {
  /* Barra de arriba siempre en un renglón, aun en los celulares más angostos */
  .nav-container {
    flex-wrap: nowrap;
  }
  .brand-wrapper {
    min-width: 0;
    flex-shrink: 1;
  }
  .navbar .brand-logo-img {
    width: auto;
    max-width: 100%;
  }
  .nav-container > div[style] {
    flex-shrink: 0;
  }

  /* Nada del Inicio puede salirse de ancho (el navegador alejaría toda la página) */
  .historia {
    overflow-x: clip;
  }
  .h-continuar {
    font-size: 0.85rem;
  }
  .historia.cel-lado .h-continuar {
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
  }
  /* ---- El celular a la derecha y el contenido a la izquierda ---- */
  .historia.cel-lado .historia-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 0.9rem;
    align-items: center;
  }
  .historia.cerrada.cel-lado .historia-grid {
    grid-template-areas: "texto cel";
  }
  .historia.abierta.cel-lado .historia-grid {
    grid-template-areas: "pasos cel";
  }
  .historia.cel-lado .cel-zona,
  .historia.cel-lado .historia-pasos,
  .historia.cel-lado .historia-texto {
    order: 0;
  }
  .historia.cel-lado .cel-zona {
    padding: 0;
  }
  .historia.cel-lado .cel-cap {
    display: none;
  }
  .historia.cel-lado .historia-pasos {
    max-width: none;
    margin: 0;
  }
  .historia.cel-lado .historia-texto {
    text-align: left;
  }
  .historia.cel-lado .hero-palabras,
  .historia.cel-lado .hero-sub-punchy {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }
  .historia.cel-lado .hero-btn-row {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .historia.cel-lado .h-nav {
    gap: 0.4rem;
  }
  /* Los giros se reparten en las columnas que quepan (1 de pie, 3 acostado) */
  .historia.cel-lado .giros {
    grid-template-columns: repeat(auto-fill, minmax(min(118px, 100%), 1fr));
    gap: 0.4rem;
  }
  .historia.cel-lado .giro {
    justify-content: flex-start;
    padding: 0.5rem 0.6rem;
  }
  .historia.cel-lado .colores {
    gap: 0.4rem;
  }
  .historia.cel-lado .h-continuar {
    white-space: normal;
    text-align: left;
  }
  .historia.cel-lado .h-paso {
    padding: 0.8rem 0.85rem 0.85rem;
  }
}

/* ---- Celular acostado (pantalla baja y ancha) ---- */

/* ---- Celulares muy angostos (Galaxy Fold, iPhone SE de 1a generación) ---- */
@media (max-width: 340px) {
  .historia .hero-palabras {
    font-size: 1.55rem;
  }
  .historia.abierta .color {
    width: 27px;
    height: 27px;
  }
  .historia.abierta .colores {
    gap: 0.35rem;
  }
  .historia.cerrada .hero-btn-row .btn {
    padding: 0.7rem 0.9rem;
    font-size: 0.88rem;
  }
  .historia.abierta .giro {
    font-size: 0.75rem;
    gap: 0.2rem;
  }
  .historia.abierta .giro span {
    font-size: 1rem;
  }
  
  
  
}

/* ---- 300px o menos (Galaxy Fold, iPhone con la letra agrandada al 125–150 %): nada puede
   salirse de ancho ---- */
@media (max-width: 300px) {
  .historia.cerrada .hero-btn-row {
    flex-wrap: wrap;
  }
  /* Las 5 pestañas de abajo siempre caben; con la letra agrandada cada px se ve más grande,
     así que la etiqueta sigue leyéndose */
  .tab-segmented-control {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }
  .tab-segmented-control .tab-btn {
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
    font-size: clamp(9px, 3.6vw, 11px);
  }
  .tab-segmented-control .tab-lbl {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Pantallas muy bajas (celular acostado chico): el paso 2 en menos renglones */
@media (max-width: 860px) and (max-height: 420px) {
  .historia.abierta #paso-nombre .h-cuerpo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.6rem;
  }
  .historia.abierta #paso-nombre .h-tit,
  .historia.abierta #paso-nombre .h-input {
    flex-basis: 100%;
    margin: 0;
  }
  .historia.abierta #paso-nombre .colores,
  .historia.abierta #paso-nombre .h-continuar {
    margin: 0;
  }
  .historia.abierta .h-input {
    padding: 0.5rem 0.8rem;
  }
  .historia.abierta .color {
    width: 26px;
    height: 26px;
  }
  .historia.abierta .h-paso {
    padding: 0.7rem 0.85rem;
  }
  .historia.abierta .h-tit {
    font-size: 1.1rem;
  }
  .h-punto span {
    width: 1.2rem;
    height: 1.2rem;
  }
  .historia.abierta .historia-pasos {
    gap: 0.4rem;
  }
}

/* Los dos botones de la recomendación bajan de renglón si no caben */
@media (max-width: 860px) {
  .historia.abierta .h-btns {
    flex-wrap: wrap;
  }
  .historia.abierta .h-btns .btn {
    flex: 1 1 8rem;
  }
}

/* "Nuestros servicios" en celulares bajos: cada tarjeta ya es un enlace completo, así que
   sobra el "Ver paquetes →" y todo cabe sin encogerse */

/* Con el celular a la derecha: la tarjeta del paso a todo lo ancho de su columna y el botón
   del asistente no lo tapa mientras el Inicio está a la vista */
@media (max-width: 860px) {
  .historia.cel-lado .h-paso {
    max-width: none;
  }
  body.historia-a-la-vista:has(.historia.cel-lado) .apex-bot:not(.abierto) {
    opacity: 0;
    transform: translateY(24px);
    pointer-events: none;
  }
  body.historia-a-la-vista:has(.historia.cel-lado) .apex-bot:not(.abierto) * {
    pointer-events: none !important;
  }
}
/* Celular acostado: el botón del asistente más chico */
@media (max-width: 860px) and (orientation: landscape) and (max-height: 500px) {
  .bot-lanzador {
    width: 46px;
    height: 46px;
  }
  .apex-bot {
    --bot-margen: 10px;
  }
}

/* Cotizador: en una columna nunca más ancho que la pantalla (antes desbordaba en 280px) */
@media (max-width: 1024px) {
  .calc-layout-clean {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 340px) {
  .total-line {
    flex-wrap: wrap;
    gap: 0 0.5rem;
  }
  .total-val {
    font-size: 1.45rem;
  }
  .total-val.recurring {
    font-size: 1.15rem;
  }
}

/* Textos cortos dentro de botones (flex con gap): el span no debe contar como otro elemento,
   o aparece un espacio doble ("Cotizar  Proyecto") */
.btn .lbl-long {
  display: contents;
}
.btn .lbl-corto {
  display: none;
}
@media (max-width: 860px) {
  .btn .lbl-long {
    display: none;
  }
  .btn .lbl-corto {
    display: contents;
  }
}

/* Al entrar a "Pruébalo" el celular de ejemplo no cambia de tamaño ni de lugar
   (js/historia.js): el paso ocupa el lugar del mensaje y, si no cabe, se reduce él
   (--pasos-zoom). El celular sigue flotando igual que en el inicio. */
@media (max-width: 860px) {
  .historia.abierta .historia-pasos {
    zoom: var(--pasos-zoom, 1);
    align-content: center;
  }
}
@media (max-width: 860px) and (prefers-reduced-motion: no-preference) {
  .historia.abierta .cel {
    animation: cel-flotar 6s ease-in-out infinite;
  }
}

/* ---- Celular y tableta de pie: los pasos a tamaño normal ----
   El paso va donde estaba el mensaje, encima del celular de ejemplo, que no se mueve. Por eso
   está hecho para caber ahí sin reducirse:
   - Sin tarjeta, igual que el mensaje.
   - Sin el texto de ayuda: el título y los controles ya dicen qué hacer.
   - Paso 2: los colores y «Listo» en un renglón.
   - Paso 3: solo la primera razón.
   Si aun así no cabe, js/historia.js aparta lugar desde el inicio: el celular de ejemplo queda
   un poco más chico, pero igual en las dos pantallas. Solo como último recurso reduce el paso. */
@media (max-width: 860px) {
  .historia.abierta:not(.cel-lado) .historia-pasos {
    gap: 0.5rem;
  }
  .historia.abierta:not(.cel-lado) .h-volver {
    padding: 0.25rem 0;
    font-size: 0.9375rem;
  }
  .historia.abierta:not(.cel-lado) .h-punto {
    padding: 0.15rem;
  }
  .historia.abierta:not(.cel-lado) .h-punto span {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.8125rem;
  }
  .historia.abierta:not(.cel-lado) .h-paso {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .historia.abierta:not(.cel-lado) .h-tit {
    font-size: 1.375rem;
    line-height: 1.2;
    margin: 0 0 0.65rem;
  }
  .historia.abierta:not(.cel-lado) .h-txt {
    display: none;
  }
  /* Paso 1: los 6 giros en 3 × 2 */
  .historia.abierta:not(.cel-lado) .giros {
    gap: 0.5rem;
  }
  .historia.abierta:not(.cel-lado) .giro {
    min-height: 2.75rem;
    padding: 0.45rem 0.25rem;
    gap: 0.35rem;
    font-size: 0.875rem;
  }
  .historia.abierta:not(.cel-lado) .giro span {
    font-size: 1.3rem;
  }
  /* Paso 2: el nombre y, abajo, los colores con «Listo» al final del renglón */
  .historia.abierta:not(.cel-lado) #paso-nombre .h-cuerpo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.5rem;
  }
  .historia.abierta:not(.cel-lado) #paso-nombre .h-tit,
  .historia.abierta:not(.cel-lado) #paso-nombre .h-input {
    flex: 1 0 100%;
    margin: 0;
  }
  .historia.abierta:not(.cel-lado) .h-input {
    padding: 0.7rem 0.95rem;
  }
  .historia.abierta:not(.cel-lado) .colores {
    /* Los círculos se achican un poco en pantallas angostas para que «Listo» no baje de renglón
       (los 134px son el margen de la página, «Listo», su espacio y un poco de holgura) */
    --color-tam: clamp(28px, calc((100vw - 134px) / 7), 34px);
    gap: calc(var(--color-tam) / 5);
    margin: 0;
  }
  .historia.abierta:not(.cel-lado) .color {
    width: var(--color-tam);
    height: var(--color-tam);
  }
  .historia.abierta:not(.cel-lado) .h-continuar {
    margin: 0 0 0 auto;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
  }
  /* Paso 3: la recomendación con su primera razón y los dos botones */
  .historia.abierta:not(.cel-lado) #paso-tuya .h-tit {
    margin: 0;
  }
  .historia.abierta:not(.cel-lado) .h-reco-head {
    margin-bottom: 0;
  }
  .historia.abierta:not(.cel-lado) .h-reco-head small {
    line-height: 1.3;
  }
  .historia.abierta:not(.cel-lado) .h-lista {
    margin: 0.4rem 0 0.75rem;
  }
  .historia.abierta:not(.cel-lado) .h-lista li {
    font-size: 0.875rem;
    line-height: 1.38;
  }
  .historia.abierta:not(.cel-lado) .h-lista li:nth-child(n+2) {
    display: none;
  }
  .historia.abierta:not(.cel-lado) .h-btns .btn {
    flex: 1 1 auto;
    min-height: 2.75rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.9375rem;
  }
}
/* Celulares muy angostos (iPhone SE de 1a generación, letra agrandada): los giros, y los
   colores con «Listo», siguen cabiendo en su renglón */
@media (max-width: 340px) {
  .historia.abierta:not(.cel-lado) .giro {
    gap: 0.25rem;
    padding: 0.45rem 0.15rem;
    font-size: 0.8125rem;
  }
  .historia.abierta:not(.cel-lado) .giro span {
    font-size: 1.1rem;
  }
  .historia.abierta:not(.cel-lado) .h-continuar {
    padding: 0.5rem 0.75rem;
  }
  /* «Listo» es más angosto aquí (126px en vez de 134) y los círculos pueden bajar a 24px */
  .historia.abierta:not(.cel-lado) .colores {
    --color-tam: clamp(24px, calc((100vw - 126px) / 7), 34px);
  }
  .historia.abierta:not(.cel-lado) .h-btns .btn {
    padding: 0.7rem 0.6rem;
    font-size: 0.875rem;
  }
}

/* ==========================================================================
   UTILIDADES Y PIEZAS QUE ANTES IBAN EN style="" (index.html)
   ========================================================================== */
.u-ancho { width: 100%; }
.u-txt-chico { font-size: 0.875rem; }
.u-txt-oro { color: var(--color-gold); }
.u-txt-azul { color: var(--color-blue); }
.u-centrado { text-align: center; }
.u-mt-1 { margin-top: 1rem; }
.u-mt-2 { margin-top: 2rem; }
.u-mb-1 { margin-bottom: 1rem; }

.nav-acciones {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.cantidad {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.6rem;
}

.cantidad-btn {
  padding: 0.2rem 0.6rem;
}

.cantidad-num {
  min-width: 20px;
  font-weight: 800;
  font-size: 1.1rem;
  text-align: center;
}

.cantidad-unidad {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-marca-chica {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: #FFFFFF;
}

/* El nombre regresa a todo lo ancho al cierre de la página */
.footer-marca {
  margin: 3rem 0 0;
  font-size: clamp(2.6rem, 9.6vw, 9.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: #56647F;
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
}

.footer-legal {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.footer-legal a {
  color: #CBD5E1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-legal a:hover {
  color: #FFFFFF;
}

.footer-lema {
  font-size: 0.9375rem;
  color: #94A3B8;
  line-height: 1.5;
  max-width: 280px;
}

.btn-contorno-claro {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
  background: transparent;
}

/* Enlaces legales junto a los pagos y el registro */
.calc-legal {
  margin-top: 0.8rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #CBD5E1;
}

.calc-legal a,
.auth-legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-legal {
  margin-top: 0.8rem;
}

/* Comparativa de paquetes (tabla real: aquí sí van líneas) */
.pkg-comparar {
  max-width: 900px;
  margin: 2rem auto 0;
}

.pkg-comparar summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--color-blue);
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pkg-tabla-caja {
  margin-top: 1rem;
  overflow-x: auto;
}

.pkg-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.pkg-tabla th,
.pkg-tabla td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

.pkg-tabla th[scope="row"],
.pkg-tabla thead th:first-child {
  text-align: left;
  font-weight: 600;
}

.pkg-tabla thead th {
  font-weight: 800;
  color: var(--text-primary);
}

.pkg-tabla thead th:nth-child(3),
.pkg-tabla td:nth-child(3) {
  background: var(--color-gold-bg);
}

/* Escritorio amplio: el celular de ejemplo (lo más propio de la página) un poco más grande */
@media (min-width: 1100px) {
  .historia .cel {
    zoom: 1.12;
  }
}
