

:root {
    /* --- Marca (azules del cliente, sin cambios de identidad) --- */
    --psd-primary: #003e7a;
    --psd-primary-dark: #001b3c;
    --psd-accent: #0055a4;
    --psd-accent-light: #175ead;
    --psd-blue-100: #d5e3ff;
    --psd-blue-200: #afccff;

    /* --- Tinta: texto más oscuro que el azul de marca ---
       Antes el cuerpo de texto usaba el azul primario, lo que dejaba
       todo plano y con contraste bajo. Ahora el azul es para acentos
       y jerarquía; el texto largo usa tinta. */
    --psd-ink: #0c1b2a;
    --psd-ink-soft: #4a5a6a;

    /* --- Superficies --- */
    --psd-bg: #f4f7fb;
    --psd-surface: #ffffff;
    --psd-surface-sunk: #eef3f9;

    /* --- Acento cálido: la luz del día ---
       Un solo tono cálido, reservado para el relato de "un solo día":
       la línea de tiempo del hero y el beneficio same-day. En ningún
       otro lado. Rompe el azul clínico sin ensuciar la marca. */
    --psd-day: #c8871f;
    --psd-day-soft: #fdf4e4;

    --psd-savings: #0f7a46;
    --psd-savings-soft: #e8f5ee;

    /* --- Elevación en 3 niveles, no una sombra para todo --- */
    --shadow-sm: 0 1px 2px rgba(10, 30, 60, .06), 0 2px 6px rgba(10, 30, 60, .04);
    --shadow-md: 0 2px 4px rgba(10, 30, 60, .05), 0 8px 20px rgba(10, 30, 60, .07);
    --shadow-lg: 0 4px 8px rgba(10, 30, 60, .06), 0 20px 48px rgba(10, 30, 60, .14);

    /* --- Radios por jerarquía, no un radio para todo --- */
    --r-chip: 999px;
    --r-sm: 10px;
    --r-md: 18px;
    --r-lg: 26px;

    /* --- Escala tipográfica fluida (clamp, sin saltos) --- */
    --t-display: clamp(2.5rem, 1.4rem + 4.6vw, 5.25rem);
    --t-h2: clamp(1.75rem, 1.15rem + 2.4vw, 2.9rem);
    --t-h3: clamp(1.125rem, 1rem + .5vw, 1.375rem);
    --t-lead: clamp(1.0625rem, .99rem + .35vw, 1.3125rem);
    --t-body: 1rem;
    --t-small: .875rem;
    --t-micro: .75rem;

    /* --- Ritmo vertical --- */
    --space-section: clamp(4.5rem, 3rem + 7vw, 8.5rem);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: var(--t-body);
    line-height: 1.65;
    background: var(--psd-bg);
    color: var(--psd-ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* Fraunces para titulares: autoridad editorial, no "startup tech".
   Optical sizing alto y wonk/soft en 0 lo mantiene serio, no decorativo. */
.display {
     font-family: "Open Sans", sans-serif;
    font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 120;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.04;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}
.material-symbols-outlined.fill-icon { font-variation-settings: 'FILL' 1; }

.container { max-width: 1500px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 1024px) { .container { padding: 0 40px; } }

/* ============================================================ */
/* FOCO VISIBLE — obligatorio, y en esta audiencia más            */
/* ============================================================ */
:where(a, button, [tabindex]):focus-visible {
    outline: 3px solid var(--psd-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.psd-reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .5s ease, transform .5s ease;
}
.psd-reveal.psd-visible { opacity: 1; transform: none; }

@keyframes psd-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(200, 135, 31, .5); }
    70%  { box-shadow: 0 0 0 9px rgba(200, 135, 31, 0); }
    100% { box-shadow: 0 0 0 0 rgba(200, 135, 31, 0); }
}
.psd-pulse-dot { animation: psd-pulse 2.4s infinite; }

@keyframes video-pulse {
    0%   { transform: scale(1); opacity: .8; }
    100% { transform: scale(1.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .psd-reveal { opacity: 1; transform: none; transition: none; }
    .psd-pulse-dot, .video-pulse-ring { animation: none; }
    * { scroll-behavior: auto !important; }
}

html { scroll-behavior: smooth; }

/* ============================================================ */
/* BOTONES                                                        */
/* Más altos (48px+) para dedos y para manos de 60 años.          */
/* Cada estado responde distinto: hover, active, focus.           */
/* ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: .9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    padding: 15px 26px;
    min-height: 50px;
    border-radius: var(--r-chip);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease,
                color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 10px 18px; min-height: 42px; font-size: .875rem; }

.btn--accent {
    background: var(--psd-accent);
    color: #fff;
    box-shadow: var(--shadow-md);
}
.btn--accent:hover { background: var(--psd-primary); box-shadow: var(--shadow-lg); }

.btn--outline {
    background: var(--psd-surface);
    color: var(--psd-primary);
    border-color: #c6d8ef;
    box-shadow: var(--shadow-sm);
}
.btn--outline:hover { background: var(--psd-blue-100); border-color: var(--psd-blue-200); }

.btn--white { background: #fff; color: var(--psd-primary); box-shadow: var(--shadow-lg); }
.btn--white:hover { background: var(--psd-blue-100); }

.btn--ghost-light {
    background: rgba(255,255,255,.08);
    color: #fff;
    border-color: rgba(255,255,255,.45);
}
.btn--ghost-light:hover { background: rgba(255,255,255,.18); }

.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); }

.btn--full { width: 100%; }
@media (min-width: 640px) { .btn--full { width: auto; } }

/* ============================================================ */
/* SECCIONES                                                      */
/* ============================================================ */
.section { padding: var(--space-section) 0; }
.section--white { background: var(--psd-surface); }
.section--dark { background: var(--psd-primary-dark); }

/* El eyebrow ya no va en MAYÚSCULAS tracked sobre cada título:
   eso es cromo de plantilla. Ahora es una línea corta en minúsculas
   con una marca de color, y solo donde aporta contexto real. */
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: var(--t-small);
    font-weight: 600;
    color: var(--psd-accent);
    margin-bottom: 14px;
}
.section-eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    background: currentColor;
    flex-shrink: 0;
}
.section-eyebrow--light { color: var(--psd-blue-200); }

.section-heading {
    font-family: "Open Sans", sans-serif;
    font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 90;
    font-size: var(--t-h2);
    font-weight: 700;
    color: var(--psd-primary);
    letter-spacing: -0.022em;
    line-height: 1.12;
    margin: 0;
    text-wrap: balance;
}
.section-heading--light { color: #fff; }

.section-intro { max-width: 46ch!important; margin-bottom: clamp(2.5rem, 4vw, 3.5rem); }
.section-intro--wide { max-width: 52ch; }

.section-text {
    font-size: var(--t-lead);
    color: var(--psd-ink-soft);
    line-height: 1.68;
    margin-top: 18px;
    max-width: 62ch;
}


/* ============================================================ */
/* NAVBAR                                                       */
/* ============================================================ */
.navbar img 
{
  max-width:80px;
}
.navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--psd-blue-100);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}
.navbar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.navbar__logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--psd-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.navbar__logo .material-symbols-outlined { color: #fff; font-size: 18px; }
.navbar__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--psd-primary);
  letter-spacing: -0.01em;
}

