/* ==========================================================================
   OSEPSA Health Group — sistema visual
   --------------------------------------------------------------------------
   1. Fuente y tokens        6. Secciones
   2. Base                   7. Carrito, contratación y overlays
   3. Utilidades             8. Mapa (Leaflet)
   4. Layout                 9. Movimiento reducido
   5. Componentes
   Breakpoints: 640 (sm) · 768 (md) · 1024 (lg) · 1200 (xl)
   ========================================================================== */

/* 1. FUENTE Y TOKENS ======================================================= */

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Marca (canónicos, no modificar) */
  --osepsa-indigo: #2F2484;
  --osepsa-blue: #1191EC;
  --osepsa-red: #F6050C;
  --white: #FFFFFF;

  /* Estados derivados del índigo (sólo interacción) */
  --indigo-hover: #251C6B;
  --indigo-050: #F4F3FA;

  /* Neutros */
  --ink-950: #111827;
  --ink-800: #1F2937;
  --ink-600: #4B5563;
  --ink-500: #6B7280;
  --ink-400: #9CA3AF;
  --line: #E5E7EB;
  --line-strong: #D1D5DB;
  --rule: #111827;
  --surface: #FFFFFF;
  --surface-soft: #F7F8FA;
  --surface-cool: #F4F7FA;

  /* Semánticos (texto con contraste AA sobre blanco) */
  --success: #067647;
  --success-bg: #F0FAF4;
  --success-line: #B7E4C7;
  --error: #B42318;
  --error-bg: #FEF3F2;

  /* Tipografía */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-display: clamp(2.125rem, 1.3rem + 3.1vw, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);
  --fs-h3: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);

  /* Layout */
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 64px;
  --section-space: clamp(56px, 8vw, 120px);
  --radius-control: 8px;
  --radius-panel: 14px;

  /* Movimiento */
  --t: 180ms cubic-bezier(0.2, 0, 0, 1);
  --shadow-overlay: 0 24px 64px rgba(17, 24, 39, 0.18);
}

@media (min-width: 1024px) {
  :root { --header-h: 76px; }
}

/* 2. BASE ================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-800);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html.is-locked { overflow: hidden; padding-right: var(--scrollbar-comp, 0px); }

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-950);
  text-wrap: balance;
}

p { text-wrap: pretty; }

img, video { max-width: 100%; display: block; }

a { color: var(--osepsa-indigo); text-underline-offset: 3px; }

button, input, select, textarea { font: inherit; }

:focus-visible {
  outline: 2px solid var(--osepsa-blue);
  outline-offset: 2px;
}

main:focus,
[tabindex="-1"]:focus { outline: none; }

::selection { background: rgba(17, 145, 236, 0.18); }

/* 3. UTILIDADES ============================================================ */

[hidden] { display: none !important; }

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

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-control);
  background: var(--osepsa-indigo);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--t);
}
.skip-link:focus { transform: none; }

.brand-rule {
  display: inline-block;
  flex: none;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg,
    var(--osepsa-indigo) 0 60%,
    var(--osepsa-blue) 60% 90%,
    var(--osepsa-red) 90% 100%);
}

.demo-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink-600);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.field-note {
  margin-top: 8px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-500);
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  padding: 12px 16px;
  border-radius: var(--radius-control);
  background: var(--ink-950);
  color: var(--white);
  font-size: 0.875rem;
}

/* 4. LAYOUT ================================================================ */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-space); }
.section-soft { background: var(--surface-soft); }
.section-compact { padding-block: clamp(56px, 6vw, 88px) 0; }

.section-head {
  display: grid;
  gap: 16px;
  padding-top: 20px;
  margin-bottom: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--rule);
}

.section-label {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--osepsa-indigo);
}

.section-intro h2 {
  max-width: 24ch;
  font-size: var(--fs-h2);
  line-height: 1.12;
  letter-spacing: -0.022em;
  color: var(--osepsa-indigo);
}

.section-intro p {
  max-width: 62ch;
  margin-top: 20px;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--ink-600);
}

@media (min-width: 1024px) {
  .section-head {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 32px;
  }
  .section-label { grid-column: 1 / 4; padding-top: 6px; }
  .section-intro { grid-column: 4 / 12; }
}

/* 5. COMPONENTES =========================================================== */

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t), border-color var(--t), color var(--t);
}
.btn .icon { width: 18px; height: 18px; }
.btn-lg { min-height: 48px; padding: 0 24px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--osepsa-indigo); color: var(--white); }
.btn-primary:hover { background: var(--indigo-hover); }

.btn-secondary {
  background: var(--white);
  border-color: var(--line-strong);
  color: var(--osepsa-indigo);
}
.btn-secondary:hover { border-color: var(--osepsa-indigo); }

.btn-ghost {
  padding-inline: 4px;
  background: transparent;
  color: var(--ink-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-ghost:hover { color: var(--error); }

.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--ink-500);
  text-decoration: none;
  cursor: not-allowed;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink-800);
  cursor: pointer;
  transition: background-color var(--t), border-color var(--t);
}
.icon-btn:hover { background: var(--surface-soft); }
.icon-btn-outline { border-color: var(--line-strong); background: var(--white); }
.icon-btn-outline:hover { border-color: var(--osepsa-indigo); background: var(--white); }

.link-btn {
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--ink-600);
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--osepsa-indigo); }
.link-btn-danger:hover { color: var(--error); }

/* Formularios */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }

