/* ==========================================================
   Centro Radiológico San Francisco · Rediseño UX/UI
   Apple-style motion design + scroll-driven + magic scroll
   ========================================================== */

:root {
  --blue-deep: #0a2a4d;
  --blue: #114370;
  --blue-dark: #213C67;
  --indigo: #4b55ad;
  --magenta: #e5004b;
  --magenta-dark: #b8003a;
  --magenta-soft: #ff3d6e;
  /* Color secundario (antes cyan) reasignado al magenta institucional */
  --cyan: #e5004b;
  --cyan-soft: #ff3d6e;
  --white: #ffffff;
  --off: #f4f7fb;
  --gray-1: #eef2f7;
  --gray-2: #d6deea;
  --gray-text: #5b6b80;
  --ink: #0d1b2a;
  --radius: 22px;
  --radius-sm: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 84px;
  --maxw: 1280px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
*::selection { background: var(--magenta); color: #fff; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  cursor: auto;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* WhatsApp icon sizing */
.wa-icon { width: 16px; height: 16px; display: inline-block; vertical-align: middle; }
.wa-icon--lg { width: 28px; height: 28px; }
.nav__cta .wa-icon { margin-right: 8px; }

/* ================= SCROLL PROGRESS BAR ================= */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--magenta), var(--indigo));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ================= CUSTOM CURSOR ================= */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
              background 0.25s var(--ease), opacity 0.25s var(--ease);
  mix-blend-mode: multiply;
  opacity: 0;
}
.cursor-dot.is-active { opacity: 1; }
.cursor-dot.is-hover { width: 36px; height: 36px; background: var(--magenta); opacity: 0.55; }
@media (hover: none), (max-width: 900px) {
  .cursor-dot { display: none; }
}