.navbar__links { display: none; gap: 32px; align-items: center; }
@media (min-width: 1024px) { .navbar__links { display: flex; } }
.navbar__links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(0, 62, 122, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}
.navbar__links a:hover { color: var(--psd-accent); }

.navbar__right { display: flex; align-items: center; gap: 12px; }
.navbar__cta { display: none; }
@media (min-width: 640px) { .navbar__cta { display: inline-flex; } }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid var(--psd-blue-200);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--psd-primary);
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.lang-switch:hover { background: var(--psd-blue-100); }
.lang-switch__flag { font-size: 16px; line-height: 1; }


/* ============================================================ */
/* HERO                                                         */
/* ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--psd-primary-dark);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: 70% 30%;
  opacity: .28;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(0,20,42,.96) 0%, rgba(0,20,42,.86) 45%, rgba(0,27,60,.72) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

/* ---------- Grid principal ---------- */
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 1.08fr 1fr; gap: 4.5rem; }
}

.hero__copy, .hero__media { min-width: 0; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(1.25rem, 3vw, 1.75rem);
  padding: 7px 14px 7px 12px;
  border-radius: var(--r-chip);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  font-size: var(--t-small);
  font-weight: 500;
  color: rgba(255,255,255,.92);
}
.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--psd-day);
  flex-shrink: 0;
}

.hero__title {
  color: #fff;
  font-size: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  margin: 0 0 clamp(1rem, 2vw, 1.375rem);
  max-width: 18ch;
  text-wrap: balance;
}
/* La promesa: cursiva de la misma serif, en azul claro.
   Resalta sin cambiar de familia ni de peso. */
