/* =====================================================================
   BIOLAQ — Laboratorio Clínico Especializado
   Hoja de estilos · versión corporativa (fondo blanco)
   01 Tokens · 02 Base · 03 Utilidades · 04 Botones · 05 Topbar/Header
   06 Hero · 07 Dock · 08 Servicios · 09 Domicilio · 10 Nosotros
   11 Segmentos · 12 Alianzas · 13 Testimonios · 14 Sede · 15 CTA final
   16 Footer · 17 Flotante · 18 Animación · 19 Responsive
   ===================================================================== */

/* ---------- 01. Tokens ---------- */
:root {
  --white: #ffffff;
  --bg: #ffffff;
  --tint: #f3f8fd;
  --tint-2: #e8f2fc;
  --ink: #0b1d3f;          /* titulares: azul noche */
  --text: #2b3a55;         /* cuerpo */
  --muted: #5d6c86;
  --line: #e1e9f3;
  --line-2: #cfdcec;
  --navy: #0e3a8a;
  --blue: #1756d1;         /* azul de marca, AA sobre blanco */
  --azure: #2a83e8;
  --cyan: #20b4d4;
  --cyan-soft: #d9f4fa;
  --green: #17a673;
  --wa: #25d366;

  --grad: linear-gradient(105deg, #1756d1 0%, #2a83e8 50%, #20b4d4 100%);
  --grad-deep: linear-gradient(135deg, #0e3a8a 0%, #1756d1 55%, #1aa6cc 100%);
  --grad-text: linear-gradient(100deg, #1756d1 0%, #1f9fd6 70%, #20b4d4 100%);

  --shadow-sm: 0 1px 2px rgba(11, 29, 63, 0.06), 0 2px 8px rgba(11, 29, 63, 0.04);
  --shadow: 0 10px 30px -12px rgba(14, 58, 138, 0.18), 0 2px 6px rgba(11, 29, 63, 0.04);
  --shadow-lg: 0 30px 60px -24px rgba(14, 58, 138, 0.28), 0 6px 16px -8px rgba(11, 29, 63, 0.08);

  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: var(--font-sans);
  --font-mono: var(--font-sans);

  --radius-sm: 12px;
  --radius: 22px;
  --radius-lg: 32px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 02. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2, h3 { color: var(--ink); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--cyan-soft); color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* ---------- 03. Utilidades ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--font-sans); letter-spacing: 0.02em; font-weight: 600; }
.serif { font-style: normal; font-weight: inherit; }
.icon { width: 1.15em; height: 1.15em; flex: none; }
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 1000; background: var(--blue); color: #fff;
  padding: 10px 16px; border-radius: 10px; font-weight: 700; transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue);
}
.eyebrow .mono {
  display: inline-grid; place-items: center; min-width: 32px; height: 24px; padding: 0 6px; border-radius: 999px;
  background: var(--tint-2); color: var(--blue); font-size: 11px; letter-spacing: 0.06em;
}
.eyebrow--light { color: #d6ecff; }
.eyebrow--light .mono { background: rgba(255, 255, 255, 0.16); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(32, 180, 212, 0.18); animation: blink 2.4s ease-in-out infinite; }
.dot--light { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22); }
@keyframes blink { 50% { opacity: 0.4; } }