/* ================= NAVIGATION ================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: height 0.4s var(--ease), background 0.4s var(--ease),
              backdrop-filter 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav__brand { display: flex; align-items: center; flex-shrink: 0; }
.nav__logo {
  height: 54px;
  width: auto;
  transition: height 0.4s var(--ease), filter 0.4s var(--ease);
  filter: brightness(0) invert(1);
}
.nav.is-scrolled {
  height: 60px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 rgba(17,67,112,0.08), 0 10px 30px -15px rgba(17,67,112,0.15);
}
.nav.is-scrolled .nav__logo {
  height: 50px;
  filter: none;
}
.nav__menu {
  display: flex;
  gap: clamp(14px, 2vw, 32px);
  align-items: center;
}
.nav__menu a {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.01em;
  position: relative;
  padding: 6px 0;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.nav__menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--magenta);
  transition: width 0.35s var(--ease);
}
.nav__menu a:hover { transform: translateY(-1px); }
.nav__menu a:hover::after { width: 100%; }
.nav.is-scrolled .nav__menu a { color: var(--blue); }
.nav.is-scrolled .nav__menu a:hover { color: var(--magenta); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.nav__cta:hover { transform: translateY(-2px); }
.nav.is-scrolled .nav__cta {
  background: var(--magenta);
  border-color: var(--magenta);
  color: #fff;
}
.nav.is-scrolled .nav__cta:hover { background: var(--magenta-dark); border-color: var(--magenta-dark); }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.nav__toggle span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.is-scrolled .nav__toggle span { background: var(--blue); }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================= MOBILE MENU ================= */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, var(--blue-deep) 0%, var(--blue) 50%, var(--indigo) 100%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 24px 40px;
  clip-path: circle(0% at 100% 0%);
  transition: clip-path 0.7s var(--ease);
  pointer-events: none;
  overflow-y: auto;
}
.mobile-menu.is-open {
  clip-path: circle(150% at 100% 0%);
  pointer-events: auto;
}
.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  max-width: 400px;
}
.mobile-menu__nav a {
  display: block;
  padding: 14px 0;
  font-size: clamp(20px, 6vw, 30px);
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
  width: 100%;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.3s var(--ease);
}
.mobile-menu__nav a:hover { color: var(--magenta-soft); }
.mobile-menu.is-open .mobile-menu__nav a { opacity: 1; transform: translateY(0); }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(1) { transition-delay: 0.15s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(2) { transition-delay: 0.20s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(3) { transition-delay: 0.25s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(4) { transition-delay: 0.30s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(5) { transition-delay: 0.35s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(6) { transition-delay: 0.40s; }
.mobile-menu__cta {
  margin-top: 36px;
  padding: 14px 30px;
  background: var(--magenta);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease) 0.5s, transform 0.5s var(--ease) 0.5s;
}
.mobile-menu.is-open .mobile-menu__cta { opacity: 1; transform: translateY(0); }

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
              color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-3px); }
.btn--light { background: #fff; color: var(--blue); box-shadow: 0 12px 30px -10px rgba(0,0,0,0.3); }
.btn--light:hover { box-shadow: 0 18px 40px -12px rgba(0,0,0,0.4); }
.btn--ghost { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.5); }
.btn--ghost:hover { background: rgba(255,255,255,0.18); }
.btn--whatsapp { background: #25D366; color: #073b1a; }
.btn--whatsapp:hover { background: #1ebe5a; box-shadow: 0 14px 30px -10px rgba(37,211,102,0.5); }

/* ================= HERO (SCROLL-DRIVEN SLIDESHOW) ================= */
.hero {
  position: relative;
  width: 100%;
  color: #fff;
  /* Height = 1 viewport per slide transition + 1 viewport for content */
  height: 300vh;
}
.hero__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.hero__slider {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.12);
  transition: opacity 0.6s var(--ease), transform 0.1s linear;
  will-change: opacity, transform;
}
.hero__slide.is-active {
  opacity: 1;
  z-index: 1;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(10,42,77,0.99) 0%, rgba(17,67,112,0.9) 45%, rgba(229,0,75,0.5) 100%),
    linear-gradient(to top, rgba(10,42,77,0.7) 0%, transparent 40%);
  z-index: 2;
}
.hero__dots {
  position: absolute;
  bottom: 90px;
  left: clamp(18px, 4vw, 48px);
  z-index: 4;
  display: flex;
  gap: 10px;
}
.hero__dot {
  width: 30px;
  height: 3px;
  background: rgba(255,255,255,0.35);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.4s var(--ease), width 0.4s var(--ease);
  padding: 0;
}
.hero__dot.is-active {
  background: #fff;
  width: 50px;
}
.hero__dot:hover { background: rgba(255,255,255,0.7); }
.hero__content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 48px);
}
.hero__eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--magenta-soft);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s var(--ease) 0.3s, transform 1s var(--ease) 0.3s;
}
.hero__eyebrow.is-in { opacity: 1; transform: none; }
.hero__title {
  font-size: clamp(36px, 7.5vw, 96px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 30px;
  max-width: 14ch;
}
.hero__word {
  display: block;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  will-change: transform, opacity;
  color: #fff;
}
.hero__word.is-in { opacity: 1; transform: none; }
.hero__word--accent {
  color: #a8d8f0;
  -webkit-text-fill-color: #a8d8f0;
}
.hero__word--pink {
  color: var(--magenta-soft);
  -webkit-text-fill-color: var(--magenta-soft);
}
.hero__sub {
  font-size: clamp(15px, 1.6vw, 19px);
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s var(--ease) 0.9s, transform 1s var(--ease) 0.9s;
}
.hero__sub.is-in { opacity: 1; transform: none; }
.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s var(--ease) 1.1s, transform 1s var(--ease) 1.1s;
}
.hero__actions.is-in { opacity: 1; transform: none; }
.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero__scroll-line {
  width: 1px; height: 50px;
  background: rgba(255,255,255,0.3);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 40%;
  background: var(--magenta-soft);
  animation: scrollDown 1.8s var(--ease) infinite;
}
@keyframes scrollDown {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(250%); }
}