.hero__accent {
  font-style: italic;
  font-weight: 500;
  color: var(--psd-blue-200);
  white-space: nowrap;
}

.hero__sub {
  font-size: var(--t-lead);
  color: rgba(255,255,255,.82);
  line-height: 1.6;
  margin: 0 0 clamp(1.75rem, 3vw, 2.25rem);
  max-width: 44ch;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Franja de confianza ---------- */
.trust {
  list-style: none;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: 22px 0 0;
  border-top: 1px solid rgba(255,255,255,.18);
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px) {
  .trust { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}
.trust__item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.trust__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
}
.trust__icon .material-symbols-outlined { font-size: 20px; color: var(--psd-blue-200); }
.trust__label {
  font-size: .9375rem;
  font-weight: 600;
  color: #fff;
}

/* Entrada escalonada al cargar */
@media (prefers-reduced-motion: no-preference) {
  .hero__badge, .hero__title, .hero__sub, .hero__actions, .hero__media, .trust {
    animation: hero-in .7s cubic-bezier(.2, .7, .3, 1) backwards;
  }
  .hero__badge   { animation-delay: .05s; }
  .hero__title   { animation-delay: .14s; }
  .hero__media   { animation-delay: .20s; }
  .hero__sub     { animation-delay: .24s; }
  .hero__actions { animation-delay: .32s; }
  .trust         { animation-delay: .42s; }
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}


/* ============================================================ */
/* MARCO DE VIDEO                                               */
/* ============================================================ */

.video-frame-outer {
  padding: 3px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--psd-accent), var(--psd-blue-200), var(--psd-accent-light));
  box-shadow: var(--shadow-lg);
  max-width: 90%;
  margin: 0 auto;
}
.video-frame-inner {
  position: relative;
  border-radius: 25px;
  overflow: hidden;
  background: var(--psd-primary-dark);
  cursor: pointer;
}
.video-frame-inner:focus-visible { outline: 3px solid var(--psd-blue-200); outline-offset: 3px; }
.video-frame-inner img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }
.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 20, 40, 0.8), rgba(0, 20, 40, 0.15) 55%, transparent);
}
.video-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  animation: video-pulse 2.2s infinite;
}
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease;
}
.video-frame-inner:hover .video-play-btn { transform: translate(-50%, -50%) scale(1.08); }
.video-play-btn .material-symbols-outlined { color: var(--psd-primary); }

.video-caption-chip { position: absolute; bottom: 18px; left: 18px; right: 18px; color: #fff; }
.video-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--psd-blue-200);
  margin-bottom: 4px;
}
.video-title { font-size: 15px; font-weight: 700; line-height: 1.3; }


/* ============================================================ */
/* POR QUÉ TIJUANA                                              */
/* ============================================================ */

/* ---------- Bento ---------- */
.why { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) {
  .why { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .card--wide { grid-column: span 2; grid-row: span 2; }
}

.card {
  background: var(--psd-bg);
  border: 1px solid #e2eaf4;
  border-radius: var(--r-md);
  padding: clamp(22px, 2.5vw, 30px);
  display: flex;
  flex-direction: column;
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card__icon--blue { background: var(--psd-blue-100); color: var(--psd-accent); }
.card__icon--savings { background: var(--psd-savings-soft); color: var(--psd-savings); }

.card__title {
  font-size: var(--t-h3);
  font-weight: 700;
  color: var(--psd-primary);
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 0 0 8px;
}
.card__text {
  font-size: var(--t-small);
  color: var(--psd-ink-soft);
  line-height: 1.68;
  margin: 0;
  max-width: 52ch;
}
.card__text .feature-card__highlight { font-weight: 700; color: var(--psd-savings); }

/* ---------- Tarjeta de ahorro ---------- */
.card--savings {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(15,122,70,.10), transparent 60%),
    var(--psd-savings-soft);
  border-color: #c8e6d5;
  gap: clamp(22px, 3vw, 32px);
}

/* Cifra y nota en un solo bloque: la nota es pie de la cifra,
   nunca un titular. Tamaños fijos para que no herede el de la cifra. */
.stat { display: flex; flex-direction: column; align-items: flex-start; }
.stat__lead {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--psd-savings);
  margin-bottom: 4px;
}
.stat__figure {
font-family: "Open Sans", sans-serif;
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 144;
  font-size: clamp(4rem, 2.6rem + 5vw, 5.5rem);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -0.045em;
  color: var(--psd-savings);
}
.stat__note {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--psd-ink);
  margin-top: 10px;
  max-width: 30ch;
}