.field-row { display: grid; gap: 20px; }
.field-row + .field-row,
.field-row + .field,
.field + .field-row,
:not(.field-row) > .field + .field { margin-top: 20px; }

/* Los formularios deciden columnas por su propio ancho, no por el viewport */
.booking-body,
.contact-form,
.checkout-form { container-type: inline-size; }

@container (min-width: 480px) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-800);
}

.optional { font-weight: 400; color: var(--ink-500); }

input,
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--white);
  color: var(--ink-950);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color var(--t), box-shadow var(--t);
}

input[type="date"],
input[type="time"] { -webkit-appearance: none; appearance: none; }

textarea { min-height: 112px; resize: vertical; }

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

input::placeholder,
textarea::placeholder { color: var(--ink-400); }

input:hover,
select:hover,
textarea:hover { border-color: var(--ink-500); }

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--osepsa-indigo);
  box-shadow: 0 0 0 3px rgba(17, 145, 236, 0.3);
}

select:disabled {
  background-color: var(--surface-soft);
  color: var(--ink-500);
  cursor: not-allowed;
}

[aria-invalid="true"] { border-color: var(--error); }
[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.18); }

.field-error {
  display: flex;
  gap: 6px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--error);
}
.field-error::before { content: "Error:"; font-weight: 600; }
.field-error:empty { display: none; }

.form-alert {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid #F4C7C3;
  border-radius: var(--radius-control);
  background: var(--error-bg);
  color: var(--error);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Radios visualmente ocultos (segmentos, chips, selector de plan) */
.plan-switch input,
.segmented input,
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.plan-switch label,
.segmented label,
.choice { position: relative; cursor: pointer; }

/* Confirmaciones */
.confirmation {
  padding: 16px 18px;
  border: 1px solid var(--success-line);
  border-radius: 10px;
  background: var(--success-bg);
}
.confirmation-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--success);
}
.confirmation-detail { margin-top: 6px; font-size: 0.9375rem; color: var(--ink-950); }
.confirmation-note { margin-top: 6px; font-size: 0.875rem; color: var(--ink-600); }

.empty-state {
  margin-top: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-500);
  font-size: 0.9375rem;
}

/* 6. SECCIONES ============================================================= */

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 0;
  min-width: max-content;
  color: inherit;
  text-decoration: none;
}
.brand:focus-visible { outline-offset: 4px; border-radius: 4px; }

.brand-logo { width: auto; height: 44px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.005em;
  color: var(--osepsa-indigo);
}
.brand-tagline { font-size: 0.75rem; color: var(--ink-500); }

.primary-nav { display: none; }
.primary-nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary-nav a {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--header-h);
  padding: 0 14px;
  color: var(--ink-600);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--t);
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--osepsa-indigo);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}
.primary-nav a:hover { color: var(--ink-950); }
.primary-nav a[aria-current] { color: var(--osepsa-indigo); }
.primary-nav a[aria-current]::after { transform: scaleX(1); }
.primary-nav a:focus-visible { outline-offset: -6px; border-radius: 6px; }

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1 1 0;
}

.header-cta-secondary,
.header-cta-primary,
.cart-indicator { display: none; }

.cart-indicator {
  position: relative;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: none;
  color: var(--ink-800);
  cursor: pointer;
  transition: background-color var(--t);
}
.cart-indicator:hover { background: var(--surface-soft); }
.cart-indicator-label { font-size: 0.875rem; font-weight: 500; }
.cart-indicator-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--osepsa-indigo);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cart-indicator[data-empty] .cart-indicator-count {
  background: var(--surface-soft);
  color: var(--ink-500);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  border: 0;
  border-radius: var(--radius-control);
  background: none;
  color: var(--ink-950);
  cursor: pointer;
}
.menu-toggle .icon { width: 24px; height: 24px; }
.menu-toggle:hover { background: var(--surface-soft); }

@media (max-width: 379.98px) {
  .brand-tagline { display: none; }
}

@media (min-width: 640px) {
  .cart-indicator,
  .header-cta-primary { display: inline-flex; }
  .brand-logo { height: 48px; }
}

@media (min-width: 1024px) {
  .brand-logo { height: 54px; }
  .brand-name { font-size: 1rem; }
}

@media (min-width: 1200px) {
  .primary-nav { display: block; flex: none; }
  .header-cta-secondary { display: inline-flex; }
  .menu-toggle { display: none; }
}

@media (min-width: 1200px) and (max-width: 1299.98px) {
  .primary-nav a { padding: 0 10px; }
  .primary-nav a::after { left: 10px; right: 10px; }
  .cart-indicator-label { display: none; }
}

/* Menú móvil */
.drawer-nav ul { margin: 0; padding: 8px 0; list-style: none; }
.drawer-nav a {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 24px;
  border-left: 3px solid transparent;
  color: var(--ink-950);
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
}
.drawer-nav a:hover { background: var(--surface-soft); }
.drawer-nav a[aria-current] { border-left-color: var(--osepsa-indigo); color: var(--osepsa-indigo); }
.drawer-nav a:focus-visible { outline-offset: -3px; }
.drawer-actions {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 20px 24px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

/* Hero ------------------------------------------------------------------- */
.hero { padding-top: clamp(48px, 7vw, 104px); }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(20px, 3vw, 32px);
  color: var(--ink-600);
  font-size: 0.875rem;
  font-weight: 500;
}

.hero-title {
  max-width: 21ch;
  font-size: var(--fs-display);
  line-height: 1.07;
  letter-spacing: -0.03em;
  color: var(--osepsa-indigo);
}