.section { position: relative; padding-block: clamp(88px, 11vw, 144px); }
.section--tint { background: var(--tint); }
.section__head {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px 72px; align-items: end;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.section__head--center { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.section__title {
  font-size: clamp(30px, 3.8vw, 48px); line-height: 1.18; letter-spacing: -0.025em; font-weight: 700; max-width: 20ch;
}
.section__title--sm { font-size: clamp(28px, 3.2vw, 42px); }
.section__title em, .hero__title em, .final__title em, .panel__title em {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.08em;
}
.section__intro { color: var(--muted); font-size: clamp(15px, 1.15vw, 17px); max-width: 46ch; line-height: 1.75; }
.section__cta { display: flex; justify-content: center; margin-top: clamp(40px, 5vw, 60px); }

/* ---------- 04. Botones ---------- */
.btn {
  --pad-y: 13px; --pad-x: 22px;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: var(--pad-y) var(--pad-x); border-radius: 999px;
  font-weight: 700; font-size: 15px; white-space: nowrap; border: 1.5px solid transparent;
  transition: transform 0.5s var(--ease), box-shadow 0.4s var(--ease), background-color 0.3s, border-color 0.3s, color 0.3s;
}
.btn--sm { --pad-y: 9px; --pad-x: 16px; font-size: 14px; }
.btn--lg { --pad-y: 16px; --pad-x: 28px; font-size: 16px; }
.btn--xl { --pad-y: 20px; --pad-x: 36px; font-size: clamp(16px, 1.5vw, 18px); }

.btn--primary { color: #fff; background: var(--grad); box-shadow: 0 10px 24px -10px rgba(23, 86, 209, 0.6); }
.btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.9s var(--ease);
}
.btn--primary:hover { box-shadow: 0 16px 34px -12px rgba(23, 86, 209, 0.75); transform: translateY(-2px); }
.btn--primary:hover::before { transform: translateX(120%); }

.btn--outline { color: var(--blue); background: #fff; border-color: var(--line-2); }
.btn--outline:hover { border-color: var(--blue); background: var(--tint); transform: translateY(-2px); }

.btn--white { color: var(--blue); background: #fff; box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.35); }
.btn--white:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(0, 0, 0, 0.4); }

.btn .icon--arrow { transition: transform 0.45s var(--ease); }
.btn:hover .icon--arrow { transform: translateX(4px); }
.btn:active { transform: scale(0.97); }

/* ---------- 05. Topbar + Header ---------- */
.topbar { background: var(--navy); color: #cfe0ff; font-size: 13px; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar__info { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.topbar__info li { display: inline-flex; align-items: center; gap: 8px; }
.topbar__info .icon { color: var(--cyan); width: 15px; height: 15px; }
.topbar__info a:hover { color: #fff; }
.topbar__social { display: flex; gap: 4px; }
.topbar__social a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; transition: background 0.3s; }
.topbar__social a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.topbar__social svg { width: 14px; height: 14px; }

.header {
  position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent; transition: border-color 0.3s, box-shadow 0.4s, transform 0.5s var(--ease);
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 24px -16px rgba(11, 29, 63, 0.25); }
.header.is-hidden { transform: translateY(-100%); }
.header__inner { display: flex; align-items: center; gap: 24px; height: 84px; transition: height 0.4s var(--ease); }
.header.is-scrolled .header__inner { height: 70px; }
.header__logo img { height: 46px; width: auto; transition: height 0.4s var(--ease); }
.header.is-scrolled .header__logo img { height: 40px; }

.nav { margin-inline: auto; }
.nav__list { display: flex; gap: 2px; }
.nav__link {
  position: relative; display: block; padding: 8px 13px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--text); transition: color 0.3s, background 0.3s;
}
.nav__link:hover { color: var(--cyan); background: transparent; font-weight: 660; }
.nav__link.is-active, .header.is-scrolled .nav__link.is-active { color: var(--cyan); font-weight: 660; }
.nav__link.is-active::after { content: none; }
.header__actions { display: flex; align-items: center; gap: 8px; }

.burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line-2); position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.45s var(--ease), top 0.45s var(--ease); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; justify-content: space-between;
  padding: 110px var(--gutter) 28px; background: #fff;
  opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu li { border-bottom: 1px solid var(--line); overflow: hidden; }
.mobile-menu nav a {
  display: flex; align-items: baseline; gap: 14px; padding: 15px 0; color: var(--ink);
  font-size: clamp(26px, 7vw, 34px); font-weight: 700; letter-spacing: -0.03em;
  transform: translateY(100%); transition: transform 0.6s var(--ease);
}
.mobile-menu nav a .mono { font-size: 12px; color: var(--blue); }
.mobile-menu.is-open nav a { transform: none; }
.mobile-menu.is-open li:nth-child(2) a { transition-delay: 0.04s; }
.mobile-menu.is-open li:nth-child(3) a { transition-delay: 0.08s; }
.mobile-menu.is-open li:nth-child(4) a { transition-delay: 0.12s; }
.mobile-menu.is-open li:nth-child(5) a { transition-delay: 0.16s; }
.mobile-menu.is-open li:nth-child(6) a { transition-delay: 0.2s; }
.mobile-menu__ctas { display: grid; gap: 10px; }

/* ---------- 06. Hero ---------- */
.hero {
  position: relative; padding-top: clamp(40px, 6vw, 72px);
  background:
    radial-gradient(60% 70% at 85% 20%, rgba(32, 180, 212, 0.12), transparent 60%),
    radial-gradient(50% 60% at 10% 90%, rgba(23, 86, 209, 0.07), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--tint) 100%);
}
.hero::before {
  /* retícula técnica muy tenue */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(23, 86, 209, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(23, 86, 209, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 70% at 70% 40%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 70% 40%, #000 10%, transparent 70%);
}
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(48px, 6vw, 96px); align-items: center; }
.hero__content { padding-block: 24px 40px; }

.badge {
  display: inline-flex; align-items: center; gap: 12px; padding: 6px 16px 6px 6px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 14px; font-weight: 600; color: var(--text);
}
.badge__num { display: grid; place-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 800; font-size: 14px; }

.hero__title { margin-top: 32px; font-size: clamp(24px, 7.8vw, 54px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.hero__title .line__inner { display: inline-block; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.hero__title em { font-weight: 700; }
/* Allow hero title lines to wrap within their container at every viewport width. */
.hero__sub { margin-top: 28px; max-width: 50ch; font-size: clamp(16px, 1.3vw, 19px); color: var(--muted); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 36px; font-size: 14px; font-weight: 600; color: var(--text); }
.hero__trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust .icon { color: var(--blue); }

/* Visual: foto recortada en forma orgánica + capa 3D */
.hero__visual { position: relative; align-self: end; }
.hero__plate {
  position: relative; aspect-ratio: 0.86; max-height: 640px; margin-left: auto; width: 100%;
  border-radius: 46% 46% 32px 32px / 36% 36% 32px 32px; overflow: hidden;
  background: var(--grad-deep); box-shadow: var(--shadow-lg);
}
.hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.hero__plate::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(14, 58, 138, 0.35) 100%);
}
.hero__scene { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero__scene canvas { display: block; width: 100% !important; height: 100% !important; }

.hud { position: absolute; inset: 0; pointer-events: none; }
.hud__card {
  position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.94); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: float 7s ease-in-out infinite;
}
.hud__card > span:last-child { display: grid; line-height: 1.25; }
.hud__card strong { color: var(--ink); font-size: 15px; }
.hud__card--a { left: 5%; top: 30%; }
.hud__card--b { right: 5%; top: 52%; animation-delay: -2.4s; }
.hud__card--c { left: 5%; bottom: 6%; animation-delay: -4.6s; }
@keyframes float { 50% { translate: 0 -10px; } }
.hud__label { font-size: 12px; color: var(--muted); font-weight: 600; }
.hud__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--tint-2); color: var(--blue); }
.hud__icon--green { background: #e3f7ef; }
.hud__big { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(23, 166, 115, 0.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(23, 166, 115, 0); } 100% { box-shadow: 0 0 0 0 rgba(23, 166, 115, 0); } }

/* ---------- 07. Dock de accesos rápidos ---------- */
.dock {
  position: relative; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(48px, 6vw, 72px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.dock__item { position: relative; display: flex; align-items: center; gap: 14px; padding: 24px 22px; transition: background 0.35s; }
.dock__item + .dock__item { border-left: 1px solid var(--line); }
.dock__item:hover { background: var(--tint); }
.dock__icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--tint-2); color: var(--blue); transition: background 0.35s, color 0.35s, transform 0.5s var(--ease); }
.dock__icon svg { width: 24px; height: 24px; }
.dock__item:hover .dock__icon { background: var(--grad); color: #fff; transform: rotate(-6deg); }
.dock__text { display: grid; line-height: 1.3; }
.dock__text strong { color: var(--ink); font-size: 16px; }
.dock__text small { color: var(--muted); font-size: 13px; }
.dock__arrow { width: 18px; height: 18px; margin-left: auto; color: var(--blue); opacity: 0.4; transition: opacity 0.3s, transform 0.4s var(--ease); }
.dock__item:hover .dock__arrow { opacity: 1; transform: translate(2px, -2px); }
.hero { padding-bottom: clamp(24px, 3vw, 40px); }

/* ---------- 08. Servicios · explorador ---------- */
.explorer { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; align-items: start; }
.explorer__rail {
  position: sticky; top: 100px; display: grid; gap: 6px; padding: 8px;
  background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius);
}
.explorer__indicator {
  position: absolute; left: 8px; right: 8px; top: 8px; height: 0; border-radius: 16px;
  background: #fff; box-shadow: var(--shadow); pointer-events: none; z-index: 0;
  transition: transform 0.55s var(--ease), height 0.55s var(--ease), width 0.55s var(--ease);
}
.seg {
  position: relative; z-index: 1; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 16px; text-align: left; font-weight: 600; color: var(--muted);
  transition: color 0.3s;
}
.seg:hover { color: var(--ink); }
.seg[aria-selected="true"] { color: var(--ink); }
.seg__num { font-size: 11px; color: var(--muted); }
.seg__icon { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: #fff; color: var(--blue); border: 1px solid var(--line); transition: background 0.3s, color 0.3s, border-color 0.3s; }
.seg[aria-selected="true"] .seg__icon { background: var(--grad); color: #fff; border-color: transparent; }
.seg__name { font-size: 15px; line-height: 1.3; }
.seg__count { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.seg[aria-selected="true"] .seg__count { background: var(--tint-2); border-color: transparent; color: var(--blue); }

.explorer__stage { position: relative; }
.panel {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); min-height: 520px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
}
.js .panel[hidden] { display: none; }
.panel__media { position: relative; background: var(--grad-deep); overflow: hidden; }
.panel__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.panel__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(200deg, rgba(14, 58, 138, 0) 40%, rgba(14, 58, 138, 0.55) 100%); }
.panel__code { position: absolute; z-index: 1; left: 20px; bottom: 20px; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: var(--blue); font-size: 11px; }
.panel__body { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: clamp(32px, 3.6vw, 52px); }
.panel__kicker { font-size: 12px; color: var(--blue); text-transform: uppercase; }
.panel__title { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.25; letter-spacing: -0.02em; font-weight: 700; }
.panel__text { color: var(--muted); }
.panel__list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; margin: 4px 0 16px; }
.panel__list li {
  position: relative; display: flex; align-items: center; padding: 11px 14px 11px 38px; border-radius: 12px; background: var(--tint);
  font-size: 14.5px; font-weight: 600; color: var(--ink);
}
.panel__list li::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 14px; height: 14px; translate: 0 -50%; border-radius: 50%;
  background: var(--grad) center / 100%;
  -webkit-mask: radial-gradient(circle, #000 34%, transparent 36%), linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.panel .btn { margin-top: auto; }

/* ---------- 09. Domicilio + resultados ---------- */
.care__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 24px; }
.care__card {
  position: relative; display: grid; grid-template-columns: 1fr 0.8fr; min-height: 360px; overflow: hidden;
  border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.care__card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.care__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: clamp(28px, 3.2vw, 44px); }
.care__copy h3 { font-size: clamp(20px, 1.9vw, 26px); line-height: 1.3; letter-spacing: -0.02em; }
.care__copy p { color: var(--muted); }
.care__copy .btn { margin-top: auto; }
.care__tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--tint-2); color: var(--blue); font-size: 13px; font-weight: 700; }
.care__card--online { grid-template-columns: 1fr; grid-template-rows: auto 1fr; background: var(--grad-deep); border: 0; }
.care__card--online h3, .care__card--online p { color: #fff; }
.care__card--online p { opacity: 0.85; }
.care__card--online img { height: 260px; object-position: 50% 25%; mask-image: linear-gradient(180deg, transparent 0%, #000 25%); -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 25%); }
.care__tag--light { background: rgba(255, 255, 255, 0.16); color: #fff; }

.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: clamp(64px, 7vw, 88px); }
.steps__line { position: absolute; left: 24px; right: 24px; top: 24px; height: 2px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.steps__line span { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: left; }
.step { position: relative; display: flex; flex-direction: column; gap: 18px; }
.step__num {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: #fff; border: 2px solid var(--blue); color: var(--blue); font-size: 13px; box-shadow: 0 0 0 6px var(--tint);
}
.step__title { font-size: 19px; letter-spacing: -0.02em; }
.step__text { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* ---------- 10. Nosotros · bento ---------- */
.bento {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  grid-template-areas:
    "years years f1 f2"
    "years years f3 f4"
    "team team goals goals";
}
.tile { position: relative; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform 0.5s var(--ease), box-shadow 0.5s; }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tile__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--tint-2); color: var(--blue); }
.tile--years { grid-area: years; min-height: 440px; color: #fff; border: 0; }
.tile--years img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile--years::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 58, 138, 0) 30%, rgba(14, 58, 138, 0.92) 100%); }
.tile--years__copy { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; gap: 24px; padding: 36px; }
.tile--years__copy p:last-child { max-width: 30ch; font-size: 16px; color: #e6f0ff; padding-bottom: 14px; }
.tile__big { display: flex; font-size: clamp(72px, 8vw, 116px); font-weight: 700; line-height: 0.9; letter-spacing: -0.04em; color: #fff; }
.tile__big span:first-child { color: #7fe3f5; }
.tile--fact { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding: 28px; min-height: 220px; }
.tile--fact:nth-of-type(2) { grid-area: f1; }
.tile--fact:nth-of-type(3) { grid-area: f2; }
.tile--fact:nth-of-type(4) { grid-area: f3; }
.tile--fact:nth-of-type(5) { grid-area: f4; }
.tile__num { font-size: clamp(24px, 2.2vw, 32px); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); line-height: 1.15; }
.tile__label { color: var(--muted); font-weight: 500; margin-top: 4px; }
.tile__label--strong { margin-top: 0; color: #0b5b45; font-size: 15px; line-height: 1.45; }
.tile--green { background: #ecf9f3; border-color: #cdeedf; }
.tile--green .tile__icon { background: #fff; color: var(--green); }
.tile--team { grid-area: team; display: grid; grid-template-columns: 1.1fr 0.9fr; }
.tile--team > div { display: flex; flex-direction: column; gap: 14px; padding: 32px; }
.tile--team h3 { font-size: 22px; letter-spacing: -0.02em; }
.tile--team p { color: var(--muted); font-size: 15px; }
.tile--team img { width: 100%; height: 100%; object-fit: cover; }
.tile--goals { grid-area: goals; padding: 32px; background: var(--grad-deep); border: 0; color: #fff; }
.tile--goals h3 { color: #fff; font-size: 21px; letter-spacing: -0.01em; margin-bottom: 22px; }
.tile--goals ul { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.tile--goals li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; color: #e6f0ff; }
.tile--goals .icon { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); color: #7fe3f5; flex: none; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 20px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--tint); overflow: hidden;
}
.stat { padding: 28px clamp(20px, 2.4vw, 32px); }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__num {
  font-size: clamp(32px, 3.4vw, 48px); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__num sup { font-size: 0.5em; vertical-align: top; position: relative; top: 0.2em; }
.stat__label { margin-top: 10px; font-weight: 600; color: var(--text); font-size: 15px; }

/* ---------- 11. Segmentos B2B / B2C ---------- */
.segments__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.segcard {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
  padding: clamp(32px, 3.8vw, 52px); border-radius: var(--radius-lg); overflow: hidden;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.segcard::after {
  content: attr(data-big); position: absolute; right: 28px; top: 16px; font-size: 110px; font-weight: 800; letter-spacing: -0.04em;
  line-height: 1; color: rgba(23, 86, 209, 0.05); pointer-events: none;
}
.segcard--clinics { background: var(--grad-deep); border: 0; }
.segcard--clinics::after { color: rgba(255, 255, 255, 0.07); }
.segcard--clinics h3, .segcard--clinics p, .segcard--clinics li { color: #fff; }
.segcard--clinics p { opacity: 0.85; }
.segcard__tag { padding: 6px 14px; border-radius: 999px; background: var(--tint-2); color: var(--blue); font-size: 13px; font-weight: 500; }
.segcard--clinics .segcard__tag { background: rgba(255, 255, 255, 0.16); color: #fff; }
.segcard h3 { font-size: clamp(22px, 2.1vw, 28px); letter-spacing: -0.02em; line-height: 1.25; max-width: 18ch; }
.segcard p { color: var(--muted); max-width: 44ch; }
.segcard ul { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; width: 100%; margin: 4px 0 16px; }
.segcard li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.segcard li .icon { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--tint-2); color: var(--blue); }
.segcard--clinics li .icon { background: rgba(255, 255, 255, 0.18); color: #7fe3f5; }
.segcard .btn { margin-top: auto; }
.segcard--clinics p { color: #dbe8ff; opacity: 1; }

/* Fotografías a sangre con una capa blanca para mantener la lectura. */
.segments .segcard__media {
  position: absolute; inset: 0; z-index: -2;
  margin: 0; width: 100%; height: 100%;
  border-radius: inherit; overflow: hidden; background: var(--tint);
}
.segments .segcard__media picture { display: block; width: 100%; height: 100%; }
.segments .segcard__media img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease);
}
@media (hover: hover) and (min-width: 1101px) {
  .segments .segcard:hover .segcard__media img { transform: scale(1.04); }
}

/* Segmentos: controles visibles en pantallas pequeñas y movimiento reducido. */
@media (max-width: 1100px), (prefers-reduced-motion: reduce) {
  #segmentos .segcard__reveal { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  #segmentos .segcard__media img { transition: none; }
  #segmentos .segcard:hover .segcard__media img { transform: none; }
}

/* ---------- 12. Alianzas ---------- */
.allies__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.allies__text { margin-top: 24px; line-height: 1.75; color: var(--muted); max-width: 46ch; }
.allies__photo { margin-top: 36px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.allies__photo img { width: 100%; height: 100%; object-fit: cover; }
.allies__wall { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.allies__wall li {
  display: grid; place-items: center; min-height: 104px; padding: 16px; text-align: center;
  font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; color: var(--ink);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background 0.35s, color 0.35s;
}
.allies__wall li:nth-child(3n) { border-right: 0; }
.allies__wall li:hover { background: var(--tint); color: var(--blue); }
.allies__wall li.allies__cta { grid-column: span 2; padding: 0; border-bottom: 0; background: var(--tint); }
.allies__cta a { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 100%; color: var(--blue); font-weight: 700; }
.allies__cta a:hover .icon { transform: translateX(4px); }
.allies__cta .icon { transition: transform 0.4s var(--ease); }
.allies__wall li:nth-last-child(2) { border-bottom: 0; }

/* ---------- 13. Testimonios · cinta ---------- */
.testi__score { display: inline-flex; align-items: center; gap: 12px; margin-top: 14px; color: var(--muted); font-weight: 600; }
.testi__stars { display: inline-flex; gap: 2px; color: #f5b301; }
.testi__stars svg { width: 18px; height: 18px; }
.ribbon { overflow: hidden; padding-block: 8px 12px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ribbon__track { display: flex; gap: 24px; width: max-content; padding-inline: 9px; animation: ribbon 55s linear infinite; }
.ribbon:hover .ribbon__track { animation-play-state: paused; }
@keyframes ribbon { to { transform: translateX(-50%); } }
.testi {
  display: flex; flex-direction: column; gap: 24px; width: 380px; padding: 32px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.testi blockquote { font-size: 16.5px; line-height: 1.6; color: var(--text); }
.testi figcaption { margin-top: auto; display: flex; align-items: center; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.testi figcaption strong { display: block; color: var(--ink); }
.testi figcaption small { color: var(--muted); font-size: 13px; }
.testi__avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; font-size: 14px; }

/* ---------- 14. Sede ---------- */
.location__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 24px; }
.location__card { padding: clamp(28px, 3.6vw, 48px); border-radius: var(--radius-lg); background: var(--tint); border: 1px solid var(--line); }
.location__list { display: grid; gap: 20px; margin: 36px 0 40px; }
.location__list li { display: flex; gap: 14px; align-items: flex-start; }
.location__list strong { display: block; color: var(--ink); font-size: 14px; }
.location__list span { color: var(--text); }
.location__list a:hover { color: var(--blue); }
.location__list a { overflow-wrap: anywhere; }
.location__grid > *, .allies__grid > *, .segments__grid > *, .care__grid > *, .hero__grid > * { min-width: 0; }
.location__icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: #fff; color: var(--blue); border: 1px solid var(--line); }
.location__ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.location__map { min-height: 420px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.location__map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }

/* ---------- 15. CTA final ---------- */
.final { padding-bottom: clamp(80px, 10vw, 128px); }
.final__card {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 48px; align-items: center;
  padding: clamp(40px, 6vw, 80px); border-radius: clamp(24px, 3vw, 40px); background: var(--grad-deep);
}
.final__rings { position: absolute; z-index: -1; right: 0; bottom: 0; }
.final__rings span {
  position: absolute; left: 0; top: 0; width: 200px; height: 200px; translate: -50% -50%;
  border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.35); animation: ring 4.5s var(--ease) infinite;
}
.final__rings span:nth-child(2) { animation-delay: 1.5s; }
.final__rings span:nth-child(3) { animation-delay: 3s; }
@keyframes ring { from { scale: 0.5; opacity: 1; } to { scale: 4; opacity: 0; } }
.final__title { color: #fff; font-size: clamp(30px, 3.8vw, 52px); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; max-width: 16ch; }
.final__title em { background: none; color: #8eeafc; -webkit-text-fill-color: #8eeafc; }
.final .is-split em .split-word > span { background: none; -webkit-text-fill-color: #8eeafc; color: #8eeafc; }
.final__text { margin-top: 20px; line-height: 1.75; color: #d6e6ff; max-width: 48ch; font-size: 17px; }
.final__action { display: grid; justify-items: center; gap: 16px; }
.final__micro { color: #cfe0ff; font-size: 13px; text-align: center; }

/* ---------- 16. Footer ---------- */
.footer { background: var(--tint); border-top: 1px solid var(--line); padding-top: 64px; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 0.9fr 0.9fr 1.2fr; gap: 48px; }
.footer__brand img { height: 52px; width: auto; }
.footer__brand p { margin-top: 18px; color: var(--muted); max-width: 34ch; font-size: 15px; }
.footer__title { font-size: 14px; color: var(--ink); font-weight: 800; margin-bottom: 18px; }
.footer__list { display: grid; gap: 12px; font-size: 14.5px; color: var(--text); }
.footer__list a { transition: color 0.3s; overflow-wrap: anywhere; }
.footer__list a:hover { color: var(--blue); }
.footer__list--icons li { display: flex; gap: 10px; align-items: flex-start; }
.footer__list--icons .icon { color: var(--blue); margin-top: 3px; }
.social { display: flex; gap: 8px; margin-top: 22px; }
.social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--blue); transition: background 0.35s, color 0.35s, transform 0.5s var(--ease); }
.social svg { width: 17px; height: 17px; }
.social a:hover { background: var(--grad); color: #fff; transform: translateY(-3px); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 52px; padding-block: 22px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.footer__legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer__legal a:hover { color: var(--blue); }

/* ---------- 17. Flotante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; align-items: center; gap: 10px;
  height: 58px; padding: 0 20px 0 16px; border-radius: 999px; background: var(--wa); color: #fff; font-weight: 700;
  box-shadow: 0 14px 32px -10px rgba(37, 211, 102, 0.65);
  transform: translateY(140%) scale(0.8); opacity: 0; transition: transform 0.6s var(--ease), opacity 0.4s;
}
.wa-float.is-visible { transform: none; opacity: 1; }
.wa-float svg { width: 26px; height: 26px; }
.wa-float::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--wa); animation: waPulse 2.6s ease-out infinite; }
@keyframes waPulse { from { opacity: 0.7; scale: 1; } to { opacity: 0; scale: 1.35; } }

/* ---------- 18. Estados de animación ---------- */
.js:not(.no-anim) [data-hero-in],
.js:not(.no-anim) [data-reveal] { opacity: 0; transform: translateY(26px); }
.js:not(.no-anim) .hero__title .line__inner { transform: translateY(110%); }
.js:not(.no-anim) .hud__card,
.js:not(.no-anim) .hero__plate,
.js:not(.no-anim) [data-dock] .dock__item,
.js:not(.no-anim) [data-bento] .tile,
.js:not(.no-anim) [data-stats] .stat,
.js:not(.no-anim) .step,
.js:not(.no-anim) [data-allies] li { opacity: 0; }

.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding-block: 0.06em 0.14em; margin-block: -0.06em -0.14em; }
.split-word > span { display: inline-block; }
.is-split em { background: none; color: inherit; padding-right: 0; }
.is-split em .split-word > span { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.08em; }

.no-anim *, .no-anim *::before, .no-anim *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
.no-anim .ribbon__track { animation: none; }
.no-anim .ribbon { overflow-x: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- 19. Responsive ---------- */
@media (max-width: 1200px) {
  .nav__link { padding-inline: 9px; font-size: 14.5px; }
}

@media (max-width: 1100px) {
  .nav { display: none; }
  .header__actions { margin-left: auto; }
  .burger { display: block; }
  .dock { grid-template-columns: repeat(2, 1fr); }
  .dock__item:nth-child(3) { border-left: 0; }
  .dock__item:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .explorer { grid-template-columns: 1fr; }
  .explorer__rail {
    position: relative; top: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .explorer__rail::-webkit-scrollbar { display: none; }
  .seg { flex: none; grid-template-columns: 30px auto auto; scroll-snap-align: start; padding: 10px 14px 10px 10px; }
  .seg__count { display: none; }
  .seg__icon { width: 30px; height: 30px; padding: 6px; }
  .seg__name { white-space: nowrap; font-size: 14.5px; }
  .care__grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); grid-template-areas: "years years" "f1 f2" "f3 f4" "team team" "goals goals"; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .final__card { grid-template-columns: 1fr; }
  .final__action { justify-items: start; }
}

@media (max-width: 860px) {
  .section__head { grid-template-columns: 1fr; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__content { padding-bottom: 0; }
  .hero__visual { max-width: 520px; margin-inline: auto; width: 100%; padding-inline: 18px; }
  .hero__plate { aspect-ratio: 1; }
  .dock { margin-top: 40px; }
  .panel { grid-template-columns: 1fr; min-height: 0; }
  .panel__media { height: 200px; }
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .step { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
  .step__title { margin-top: 10px; }
  .steps__line { left: 23px; right: auto; top: 24px; bottom: 24px; width: 2px; height: auto; }
  .steps__line span { transform-origin: top; }
  .segments__grid, .allies__grid, .location__grid { grid-template-columns: 1fr; }
  .tile--team { grid-template-columns: 1fr; }
  .tile--team img { height: 220px; }
}

@media (max-width: 560px) {
  .topbar { font-size: 12px; }
  .topbar .topbar__hide-sm, .topbar .topbar__hide-md { display: none; }
  .topbar__inner { min-height: 36px; }
  .topbar__social { display: none; }
  .header__inner { height: 68px; gap: 10px; }
  .header__logo img, .header.is-scrolled .header__logo img { height: 34px; }
  .header__actions .btn--outline { display: none; }
  .header__actions .btn--primary span { display: none; }
  .header__actions .btn--primary { width: 44px; height: 44px; padding: 0; }
  .header__actions .btn--primary .icon { width: 20px; height: 20px; }
  .hero__ctas .btn { width: 100%; }
  .hud__card { padding: 8px 12px 8px 8px; }
  .hud__card strong { font-size: 13px; }
  .hud__icon { width: 30px; height: 30px; }
  .hud__card--a { left: 4%; top: 8%; }
  .hud__card--b { right: 4%; top: auto; bottom: 8%; }
  .hud__card--c { display: none; }
  .dock { grid-template-columns: 1fr; }
  .dock__item + .dock__item { border-left: 0; border-top: 1px solid var(--line); }
  .dock__item { padding: 18px; }
  .panel__list, .segcard ul, .tile--goals ul { grid-template-columns: 1fr; }
  .care__card { grid-template-columns: 1fr; }
  .care__card--home img { height: 220px; }
  .bento { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tile--years { min-height: 360px; }
  .tile--years__copy { flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px; }
  .tile--fact { padding: 20px; min-height: 176px; gap: 16px; }
  .tile__num { font-size: 19px; }
  .tile__label { font-size: 14px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .allies__wall { grid-template-columns: 1fr 1fr; }
  .allies__wall li:nth-child(3n) { border-right: 1px solid var(--line); }
  .allies__wall li:nth-child(2n) { border-right: 0; }
  .allies__wall li { min-height: 84px; font-size: 14px; }
  .testi { width: 300px; padding: 22px; }
  .location__map, .location__map iframe { min-height: 320px; }
  .btn--xl { width: 100%; white-space: normal; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .wa-float { right: 14px; bottom: 14px; width: 56px; height: 56px; padding: 0; justify-content: center; }
  .wa-float__label { display: none; }
}

/* =====================================================================
   v3 · Ajustes de diseño
   - Hero con imagen de fondo amplia y difuminado blanco a la izquierda
   - Servicios fijados: el punto activo cambia con el scroll
   - Domicilio / resultados: fade in / fade out al pasar el mouse
   - Para clínicas / Para pacientes
   - Testimonios en carrusel de máximo 3 tarjetas, nombres como cita
   ===================================================================== */

/* ---------- Hero con fondo ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding-top: clamp(80px, 10vw, 140px); background: #fff;
}
.hero::before { display: none; }
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 75% 55%; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, #fff 0%, #fff 28%, rgba(255, 255, 255, 0.92) 40%, rgba(255, 255, 255, 0.55) 54%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(0deg, #fff 0%, rgba(255, 255, 255, 0.85) 14%, rgba(255, 255, 255, 0) 34%);
}
.hero__inner { position: relative; }
.hero__content { max-width: 600px; padding-block: 0; }
/* Hero visual visible immediately: avoids LCP render delay. */

/* ---------- Servicios: scroll que cambia de punto ---------- */
.explorer__progress { display: none; }
@media (min-width: 1101px) {
  .explorer__rail { position: relative; top: auto; }
  .explorer__progress {
    display: block; position: relative; z-index: 1; height: 3px; margin: 10px 12px 6px;
    border-radius: 3px; background: var(--line-2); overflow: hidden;
  }
  .explorer__progress span { display: block; height: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; }
  .explorer.is-pinned .panel { min-height: min(560px, calc(100vh - 140px)); }
}

/* ---------- Domicilio / resultados: fade al hover ---------- */
.care__card { transition: opacity 0.6s var(--ease), transform 0.7s var(--ease), filter 0.6s var(--ease), box-shadow 0.6s var(--ease); }
.care__card img { transition: transform 1.2s var(--ease); }
@media (hover: hover) {
  .care__grid:hover .care__card:not(:hover) { opacity: 0.4; filter: saturate(0.5); transform: scale(0.985); }
  .care__card:hover { box-shadow: var(--shadow-lg); }
  .care__card:hover img { transform: scale(1.06); }
  .care__more { max-height: 0; opacity: 0; transform: translateY(8px); overflow: hidden; transition: max-height 0.6s var(--ease), opacity 0.5s var(--ease), transform 0.6s var(--ease); }
  .care__card:hover .care__more { max-height: 140px; opacity: 1; transform: none; }
}
.care__more { display: grid; gap: 8px; font-size: 14.5px; font-weight: 500; color: var(--ink); }
.care__more li { display: flex; align-items: center; gap: 10px; }
.care__more .icon { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--tint-2); color: var(--blue); }
.care__card--online .care__more { color: #fff; }
.care__card--online .care__more .icon { background: rgba(255, 255, 255, 0.18); color: #8eeafc; }

/* ---------- Para clínicas / Para pacientes ---------- */
.segcard::after { display: none; }
.segcard__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--tint-2); color: var(--blue); }
.segcard__icon .icon { width: 24px; height: 24px; }
.segcard--clinics .segcard__icon { background: rgba(255, 255, 255, 0.16); color: #fff; }
.segcard--clinics h3, .segcard--clinics li { color: #fff; }
.segcard--clinics p { color: #dbe8ff; }

/* ---------- Testimonios: carrusel de 3 ---------- */
.carousel { position: relative; }
.carousel__viewport { overflow: hidden; padding: 6px 6px 20px; margin: -6px -6px -20px; }
.carousel__track { display: flex; gap: 24px; transition: transform 0.8s var(--ease); will-change: transform; }
.carousel .testi { flex: 0 0 calc((100% - 48px) / 3); width: auto; min-height: 280px; box-shadow: var(--shadow-sm); }
.carousel .testi::before {
  content: "“"; display: block; height: 34px; font-size: 64px; line-height: 1; font-weight: 700; color: var(--cyan);
}
.carousel .testi blockquote { font-size: 16px; line-height: 1.75; }
.testi figcaption { flex-direction: column; align-items: flex-start; gap: 2px; }
.testi figcaption cite { font-style: normal; font-weight: 600; color: var(--ink); font-size: 15.5px; }
.testi figcaption small { color: var(--muted); font-size: 13px; }
.carousel__controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 36px; }
.carousel__btn {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--line-2); color: var(--blue);
  transition: background 0.3s, border-color 0.3s, transform 0.4s var(--ease);
}
.carousel__btn:hover { background: var(--tint); border-color: var(--blue); transform: translateY(-2px); }
.carousel__dots { display: flex; gap: 8px; }
.carousel__dots button { width: 8px; height: 8px; padding: 0; border-radius: 999px; background: var(--line-2); transition: width 0.4s var(--ease), background 0.3s; }
.carousel__dots button[aria-current="true"] { width: 28px; background: var(--blue); }

@media (max-width: 1100px) {
  .carousel .testi { flex-basis: calc((100% - 24px) / 2); }
}
@media (max-width: 860px) {
  .hero { padding-top: 0; }
  .hero__bg { position: relative; inset: auto; height: 300px; z-index: 0; }
  .hero__bg::after { background: linear-gradient(0deg, #fff 0%, rgba(255, 255, 255, 0.6) 30%, rgba(255, 255, 255, 0) 60%); }
  .hero__bg img { object-position: 70% 50%; }
  .hero__inner { margin-top: -40px; z-index: 1; }
}
@media (max-width: 680px) {
  .carousel .testi { flex-basis: 100%; padding: 26px; }
  .carousel__track { gap: 16px; }
}

/* =====================================================================
   v4 · Header flotante, botones sobrios, servicios apilados,
   domicilio tipo acordeón, Nosotros 3D, clínicas/pacientes con hover
   ===================================================================== */

/* ---------- Estilo sobrio: sin degradados de texto ni brillos ---------- */
.section__title em, .hero__title em, .final__title em, .panel__title em,
.is-split em .split-word > span {
  background: none; -webkit-text-fill-color: currentColor; color: var(--blue); padding-right: 0;
}
.final__title em, .final .is-split em .split-word > span { color: #8eeafc; -webkit-text-fill-color: #8eeafc; }
.badge__num { background: var(--blue); }
.stat__num { background: none; -webkit-text-fill-color: currentColor; color: var(--blue); }

/* ---------- Botones ---------- */
.btn { font-weight: 600; }
.btn--primary { background: var(--blue); box-shadow: 0 6px 16px -10px rgba(23, 86, 209, 0.7); }
.btn--primary::before { display: none; }
.btn--primary:hover { background: var(--navy); box-shadow: 0 10px 22px -12px rgba(14, 58, 138, 0.7); transform: translateY(-1px); }
.btn--outline:hover { transform: translateY(-1px); }
.btn--white:hover { transform: translateY(-1px); }

/* ---------- Header flotante con cambio de color ---------- */
.header {
  position: sticky; top: 0; z-index: 100; padding: 10px var(--gutter) 0;
  background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 0; box-shadow: none; transition: padding 0.5s var(--ease);
}
.header.is-scrolled { border: 0; box-shadow: none; padding-top: 14px; }
.header__inner {
  max-width: calc(var(--container) - 2 * var(--gutter) + 48px);
  height: 76px; padding-inline: 24px; border-radius: 999px;
  background: transparent; border: 1px solid transparent;
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s, height 0.4s var(--ease);
}
.header.is-scrolled .header__inner {
  height: 66px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.94) 0%, rgba(232, 242, 252, 0.94) 100%);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-color: rgba(23, 86, 209, 0.14);
  box-shadow: 0 18px 40px -20px rgba(14, 58, 138, 0.45);
}
.header.is-scrolled .nav__link { color: var(--navy); }
.header.is-scrolled .nav__link:hover { color: var(--cyan); background: transparent; font-weight: 660; }
.header.is-scrolled .header__logo img { height: 38px; }
.hero { margin-top: -86px; padding-top: calc(86px + clamp(70px, 9vw, 120px)); }

/* ---------- Servicios: pantalla completa con cartas apiladas ---------- */
.services { position: relative; background: #fff; }
.services__pin { min-height: 100vh; display: flex; align-items: flex-start; padding-block: 24px 48px; }
/* Native sticky keeps Services in flow when reversing scroll. */
.services--sticky { height: calc(var(--services-panel-height) + var(--services-scroll)); }
.services--sticky .services__pin { position: sticky; top: 88px; min-height: calc(100vh - 88px); }
.services__layout { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: clamp(40px, 5vw, 88px); align-items: center; width: 100%; }
.services__intro .section__intro { margin-top: 18px; }
.snav { display: grid; gap: 4px; margin-top: 32px; }
.snav button {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 9px 14px 9px 9px; border-radius: 14px;
  text-align: left; font-weight: 600; font-size: 15px; color: var(--muted); transition: background 0.35s, color 0.35s;
}
.snav button:hover { color: var(--ink); background: var(--tint); }
.snav__icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--tint); color: var(--blue); transition: background 0.35s, color 0.35s; }
.snav__icon svg { width: 20px; height: 20px; }
.snav button.is-active { color: var(--ink); background: var(--tint); }
.snav button.is-active .snav__icon { background: var(--blue); color: #fff; }
.services__progress { height: 3px; margin-top: 18px; border-radius: 3px; background: var(--line); overflow: hidden; }
.services__progress span { display: block; height: 100%; background: var(--blue); transform: scaleX(0); transform-origin: left; }

.stack { position: relative; height: min(600px, calc(100vh - 190px)); }
.scard {
  position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  background: #fff; border: 1px solid var(--line); border-radius: 28px; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(14, 58, 138, 0.35), 0 2px 8px rgba(11, 29, 63, 0.05);
}
.scard__media { position: relative; background: var(--tint-2); }
.scard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scard__body { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: clamp(28px, 3vw, 48px); overflow: auto; }
.scard__label { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--tint-2); color: var(--blue); font-size: 13px; font-weight: 600; }
.scard__title { font-size: clamp(22px, 2.1vw, 30px); line-height: 1.25; letter-spacing: -0.02em; }
.scard__text { color: var(--muted); }
.scard__list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-bottom: 8px; }
.scard__list li { position: relative; display: flex; align-items: center; padding: 10px 12px 10px 34px; border-radius: 12px; background: var(--tint); font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.scard__list li::before { content: ""; position: absolute; left: 13px; top: 50%; width: 9px; height: 9px; translate: 0 -50%; border-radius: 50%; border: 2px solid var(--blue); }
.scard .btn { margin-top: auto; }

/* ---------- Domicilio / resultados: tarjetas tipo acordeón ---------- */
.duo { display: flex; gap: 24px; min-height: 480px; }
.duo__card {
  position: relative; isolation: isolate; flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: clamp(28px, 3.2vw, 48px); border-radius: 28px; overflow: hidden;
  background: #fff; border: 1px solid var(--line);
  transition: flex-grow 0.7s var(--ease), border-color 0.5s, box-shadow 0.6s var(--ease);
}
.duo__media { position: absolute; inset: 0; z-index: -1; }
.duo__media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.08; transition: opacity 0.6s var(--ease), transform 1.4s var(--ease); }
.duo__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 58, 138, 0.92) 0%, rgba(14, 58, 138, 0.7) 45%, rgba(14, 58, 138, 0.15) 100%); opacity: 0; transition: opacity 0.6s var(--ease); }
.duo__content { display: grid; grid-template-areas: "tag" "head" "more"; justify-items: start; gap: 18px; }
.duo__tag { grid-area: tag; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--tint-2); color: var(--blue); font-size: 13px; font-weight: 600; transition: background 0.4s, color 0.4s; }
.duo__title, .duo__short { grid-area: head; font-size: clamp(22px, 2.3vw, 32px); line-height: 1.25; letter-spacing: -0.02em; font-weight: 700; color: var(--ink); max-width: 17ch; transition: opacity 0.4s var(--ease), color 0.4s; }
.duo__short { opacity: 0; pointer-events: none; }
.duo__more { grid-area: more; display: grid; gap: 14px; max-width: 46ch; color: #e6f0ff; max-height: 0; opacity: 0; overflow: hidden; transform: translateY(10px); transition: max-height 0.7s var(--ease), opacity 0.5s var(--ease), transform 0.6s var(--ease); }
.duo__more ul { display: grid; gap: 8px; }
.duo__more li { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; }
.duo__more .icon { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); color: #8eeafc; }
.duo__btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px;
  background: var(--blue); color: #fff; font-weight: 600; font-size: 15px;
  transition: background 0.4s, color 0.4s, padding 0.5s var(--ease), opacity 0.4s;
}
.duo__arrow { width: 0; opacity: 0; margin-left: -10px; transition: width 0.4s var(--ease), opacity 0.4s, margin 0.4s var(--ease); }

@media (hover: hover) and (min-width: 1101px) {
  .duo[data-hover="1"] [data-box="1"], .duo[data-hover="2"] [data-box="2"] { flex-grow: 1.7; border-color: transparent; box-shadow: var(--shadow-lg); }
  .duo[data-hover="1"] [data-box="1"] .duo__media img, .duo[data-hover="2"] [data-box="2"] .duo__media img { opacity: 1; transform: scale(1.04); }
  .duo[data-hover="1"] [data-box="1"] .duo__media::after, .duo[data-hover="2"] [data-box="2"] .duo__media::after { opacity: 1; }
  .duo[data-hover="1"] [data-box="1"] .duo__tag, .duo[data-hover="2"] [data-box="2"] .duo__tag { background: rgba(255, 255, 255, 0.16); color: #fff; }
  .duo[data-hover="1"] [data-box="1"] .duo__title, .duo[data-hover="2"] [data-box="2"] .duo__title { color: #fff; }
  .duo[data-hover="1"] [data-box="1"] .duo__more, .duo[data-hover="2"] [data-box="2"] .duo__more { max-height: 240px; opacity: 1; transform: none; }
  .duo[data-hover="1"] [data-box="1"] .duo__btn, .duo[data-hover="2"] [data-box="2"] .duo__btn { background: #fff; color: var(--blue); padding-right: 30px; }
  .duo[data-hover="1"] [data-box="1"] .duo__arrow, .duo[data-hover="2"] [data-box="2"] .duo__arrow { width: 1.15em; opacity: 1; margin-left: 0; }
  /* La otra tarjeta se reduce y muestra solo su nombre */
  .duo[data-hover="1"] [data-box="2"] .duo__title, .duo[data-hover="2"] [data-box="1"] .duo__title { opacity: 0; }
  .duo[data-hover="1"] [data-box="2"] .duo__short, .duo[data-hover="2"] [data-box="1"] .duo__short { opacity: 1; }
  .duo[data-hover="1"] [data-box="2"] .duo__btn, .duo[data-hover="2"] [data-box="1"] .duo__btn { opacity: 0; pointer-events: none; }
}
@media (hover: none), (max-width: 1100px) {
  .duo__media img { opacity: 1; }
  .duo__media::after { opacity: 1; }
  .duo__tag { background: rgba(255, 255, 255, 0.16); color: #fff; }
  .duo__title { color: #fff; }
  .duo__more { max-height: none; opacity: 1; transform: none; }
  .duo__btn { background: #fff; color: var(--blue); }
}

/* ---------- Nosotros: cartas 3D ---------- */
.bento { perspective: 1600px; }
.tile { transform-style: preserve-3d; backface-visibility: hidden; }
.tile:hover { transform: none; }

/* ---------- Para clínicas / Para pacientes ---------- */
.segments .segcard {
  isolation: isolate; background: #fff; border: 1px solid var(--line); min-height: 360px; justify-content: flex-start;
  transition: box-shadow 0.6s var(--ease), border-color 0.5s, translate 0.6s var(--ease);
}
.segments .segcard::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, rgba(255,255,255,.96), rgba(255,255,255,.86) 55%, rgba(255,255,255,.48));
  opacity: 1; pointer-events: none;
}
.segments .segcard h3 { color: var(--ink); transition: color 0.4s; }
.segments .segcard p { color: var(--muted); transition: color 0.4s; }
.segments .segcard li { color: var(--ink); }
.segments .segcard .segcard__icon { background: var(--tint-2); color: var(--blue); transition: background 0.4s, color 0.4s; }
.segcard__reveal { display: grid; gap: 22px; justify-items: start; width: 100%; max-height: 0; opacity: 0; overflow: hidden; transform: translateY(14px); transition: max-height 0.7s var(--ease), opacity 0.5s var(--ease), transform 0.6s var(--ease); }
.segcard__reveal ul { margin: 0; }
@media (hover: hover) {
  .segments .segcard:hover { border-color: transparent; box-shadow: var(--shadow-lg); translate: 0 -4px; }
  .segments .segcard:hover::before { opacity: 1; }
  .segments .segcard:hover h3, .segments .segcard:hover li { color: var(--ink); }
  .segments .segcard:hover p { color: var(--muted); }
  .segments .segcard:hover .segcard__icon { background: var(--tint-2); color: var(--blue); }
  .segments .segcard:hover li .icon { background: var(--tint-2); color: var(--blue); }
  .segments .segcard:hover .segcard__reveal { max-height: 320px; opacity: 1; transform: none; }
  .segments .segcard:hover .btn--primary { background: var(--blue); color: #fff; }
}
@media (hover: none) { .segcard__reveal { max-height: none; opacity: 1; transform: none; } }

/* ---------- Estados iniciales ---------- */
.js:not(.no-anim) .segcard[data-side],
.js:not(.no-anim) [data-duo] .duo__card { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .header__inner { height: 68px; padding-inline: 16px 10px; }
  .services__pin { min-height: 0; display: block; padding-block: clamp(32px, 4vw, 48px); }
  .services__layout { grid-template-columns: 1fr; gap: 40px; }
  .snav, .services__progress { display: none; }
  .stack { height: auto; display: grid; gap: 24px; }
  .scard { position: sticky; top: calc(100px + var(--i) * 14px); inset: auto; }
  .duo { flex-direction: column; min-height: 0; }
  .duo__card { min-height: 420px; }
}
@media (max-width: 860px) {
  .hero { margin-top: -78px; padding-top: 78px; }
  .scard { grid-template-columns: 1fr; }
  .scard__media { height: 200px; }
}
@media (max-width: 560px) {
  .header { padding: 8px 10px 0; }
  .header__inner { height: 60px; }
  .header.is-scrolled .header__inner { height: 58px; }
  .hero { margin-top: -68px; padding-top: 68px; }
  .scard__list { grid-template-columns: 1fr; }
  .scard__body { padding: 24px; }
  .duo__card { padding: 26px; min-height: 440px; }
}

.segments__grid { align-items: start; }

/* Evita scroll horizontal por las animaciones que entran desde los lados */
/* Solo en main: en html/body rompe el cálculo de posiciones de ScrollTrigger */
main, .footer { overflow-x: clip; }

/* Sin animaciones (movimiento reducido o GSAP no disponible): las cartas de servicios se listan */
.no-anim .stack { height: auto; display: grid; gap: 24px; }
.no-anim .scard { position: relative; inset: auto; min-height: 520px; }
.no-anim .services__pin { min-height: 0; display: block; }
.no-anim .services__intro { align-self: start; position: sticky; top: 110px; }
.no-anim .services__layout { align-items: start; }

/* v5 · Imagen de portada vertical (generada): ocupa el lado derecho con difuminado hacia el texto */
@media (min-width: 861px) {
  .hero__bg { left: auto; right: 0; width: 56%; }
  .hero__bg img { object-position: 50% 15%; }
  .hero__bg::after {
    background:
      linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.8) 16%, rgba(255, 255, 255, 0) 42%),
      linear-gradient(0deg, #fff 0%, rgba(255, 255, 255, 0.85) 10%, rgba(255, 255, 255, 0) 30%);
  }
}
@media (max-width: 860px) {
  .hero__bg { height: 360px; }
  .hero__bg img { object-position: 50% 12%; }
}

/* =====================================================================
   v6 · Cartas sin scroll interno, hover sin desplazamientos,
   flujo de 3 pasos animado y cierre con video de Lima + radar
   ===================================================================== */

/* ---------- Servicios: sin barra de scroll en las cartas ---------- */
.stack { height: min(640px, calc(100vh - 150px)); }
.scard__body {
  overflow: hidden; scrollbar-width: none; gap: 12px;
  padding: clamp(24px, 2.6vw, 40px); justify-content: center;
}
.scard__body::-webkit-scrollbar { display: none; }
.scard__title { font-size: clamp(20px, 1.8vw, 26px); }
.scard__text { font-size: 15px; line-height: 1.6; }
.scard__list { gap: 8px; margin-bottom: 4px; }
.scard__list li { padding: 8px 10px 8px 30px; font-size: 13.5px; }
.scard__list li::before { left: 11px; width: 8px; height: 8px; }
.scard .btn { margin-top: 8px; }

/* ---------- Menos espacio entre servicios y domicilio ---------- */
.services__pin { padding-bottom: 16px; }
.care.section { padding-top: clamp(48px, 6vw, 80px); }

/* ---------- Domicilio / resultados: el hover no mueve nada ---------- */
@media (min-width: 1101px) {
  .duo { min-height: 0; }
  .duo__card { height: 500px; }
  .duo[data-hover] .duo__card { flex-grow: 1 !important; }
}
.duo__card { transition: border-color 0.5s, box-shadow 0.6s var(--ease); }

/* ---------- Para clínicas / pacientes: el hover no mueve nada ---------- */
.segments__grid { align-items: stretch; }
.segments .segcard { min-height: 420px; }
.segments .segcard:hover { translate: none; }
.segcard__reveal { max-height: none; overflow: visible; margin-top: auto; padding-top: 8px; }
@media (hover: hover) {
  .segments .segcard:hover .segcard__reveal { max-height: none; }
}

/* ---------- Flujo de 3 pasos ---------- */
.flow {
  --p: clamp(28px, 4vw, 56px);
  --node: 72px;
  position: relative; margin-top: clamp(56px, 6vw, 88px); padding: var(--p);
  background: #fff; border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.flow__track {
  position: absolute; height: 3px; border-radius: 3px; background: var(--line);
  top: calc(var(--p) + var(--node) / 2 - 1.5px);
  left: calc(var(--p) + (100% - 2 * var(--p) - 64px) / 6);
  right: calc(var(--p) + (100% - 2 * var(--p) - 64px) / 6);
}
.flow__fill { position: absolute; inset: 0; border-radius: inherit; background: var(--blue); transform: scaleX(0); transform-origin: left; }
.flow__dot {
  position: absolute; top: 50%; left: 0; width: 14px; height: 14px; translate: -50% -50%; border-radius: 50%;
  background: #fff; border: 3px solid var(--blue); box-shadow: 0 0 0 6px rgba(23, 86, 209, 0.15);

}
.flow__dot::after { content:""; position:absolute; inset:-9px; border-radius:50%; border:2px solid var(--blue); animation:flowPulse 1.6s ease-in-out infinite; }
@keyframes flowPulse { 0% { transform:scale(.6); opacity:.55; } 100% { transform:scale(1.5); opacity:0; } }
.flow__steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; counter-reset: none; }
.flow__step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.flow__node {
  position: relative; display: grid; place-items: center; width: var(--node); height: var(--node); margin-bottom: 14px;
  border-radius: 50%; background: #fff; border: 2px solid var(--line-2); color: var(--muted);
  transition: background 0.5s var(--ease), border-color 0.5s, color 0.4s, transform 0.6s var(--ease);
}
.flow__node .icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 28px; height: 28px; }
.flow__node::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--blue); opacity: 0;
}
.flow__num {
  position: absolute; top: -4px; right: -4px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--tint-2); color: var(--blue); font-size: 12px; font-weight: 700; border: 2px solid #fff;
  transition: background 0.4s, color 0.4s;
}
.flow__title { font-size: 19px; transition: color 0.4s; }
.flow__text { color: var(--muted); font-size: 15px; transition: opacity 0.5s; }
.flow__step:not(.is-on) .flow__title { color: #9aa6bc; }
.flow__step:not(.is-on) .flow__text { opacity: 0.55; }
.flow__step.is-on .flow__node { background: var(--blue); border-color: var(--blue); color: #fff; transform: scale(1.06); }
.flow__step.is-on .flow__node::after { animation: flowRing 2.4s ease-out infinite; }
.flow__step.is-on .flow__num { background: #fff; color: var(--blue); }
@keyframes flowRing { 0% { opacity: 0.7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }
.no-anim .flow__step .flow__title { color: var(--ink); }
.no-anim .flow__step .flow__text { opacity: 1; }
.no-anim .flow__fill { transform: none; }
.no-anim .flow__dot { display: none; }

@media (max-width: 860px) {
  .flow { --node: 60px; }
  .flow__track {
    width: 3px; height: auto; right: auto;
    left: calc(var(--p) + var(--node) / 2 - 1.5px);
    top: calc(var(--p) + var(--node) / 2);
    bottom: calc(var(--p) + 70px);
  }
  .flow__fill { transform: scaleY(0); transform-origin: top; }
  .flow__dot { left: 50%; top: 0; }
  .flow__steps { grid-template-columns: 1fr; gap: 32px; }
  .flow__step { display: grid; grid-template-columns: var(--node) 1fr; align-items: start; text-align: left; column-gap: 18px; row-gap: 6px; }
  .flow__node { grid-row: span 2; margin-bottom: 0; }
  .flow__title { align-self: end; }
}

/* ---------- Cierre: video de Lima con filtro azul y radar ---------- */
.final__card { background: var(--navy); }
.final__rings { display: none; }
.final__video { position: absolute; inset: 0; z-index: -2; }
.final__video video { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.35) contrast(1.05); }
.final__video::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(14, 58, 138, 0.94) 0%, rgba(23, 86, 209, 0.82) 50%, rgba(26, 166, 204, 0.72) 100%);
}
.final__action .btn--white { position: relative; }

.services__pin { padding-bottom: 0; }
.care.section { padding-top: 40px; }

/* Auditoría BIOLAQ — mejoras de usabilidad sin modificar identidad */
.services__skip { display: inline-flex; margin-top: 18px; font-size: 13px; color: var(--blue); text-decoration: underline; font-weight: 600; }
.faq__list { width: 100%; margin-inline: auto; display: grid; gap: 12px; }
.faq__list details { background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--line); padding: 20px 24px; }
.faq__list summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.faq__list details p { color: var(--text); margin-top: 12px; }
.faq__cta { margin-top: 28px; }
.footer__list a { display:inline-flex; align-items:center; min-height:32px; }
@media (max-width: 860px) {
  .scard__media img { aspect-ratio:16/9; object-fit:cover; width:100%; height:auto; }
  .scard__body { padding: clamp(18px, 4vw, 28px); }
}
@media (max-width: 400px) {
  .hero__bg { height: 240px; }
}
@media (prefers-reduced-motion: reduce) { .flow__dot::after { animation:none; } }
/* Picture wrappers retain the original absolute image layout. */
.hero__bg picture, .duo__media picture { display:block; width:100%; height:100%; }
.scard__media picture { display:block; position:absolute; inset:0; }
.scard__media picture img { width:100%; height:100%; object-fit:cover; }
@media (max-width:860px) {
  .scard__media picture { display:block; position:absolute; inset:0; }
  .scard__media picture img { width:100%; height:100%; aspect-ratio:16/9; object-fit:cover; }
}

/* BIOLAQ responsive fix 2026-11-15 — mobile cards and sticky navigation */
html { scroll-padding-top: 106px; }
[id] { scroll-margin-top: 106px; }
@media (max-width: 1100px) {
  .duo__card { justify-content: flex-start; min-height: 0; height: auto; gap: 24px; }
  .duo__content { min-width: 0; }
  .duo__more { overflow: visible; }
  .duo__btn { margin-top: auto; max-width: 100%; }
}
@media (max-width: 560px) {
  html { scroll-padding-top: 92px; }
  [id] { scroll-margin-top: 92px; }
  .header { padding: 8px 12px 0; }
  .header__inner, .header.is-scrolled .header__inner {
    width: 100%; height: 60px; padding-inline: 14px 8px; gap: 8px;
  }
  .header__logo { min-width: 0; }
  .header__logo img, .header.is-scrolled .header__logo img { width: auto; max-width: 155px; height: 32px; object-fit: contain; }
  .header__actions { gap: 6px; flex-shrink: 0; }
  .header__actions .btn--primary { width: 42px; height: 42px; }
  .duo { gap: 18px; }
  .duo__card {
    min-height: 0; height: auto; padding: 24px 22px 22px;
    gap: 24px; border-radius: 24px;
  }
  .duo__content { gap: 12px; }
  .duo__tag { font-size: 12px; padding: 6px 12px; }
  .duo__title { max-width: 23ch; font-size: clamp(22px, 6vw, 27px); line-height: 1.18; }
  .duo__more { gap: 12px; max-width: none; line-height: 1.48; font-size: 14px; }
  .duo__more ul { gap: 10px; }
  .duo__more li { font-size: 14px; line-height: 1.4; }
  .duo__btn {
    align-self: stretch; justify-content: center; min-height: 48px;
    padding: 12px 14px; font-size: 14px; line-height: 1.3;
    text-align: center; white-space: normal;
  }
  .duo__btn .icon { flex-shrink: 0; }
  .duo__media::after {
    background: linear-gradient(90deg, rgba(14, 58, 138, 0.96) 0%, rgba(14, 58, 138, 0.87) 60%, rgba(14, 58, 138, 0.65) 100%);
  }
  .duo__media img { object-position: 58% center; }
  .care.section { padding-top: 56px; }
}
@media (max-width: 360px) {
  .header__logo img, .header.is-scrolled .header__logo img { max-width: 135px; height: 29px; }
  .header__inner, .header.is-scrolled .header__inner { padding-inline: 10px 6px; }
  .duo__card { padding-inline: 18px; }
}

/* Keep the website icon vertically centered on its footer link. */
.footer__list--icons .footer__website { align-items: center; }
.footer__list--icons .footer__website .icon { margin-top: 0; }

/* Carruseles de cards: ningún selector de este bloque actúa desde 768px. */
@media (max-width: 767px) {
  .mobile-cards,
  .no-anim .mobile-cards {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    grid-template-areas: none;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-cards::-webkit-scrollbar { display: none; }
  .mobile-cards > *,
  .no-anim .mobile-cards > * {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    grid-area: auto;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow-wrap: anywhere;
  }
  .mobile-cards__slide { display: grid; position: relative; }
  .mobile-cards__slide > * { width: 100%; min-width: 0; max-width: 100%; }
  .mobile-cards__dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
    width: 100%;
    min-width: 0;
    margin-top: 10px;
  }
  .mobile-cards__dots button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    touch-action: manipulation;
  }
  .mobile-cards__dots button::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--line-2);
    transition: background 0.25s, transform 0.25s;
  }
  .mobile-cards__dots button[aria-current='true']::before {
    background: var(--blue);
    transform: scale(1.3);
  }
  .mobile-cards .btn { max-width: 100%; white-space: normal; text-align: center; }
  .dock.mobile-cards .dock__item { border: 0; }
  .dock.mobile-cards .dock__text { min-width: 0; }
  .dock.mobile-cards + .mobile-cards__dots { position: relative; z-index: 5; }
  .services__layout { min-width: 0; }
  .services__layout > .mobile-cards__dots { margin-top: -30px; }
  .services__intro { position: static; }
  .stack.mobile-cards { padding-block: 8px 20px; }
  .stack.mobile-cards .scard,
  .no-anim .stack.mobile-cards .scard {
    position: relative;
    inset: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 200px auto;
    min-height: 0;
  }
  .stack.mobile-cards .scard__body { min-width: 0; overflow: visible; }
  .stack.mobile-cards .scard__list { grid-template-columns: minmax(0, 1fr); }
  .stack.mobile-cards .scard__label { max-width: 100%; }
  .duo.mobile-cards { padding-block: 8px; }
  .duo.mobile-cards .duo__card { flex-grow: 0; }
  .flow__steps.mobile-cards { padding-block: 16px; }
  .flow__steps.mobile-cards .flow__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding-inline: 8px;
  }
  .flow__steps.mobile-cards .flow__title { align-self: auto; }
  .flow:has(.mobile-cards) .flow__track {
    left: var(--p);
    right: var(--p);
    top: calc(var(--p) + 16px + var(--node) / 2 - 1.5px);
    bottom: auto;
    width: auto;
    height: 3px;
  }
  .flow:has(.mobile-cards) .flow__fill { transform-origin: left; }
  .bento.mobile-cards { padding-block: 12px 24px; }
  .bento.mobile-cards .tile { grid-area: auto; }
  .bento.mobile-cards .tile--years__copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 24px;
  }
  .bento.mobile-cards .tile__big { font-size: clamp(40px, 12vw, 72px); }
  .bento.mobile-cards .tile--goals ul { grid-template-columns: minmax(0, 1fr); }
  .segments__grid.mobile-cards { padding-block: 8px 24px; }
  .segments__grid.mobile-cards .segcard { padding: 28px; }
  .segments__grid.mobile-cards .segcard__reveal { max-height: none; }
  .segments__grid.mobile-cards .segcard ul { grid-template-columns: minmax(0, 1fr); }
  .faq__list.mobile-cards { padding-block: 4px 8px; align-items: flex-start; }
  .faq__list.mobile-cards details { padding: 20px; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .mobile-cards { scroll-behavior: auto; }
  .mobile-cards__dots button::before { transition: none; }
}

/* Ajustes solicitados para mobile: Servicios, sede y FAQ. */
@media (max-width: 767px) {
  .stack.mobile-cards .scard,
  .no-anim .stack.mobile-cards .scard {
    grid-template-rows: auto 1fr;
  }
  .stack.mobile-cards .scard__media {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    overflow: hidden;
  }
  .stack.mobile-cards .scard__media picture,
  .stack.mobile-cards .scard__media picture img {
    width: 100%;
    height: 100%;
  }
  .stack.mobile-cards .scard__media picture img {
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
  }
  .stack.mobile-cards .scard__body { justify-content: flex-start; }
  #nosotros .section__head,
  #nosotros [data-bento] > .tile:not(.tile--years),
  #preguntas,
  .footer li:has(> a[href="#preguntas"]) { display: none; }
  #nosotros [data-bento] { display: block; }
  #nosotros .tile--years { width: 100%; min-height: 360px; }
  #nosotros .tile--years__copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 24px;
  }
  #nosotros .tile__big { font-size: clamp(40px, 12vw, 72px); }
}