/* Comparación visual: el ahorro se ve antes de leerse */
.bars { display: grid; gap: 12px; max-width: 520px; }
.bar { display: grid; gap: 6px; }
.bar__label {
  font-size: var(--t-micro);
  font-weight: 600;
  color: var(--psd-ink-soft);
}
.bar__label--to { color: var(--psd-savings); }
.bar__track {
  display: block;
  height: 12px;
  border-radius: var(--r-chip);
  background: rgba(12,27,42,.06);
  overflow: hidden;
}
.bar__fill {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
}
.bar__fill--from { background: #b9c4d0; }
.bar__fill--to { background: var(--psd-savings); }

/* En desktop la cifra y las barras van lado a lado: la tarjeta
   grande no deja un hueco vacío a la derecha. */
@media (min-width: 1100px) {
  .card--savings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    column-gap: 40px;
    align-content: space-between;
  }
  .card--savings .bars { align-self: end; max-width: none; }
  .card--savings .card__body { grid-column: 1 / -1; }
}

.card__body { margin-top: auto; }
.card--savings .card__title { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); }


/* ============================================================ */
/* EL SISTEMA ALL-ON-4                                          */
/* ============================================================ */

/* Texto a la izquierda, video a la derecha.
   En móvil el texto va primero: se lee antes de ver el video. */
.grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 1024px) {
  .grid { grid-template-columns: 1.05fr 1fr; }
}

.media__caption {
  text-align: center;
  font-size: var(--t-micro);
  color: var(--psd-ink-soft);
  margin: 14px 0 0;
}

.copy__body { margin-bottom: 32px; }

/* ---------- Control segmentado ---------- */
.parts {
  border: 1px solid #dde7f3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--psd-surface);
  box-shadow: var(--shadow-sm);
}

.parts__tabs {
  display: flex;
  background: var(--psd-surface-sunk);
  border-bottom: 1px solid #dde7f3;
}
.parts__tab {
  flex: 1;
  font-family: inherit;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 14px 10px;
  min-height: 52px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--psd-ink-soft);
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.parts__tab:hover { color: var(--psd-primary); background: rgba(255,255,255,.6); }
.parts__tab.is-active {
  color: var(--psd-primary);
  background: var(--psd-surface);
  border-bottom-color: var(--psd-accent);
}

.parts__panels { padding: 22px 24px; min-height: 124px; }
.parts__panel { display: none; }
.parts__panel.is-active { display: block; }
.parts__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--psd-primary);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.parts__text {
  font-size: var(--t-small);
  color: var(--psd-ink-soft);
  line-height: 1.68;
  margin: 0;
  max-width: 52ch;
}


/* ============================================================ */
/* BENEFICIOS                                                   */
/* ============================================================ */

.bento { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

.cell {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-md);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cell__icon {
  color: var(--psd-blue-200);
  font-size: 26px;
  margin-bottom: 4px;
}
.cell__title {
  color: #fff;
  font-size: var(--t-h3);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0;
}
.cell__text {
  font-size: var(--t-small);
  color: rgba(255,255,255,.66);
  line-height: 1.65;
  margin: 0;
  max-width: 44ch;
}

/* ---------- Celda destacada ---------- */
.cell--featured {
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(200,135,31,.22) 0%, rgba(200,135,31,0) 55%),
    rgba(255,255,255,.07);
  border-color: rgba(200,135,31,.4);
  padding: 30px 28px;
}
@media (min-width: 640px) { .cell--featured { grid-column: span 2; } }

.cell--featured .cell__icon { color: var(--psd-day); font-size: 32px; }
.cell--featured .cell__title {
  font-family: "Open Sans", sans-serif;
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 70;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem);
  letter-spacing: -0.022em;
}
.cell--featured .cell__text {
  font-size: var(--t-body);
  color: rgba(255,255,255,.78);
  max-width: 52ch;
}


/* ============================================================ */
/* PROCESO                                                      */
/* ============================================================ */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 36px; }
}

.step { display: flex; flex-direction: column; }

/* El número y la regla que lo sigue forman la secuencia.
   La regla se corta sola en el último paso. */