.hero-body {
  display: grid;
  gap: 48px;
  margin-top: clamp(28px, 4vw, 56px);
}

.hero-lead p {
  max-width: 36em;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--ink-600);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-facts-title {
  margin-bottom: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-950);
}
.hero-facts dl > div {
  display: grid;
  grid-template-columns: minmax(104px, 34%) minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.hero-facts dl > div:last-child { border-bottom: 1px solid var(--line); }
.hero-facts dt { color: var(--ink-500); font-size: 0.875rem; }
.hero-facts dd { color: var(--ink-950); font-size: 0.9375rem; font-weight: 500; }

@media (min-width: 1024px) {
  .hero-body {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 32px;
    align-items: start;
  }
  .hero-lead { grid-column: 1 / 7; }
  .hero-facts { grid-column: 8 / 13; padding-top: 4px; }
}

/* Slot de fotografía institucional (se activa con .hero--media) */
.hero-media {
  margin-top: clamp(40px, 5vw, 64px);
  overflow: hidden;
  border-radius: var(--radius-panel);
  aspect-ratio: 16 / 7;
  background: var(--surface-soft);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* Franja */
.trust-strip {
  margin-top: clamp(56px, 8vw, 104px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.trust-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  color: var(--ink-800);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
}
.trust-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--osepsa-blue);
}
.trust-list li:nth-child(n + 3) { border-top: 1px solid var(--line); }

@media (min-width: 768px) {
  .trust-list { display: flex; justify-content: space-between; gap: 24px; }
  .trust-list li:nth-child(n + 3) { border-top: 0; }
  .trust-list li { padding: 22px 0; }
}

/* Cómo funciona ---------------------------------------------------------- */
.steps {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  column-gap: 16px;
  padding: 24px 0 28px;
  border-top: 1px solid var(--line-strong);
}
.steps li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--osepsa-indigo);
}
.step-num {
  grid-row: span 2;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--osepsa-indigo);
  font-variant-numeric: tabular-nums;
}
.steps h3 {
  margin-bottom: 8px;
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.steps p { color: var(--ink-600); font-size: 0.9375rem; }

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
}
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps li { display: block; padding: 24px 0 0; }
  .step-num { display: block; margin-bottom: 48px; font-size: 2.75rem; }
}

.model-detail {
  display: grid;
  gap: 48px;
  margin-top: clamp(56px, 7vw, 96px);
}
.model-detail h3 { margin-bottom: 14px; font-size: var(--fs-h3); letter-spacing: -0.012em; }
.model-detail p { color: var(--ink-600); }
.model-prevention > p { margin-bottom: 24px; }
.model-prevention .field-note { margin-top: 8px; margin-bottom: 0; }

.feature-grid {
  display: grid;
  margin-top: 24px;
  column-gap: 32px;
}
.feature-grid > div { padding: 16px 0; border-top: 1px solid var(--line-strong); }
.feature-grid dt { color: var(--ink-950); font-weight: 600; font-size: 0.9375rem; }
.feature-grid dd { margin-top: 4px; color: var(--ink-600); font-size: 0.9375rem; }

@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .model-detail { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }
  .model-prevention { grid-column: 1 / 5; }
  .model-platform { grid-column: 6 / 13; }
}

/* Membresías ------------------------------------------------------------- */
.plan-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 28px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--white);
  min-width: 0;
}
.plan-switch span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 7px;
  color: var(--ink-600);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background-color var(--t), color var(--t);
}
.plan-switch input:checked + span { background: var(--osepsa-indigo); color: var(--white); }
.plan-switch input:focus-visible + span { outline: 2px solid var(--osepsa-blue); outline-offset: 2px; }

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

.plan-kicker { color: var(--ink-500); font-size: 0.8125rem; font-weight: 500; }
.plan-name {
  margin-top: 4px;
  font-size: 1.25rem;
  letter-spacing: -0.012em;
  color: var(--osepsa-indigo);
}
.plan-price {
  margin-top: 16px;
  color: var(--ink-950);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.plan-currency {
  margin-right: 2px;
  color: var(--ink-500);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: 0.9em;
}
.plan-period { color: var(--ink-500); font-size: 0.875rem; font-weight: 400; letter-spacing: 0; }
.plan-installments { margin-top: 6px; color: var(--ink-600); font-size: 0.875rem; }
.plan-head .btn { margin-top: 20px; }

.plan-in-cart {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--success);
  font-size: 0.8125rem;
  font-weight: 600;
}
.plan-in-cart::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cell-lead {
  display: block;
  color: var(--ink-950);
  font-weight: 600;
  line-height: 1.35;
}
.cell-detail {
  display: block;
  margin-top: 6px;
  color: var(--ink-600);
  font-size: 0.8125rem;
  line-height: 1.55;
}
.cell-na {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-500);
  font-size: 0.875rem;
}
.cell-na::before { content: ""; width: 12px; height: 1px; background: var(--ink-400); }

.shared-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-950);
  font-weight: 600;
}

.compare-note {
  margin-top: 16px;
  color: var(--ink-500);
  font-size: 0.8125rem;
}

