/* ==========================================================================
   Medimap — Consorcio Medicina por Imágenes Paraguay
   Sistema de diseño · Dirección "Clínico premium"
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  /* Marca (extraídos del logotipo institucional) */
  --navy-900: #171d3e;
  --navy-800: #202654;
  --navy-700: #232c5d;
  --blue-600: #2c4a85;
  --blue-500: #355a9d;
  --blue-400: #407ac5;
  --blue-300: #6d9cd8;
  --blue-200: #a9c4e8;
  --blue-100: #d8e4f4;
  --blue-050: #eef3fa;

  /* Neutros */
  --ink: #16203c;
  --ink-soft: #46516f;
  --ink-mute: #6f7a95;
  --line: #dfe6f1;
  --line-soft: #ecf1f8;
  --surface: #ffffff;
  --canvas: #f7f9fc;

  /* Acento cálido para urgencias */
  --alert: #c0392b;
  --alert-soft: #fdeceb;

  /* Escala tipográfica fluida */
  --fs-hero: clamp(2.4rem, 1.4rem + 3.6vw, 4.2rem);
  --fs-h1: clamp(2.1rem, 1.4rem + 2.4vw, 3.2rem);
  --fs-h2: clamp(1.7rem, 1.25rem + 1.6vw, 2.5rem);
  --fs-h3: clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
  --fs-lead: clamp(1.05rem, 0.98rem + 0.4vw, 1.2rem);

  /* Ritmo */
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-y: clamp(3.5rem, 7vw, 6.5rem);
  --max: 1200px;
  --max-narrow: 760px;

  /* Formas */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* Sombras */
  --sh-1: 0 1px 2px rgba(23, 29, 62, .06), 0 2px 8px rgba(23, 29, 62, .05);
  --sh-2: 0 4px 12px rgba(23, 29, 62, .07), 0 12px 32px rgba(23, 29, 62, .07);
  --sh-3: 0 12px 28px rgba(23, 29, 62, .10), 0 28px 64px rgba(23, 29, 62, .12);

  --font-display: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- 2. Reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-700);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  font-weight: 600;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue-500); text-decoration: none; }
a:hover { color: var(--blue-400); }

ul { margin: 0 0 1em; padding-left: 1.15em; }
li { margin-bottom: .35em; }

:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--navy-700);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- 3. Layout ---------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--max-narrow); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--surface { background: var(--surface); }
.section--soft { background: var(--blue-050); }