.step__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.step__num {
  font-family: "Open Sans", sans-serif;
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 100;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--psd-accent);
  letter-spacing: -0.03em;
  flex-shrink: 0;
  font-variant-numeric: lining-nums;
}
.step__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--psd-blue-200), rgba(175,204,255,0));
}
.step:last-child .step__rule { display: none; }

.step__icon {
  color: var(--psd-accent);
  font-size: 24px;
  margin-bottom: 12px;
}
.step__title {
  font-size: var(--t-h3);
  font-weight: 700;
  color: var(--psd-primary);
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 0 0 8px;
}
.step__text {
  font-size: var(--t-small);
  color: var(--psd-ink-soft);
  line-height: 1.68;
  margin: 0;
  max-width: 42ch;
}


/* ============================================================ */
/* PRECIOS                                                      */
/* ============================================================ */

/* ---------- Planes ---------- */
.plans { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 860px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }

.plan {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--r-lg);
  background: var(--psd-bg);
  border: 1px solid #e2eaf4;
}
.plan--dark {
  background:
    radial-gradient(110% 80% at 100% 0%, rgba(23,94,173,.45), transparent 60%),
    var(--psd-primary-dark);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.plan__badge {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--r-chip);
  font-size: var(--t-micro);
  font-weight: 500;
  color: var(--psd-accent);
  background: var(--psd-blue-100);
  margin-bottom: 16px;
}
.plan__badge strong { font-weight: 700; letter-spacing: .06em; }
.plan--dark .plan__badge { color: var(--psd-blue-200); background: rgba(255,255,255,.1); }

.plan__name {
  font-family: "Open Sans", sans-serif;
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 72;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--psd-primary);
  margin: 0 0 6px;
}
.plan--dark .plan__name { color: #fff; }

.plan__scope { margin: 0; font-size: var(--t-small); color: var(--psd-ink-soft); }
.plan--dark .plan__scope { color: rgba(255,255,255,.7); }

/* ---------- Visitas ---------- */
.visits { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.visit {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--psd-surface);
  border: 1px solid #e2eaf4;
}
.plan--dark .visit { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }

.visit__num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--psd-accent);
  background: var(--psd-blue-100);
}
.plan--dark .visit__num { color: var(--psd-primary-dark); background: var(--psd-blue-200); }

.visit__label { font-size: .9375rem; font-weight: 600; color: var(--psd-ink); }
.plan--dark .visit__label { color: rgba(255,255,255,.9); }

.visit__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: 'Open Sans', sans-serif;
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 72;
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--psd-primary);
  white-space: nowrap;
}
.plan--dark .visit__price { color: #fff; }

.visit__prefix {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--psd-ink-soft);
  margin-bottom: 2px;
}
.plan--dark .visit__prefix { color: rgba(255,255,255,.6); }

.plan__cta { margin-top: auto; align-self: flex-start; }

/* ---------- Qué incluye ---------- */
.includes {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--r-lg);
  border: 1px solid #e2eaf4;
}
.includes__title {
  font-size: var(--t-h3);
  font-weight: 700;
  color: var(--psd-primary);
  letter-spacing: -0.015em;
  margin: 0 0 24px;
}

.groups { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 640px) { .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .groups { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }

.group__title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2eaf4;
  font-size: var(--t-small);
  font-weight: 700;
  color: var(--psd-ink);
}
.group__title .material-symbols-outlined { font-size: 20px; color: var(--psd-accent); }

.group__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.group__list li {
  position: relative;
  padding-left: 24px;
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--psd-ink-soft);
}
/* Palomita dibujada con CSS: no depende de la fuente de íconos */
.group__list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: .42em;
  width: 10px;
  height: 5px;
  border-left: 2px solid var(--psd-savings);
  border-bottom: 2px solid var(--psd-savings);
  transform: rotate(-45deg);
}

/* ---------- Notas ---------- */
.notes {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
@media (min-width: 860px) { .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
.note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--psd-day-soft);
  font-size: var(--t-small);
  line-height: 1.55;
  color: var(--psd-ink);
}
.note .material-symbols-outlined { font-size: 20px; color: var(--psd-day); flex-shrink: 0; }


/* ============================================================ */
/* ANTES Y DESPUÉS                                              */
/* ============================================================ */

/* Flex con wrap centrado: con 5 casos la última fila (2) queda
   centrada en lugar de cargada a la izquierda. */
.cases {
  --cols: 1;
  --gap: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}
@media (min-width: 560px) { .cases { --cols: 2; } }
@media (min-width: 1024px) { .cases { --cols: 3; --gap: 20px; } }