/* Comparador — móvil/tablet: una membresía a la vez */
@media (max-width: 1023.98px) {
  .compare,
  .compare thead,
  .compare tbody,
  .compare tfoot,
  .compare tr,
  .compare th,
  .compare td { display: block; width: auto; text-align: left; }

  .compare .compare-corner { display: none; }

  .compare[data-view="plata"] [data-col]:not([data-col="plata"]):not([data-col="all"]),
  .compare[data-view="oro"] [data-col]:not([data-col="oro"]):not([data-col="all"]),
  .compare[data-view="platino"] [data-col]:not([data-col="platino"]):not([data-col="all"]) { display: none; }

  .compare thead th { padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
  .plan-head .btn { max-width: 360px; }

  .compare tbody tr { padding: 18px 0; border-bottom: 1px solid var(--line); }
  .compare tbody th {
    margin-bottom: 6px;
    color: var(--osepsa-indigo);
    font-size: 0.8125rem;
    font-weight: 600;
  }
  .compare tfoot td[data-col] { padding-top: 24px; }
  .compare tfoot .btn { max-width: 360px; }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .compare tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
    gap: 24px;
  }
  .compare tbody th { margin: 0; padding-top: 1px; font-size: 0.875rem; }
  .plan-head { display: grid; grid-template-columns: 1fr auto; column-gap: 32px; align-items: end; }
  .plan-head > * { grid-column: 1; }
  .plan-head .btn { grid-column: 2; grid-row: 3 / 5; width: auto; min-width: 220px; margin: 0; }
  .plan-head .plan-in-cart { grid-column: 2; }
}

/* Comparador — escritorio: tabla */
@media (min-width: 1024px) {
  .plan-switch { display: none; }
  .compare { table-layout: fixed; }
  .compare-corner { width: 22%; vertical-align: bottom; padding: 0 24px 24px 0; }
  .compare-corner-text { color: var(--ink-500); font-size: 0.8125rem; font-weight: 500; }
  .compare th[data-col],
  .compare td[data-col] {
    padding: 20px 24px;
    border-left: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
  }
  .compare thead th[data-col] { padding-top: 0; padding-bottom: 28px; vertical-align: bottom; font-weight: inherit; }
  .compare thead tr { border-bottom: 1px solid var(--rule); }
  .compare tbody tr { border-bottom: 1px solid var(--line); }
  .compare tbody th[scope="row"] {
    padding: 20px 24px 20px 0;
    color: var(--ink-950);
    font-weight: 600;
    text-align: left;
    vertical-align: top;
  }
  .compare tbody tr:hover > * { background: var(--surface-soft); }
  .compare tfoot td[data-col] { padding-top: 24px; padding-bottom: 0; }
  .compare tfoot td:not([data-col]) { padding: 0; }
  .compare .row-shared td[data-col] { padding-top: 22px; }
}

/* Platino + Plus */
.telehealth {
  display: grid;
  gap: 40px;
  margin-top: clamp(56px, 7vw, 96px);
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-cool);
}
.telehealth-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--osepsa-indigo);
  font-size: 0.875rem;
  font-weight: 600;
}
.telehealth-kicker .icon { width: 18px; height: 18px; }
.telehealth-title {
  margin-top: 12px;
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  letter-spacing: -0.02em;
  color: var(--osepsa-indigo);
}
.telehealth-desc { margin-top: 12px; max-width: 44ch; color: var(--ink-600); }

.telehealth-prices { margin: 24px 0; }
.telehealth-prices > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line-strong);
}
.telehealth-prices > div:last-child { border-bottom: 1px solid var(--line-strong); }
.telehealth-prices dt { color: var(--ink-600); font-size: 0.9375rem; }
.telehealth-prices dd {
  color: var(--ink-950);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.telehealth-prices .plan-currency { vertical-align: 0.4em; }
.telehealth-main .field-note { max-width: 44ch; }

.telehealth-lead {
  color: var(--ink-950);
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: -0.012em;
}
.telehealth-list { margin: 16px 0 0; padding: 0; list-style: none; }
.telehealth-list li {
  padding: 14px 0 14px 22px;
  border-top: 1px solid var(--line-strong);
  position: relative;
  color: var(--ink-800);
}
.telehealth-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  width: 8px;
  height: 1px;
  background: var(--osepsa-indigo);
}

@media (min-width: 1024px) {
  .telehealth { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; }
  .telehealth-scope { padding-top: 34px; }
}

/* Selección */
.selection {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.selection-title { font-size: 1rem; }
.selection-summary { margin-top: 4px; color: var(--ink-600); font-size: 0.9375rem; }
.selection-summary strong { color: var(--ink-950); font-variant-numeric: tabular-nums; }
.selection-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 639.98px) {
  .selection-actions { width: 100%; }
  .selection-actions .btn { flex: 1 1 100%; }
}

/* Red médica ------------------------------------------------------------- */
.segmented { min-width: 0; margin: 0 0 24px; padding: 0; border: 0; }
.segmented-legend { margin-bottom: 12px; padding: 0; color: var(--ink-950); font-size: 0.875rem; font-weight: 600; }
.segmented-options { display: flex; gap: 8px; }
.segmented span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--white);
  color: var(--ink-800);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color var(--t), background-color var(--t), color var(--t);
}
.segmented label:hover span { border-color: var(--ink-500); }
.segmented input:checked + span {
  border-color: var(--osepsa-indigo);
  background: var(--osepsa-indigo);
  color: var(--white);
}
.segmented input:focus-visible + span { outline: 2px solid var(--osepsa-blue); outline-offset: 2px; }

@media (max-width: 767.98px) {
  .segmented-options {
    margin-inline: calc(-1 * var(--gutter));
    padding: 2px var(--gutter) 6px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-padding-inline: var(--gutter);
  }
  .segmented-options::-webkit-scrollbar { display: none; }
}
@media (min-width: 768px) {
  .segmented-options { flex-wrap: wrap; }
}