.section--navy {
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(64, 122, 197, .38), transparent 62%),
    radial-gradient(900px 480px at 92% 110%, rgba(53, 90, 157, .45), transparent 60%),
    var(--navy-800);
  color: #e9eefa;
}
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy p { color: #c3cfe8; }

.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.stack > * + * { margin-top: 1rem; }

/* ---------- 4. Bloques tipográficos ------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue-400);
  margin-bottom: .9rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.section--navy .eyebrow { color: var(--blue-300); }

.lead {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  line-height: 1.6;
}
.section--navy .lead { color: #bcc9e4; }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: var(--fs-h2); }

/* ---------- 5. Botones --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-size: .97rem;
  font-weight: 600;
  letter-spacing: .01em;
  padding: .85rem 1.6rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary {
  background: linear-gradient(135deg, var(--blue-400), var(--blue-500) 55%, var(--navy-700));
  color: #fff;
  box-shadow: 0 6px 18px rgba(53, 90, 157, .34);
}
.btn--primary:hover { color: #fff; box-shadow: 0 10px 26px rgba(53, 90, 157, .42); }

.btn--ghost {
  background: transparent;
  border-color: var(--blue-200);
  color: var(--navy-700);
}
.btn--ghost:hover { background: #fff; border-color: var(--blue-400); color: var(--navy-700); }

.btn--light { background: #fff; color: var(--navy-700); box-shadow: var(--sh-1); }
.btn--light:hover { color: var(--navy-700); }

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

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
}
.link-arrow::after {
  content: "→";
  transition: transform .18s ease;
}
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- 6. Header ---------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow .25s ease;
}
.site-header.is-stuck { box-shadow: var(--sh-1); }

.topbar {
  background: var(--navy-800);
  color: #c3cfe8;
  font-size: .82rem;
}
.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding-block: .35rem;
}
.topbar a { color: #fff; font-weight: 500; }
.topbar a:hover { color: var(--blue-300); }
.topbar-items { display: flex; flex-wrap: wrap; gap: .3rem 1.25rem; align-items: center; }
.topbar-item { display: inline-flex; align-items: center; gap: .4rem; }
.topbar-item svg { width: 14px; height: 14px; opacity: .8; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}

.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 46px; width: auto; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  display: block;
  padding: .55rem .85rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background .18s ease, color .18s ease;
}
.nav-menu a:hover { background: var(--blue-050); color: var(--navy-700); }
.nav-menu a[aria-current="page"] { color: var(--navy-700); font-weight: 600; background: var(--blue-050); }


.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy-700);
  border-radius: 2px;
  transition: transform .22s ease, opacity .18s ease;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: grid; order: 3; }
  .nav-menu {
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: .15rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
  }
  .nav-menu.is-open { max-height: 520px; padding-block: .5rem 1.25rem; }
  .nav-menu a { padding: .75rem 1rem; }
  /* El menú colapsado forma una 2ª línea flex: con min-height el espacio
     sobrante se repartía entre líneas y descentraba el logo. Altura por padding. */
  .nav {
    flex-wrap: wrap;
    align-content: flex-start;
    min-height: 0;
    padding-block: .85rem;
    row-gap: 0;
  }
}

@media (max-width: 700px) {
  /* El header queda fijo: no puede comerse un quinto de la pantalla. */
  html { scroll-padding-top: 124px; }
  .topbar { font-size: .78rem; }
  .topbar .wrap { justify-content: center; }
  .topbar .topbar-items:first-child { display: none; }
  .nav { min-height: 68px; }
  .brand img { height: 40px; }
}

/* ---------- 7. Hero ------------------------------------------------------ */
.hero {
  position: relative;
  background:
    radial-gradient(760px 420px at 88% -12%, rgba(64, 122, 197, .16), transparent 60%),
    radial-gradient(620px 520px at 2% 108%, rgba(53, 90, 157, .12), transparent 62%),
    var(--canvas);
  overflow: hidden;
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(3.5rem, 7vw, 6rem);
}
.hero::after {
  content: "";
  position: absolute;
  inset-inline-start: -8%;
  bottom: -30%;
  width: 46%;
  aspect-ratio: 1;
  background: url("../img/brand/medimap-isotipo.png") no-repeat center / contain;
  opacity: .05;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 600;
  margin-bottom: .55em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--blue-400), var(--blue-500) 60%, var(--navy-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead { max-width: 52ch; }
.hero .btn-row { margin-top: 2rem; }

.hero-media {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-3);
  aspect-ratio: 4 / 3.2;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(35, 44, 93, 0) 45%, rgba(23, 29, 62, .55));
}

.hero-badge {
  position: absolute;
  z-index: 2;
  left: clamp(.9rem, 2vw, 1.6rem);
  bottom: clamp(.9rem, 2vw, 1.6rem);
  right: clamp(.9rem, 2vw, 1.6rem);
  display: flex;
  align-items: center;
  gap: .9rem;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-radius: var(--r-md);
  padding: .85rem 1.1rem;
  box-shadow: var(--sh-2);
}
.hero-badge svg { width: 30px; height: 30px; color: var(--blue-400); flex: none; }
.hero-badge strong { display: block; font-family: var(--font-display); color: var(--navy-700); font-size: 1rem; }
.hero-badge span { font-size: .84rem; color: var(--ink-mute); }