.ba {
  margin: 0;
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  min-width: 0;
}

/* Marco oscuro: las fotos clínicas vienen sobre fondo negro,
   así el recorte no se nota y el caso se lee como una pieza. */
.ba__stage {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #0a0a0a;
  box-shadow: var(--shadow-md);
  isolation: isolate;
}

.ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

/* La foto "después" se recorta desde la izquierda hasta --pos.
   Mover --pos es todo lo que hace el JS. */
.ba__img--after { clip-path: inset(0 0 0 var(--pos)); }

.ba__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .18);
  pointer-events: none;
}

.ba__knob {
  position: absolute;
  top: 50%;
  left: var(--pos);
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--psd-primary-dark);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  pointer-events: none;
  transition: transform .14s ease;
}
.ba__stage:hover .ba__knob { transform: translate(-50%, -50%) scale(1.06); }

.ba__tag {
  position: absolute;
  top: 12px;
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: .02em;
  color: #fff;
  background: rgba(8, 20, 34, .62);
  backdrop-filter: blur(4px);
  padding: 5px 11px;
  border-radius: var(--r-chip);
  pointer-events: none;
}
.ba__tag--before { left: 12px; }
.ba__tag--after  { right: 12px; }

/* El control real: invisible, encima de todo.
   Nos da teclado, táctil y lector de pantalla sin escribir nada. */
.ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: ew-resize;
  z-index: 2;
}
.ba__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 46px;
  height: 100vh; /* alto para poder arrastrar desde cualquier punto */
  background: transparent;
  cursor: ew-resize;
}
.ba__range::-moz-range-thumb {
  width: 46px;
  height: 100vh;
  border: 0;
  background: transparent;
  cursor: ew-resize;
}
.ba__range::-moz-range-track { background: transparent; border: 0; }

/* El foco se dibuja sobre el marco, no sobre el input invisible */
.ba__range:focus-visible { outline: none; }
.ba__stage:has(.ba__range:focus-visible) {
  outline: 3px solid var(--psd-accent);
  outline-offset: 3px;
}

.ba__note {
  margin: 10px 2px 0;
  font-size: var(--t-small);
  color: var(--psd-ink-soft);
  line-height: 1.5;
}

.cases__hint {
  margin: 26px 0 0;
  font-size: var(--t-small);
  color: var(--psd-ink-soft);
  text-align: center;
}


/* ============================================================ */
/* UBICACIÓN                                                    */
/* ============================================================ */

.loc { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 1024px) { .loc { grid-template-columns: 1fr 1.25fr; } }
.loc__copy, .loc__map { min-width: 0; }

.facts { list-style: none; margin: 28px 0 32px; padding: 0; display: grid; gap: 14px; }
.fact { display: flex; align-items: center; gap: 14px; }
.fact__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: var(--psd-blue-100);
  color: var(--psd-accent);
}
.fact__icon .material-symbols-outlined { font-size: 20px; }
.fact__label { font-size: .9375rem; font-weight: 600; color: var(--psd-ink); }

.map-frame {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid #e2eaf4;
  box-shadow: var(--shadow-lg);
  background: var(--psd-surface-sunk);
}
.map-frame iframe { width: 100%; height: 340px; border: 0; display: block; }
@media (min-width: 1024px) { .map-frame iframe { height: 460px; } }

.map-note {
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--t-small);
  color: var(--psd-ink-soft);
}
.map-note .material-symbols-outlined { color: var(--psd-accent); flex-shrink: 0; }
.map-note strong { color: var(--psd-primary); font-weight: 600; }


/* ============================================================ */
/* CTA FINAL                                                    */
/* ============================================================ */

.cta-final { background: var(--psd-primary); padding: 80px 0 96px; text-align: center; }
.cta-final__inner { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.cta-final__title {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 20px;
}
@media (min-width: 640px) { .cta-final__title { font-size: 36px; } }
.cta-final__subtitle { font-size: 16px; color: var(--psd-blue-200); margin: 0 0 40px; line-height: 1.6; }

.cta-final__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}
@media (min-width: 640px) { .cta-final__actions { flex-direction: row; } }

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.contact-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.2);
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.contact-pill:hover { background: rgba(255,255,255,0.2); }


/* ============================================================ */
/* FOOTER                                                       */
/* ============================================================ */