.network {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background: var(--white);
}
.network-directory { display: flex; flex-direction: column; min-width: 0; }
.directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.directory-count { color: var(--ink-950); font-size: 0.9375rem; font-weight: 600; }

.provider-list { flex: 1; margin: 0; padding: 0; list-style: none; overflow-y: auto; }
.provider {
  position: relative;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
  transition: background-color var(--t);
}
.provider::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--osepsa-indigo);
  transform: scaleY(0);
  transition: transform var(--t);
}
.provider:hover { background: var(--surface-soft); }
.provider.is-selected { background: var(--indigo-050); }
.provider.is-selected::before { transform: scaleY(1); }

.provider-main {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.provider-main:focus-visible { outline-offset: 4px; border-radius: 4px; }
.provider-name { color: var(--ink-950); font-weight: 600; }
.provider-spec { color: var(--osepsa-indigo); font-size: 0.875rem; font-weight: 500; }
.provider-meta { color: var(--ink-600); font-size: 0.875rem; }
.provider-meta span + span::before { content: " · "; color: var(--ink-400); }
.provider-actions { display: flex; gap: 16px; margin-top: 4px; }
.provider-selected-tag {
  display: none;
  align-items: center;
  color: var(--osepsa-indigo);
  font-size: 0.8125rem;
  font-weight: 600;
}
.provider.is-selected .provider-selected-tag { display: inline-flex; }

.provider-empty { padding: 24px 20px; color: var(--ink-600); font-size: 0.9375rem; }
.provider-empty .link-btn { display: block; margin-top: 4px; }

.directory-note {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-500);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.network-map { position: relative; order: -1; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.map { position: relative; height: 320px; z-index: 0; }
.map-status {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--surface-soft);
  color: var(--ink-500);
  font-size: 0.875rem;
  text-align: center;
}

@media (min-width: 768px) {
  .map { height: 400px; }
}
@media (min-width: 1024px) {
  .network { grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); min-height: 580px; }
  .network-directory { border-right: 1px solid var(--line); }
  .network-map { order: 0; border-bottom: 0; }
  .map { position: absolute; inset: 0; height: auto; }
}

/* Reservar cita ---------------------------------------------------------- */
.booking { display: grid; gap: 56px; }

.booking-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 24px 0;
  border-top: 1px solid var(--line-strong);
}
.booking-step:first-of-type { border-top-color: var(--rule); }
.booking-num {
  padding-top: 1px;
  color: var(--osepsa-indigo);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.booking-title {
  margin-bottom: 14px;
  padding: 0;
  color: var(--ink-950);
  font-size: 1rem;
  font-weight: 600;
}
.booking-submit .field-note { margin-top: 12px; }

.choice-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.choice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.choice span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  height: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--white);
  color: var(--ink-800);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  transition: border-color var(--t), background-color var(--t), color var(--t), box-shadow var(--t);
}
.choice span::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: none;
  border: 1.5px solid var(--ink-400);
  border-radius: 50%;
  background: var(--white);
  transition: border-color var(--t), box-shadow var(--t);
}
.choice:hover span { border-color: var(--ink-500); }
.choice input:checked + span {
  border-color: var(--osepsa-indigo);
  background: var(--indigo-050);
  color: var(--osepsa-indigo);
  box-shadow: inset 0 0 0 1px var(--osepsa-indigo);
}
.choice input:checked + span::before {
  border-color: var(--osepsa-indigo);
  box-shadow: inset 0 0 0 3.5px var(--white);
  background: var(--osepsa-indigo);
}
.choice input:focus-visible + span { outline: 2px solid var(--osepsa-blue); outline-offset: 2px; }
.choice-group[aria-invalid="true"] .choice span { border-color: var(--error); }
.choice-group .field-error { margin-top: 10px; }

.booking-aside { container-type: inline-size; }
.booking-aside .confirmation { margin-bottom: 28px; }
.aside-title { padding-top: 20px; border-top: 1px solid var(--rule); font-size: 1rem; }
.booking-aside > .field-note { margin-top: 4px; }

.appointments {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.appointments th {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-500);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.appointments td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-800);
  vertical-align: top;
}
.appointments td:first-child { color: var(--ink-950); font-weight: 600; }
.appt-provider { display: block; color: var(--ink-500); font-size: 0.8125rem; }
.appointments tr.is-new td { animation: row-in 900ms ease-out; }

@container (max-width: 520px) {
  .appointments thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .appointments,
  .appointments tbody,
  .appointments tr,
  .appointments td { display: block; }
  .appointments tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }
  .appointments td { padding: 0; border: 0; }
  .appointments td:first-child { grid-column: 1 / -1; font-size: 0.9375rem; }
  .appointments td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--ink-500);
    font-size: 0.75rem;
    font-weight: 500;
  }
  .appointments td:first-child::before { display: none; }
}

@media (min-width: 1024px) {
  .booking { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: start; }
  .booking-form { grid-column: 1 / 8; }
  .booking-aside { grid-column: 9 / 13; position: sticky; top: calc(var(--header-h) + 32px); }
  .booking-step { grid-template-columns: 48px minmax(0, 1fr); }
}

/* Nosotros --------------------------------------------------------------- */
.about-text { display: grid; gap: 20px; color: var(--ink-600); font-size: 1.0625rem; line-height: 1.7; }

.about-video { margin-top: clamp(48px, 6vw, 80px); }
.video-frame {
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  aspect-ratio: 16 / 9;
}
.video-frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-fallback { padding: 24px; color: var(--white); }
.video-fallback a { color: var(--white); }
.about-video figcaption { margin-top: 12px; color: var(--ink-500); font-size: 0.8125rem; }