/* ---------- 8. Barra de métricas ---------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-1);
}
.stat { background: var(--surface); padding: clamp(1.4rem, 3vw, 2rem) 1.25rem; text-align: center; }
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.2rem + 2vw, 2.7rem);
  font-weight: 600;
  line-height: 1;
  color: var(--blue-500);
  letter-spacing: -.03em;
}
.stat span { display: block; margin-top: .45rem; font-size: .88rem; color: var(--ink-mute); line-height: 1.4; }

/* ---------- 9. Tarjetas -------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 2.5vw, 1.9rem);
  box-shadow: var(--sh-1);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  height: 100%;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--blue-200); }
.card h3 { font-size: var(--fs-h3); margin-bottom: .4em; }
.card p { color: var(--ink-soft); font-size: .95rem; }

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin-bottom: 1.1rem;
  background: linear-gradient(140deg, var(--blue-050), var(--blue-100));
  color: var(--blue-500);
  border: 1px solid var(--blue-100);
}
.card-icon svg { width: 26px; height: 26px; }

.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; padding: 0; list-style: none; }
.tag-list li { margin: 0; }
.tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 500;
  padding: .25rem .7rem;
  border-radius: 999px;
  background: var(--blue-050);
  color: var(--blue-600);
  border: 1px solid var(--blue-100);
}

/* ---------- 10. Sedes ---------------------------------------------------- */
.branch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.branch + .branch { margin-top: clamp(3rem, 6vw, 5rem); }
.branch--flip .branch-media { order: 2; }
@media (max-width: 880px) {
  .branch { grid-template-columns: 1fr; }
  .branch--flip .branch-media { order: 0; }
}

.branch-media {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-2);
  aspect-ratio: 4 / 3;
}
.branch-media img { width: 100%; height: 100%; object-fit: cover; }

.branch-media-stack { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.branch-media-stack > * { border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-1); }
.branch-media-stack > :first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.branch-media-stack > :not(:first-child) { aspect-ratio: 4 / 3; }
.branch-media-stack img { width: 100%; height: 100%; object-fit: cover; }

.branch-name { font-size: var(--fs-h2); margin-bottom: .3em; }
.branch-city {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-400);
  margin-bottom: .8rem;
}

.info-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .95rem; }
.info-list li { display: flex; gap: .85rem; margin: 0; }
.info-list svg { width: 20px; height: 20px; color: var(--blue-400); flex: none; margin-top: .22rem; }
.info-list b { display: block; font-family: var(--font-display); font-size: .95rem; color: var(--navy-700); }
.info-list span { font-size: .93rem; color: var(--ink-soft); }

/* ---------- 11. Galería -------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: .9rem;
}
.gallery-item {
  position: relative;
  border: 0;
  padding: 0;
  margin: 0;
  background: var(--navy-800);
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  box-shadow: var(--sh-1);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease, opacity .3s ease;
}
.gallery-item:hover img { transform: scale(1.06); opacity: .85; }
.gallery-item figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1.6rem .9rem .75rem;
  background: linear-gradient(to top, rgba(23, 29, 62, .88), transparent);
  color: #fff;
  font-family: var(--font-display);
  font-size: .87rem;
  font-weight: 500;
  text-align: left;
}
.gallery-item--wide { grid-column: span 2; aspect-ratio: 16 / 9; }
@media (max-width: 600px) {
  /* En una sola columna la galería medía ~5.800 px de alto. Miniaturas en 2
     columnas + lightbox al tocar: la mitad de scroll y misma legibilidad. */
  .gallery { grid-template-columns: repeat(2, 1fr); gap: .55rem; }
  /* En una miniatura de 169 px el epígrafe tapa la foto. Se conserva en las
     anchas y en el lightbox, que es donde de verdad se lee. */
  .gallery-item:not(.gallery-item--wide) figcaption { display: none; }
  .gallery-item--wide figcaption { padding: 1.1rem .7rem .55rem; font-size: .82rem; }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(12, 16, 36, .93);
  backdrop-filter: blur(6px);
}
.lightbox.is-open { display: grid; }
.lightbox img {
  max-width: min(1100px, 100%);
  max-height: 82vh;
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  object-fit: contain;
}
.lightbox-caption {
  margin-top: 1rem;
  color: #dbe4f6;
  font-family: var(--font-display);
  font-size: .95rem;
  text-align: center;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, .24); }