.footer { background: #fff; padding: 40px 0; border-top: 1px solid var(--psd-blue-100); }
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
@media (min-width: 640px) { .footer__inner { flex-direction: row; } }
.footer__brand { display: flex; align-items: center; gap: 8px; }
.footer__logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--psd-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer__logo .material-symbols-outlined { color: #fff; font-size: 14px; }
.footer__name { font-size: 14px; font-weight: 700; color: var(--psd-primary); }
.footer__legal { font-size: 12px; color: var(--psd-text-muted); text-align: center; margin: 0; }


/* ============================================================ */
/* MODAL DE VIDEO                                               */
/* ============================================================ */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.video-modal.is-open { display: flex; }
.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 10, 25, 0.88);
  cursor: pointer;
}
.video-modal__dialog { position: relative; width: 100%; max-width: 900px; z-index: 1; }
.video-modal__close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.video-modal__close:hover { background: rgba(255, 255, 255, 0.3); }
.video-modal__content {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.video-modal__content video,
.video-modal__content iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-modal__content .video-modal__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  text-align: center;
  padding: 24px;
}

/* ============================================================ */
/* VIDEO EN LOOP (vista previa automática, sin sonido)           */
/* ============================================================ */

/* El video ocupa el marco igual que la imagen de vista previa */
.video-frame-inner .video-frame__loop {
  display: block;
  width: 100%;
  height: 85%;
  object-fit: cover;
}


/* Con el video ya en movimiento, el botón grande de play estorba:
   se vuelve un botón chico de "ver con sonido" en la esquina. */
.video-frame-inner.is-loop .video-pulse-ring { display: none; }
.video-frame-inner.is-loop .video-play-btn {
  top: auto;
  left: auto;
  right: 16px;
  bottom: 16px;
  width: 52px;
  height: 52px;
  transform: none;
}
.video-frame-inner.is-loop:hover .video-play-btn { transform: scale(1.08); }
.video-frame-inner.is-loop .video-caption-chip { right: 84px; }

/* ============================================================ */
/* PROCESO EN CITAS (la cita 1 lleva su propia línea de días)    */
/* ============================================================ */

/* La cita 1 tiene más contenido: se le da más ancho */
@media (min-width: 900px) {
  .steps--visits { grid-template-columns: 1.4fr 1fr 1fr; }
}

.step__label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--psd-accent);
}

/* Mini línea de tiempo: Día 1 → Día 2 → Día 3 */
.days {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}
.day {
  position: relative;
  padding: 0 0 18px 24px;
}
.day:last-child { padding-bottom: 0; }

/* Punto de cada día */
.day::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--psd-accent);
}
/* Línea que une un día con el siguiente */
.day:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: calc(.3em + 14px);
  bottom: 4px;
  width: 1px;
  background: var(--psd-blue-200);
}
/* El día de la cirugía, con el acento cálido de "un solo día" */
.day--key::before { background: var(--psd-day); }
.day--key .day__label { color: var(--psd-day); }

.day__label {
  display: block;
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--psd-accent);
}
.day__title {
  margin: 2px 0 3px;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--psd-ink);
}
.day__text {
  margin: 0;
  font-size: var(--t-small);
  line-height: 1.6;
  color: var(--psd-ink-soft);
  max-width: 46ch;
}

/* ============================================================ */
/* MODAL DEL FORMULARIO DE CONTACTO                              */
/* ============================================================ */

.form-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.form-modal.is-open { display: flex; }

.form-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 10, 25, 0.78);
  cursor: pointer;
}

.form-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  background: var(--psd-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px 22px 8px;
}

.form-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.form-modal__title {
  margin: 0;
  font-size: var(--t-h3);
  font-weight: 700;
  color: var(--psd-primary);
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.form-modal__sub {
  margin: 4px 0 0;
  font-size: var(--t-small);
  color: var(--psd-ink-soft);
}
.form-modal__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--psd-surface-sunk);
  color: var(--psd-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color .2s ease;
}
.form-modal__close:hover { background: var(--psd-blue-100); }

/* El formulario necesita su alto (592px) aunque el iframe diga height:100% */
.form-modal__body iframe {
  display: block;
  width: 100%;
  min-height: 592px;
  border: 0;
}
/* Calendario: más ancho y más alto que el formulario */
.form-modal--wide .form-modal__dialog { max-width: 820px; }
.form-modal__body--calendar iframe {
  display: block;
  width: 100%;
  min-height: 720px;
  border: 0;
}

.footer__brand img{
max-width:80px;
}