.mvv { display: grid; gap: 40px; margin-top: clamp(56px, 7vw, 96px); }
.mvv-col { padding-top: 20px; border-top: 1px solid var(--rule); }
.mvv-col h3 { margin-bottom: 12px; font-size: 1.125rem; color: var(--osepsa-indigo); }
.mvv-col p { color: var(--ink-600); font-size: 0.9375rem; line-height: 1.65; }

.values-list { margin: 20px 0 0; padding: 0; list-style: none; }
.values-list li {
  position: relative;
  padding: 10px 0 10px 18px;
  border-top: 1px solid var(--line-strong);
  color: var(--ink-800);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.values-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 19px;
  width: 5px;
  height: 5px;
  background: var(--osepsa-red);
}

@media (min-width: 768px) {
  .mvv { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .mvv-col:last-child { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .about-text,
  .about-video { margin-left: calc((100% + 32px) * 3 / 12); }
  .about-text { display: block; columns: 2; column-gap: 40px; }
  .about-text p { break-inside: avoid; margin-bottom: 20px; }
  .mvv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mvv-col:last-child { grid-column: auto; }
}

/* Testimonios ------------------------------------------------------------ */
.testimonials {
  display: grid;
  gap: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.testimonials-title { margin-top: 12px; font-size: var(--fs-h3); letter-spacing: -0.012em; }
.demo-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 14px;
  color: var(--ink-600);
  font-size: 0.875rem;
}

.testimonial-quote { padding-left: 24px; border-left: 2px solid var(--osepsa-indigo); }
.testimonial-quote p {
  color: var(--ink-950);
  font-size: clamp(1.125rem, 1rem + 0.55vw, 1.5rem);
  font-weight: 450;
  line-height: 1.45;
  letter-spacing: -0.012em;
}
.testimonial-quote footer { margin-top: 16px; color: var(--ink-600); font-size: 0.875rem; }
.testimonial-quote footer span:first-child { color: var(--ink-950); font-weight: 600; }

.testimonial-controls { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding-left: 26px; }
.testimonial-count { min-width: 48px; color: var(--ink-600); font-size: 0.875rem; text-align: center; font-variant-numeric: tabular-nums; }

@media (min-width: 1024px) {
  .testimonials { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }
  .testimonials-head { grid-column: 1 / 5; }
  .testimonial { grid-column: 6 / 13; }
}

/* Preguntas frecuentes --------------------------------------------------- */
.faq-layout { display: grid; gap: 24px; padding-top: 20px; border-top: 1px solid var(--rule); }
.faq-head h2 {
  margin-top: 12px;
  font-size: var(--fs-h2);
  line-height: 1.12;
  letter-spacing: -0.022em;
  color: var(--osepsa-indigo);
}

.faq-item { border-bottom: 1px solid var(--line-strong); }
.faq-q { font-size: inherit; }
.faq-q button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-height: 64px;
  padding: 20px 0;
  border: 0;
  background: none;
  color: var(--ink-950);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: color var(--t);
}
.faq-q button:hover { color: var(--osepsa-indigo); }
.faq-q button:focus-visible { outline-offset: 4px; border-radius: 4px; }
.faq-icon { position: relative; width: 14px; height: 14px; flex: none; }
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 1.5px;
  margin-top: -0.75px;
  background: currentColor;
  transition: transform var(--t);
}
.faq-icon::after { transform: rotate(90deg); }
[aria-expanded="true"] .faq-icon::after { transform: rotate(90deg) scaleX(0); }

.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 220ms cubic-bezier(0.2, 0, 0, 1); }
.faq-a.is-open { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; }
.faq-a p { max-width: 64ch; padding: 0 40px 24px 0; color: var(--ink-600); }

@media (min-width: 1024px) {
  .faq-layout { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }
  .faq-head { grid-column: 1 / 5; }
  .faq-list { grid-column: 6 / 13; margin-top: -20px; }
}

/* Contacto --------------------------------------------------------------- */
.contact {
  padding-block: var(--section-space);
  background: var(--osepsa-indigo);
  color: var(--white);
}
.contact-grid { display: grid; gap: 48px; }
.contact .section-label { color: rgba(255, 255, 255, 0.78); }
.contact h2 {
  max-width: 18ch;
  margin-top: 16px;
  color: var(--white);
  font-size: var(--fs-h2);
  line-height: 1.12;
  letter-spacing: -0.022em;
}
.contact-lead { max-width: 46ch; margin-top: 20px; color: rgba(255, 255, 255, 0.84); font-size: var(--fs-lead); }
.contact-info :focus-visible { outline-color: var(--white); }

.contact-list { margin-top: 40px; }
.contact-list > div {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.contact-list dt { font-size: 0.9375rem; font-weight: 600; }
.contact-list dd { color: rgba(255, 255, 255, 0.8); font-size: 0.9375rem; }
.contact-muted { color: rgba(255, 255, 255, 0.64); }

.contact-panel {
  padding: clamp(24px, 3.5vw, 40px);
  border-radius: var(--radius-panel);
  background: var(--white);
  color: var(--ink-800);
}
.contact-form-title { margin-bottom: 24px; font-size: var(--fs-h3); letter-spacing: -0.012em; }
.contact-form .btn { margin-top: 28px; }
.confirmation-panel .btn { margin-top: 20px; }

@media (min-width: 640px) {
  .contact-list > div { grid-template-columns: 184px minmax(0, 1fr); gap: 24px; }
}
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: start; }
  .contact-info { grid-column: 1 / 6; }
  .contact-panel { grid-column: 7 / 13; }
}