.lightbox-close { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
.lightbox-nav--prev { left: clamp(.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }
.lightbox-nav--next { right: clamp(.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
  /* A los costados las flechas quedaban sobre la foto: van abajo, centradas. */
  .lightbox { padding-bottom: 5.5rem; }
  .lightbox img { max-height: 68vh; }
  .lightbox-nav { top: auto; bottom: 1.25rem; transform: none; width: 46px; height: 46px; }
  .lightbox-nav--prev { left: calc(50% - 56px); }
  .lightbox-nav--next { left: calc(50% + 10px); right: auto; }
}

/* ---------- 12. Estudios ------------------------------------------------- */
.study-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }

.study {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--sh-1);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.study:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--blue-200); }
.study-ico {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-050);
  border: 1px solid var(--blue-100);
  color: var(--blue-500);
}
.study-ico svg { width: 22px; height: 22px; }
.study b { display: block; font-family: var(--font-display); font-size: 1rem; color: var(--navy-700); line-height: 1.3; }
.study span { font-size: .87rem; color: var(--ink-mute); }

/* ---------- 13. Pasos ---------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2.4rem 1.5rem 1.5rem;
  box-shadow: var(--sh-1);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -20px;
  left: 1.5rem;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-400), var(--navy-700));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 6px 16px rgba(53, 90, 157, .35);
}
.step h3 { font-size: 1.1rem; margin-bottom: .35em; }
.step p { font-size: .93rem; color: var(--ink-soft); }

/* ---------- 14. Panel de horarios / urgencias --------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  box-shadow: var(--sh-1);
}
.panel--alert { border-color: #f3cfcb; background: var(--alert-soft); }
.panel--alert h3 { color: var(--alert); }

.hours { list-style: none; margin: 0; padding: 0; }
.hours li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: .95rem;
  margin: 0;
}
.hours li:last-child { border-bottom: 0; }
.hours b { font-family: var(--font-display); color: var(--navy-700); font-weight: 600; }
.hours span { color: var(--ink-soft); white-space: nowrap; }

/* Lista de valores (sección de propósito, sobre fondo azul) */
.value-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.value-list li {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  color: #c3cfe8;
  font-size: .97rem;
}
.value-list svg { width: 17px; height: 17px; flex: none; color: var(--blue-300); }

/* ---------- 15. FAQ ------------------------------------------------------ */
.faq { display: grid; gap: .75rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.faq details[open] { border-color: var(--blue-200); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 3rem 1.1rem 1.3rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--navy-700);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--blue-400);
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq .faq-body { padding: 0 1.3rem 1.25rem; color: var(--ink-soft); font-size: .95rem; }