/* ---------- Savings comparison (enhanced) ---------- */
.bars--compare {
  --bar-h: 44px;
  --bar-radius: 999px;
  --c-from: #94a3b8;
  --c-from-2: #cbd5e1;
  --c-to: #0055a4;
  --c-to-2: #175ead;
  --c-save: #1a7f4b;
  --c-save-bg: #e9f7ef;

  display: grid;
  gap: 1.5rem;
  margin: 1.75rem 0;
}

.bars--compare .bar {
  display: grid;
  gap: 0.5rem;
}

.bars--compare .bar__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.bars--compare .bar__label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #475569;
}

.bars--compare .bar__label--to {
  font-weight: 700;
  color: #003e7a;
}

.bars--compare .bar__value {
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
}

.bars--compare .bar__value--from {
  color: #64748b;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.bars--compare .bar__value--to {
  color: #0055a4;
  font-size: 1.6rem;
}

.bars--compare .bar__track {
  position: relative;
  display: flex;
  height: var(--bar-h);
  border-radius: var(--bar-radius);
  background: #f1f5f9;
  overflow: hidden;
}

.bars--compare .bar__fill {
  height: 100%;
  width: 0;
  border-radius: var(--bar-radius);
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.bars--compare .bar__fill--from {
  background: repeating-linear-gradient(
    -45deg,
    var(--c-from) 0 10px,
    var(--c-from-2) 10px 20px
  );
}

.bars--compare .bar__fill--to {
  background: linear-gradient(90deg, var(--c-to), var(--c-to-2));
  box-shadow: 0 6px 18px rgba(0, 85, 164, 0.35);
  transition-delay: 0.25s;
}

/* "You save" zone: fills the rest of the PSD track */
.bars--compare .bar__save {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 0 0 var(--w);
  margin-left: 6px;
  border: 2px dashed var(--c-save);
  border-radius: var(--bar-radius);
  background: var(--c-save-bg);
  color: var(--c-save);
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.5s ease 1.1s, transform 0.5s ease 1.1s;
}

.bars--compare .bar__save .material-symbols-outlined {
  font-size: 1.25rem;
}

/* Animated state */
.bars--compare.is-in .bar__fill {
  width: var(--w);
}

.bars--compare.is-in .bar__save {
  opacity: 1;
  transform: none;
}

/* Small screens: shorter save label */
@media (max-width: 480px) {
  .bars--compare {
    --bar-h: 38px;
  }
  .bars--compare .bar__save {
    font-size: 0.8rem;
  }
  .bars--compare .bar__save .material-symbols-outlined {
    display: none;
  }
}

/* No animation for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bars--compare .bar__fill,
  .bars--compare .bar__save {
    transition: none;
  }
}

/* ============================================================ */
/* ANTES Y DESPUÉS EN CARRUSEL                                   */
/* 3 visibles en escritorio, 2 en tablet, 1 (con asomo) en móvil */
/* ============================================================ */

.ba-carousel { display: grid; gap: 18px; }

/* La pista: scroll horizontal con imán en cada caso */
.ba-carousel .cases {
  --per-view: 1.12;
  --gap: 16px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 4px; /* que no se corte la sombra */
}
.ba-carousel .cases::-webkit-scrollbar { display: none; }

@media (min-width: 640px)  { .ba-carousel .cases { --per-view: 2; } }
@media (min-width: 1024px) { .ba-carousel .cases { --per-view: 3; --gap: 20px; } }

.ba-carousel .ba {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  scroll-snap-align: start;
}

/* Flechas: debajo de las imágenes en móvil, centradas */
.ba-nav { display: flex; justify-content: center; gap: 10px; }

/* Escritorio y tablet: arriba a la derecha del carrusel */
@media (min-width: 768px) {
  .ba-nav { order: -1; justify-content: flex-end; }
}

.ba-nav__btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--psd-blue-200);
  background: var(--psd-surface);
  color: var(--psd-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color .18s ease, color .18s ease, opacity .18s ease, transform .12s ease;
}
.ba-nav__btn:hover:not(:disabled) { background: var(--psd-accent); border-color: var(--psd-accent); color: #fff; }
.ba-nav__btn:active:not(:disabled) { transform: scale(.95); }
.ba-nav__btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.ba-nav__btn svg { display: block; }

/* Si caben todos los casos, las flechas sobran */
.ba-carousel.is-static .ba-nav { display: none; }

@media (prefers-reduced-motion: reduce) {
  .ba-carousel .cases { scroll-behavior: auto; }
}