/* Footer ----------------------------------------------------------------- */
.site-footer { padding: 64px 0 40px; background: var(--white); }
.footer-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand img { width: 104px; height: auto; }
.footer-brand p { max-width: 32ch; margin-top: 16px; color: var(--ink-600); font-size: 0.9375rem; }
.footer-heading { margin-bottom: 14px; color: var(--ink-950); font-size: 0.8125rem; font-weight: 600; }
.footer-nav ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.footer-nav a { color: var(--ink-600); font-size: 0.9375rem; text-decoration: none; }
.footer-nav a:hover { color: var(--osepsa-indigo); text-decoration: underline; }

.footer-bottom {
  display: grid;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.footer-legal,
.footer-copy { color: var(--ink-500); font-size: 0.8125rem; line-height: 1.55; }

@media (min-width: 768px) {
  .footer-top { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: auto; }
}
@media (min-width: 1024px) {
  .footer-top { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }
  .footer-brand { grid-column: 1 / 6; }
  .footer-nav:nth-of-type(1) { grid-column: 8 / 10; }
  .footer-nav:nth-of-type(2) { grid-column: 10 / 13; }
  .footer-bottom { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 24px; }
}

/* 7. CARRITO, CONTRATACIÓN Y OVERLAYS ===================================== */

/* Barra inferior (móvil, sólo con carrito activo) */
.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-strong);
  background: var(--white);
}
.cart-bar-text { display: grid; line-height: 1.3; }
.cart-bar-count { color: var(--ink-600); font-size: 0.8125rem; }
.cart-bar-total { color: var(--ink-950); font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 639.98px) {
  body.has-cart-bar { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (min-width: 640px) {
  .cart-bar { display: none; }
}

/* Dialog base */
dialog {
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-800);
}
dialog::backdrop { background: rgba(17, 24, 39, 0.44); }
dialog[open]::backdrop { animation: fade-in 200ms ease-out; }

/* Sheet lateral (menú y carrito) */
.sheet {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
.sheet-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  background: var(--white);
  box-shadow: var(--shadow-overlay);
}
.sheet-nav .sheet-panel { width: min(400px, 100%); }
.sheet[open] .sheet-panel { animation: sheet-in 240ms cubic-bezier(0.2, 0, 0, 1); }
.sheet.is-closing .sheet-panel { animation: sheet-out 160ms ease-in forwards; }
.sheet.is-closing::backdrop { animation: fade-out 160ms ease-in forwards; }

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: none;
  height: var(--header-h);
  padding: 0 12px 0 24px;
  border-bottom: 1px solid var(--line);
}
.sheet-title { color: var(--ink-950); font-size: 1.0625rem; font-weight: 600; }
.sheet-body { flex: 1; overflow-y: auto; padding: 20px 24px 24px; }
.sheet-body > .field-note { margin-top: 0; }
.sheet-foot {
  flex: none;
  padding: 16px 24px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.sheet-foot .cart-total { padding-top: 0; }
.cart-foot-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.cart-foot-actions .btn-primary { flex: 1; max-width: 260px; }

/* Items del carrito (drawer y contratación) */
.cart-list { margin: 20px 0 0; padding: 0; list-style: none; }
.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: 1px solid var(--line); }
.cart-item-name { color: var(--ink-950); font-weight: 600; }
.cart-item-unit { color: var(--ink-500); font-size: 0.8125rem; }
.cart-item-line {
  grid-row: 1;
  grid-column: 2;
  color: var(--ink-950);
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: 1 / -1;
  margin-top: 10px;
}
.cart-item.is-updated .cart-item-line { animation: flash 700ms ease-out; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
}
.qty button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: none;
  color: var(--ink-800);
  cursor: pointer;
}
.qty button:hover:not(:disabled) { background: var(--surface-soft); }
.qty button:disabled { color: var(--ink-400); cursor: not-allowed; }
.qty button .icon { width: 16px; height: 16px; }
.qty output { min-width: 28px; color: var(--ink-950); font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }

.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  color: var(--ink-600);
}
.cart-total strong {
  color: var(--ink-950);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}

.cart-empty { padding: 28px 0 8px; color: var(--ink-600); }
.cart-empty p { margin-bottom: 16px; }

/* Modal de contratación */
.modal {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  overflow-y: auto;
  border-radius: var(--radius-panel);
  background: var(--white);
  box-shadow: var(--shadow-overlay);
}
.modal[open] { animation: modal-in 220ms cubic-bezier(0.2, 0, 0, 1); }
.modal.is-closing { animation: fade-out 150ms ease-in forwards; }
.modal.is-closing::backdrop { animation: fade-out 150ms ease-in forwards; }

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 16px 16px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.modal-title { color: var(--osepsa-indigo); font-size: 1.25rem; letter-spacing: -0.012em; }

.sim-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--ink-600);
  font-size: 0.8125rem;
  font-weight: 500;
}
.sim-tag .icon { width: 16px; height: 16px; color: var(--osepsa-indigo); }

.stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 20px 28px 4px;
  list-style: none;
}
.stepper li {
  display: flex;
  gap: 6px;
  padding-top: 10px;
  border-top: 3px solid var(--line);
  color: var(--ink-500);
  font-size: 0.8125rem;
  line-height: 1.3;
}
.stepper-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.stepper li.is-complete { border-top-color: var(--osepsa-indigo); color: var(--ink-800); }
.stepper li.is-complete .stepper-num { font-size: 0; }
.stepper li.is-complete .stepper-num::before { content: "✓"; font-size: 0.8125rem; color: var(--osepsa-indigo); }
.stepper li[aria-current="step"] { border-top-color: var(--osepsa-indigo); color: var(--ink-950); font-weight: 600; }

.checkout-step { padding: 24px 28px 28px; }
.step-title { margin-bottom: 4px; color: var(--ink-950); font-size: 1.125rem; }
.checkout-form { margin-top: 20px; }

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.order-id { margin-top: 8px; color: var(--ink-600); font-size: 0.875rem; }
.order-id strong { margin-left: 4px; color: var(--ink-950); letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }

.summary-grid { display: grid; gap: 28px; margin-top: 24px; }
.summary-label { margin-bottom: 8px; color: var(--ink-500); font-size: 0.8125rem; font-weight: 600; }
.summary-items { margin: 0; padding: 0; list-style: none; }
.summary-items li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}
.summary-items li span:last-child { color: var(--ink-950); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.summary-grid .cart-total { border-top: 1px solid var(--rule); padding-top: 12px; }
.summary-data > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.summary-data dt { color: var(--ink-500); }
.summary-data dd { color: var(--ink-950); overflow-wrap: anywhere; }

.sim-note {
  margin-top: 24px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--ink-600);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.processing {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  color: var(--ink-800);
  font-size: 0.9375rem;
}
.spinner {
  width: 20px;
  height: 20px;
  flex: none;
  border: 2px solid var(--line-strong);
  border-top-color: var(--osepsa-indigo);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.done { padding-top: 8px; }
.done-mark { display: inline-flex; margin-bottom: 12px; color: var(--success); }
.done-mark .icon { width: 32px; height: 32px; stroke-width: 2; }
.done .step-title { font-size: 1.375rem; }
.done > p:not(.order-id) { max-width: 52ch; margin-top: 8px; color: var(--ink-600); }

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

@media (max-width: 639.98px) {
  .modal {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
  .modal-head { padding: 16px 8px 14px 20px; }
  .stepper { padding: 16px 20px 0; }
  .stepper-label { font-size: 0.75rem; }
  .stepper li:not([aria-current="step"]) .stepper-label { display: none; }
  .checkout-step { padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); }
  .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .modal-actions .btn:only-child { grid-column: 1 / -1; }
}

/* Avisos */
.toast-region {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(460px, calc(100% - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}
.has-cart-bar .toast-region { bottom: calc(88px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .has-cart-bar .toast-region { bottom: 24px; } }

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 8px 8px 8px 16px;
  border-radius: 10px;
  background: var(--ink-950);
  color: var(--white);
  font-size: 0.9375rem;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.2);
  pointer-events: auto;
  animation: toast-in 200ms cubic-bezier(0.2, 0, 0, 1);
}
.toast.is-leaving { animation: fade-out 160ms ease-in forwards; }
.toast button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: none;
  color: var(--white);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.toast button:hover { border-color: var(--white); }
.toast :focus-visible { outline-color: var(--white); }

/* 8. MAPA (LEAFLET) ======================================================== */

.leaflet-container { font-family: var(--font-sans); background: var(--surface-soft); }
.leaflet-container:focus-visible { outline: 2px solid var(--osepsa-blue); outline-offset: -2px; }
.map .leaflet-bar { overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius-control); box-shadow: none; }
.map .leaflet-bar a { width: 36px; height: 36px; line-height: 36px; color: var(--ink-800); }
.leaflet-control-attribution { font-size: 11px; }

.pin-wrap { background: none; border: 0; }
.pin {
  display: block;
  width: 18px;
  height: 18px;
  margin: 3px;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--osepsa-indigo);
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.35), 0 1px 4px rgba(17, 24, 39, 0.3);
  transition: transform var(--t), background-color var(--t);
}
.pin-wrap:hover .pin { transform: scale(1.15); }
.pin-wrap.is-selected .pin {
  background: var(--osepsa-blue);
  transform: scale(1.35);
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.4), 0 0 0 6px rgba(17, 145, 236, 0.22);
}
.leaflet-marker-icon.pin-wrap:focus-visible { outline: 2px solid var(--osepsa-blue); outline-offset: 2px; border-radius: 50%; }

.leaflet-popup-content-wrapper { border-radius: 10px; box-shadow: 0 8px 24px rgba(17, 24, 39, 0.18); }
.leaflet-popup-content { margin: 14px 18px 14px 16px; font-size: 0.875rem; line-height: 1.45; color: var(--ink-800); }
.popup-name { display: block; color: var(--ink-950); font-weight: 600; font-size: 0.9375rem; }
.popup-spec { display: block; color: var(--osepsa-indigo); font-weight: 500; }
.popup-meta { display: block; color: var(--ink-600); }
.popup-book {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--osepsa-indigo);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ANIMACIONES ============================================================== */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-in { from { transform: translateX(32px); opacity: 0; } }
@keyframes sheet-out { to { transform: translateX(32px); opacity: 0; } }
@keyframes modal-in { from { transform: translateY(12px); opacity: 0; } }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
@keyframes flash { from { color: var(--osepsa-blue); } }
@keyframes row-in { from { background: var(--indigo-050); } }

/* 9. MOVIMIENTO REDUCIDO =================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after,
  ::backdrop {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .spinner { border-top-color: var(--line-strong); border-right-color: var(--osepsa-indigo); }
}