/* ================= STATEMENT ================= */
.statement {
  background: var(--off);
  padding: clamp(80px, 14vh, 180px) clamp(18px, 4vw, 48px);
  position: relative;
}
.statement__inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.statement__small {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 24px;
}
.statement__big {
  font-size: clamp(26px, 5vw, 60px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--blue-deep);
  max-width: 28ch;
  margin: 0 auto;
}
.statement__big .word {
  display: inline-block;
  opacity: 0.22;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  transform: translateY(4px);
}
.statement__big .word.is-lit {
  opacity: 1;
  transform: translateY(0);
}
.statement__caption {
  margin-top: 40px;
  font-size: clamp(14px, 1.4vw, 17px);
  color: var(--gray-text);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* ================= SECTION COMMON ================= */
.section__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 18px;
}
.section__eyebrow--light { color: var(--magenta-soft); }
.section__title {
  font-size: clamp(24px, 4vw, 48px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--blue-deep);
  max-width: 26ch;
}
.section__title--center { margin-left: auto; margin-right: auto; }
.section__title--wide { max-width: 40ch; }

/* ================= ABOUT ================= */
.about {
  padding: clamp(70px, 12vh, 140px) clamp(18px, 4vw, 48px);
  background: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
}
.about__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 9/16;
  box-shadow: 0 30px 60px -25px rgba(17,67,112,0.4);
  will-change: transform;
  background: var(--blue-deep);
  max-height: 80vh;
  margin: 0 auto;
  width: 100%;
  max-width: 420px;
}
.about__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.about__media:hover img { transform: scale(1.06); }
.about__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--blue-deep);
}
.about__video-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--magenta);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 4px 12px -2px rgba(229,0,75,0.6);
}
.about__text .section__title { margin-bottom: 22px; max-width: 22ch; }
.about__copy {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--gray-text);
  margin-bottom: 32px;
  line-height: 1.7;
  max-width: 50ch;
}
.about__list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.about__list li {
  display: flex; align-items: baseline; gap: 18px;
  font-size: 15px; color: var(--ink); font-weight: 500;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-1);
}
.about__list li span {
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 13px;
  color: var(--magenta);
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* ================= SERVICES ================= */
.services {
  padding: clamp(80px, 12vh, 150px) clamp(18px, 4vw, 48px);
  background: linear-gradient(180deg, var(--off) 0%, #fff 100%);
}
.services__header {
  max-width: var(--maxw);
  margin: 0 auto 60px;
  text-align: center;
}
.services__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.service-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px -8px rgba(17,67,112,0.08);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  will-change: transform;
  cursor: pointer;
}
.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 30px 50px -20px rgba(17,67,112,0.25);
}
.service-card__img {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--blue-deep);
}
.service-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.5s var(--ease);
  padding: 30px; background: #fff;
}
.service-card:hover .service-card__img img { transform: scale(1.1); }
.service-card__body {
  padding: 24px 22px 28px;
  position: relative;
}
.service-card__num {
  position: absolute;
  top: -18px; right: 22px;
  background: var(--magenta);
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  font-family: "SF Mono", ui-monospace, monospace;
}
.service-card__body h3 {
  font-size: 17px; font-weight: 600;
  color: var(--blue-deep);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.service-card__body p {
  font-size: 13.5px; color: var(--gray-text);
  line-height: 1.55;
}

/* ================= ESTUDIOS ================= */
.estudios {
  padding: clamp(80px, 12vh, 150px) clamp(18px, 4vw, 48px);
  background: var(--blue-deep);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.estudios::before {
  content: "";
  position: absolute;
  top: -20%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(229,0,75,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.estudios__header {
  max-width: var(--maxw);
  margin: 0 auto 60px;
  text-align: center;
  position: relative;
}
.estudios__header .section__eyebrow { color: var(--magenta-soft); }
.estudios__header .section__title { color: #fff; }
.estudios__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}
.estudio-item {
  padding: 36px 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-right: 1px solid rgba(255,255,255,0.1);
  transition: background 0.4s var(--ease), transform 0.5s var(--ease);
  position: relative;
  overflow: hidden;
  cursor: default;
}
.estudio-item:nth-child(3n) { border-right: none; }
.estudio-item:nth-last-child(-n+3) { border-bottom: 1px solid rgba(255,255,255,0.1); }
.estudio-item:hover {
  background: rgba(229,0,75,0.08);
  transform: scale(1.02);
}
.estudio-item span {
  display: inline-block;
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--magenta-soft);
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.estudio-item h3 {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

/* ================= EQUIPOS (HORIZONTAL MAGIC SCROLL) ================= */
.equipos {
  background: #fff;
  position: relative;
}
.equipos__intro {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) clamp(18px, 4vw, 48px) 60px;
  text-align: center;
}
.equipos__lead {
  margin-top: 18px;
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--gray-text);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

.equipos__horizontal {
  position: relative;
}
/* Desktop: extra height so vertical scroll drives horizontal translate */
@media (min-width: 901px) {
  .equipos__horizontal {
    height: 320vh;
  }
  .equipos__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
  }
  .equipos__track {
    flex: 1;
    display: flex;
    align-items: center;
    gap: clamp(20px, 3vw, 40px);
    padding: 0 clamp(18px, 4vw, 48px);
    will-change: transform;
    transform: translate3d(0,0,0);
  }
  .equipos__track-footer {
    flex-shrink: 0;
    padding: 0 0 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}
@media (max-width: 900px) {
  .equipos__sticky { padding: 0; }
  .equipos__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding: 0 clamp(18px, 4vw, 48px) 30px;
    scrollbar-width: none;
  }
  .equipos__track::-webkit-scrollbar { display: none; }
  .equipos__track-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 clamp(60px, 10vh, 100px);
  }
}
.equipo-card {
  flex: 0 0 auto;
  width: clamp(280px, 32vw, 440px);
  background: var(--off);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px -12px rgba(17,67,112,0.12);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  position: relative;
  display: flex;
  flex-direction: column;
}
@media (max-width: 900px) {
  .equipo-card {
    scroll-snap-align: center;
    width: 78vw;
    max-width: 340px;
  }
  .equipo-card:hover { transform: none; }
}
.equipo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -25px rgba(17,67,112,0.3);
}
.equipo-card__num {
  position: absolute;
  top: 18px; left: 18px;
  z-index: 2;
  background: var(--magenta);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-family: "SF Mono", ui-monospace, monospace;
  letter-spacing: 0.1em;
  box-shadow: 0 6px 16px -4px rgba(229,0,75,0.5);
}
.equipo-card__img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--blue-deep);
}
.equipo-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.5s var(--ease);
}
.equipo-card:hover .equipo-card__img img { transform: scale(1.08); }
.equipo-card__body {
  padding: 26px 24px 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.equipo-card__body h3 {
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 600;
  color: var(--blue-deep);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.equipo-card__body p {
  font-size: clamp(13.5px, 1.2vw, 15px);
  color: var(--gray-text);
  line-height: 1.6;
}

.equipos__progress {
  width: clamp(160px, 24vw, 280px);
  height: 3px;
  background: var(--gray-1);
  border-radius: 999px;
  margin: 0 auto 14px;
  overflow: hidden;
}
.equipos__progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--magenta));
  border-radius: 999px;
  transition: width 0.2s var(--ease);
}
.equipos__hint {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-text);
}
/* ================= BANNER IMAGEN FULLWIDTH ================= */
.banner-img {
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: var(--blue-deep);
  display: block;
  line-height: 0;
}
.banner-img__pic {
  width: 100%;
  height: auto;
  max-height: 210vh;
  object-fit: cover;
  display: block;
}