/* ---------- 16. CTA final ------------------------------------------------ */
.cta-band {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  padding: clamp(2.2rem, 5vw, 4rem);
  color: #fff;
  background:
    radial-gradient(700px 360px at 85% 0%, rgba(64, 122, 197, .5), transparent 60%),
    linear-gradient(135deg, var(--navy-700), var(--navy-900));
  box-shadow: var(--sh-3);
}
.cta-band h2 { color: #fff; font-size: var(--fs-h2); }
.cta-band p { color: #c3cfe8; max-width: 56ch; }
.cta-band::after {
  content: "";
  position: absolute;
  right: -6%;
  top: -35%;
  width: 45%;
  aspect-ratio: 1;
  background: url("../img/brand/medimap-isotipo.png") no-repeat center / contain;
  opacity: .1;
  filter: brightness(0) invert(1);
  pointer-events: none;
}
.cta-band .btn-row { margin-top: 1.8rem; position: relative; z-index: 1; }

/* ---------- 17. Mapa ----------------------------------------------------- */
.map-frame {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  background: var(--blue-050);
}
.map-frame iframe { width: 100%; height: clamp(280px, 42vw, 420px); border: 0; }

/* ---------- 18. Campos de formulario ------------------------------------ */
.form { display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field { display: grid; gap: .4rem; }
/* display:grid pisa al [hidden] del user-agent: hay que declararlo. */
.field[hidden] { display: none; }
.field label { font-family: var(--font-display); font-size: .87rem; font-weight: 600; color: var(--navy-700); }
.field select {
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  padding: .8rem 2.4rem .8rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background-color: #fff;
  /* Archivo y no data: URI — la CSP del hosting bloquea imágenes data:. */
  background-image: url("../img/select-flecha.svg");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  background-size: 16px;
  width: 100%;
  appearance: none;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field select:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 4px rgba(64, 122, 197, .15);
}
.form-note { font-size: .84rem; color: var(--ink-mute); }

/* ---------- 18b. Widget de WhatsApp -------------------------------------- */
/* Color de marca WhatsApp: se usa sólo como acento (punto de estado e icono).
   Para un FAB verde clásico, cambiá --wa-fab-bg por var(--wa-green).        */
:root {
  --wa-green: #25d366;
  --wa-fab-bg: linear-gradient(135deg, var(--blue-400), var(--navy-700));
}

.wa-widget {
  position: fixed;
  right: clamp(.9rem, 2.5vw, 1.75rem);
  bottom: clamp(.9rem, 2.5vw, 1.75rem);
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .75rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s ease, visibility .25s, transform .25s ease;
}
.wa-widget.is-ready,
.wa-widget.is-open { opacity: 1; visibility: visible; transform: none; }

.wa-fab {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.3rem;
  border: 0;
  border-radius: 999px;
  background: var(--wa-fab-bg);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .93rem;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(23, 29, 62, .35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.wa-fab:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(23, 29, 62, .45); }
.wa-fab svg { width: 22px; height: 22px; flex: none; }
.wa-fab .wa-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wa-green);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, .28);
  flex: none;
}
@media (max-width: 520px) {
  .wa-fab .wa-fab-label { display: none; }
  .wa-fab { padding: .95rem 1rem; gap: .4rem; }
  .wa-fab svg { width: 24px; height: 24px; }
}

.wa-panel {
  width: min(340px, calc(100vw - 2rem));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  overflow: hidden;
  transform-origin: bottom right;
  animation: wa-in .22s ease;
}
@keyframes wa-in {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.wa-panel[hidden] { display: none; }

.wa-panel-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: #fff;
}
.wa-avatar {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: var(--wa-green);
}
.wa-avatar svg { width: 24px; height: 24px; }
.wa-panel-head strong { display: block; font-family: var(--font-display); font-size: .97rem; line-height: 1.3; }
.wa-panel-head span { display: block; font-size: .76rem; color: #b6c3de; line-height: 1.35; }
.wa-close {
  margin-left: auto;
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: .85rem;
  cursor: pointer;
  transition: background .18s ease;
}
.wa-close:hover { background: rgba(255, 255, 255, .26); }

.wa-panel-body { padding: 1.1rem; display: grid; gap: .9rem; }
/* En pantallas bajas el panel flotante no debe desbordar la ventana */
.wa-widget .wa-panel-body { max-height: calc(100vh - 13rem); overflow-y: auto; }
.wa-bubble {
  position: relative;
  margin: 0;
  padding: .8rem .95rem;
  border-radius: 4px var(--r-md) var(--r-md) var(--r-md);
  background: var(--blue-050);
  border: 1px solid var(--blue-100);
  font-size: .9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.wa-panel-body .field label { font-size: .82rem; }
.wa-panel-body .field select { padding-block: .65rem; font-size: .9rem; }

.btn--wa {
  background: var(--wa-green);
  color: #08311a;
  box-shadow: 0 6px 18px rgba(37, 211, 102, .32);
  width: 100%;
}
.btn--wa:hover { color: #08311a; background: #1fc25d; box-shadow: 0 10px 26px rgba(37, 211, 102, .4); }
.wa-panel-body .form-note { text-align: center; font-size: .8rem; }

/* Bloque de agendamiento embebido en la página de contacto */
.wa-inline {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.wa-inline .wa-panel-head { padding: 1.25rem 1.5rem; }
.wa-inline .wa-avatar { width: 46px; height: 46px; }
.wa-inline .wa-panel-body { padding: 1.5rem; gap: 1.1rem; }
.wa-inline .wa-bubble { font-size: .95rem; }
.wa-inline .btn--wa { width: auto; justify-self: start; padding-inline: 1.9rem; }
@media (max-width: 480px) { .wa-inline .btn--wa { width: 100%; justify-self: stretch; } }

/* ---------- 19. Encabezado de página interna ---------------------------- */
.page-hero {
  position: relative;
  padding-block: clamp(2.8rem, 6vw, 4.5rem);
  background:
    radial-gradient(760px 420px at 85% -20%, rgba(64, 122, 197, .18), transparent 62%),
    var(--blue-050);
  border-bottom: 1px solid var(--line-soft);
}
.page-hero h1 { font-size: var(--fs-h1); max-width: 20ch; }
.page-hero .lead { max-width: 62ch; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0 0 1.1rem; padding: 0; font-size: .85rem; color: var(--ink-mute); }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .45rem; color: var(--blue-200); }

.page-hero--photo { border-bottom: 0; background: var(--navy-800); overflow: hidden; }
.page-hero--photo .wrap { position: relative; z-index: 1; }
.page-hero--photo h1, .page-hero--photo .breadcrumb li { color: #fff; }
.page-hero--photo .lead { color: #c9d6ec; }
.page-hero--photo .breadcrumb a { color: var(--blue-200); }
.page-hero-bg { position: absolute; inset: 0; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.page-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(23, 29, 62, .93) 20%, rgba(32, 38, 84, .6));
}

/* ---------- 20. Footer --------------------------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: #a8b5d4;
  padding-block: clamp(3rem, 6vw, 4.5rem) 0;
  font-size: .93rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: clamp(1.5rem, 4vw, 3rem); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }

.site-footer h4 {
  color: #fff;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
  font-weight: 600;
}
.site-footer a { color: #a8b5d4; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer ul a { display: inline-block; padding-block: .2rem; }
.site-footer li { margin: 0; }
.footer-brand img { height: 52px; width: auto; filter: brightness(0) invert(1); margin-bottom: 1.1rem; }
.footer-brand p { max-width: 34ch; font-size: .9rem; line-height: 1.6; }

.footer-bottom {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-block: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: space-between;
  font-size: .84rem;
  color: #7d8cb0;
}

/* ---------- 21. Animación de entrada ------------------------------------ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 22. Ajustes tipográficos para mobile -------------------------
   Va al final a propósito: estas reglas comparten especificidad con las bases
   y necesitan ganar por orden de cascada.
   ------------------------------------------------------------------------ */
@media (max-width: 700px) {
  /* Versalitas con tracking amplio: a 12,5 px cuestan de leer en pantalla chica. */
  .eyebrow { font-size: .82rem; letter-spacing: .13em; }
  .branch-city { font-size: .82rem; }
  .tag { font-size: .82rem; }
  .topbar { font-size: .84rem; }
  .wa-panel-head span { font-size: .82rem; }
  .wa-panel-body .form-note { font-size: .84rem; }

  /* Texto de lectura a 16 px: en una columna no hay motivo para achicarlo. */
  .card p,
  .step p,
  .faq .faq-body,
  .info-list span { font-size: 1rem; }
}