.banner-img--reveal .banner-img__pic {
  transform: scale(1.18);
  opacity: 0;
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 1.2s ease;
}
.banner-img--reveal.is-in .banner-img__pic {
  transform: scale(1);
  opacity: 1;
}
.banner-img--kenburns.is-in .banner-img__pic {
  animation: kenBurns 18s ease-in-out 1.6s infinite alternate;
}
@keyframes kenBurns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.12) translate(-2%, -2%); }
}

/* Desktop y tableta: imagen desktop */
.banner-img__pic--desktop { display: block; }
.banner-img__pic--mobile { display: none; }

/* Móvil: imagen experiencia-movil */
@media (max-width: 560px) {
  .banner-img__pic--desktop { display: none; }
  .banner-img__pic--mobile { display: block; max-height: 90vh; }
}

/* Ajustes de altura por dispositivo */
@media (max-width: 900px) {
  .banner-img__pic--desktop { max-height: 70vh; }
}
@media (max-width: 560px) {
  .banner-img__pic--desktop { max-height: 50vh; }
}



/* ================= AMBULANCIAS HERO ================= */
.ambulancias {
  position: relative;
  min-height: 80vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: clamp(100px, 16vh, 180px) clamp(18px, 4vw, 48px);
}
.ambulancias__bg {
  position: absolute;
  inset: -8% 0;
  background: url("https://radiologiasanfrancisco.com/img/home.jpg") center/cover no-repeat;
  transform: scale(1.05);
  will-change: transform;
  z-index: 0;
}
.ambulancias__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(10,42,77,0.85) 0%, rgba(17,67,112,0.6) 50%, rgba(229,0,75,0.4) 100%);
  z-index: 1;
}
/* Animated accent line at bottom */
.ambulancias::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, transparent 0%, var(--magenta) 50%, transparent 100%);
  background-size: 200% 100%;
  z-index: 3;
  animation: accentSlide 4s linear infinite;
}
@keyframes accentSlide {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.ambulancias__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}
.ambulancias__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--magenta-soft);
  margin-bottom: 22px;
  display: inline-block;
  position: relative;
}
.ambulancias__eyebrow::before,
.ambulancias__eyebrow::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 30px; height: 1px;
  background: var(--magenta-soft);
}
.ambulancias__eyebrow::before { right: 100%; margin-right: 12px; }
.ambulancias__eyebrow::after { left: 100%; margin-left: 12px; }
.ambulancias__title {
  font-size: clamp(28px, 5.5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 24px;
}
.ambulancias__copy {
  font-size: clamp(15px, 1.6vw, 19px);
  color: rgba(255,255,255,0.9);
  line-height: 1.7;
  max-width: 56ch;
  margin: 0 auto 36px;
}
.ambulancias__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
/* Floating badge */
.ambulancias__badge {
  position: absolute;
  top: 80px; right: 30px;
  z-index: 3;
  background: rgba(229,0,75,0.95);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px -6px rgba(229,0,75,0.6);
  animation: badgeFloat 3s var(--ease) infinite;
}
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@media (max-width: 900px) {
  .ambulancias__badge { top: 70px; right: 16px; padding: 8px 14px; font-size: 10px; }
}

/* ================= CUERPO MÉDICO ================= */
.equipo {
  padding: clamp(80px, 12vh, 150px) clamp(18px, 4vw, 48px);
  background: var(--off);
}
.equipo__header {
  max-width: var(--maxw);
  margin: 0 auto 60px;
  text-align: center;
}
.equipo__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.doctor {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  box-shadow: 0 4px 20px -10px rgba(17,67,112,0.1);
  position: relative;
  overflow: hidden;
}
.doctor::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--magenta), var(--indigo));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.doctor:hover::before { transform: scaleX(1); }
.doctor:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -20px rgba(17,67,112,0.2);
}
.doctor__avatar {
  width: 110px; height: 110px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--blue-deep);
  border: 3px solid var(--magenta);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-soft);
}
.doctor__avatar--icon {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 100%);
  color: #fff;
}
.doctor__avatar img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease);
}
.doctor__icon {
  width: 70%;
  height: 70%;
  transition: transform 0.6s var(--ease);
}
.doctor:hover .doctor__icon {
  transform: scale(1.1) translateY(-2px);
}
.doctor:hover .doctor__avatar img { transform: scale(1.1); }
.doctor h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--blue-deep);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.doctor p {
  font-size: 12.5px;
  color: var(--gray-text);
  line-height: 1.5;
}

/* ================= UBICACIÓN + MAP ================= */
.ubicacion {
  padding: clamp(80px, 12vh, 140px) 0 0;
  background: #fff;
}
.ubicacion__header {
  max-width: var(--maxw);
  margin: 0 auto 50px;
  padding: 0 clamp(18px, 4vw, 48px);
  text-align: center;
}
.ubicacion__lead {
  margin-top: 18px;
  font-size: clamp(14px, 1.3vw, 17px);
  color: var(--gray-text);
  line-height: 1.7;
}
.map-fullwidth {
  position: relative;
  width: 100%;
  height: clamp(380px, 50vh, 560px);
  overflow: hidden;
}
.map-fullwidth iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: saturate(1.1) contrast(1.05);
  transition: filter 0.6s var(--ease);
}
.map-fullwidth:hover iframe {
  filter: saturate(1.25) contrast(1.1);
}
.map-fullwidth__pin {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -100%);
  z-index: 5;
  color: var(--magenta);
  pointer-events: none;
  animation: pinDrop 0.8s var(--ease) 0.5s both, pinBounce 2s var(--ease) 1.3s infinite;
  filter: drop-shadow(0 6px 12px rgba(229,0,75,0.4));
}
@keyframes pinDrop {
  0% { transform: translate(-50%, -200%); opacity: 0; }
  60% { transform: translate(-50%, -85%); opacity: 1; }
  80% { transform: translate(-50%, -105%); }
  100% { transform: translate(-50%, -100%); opacity: 1; }
}
@keyframes pinBounce {
  0%, 100% { transform: translate(-50%, -100%); }
  50% { transform: translate(-50%, -110%); }
}

/* ================= FOOTER ================= */
.footer {
  background: var(--blue-deep);
  color: rgba(255,255,255,0.75);
  padding: 70px clamp(18px, 4vw, 48px) 30px;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__brand {}
.footer__logo {
  height: 66px;
  filter: brightness(0) invert(1);
  margin-bottom: 18px;
}
.footer__brand p { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.6); }
.footer__social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.social-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
              color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.social-icon:hover { transform: translateY(-3px); }
.social-icon--wa:hover   { background: #25D366; color: #fff; border-color: #25D366; }
.social-icon--fb:hover   { background: #1877F2; color: #fff; border-color: #1877F2; }
.social-icon--ig:hover   { background: var(--magenta); color: #fff; border-color: var(--magenta); }
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.footer__col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--magenta-soft);
  margin-bottom: 18px;
}
.footer__col a, .footer__col p {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 10px;
  line-height: 1.6;
  transition: color 0.3s var(--ease);
}
.footer__col a:hover { color: #fff; }
.footer__cof { margin-top: 14px; font-size: 12px; opacity: 0.6; }
.footer__bottom {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
}

/* ================= FLOATING WHATSAPP ================= */
.wa-float {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  z-index: 998;
  box-shadow: 0 10px 30px -8px rgba(37,211,102,0.5);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  animation: waPulse 2.5s var(--ease) infinite;
}
.wa-float:hover {
  transform: scale(1.1) rotate(8deg);
  box-shadow: 0 18px 40px -10px rgba(37,211,102,0.7);
}
@keyframes waPulse {
  0%, 100% { box-shadow: 0 10px 30px -8px rgba(37,211,102,0.5), 0 0 0 0 rgba(37,211,102,0.4); }
  50% { box-shadow: 0 10px 30px -8px rgba(37,211,102,0.5), 0 0 0 14px rgba(37,211,102,0); }
}

/* ================= REVEAL ANIMATIONS (ASSEMBLY EFFECT) ================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: transform, opacity;
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}
[data-reveal-dir="left"] { transform: translateX(-40px); }
[data-reveal-dir="left"].is-in { transform: none; }
[data-reveal-dir="right"] { transform: translateX(40px); }
[data-reveal-dir="right"].is-in { transform: none; }
[data-reveal-dir="up"] { transform: translateY(40px); }
[data-reveal-dir="up"].is-in { transform: none; }
[data-reveal-dir="scale"] { transform: scale(0.85); }
[data-reveal-dir="scale"].is-in { transform: none; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .equipo__grid { grid-template-columns: repeat(2, 1fr); }
  .estudios__grid { grid-template-columns: repeat(2, 1fr); }
  .estudio-item:nth-child(3n) { border-right: 1px solid rgba(255,255,255,0.1); }
  .estudio-item:nth-child(2n) { border-right: none; }
}

@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .nav__inner { padding: 0 16px; gap: 12px; }
  .nav__menu { display: none; }
  .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav__logo { height: 50px; }
  .nav.is-scrolled .nav__logo { height: 32px; }

  /* HERO móvil: autoplay slideshow, NO scroll-driven pin */
  .hero {
    height: auto;
    min-height: 100svh;
    min-height: 100vh;
  }
  .hero__pin {
    position: relative;
    height: auto;
    min-height: 100svh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--nav-h) + 30px) 20px 80px;
  }
  .hero__content {
    padding: 0;
    max-width: 100%;
  }
  .hero__title {
    max-width: 100%;
    font-size: clamp(30px, 10vw, 52px);
    margin-bottom: 20px;
  }
  .hero__eyebrow {
    font-size: 10px;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
  }
  .hero__sub { font-size: 14px; margin-bottom: 24px; }
  .hero__actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }
  .hero__actions .btn {
    padding: 13px 20px;
    font-size: 13.5px;
    width: 100%;
    justify-content: center;
  }
  .hero__dots { bottom: 20px; left: 50%; transform: translateX(-50%); gap: 8px; }
  .hero__dot { width: 24px; }
  .hero__dot.is-active { width: 36px; }
  .hero__scroll { display: none; }

  .about {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: clamp(50px, 8vh, 70px) 18px;
  }
  .about__media {
    aspect-ratio: 9/16;
    max-width: 100%;
    margin-bottom: 0;
  }
  .about__text .section__title { max-width: 100%; font-size: clamp(20px, 6vw, 28px); }
  .about__copy { font-size: 14px; line-height: 1.65; }
  .about__list li { font-size: 14px; gap: 14px; }

  .services { padding: clamp(50px, 8vh, 70px) 16px; }
  .services__header { margin-bottom: 30px; }
  .estudios { padding: clamp(50px, 8vh, 70px) 16px; }
  .estudios__header { margin-bottom: 30px; }
  .equipo { padding: clamp(50px, 8vh, 70px) 16px; }

  .ambulancias { min-height: 80vh; padding: clamp(70px, 12vh, 100px) 16px; }
  .ambulancias__actions { flex-direction: column; }
  .ambulancias__actions .btn { width: 100%; justify-content: center; }
  .ambulancias__copy { font-size: 14px; line-height: 1.6; }

  .footer__inner { grid-template-columns: 1fr; gap: 36px; }
  .footer__cols { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 560px) {
  .services__grid { grid-template-columns: 1fr; }
  .equipo__grid { grid-template-columns: 1fr; gap: 16px; }
  .estudios__grid { grid-template-columns: 1fr; }
  .estudio-item { border-right: none !important; padding: 24px 18px; }
  .estudio-item:nth-child(2n) { border-right: none; }
  .footer__cols { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .wa-float { width: 50px; height: 50px; bottom: 16px; right: 16px; }
  .wa-float .wa-icon--lg { width: 24px; height: 24px; }
  .nav__logo { height: 60px; }
  .nav.is-scrolled .nav__logo { height: 50px; }

  .hero__title { font-size: clamp(28px, 11vw, 44px); line-height: 1; }
  .hero__pin { padding: calc(var(--nav-h) + 24px) 18px 70px; }
  .statement__big { font-size: clamp(20px, 7vw, 30px); }
  .section__title { font-size: clamp(20px, 7vw, 28px); }
  .section__title--wide { max-width: 100%; }
  .ambulancias__title { font-size: clamp(22px, 9vw, 34px); }
  .equipo-card { width: 86vw; }
  .equipo-card__body { padding: 22px 20px 26px; }
  .equipo-card__body h3 { font-size: 17px; }
  .equipo-card__body p { font-size: 13px; }
  .map-fullwidth { height: 280px; }
  .doctor { padding: 22px 16px; }
  .doctor__avatar { width: 90px; height: 90px; }
  .doctor h3 { font-size: 15px; }
  .doctor p { font-size: 12px; }
  .service-card__body { padding: 24px 20px 28px; }
  .service-card__body h3 { font-size: 19px; margin-bottom: 10px; }
  .service-card__body p { font-size: 15px; line-height: 1.55; }
  .ubicacion__lead { font-size: 13px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none !important; }
  .hero__word { opacity: 1; transform: none; }
  .hero { height: 100vh; }
  .hero__pin { position: relative; }
  .equipos__horizontal { height: auto; }
  .equipos__sticky { position: relative; height: auto; }
  .equipos__track { overflow-x: auto; transform: none !important; }
}
