/* ═══════════════════════════════════════════════════════════════════════════
   RIVIERA MEDICAL CENTER — estilo editorial hospitalario (referencia: Mayo Clinic)
   Fondo blanco. Titulares SERIF grandes en tinta oscura, texto sans.
   Fotos protagonistas: hero a sangre completa y secciones partidas texto/foto.
   Botones pill con contorno azul. Recuadros azules de esquinas rectas.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tokens ───────────────────────────────────────────────────────────────── */
:root {
  /* Paleta EXACTA de mayoclinic.org (extraída de la portada descargada) */
  --fondo: #ffffff;
  --gris-banda: #f4f4f4;          /* banda gris clara (secciones alternas) */
  --azul: #002443;                /* azul marino de marca: único azul del sitio */
  --azul-hover: #003a6b;
  --marino-oscuro: #002443;       /* footer / azul profundo */
  --tinta: #080808;               /* titulares y texto principal */
  --texto: #080808;               /* cuerpo */
  --texto-suave: #595959;
  --linea: #d8d8d8;
  --recuadro-fondo: #e9eef4;      /* tinte pálido del mismo azul marino */
  --recuadro-borde: #b9c8d7;

  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Source Sans 3", "Helvetica Neue", sans-serif;

  --margen: clamp(1.25rem, 5vw, 5.5rem);
  --ancho: 1240px;
  --transicion: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--sans);
  /* Medido en mayoclinic.org: cuerpo 20px/28px en desktop */
  font-size: clamp(17px, 16px + 0.28vw, 20px);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--azul); color: #ffffff; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--azul);
  outline-offset: 3px;
}

/* Los saltos de ancla nativos respetan la barra fija */
section[id] { scroll-margin-top: 88px; }

/* ── Reveals a prueba de fallos ───────────────────────────────────────────
   El contenido es VISIBLE por defecto. animations.js añade .anim-prep solo a
   lo que está bajo el pliegue (y solo con JS activo); el observer lo revela
   con .anim-entra. Si algo falla, nada queda oculto. */
html.js .anim-prep {
  opacity: 0;
  transform: translateY(24px);
}
html.js .anim-entra {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s var(--transicion);
}

/* ── Tipografía ───────────────────────────────────────────────────────────── */
/* Kicker: etiqueta pequeña en mayúsculas sobre los títulos (jerarquía Mayo) */
.eyebrow {
  display: block;
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--azul);
  margin-bottom: 0.6rem;
}
.eyebrow--hero { color: rgba(255, 255, 255, 0.92); margin-bottom: 0.9rem; }

/* Titular serif estilo Mayo — MEDIDO en su portada: 40px/44px, peso 700 */
.titulo-serif {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: normal;
  color: var(--tinta);
  text-wrap: balance;
}
.titulo-serif--centrado { text-align: center; }
.titulo-serif--grande { font-size: clamp(2.3rem, 5vw, 4rem); }

/* ── Botones (pill: permitidos redondeados; los RECUADROS van rectos) ─────── */
/* Botones pill medidos en Mayo: 56px de alto, letra 20px peso regular */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8em;
  padding: 0.55em 1.6em;
  border-radius: 999px;
  font-weight: 400;
  font-size: 1em;
  line-height: 1.2;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.btn--contorno {
  border: 1.5px solid var(--azul);
  color: var(--azul);
  background: transparent;
}
.btn--contorno:hover { background: var(--azul); color: #ffffff; }
.btn--solido {
  background: var(--azul);
  color: #ffffff;
  border: 1.5px solid var(--azul);
  padding: 0.95rem 2.2rem;
}
.btn--solido:hover { background: var(--azul-hover); border-color: var(--azul-hover); }
.btn--blanco {
  border: 1.5px solid #ffffff;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.08);
}
.btn--blanco:hover { background: #ffffff; color: var(--tinta); }

/* Enlace con flecha (patrón Mayo) */
.enlace-flecha {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--azul);
  font-weight: 600;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.25s;
}
.enlace-flecha svg { width: 15px; height: 15px; transition: transform 0.3s var(--transicion); }
.enlace-flecha:hover { border-color: var(--azul); }
.enlace-flecha:hover svg { transform: translateX(4px); }

.enlace {
  color: var(--azul);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.enlace:hover { color: var(--azul-hover); }

/* ── Navegación (blanca, sobria) ──────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.8rem var(--margen);
  background: #ffffff;
  transition: box-shadow 0.4s;
}
.nav--sombra { box-shadow: 0 1px 0 var(--linea), 0 8px 24px rgba(29, 39, 51, 0.06); }
/* Marca en la barra: emblema monocolor + nombre en texto (patrón Mayo) */
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.nav__logo img { height: 44px; width: auto; }
.nav__nombre {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.02em;
  line-height: 1.05;
  color: var(--azul);
  white-space: nowrap;
}
.nav__enlaces {
  display: flex;
  gap: 1.9rem;
  font-size: 1em;
  font-weight: 400;
}
.nav__enlaces a {
  color: var(--azul);
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}
.nav__enlaces a:hover { color: var(--azul-hover); border-color: var(--azul); }
.nav__extras { display: flex; align-items: center; gap: 1.4rem; }
.nav__tel { font-weight: 700; color: var(--azul); }
/* Botón "Agenda" compacto: solo aparece cuando la nav está en modo móvil */
.nav__agenda-movil {
  display: none;
  font-size: 0.85em;
  font-weight: 600;
  padding: 0.45em 1.1em;
  min-height: 0;
}
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 0;
  padding: 12px 8px;
}
.nav__burger span {
  width: 24px;
  height: 2px;
  background: var(--tinta);
  transition: transform 0.35s var(--transicion), opacity 0.25s;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menú móvil: lista con separadores y flechas (patrón de menú de Mayo) */
.menu-movil {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: #ffffff;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
.menu-movil--abierto { opacity: 1; visibility: visible; }
.menu-movil nav {
  display: flex;
  flex-direction: column;
  padding: 6rem var(--margen) 2.5rem;
}
.menu-movil a {
  position: relative;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--tinta);
  padding: 1.05rem 2rem 1.05rem 0.2rem;
  border-bottom: 1px solid var(--linea);
}
.menu-movil a:first-child { border-top: 1px solid var(--linea); }
/* Flecha (chevron) al final de cada entrada */
.menu-movil a:not(.menu-movil__cta)::after {
  content: "";
  position: absolute;
  right: 0.6rem;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid var(--azul);
  border-bottom: 2.5px solid var(--azul);
  transform: translateY(-50%) rotate(-45deg);
}
.menu-movil__cta {
  margin-top: 1.6rem;
  border: 0 !important;
  background: var(--azul);
  color: #ffffff !important;
  font-family: var(--sans) !important;
  font-size: 1.05rem !important;
  font-weight: 600;
  text-align: center;
  padding: 0.95rem 1rem !important;
  border-radius: 999px;
}

/* ═══════════════ HERO: foto a sangre completa (patrón Mayo) ═══════════════ */
.hero {
  position: relative;
  min-height: 88svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__foto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Si la foto provisional no carga, queda un fondo marino digno */
  background: var(--marino-oscuro);
  will-change: transform;
}
.hero__velo {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 40%, rgba(0, 0, 0, 0.55) 100%);
}
.hero__contenido {
  position: relative;
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 var(--margen) clamp(2.5rem, 6vh, 4.5rem);
}
/* Hero medido en Mayo: 76px, peso 300 (ligero), interlineado 1.05 */
.hero__titulo {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 5.3vw, 4.75rem);
  line-height: 1.05;
  color: #ffffff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.hero__acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.6rem;
  margin-top: 1.8rem;
}
.hero__enlace {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.05rem;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.65);
  padding-bottom: 2px;
  transition: border-color 0.25s;
}
.hero__enlace svg { width: 15px; height: 15px; transition: transform 0.3s var(--transicion); }
.hero__enlace:hover { border-color: #ffffff; }
.hero__enlace:hover svg { transform: translateX(4px); }

/* ═══════════════ SPLITS: texto + foto alternados (patrón Mayo) ════════════ */
.split { padding: clamp(4rem, 9vh, 7rem) var(--margen); }
.split--gris { background: var(--gris-banda); }
.split__interior {
  max-width: var(--ancho);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.split__texto .titulo-serif { margin-bottom: 2rem; }
.split__bloque { margin-bottom: 1.7rem; }
/* Sub-bloques medidos en Mayo: h3 sans 20px bold, párrafo 20px casi negro */
.split__bloque h3 {
  font-weight: 700;
  font-size: 1em;
  color: var(--tinta);
  margin-bottom: 0.2rem;
}
.split__bloque p { color: var(--tinta); max-width: 46ch; }
.split__bloque .enlace-flecha { margin-top: 0.7rem; }
.split__parrafo { color: var(--tinta); max-width: 46ch; margin-bottom: 2rem; }
.split__media {
  position: relative;
  overflow: hidden; /* recorta el parallax */
  aspect-ratio: 3 / 4;
  max-height: 620px;
  width: 100%;
}
.split__media img {
  width: 100%;
  height: 112%;   /* margen para el parallax vertical */
  object-fit: cover;
  will-change: transform;
  background: var(--recuadro-fondo);
}
.split__media--mapa { aspect-ratio: 4 / 3; }
.split__media--mapa iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(0.85);
}

.horarios div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--linea);
  color: var(--texto-suave);
  max-width: 420px;
}
.horarios dd { color: var(--tinta); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ═══════════════ ESPECIALIDADES: tarjetas (recuadros azules, rectos) ══════ */
.espec { padding: clamp(4rem, 9vh, 7rem) var(--margen); }
.espec__interior { max-width: var(--ancho); margin: 0 auto; }
.espec__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.tarjeta {
  background: var(--recuadro-fondo);
  border: 1px solid var(--recuadro-borde);
  border-top: 3px solid var(--azul);
  padding: 2.1rem 1.9rem 2.3rem;
  overflow: hidden;
}
/* Foto de la tarjeta (patrón Mayo: imagen arriba, a sangre del recuadro) */
.tarjeta__foto {
  margin: -2.1rem -1.9rem 1.5rem;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #ffffff;
}
.tarjeta__foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Banda de foto a todo lo ancho (páginas interiores) */
.banda-foto {
  margin-top: clamp(2rem, 5vh, 3rem);
  height: clamp(240px, 38vh, 420px);
  overflow: hidden;
}
.banda-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tarjeta h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--tinta);
  margin-bottom: 0.55rem;
}
.tarjeta p { color: var(--tinta); font-size: 0.95em; }
.espec__cta { text-align: center; margin-top: 2.8rem; }

/* ═══════════════ PÁGINAS INTERIORES: cabecera de página ═══════════════ */
.pagina-cabecera {
  padding: clamp(3rem, 7vh, 5rem) var(--margen) 0;
}
.pagina-cabecera__interior { max-width: var(--ancho); margin: 0 auto; }
.pagina-cabecera h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.1;
  color: var(--tinta);
}
.pagina-cabecera p { margin-top: 0.9rem; color: var(--tinta); max-width: 60ch; }

/* Enlace activo en la navegación (página actual) */
.nav__enlaces a[aria-current="page"] {
  color: var(--azul);
  border-color: var(--azul);
}

/* Perfil y cédula del doctor en la página de doctores */
.grupo .perfil {
  display: block;
  color: var(--texto-suave);
  font-size: 0.9em;
  margin-top: 0.25rem;
}
.grupo .cedula {
  display: block;
  color: var(--azul);
  font-size: 0.8em;
  font-weight: 600;
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

/* ═══════════════ CÓMO AGENDAR: 3 pasos con número serif grande ═══════════ */
.pasos { padding: clamp(4rem, 9vh, 7rem) var(--margen); }
.pasos__interior { max-width: var(--ancho); margin: 0 auto; }
.pasos__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.paso {
  border-top: 3px solid var(--azul);
  padding-top: 1.4rem;
}
.paso__numero {
  display: block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--azul);
  margin-bottom: 0.8rem;
}
.paso h3 { font-weight: 700; font-size: 1em; color: var(--tinta); margin-bottom: 0.2rem; }
.paso p { color: var(--tinta); max-width: 40ch; }

/* ═══════════════ BANDA AZUL: llamada a la acción (patrón Mayo) ════════════ */
.banda-cta {
  background: var(--azul);
  padding: clamp(3.5rem, 8vh, 5.5rem) var(--margen);
  text-align: center;
}
.banda-cta__interior { max-width: 760px; margin: 0 auto; }
.banda-cta__titulo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
  line-height: 1.1;
  color: #ffffff;
  text-wrap: balance;
}
.banda-cta__texto { color: rgba(255, 255, 255, 0.9); margin: 0.9rem auto 1.8rem; max-width: 46ch; }
.banda-cta .btn--blanco { background: transparent; }
.banda-cta .btn--blanco:hover { background: #ffffff; color: var(--azul); }

/* ═══════════════ TESTIMONIOS: recuadros con cita serif ════════════════════ */
.testimonios { padding: clamp(4rem, 9vh, 7rem) var(--margen); }
.testimonios__interior { max-width: var(--ancho); margin: 0 auto; }
.testimonios__nota { text-align: center; color: var(--tinta); margin-top: 0.8rem; }
.testimonios__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.testimonio {
  background: var(--recuadro-fondo);
  border: 1px solid var(--recuadro-borde);
  border-top: 3px solid var(--azul);
  padding: 2rem 1.9rem 2.1rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.testimonio blockquote {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.1em;
  line-height: 1.45;
  color: var(--tinta);
}
.testimonio blockquote::before { content: "“"; }
.testimonio blockquote::after { content: "”"; }
.testimonio figcaption {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.9em;
  color: var(--texto-suave);
}

/* ═══════════════ DOCTORES: directorio por área (sin avatares ni iconos) ═══ */
.equipo { padding: clamp(4rem, 9vh, 7rem) var(--margen); background: var(--gris-banda); }
.equipo__interior { max-width: var(--ancho); margin: 0 auto; }
.equipo__nota {
  margin: 1rem 0 3rem;
  color: var(--texto-suave);
  max-width: 60ch;
}
.equipo__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.grupo {
  background: #ffffff;
  border-top: 3px solid var(--azul);
  padding: 1.6rem 1.7rem 1.9rem;
}
.grupo h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--tinta);
  margin-bottom: 0.9rem;
}
.grupo li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--linea);
}
.grupo li:last-child { border-bottom: 0; padding-bottom: 0; }
.grupo .nombre { display: block; font-weight: 700; color: var(--tinta); }
.grupo .esp { display: block; color: var(--texto-suave); font-size: 0.93rem; }

/* ═══════════════ LA APP: teléfono CSS + badges ═══════════════ */
.app__badges { display: flex; gap: 0.8rem; margin-top: 1.6rem; flex-wrap: wrap; }
.badge {
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--recuadro-borde);
  background: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--texto-suave);
}
.badge em { color: var(--azul); font-style: normal; font-weight: 700; }

.telefono { display: grid; place-items: center; }
.telefono__marco {
  width: clamp(240px, 22vw, 290px);
  aspect-ratio: 9 / 19;
  border-radius: 44px; /* es un dispositivo, no un recuadro */
  padding: 12px;
  position: relative;
  background: linear-gradient(160deg, #24405f, #12263f);
  border: 1px solid rgba(29, 39, 51, 0.25);
  box-shadow: 0 32px 70px rgba(29, 39, 51, 0.28);
}
.telefono__notch {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 22px;
  border-radius: 999px;
  background: #0a1626;
  z-index: 2;
}
/* La pantalla es una captura REAL de la app del paciente (demo) */
.telefono__pantalla {
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: #f5f2ea; /* fondo de la app mientras carga la imagen */
}
.telefono__pantalla img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ═══════════════ CTA FINAL ═══════════════ */
.final { padding: clamp(4.5rem, 10vh, 8rem) var(--margen); text-align: center; }
.final__interior { max-width: 760px; margin: 0 auto; }
.final__logo { width: clamp(190px, 30vw, 320px); margin: 0 auto 2.2rem; }
.final__bajada { color: var(--texto-suave); margin: 1.1rem auto 2rem; max-width: 46ch; }

/* ═══════════════ FOOTER: azul marino oscuro (patrón Mayo) ═══════════════ */
.footer { background: var(--marino-oscuro); color: rgba(255, 255, 255, 0.85); }
.footer__interior {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 4rem var(--margen) 2.2rem;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 3rem;
}
.footer__marca img { height: 60px; width: auto; margin-bottom: 1rem; }
.footer__marca p { font-size: 0.95rem; max-width: 300px; }
.footer__columnas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer__columnas h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.9rem;
}
.footer__columnas a {
  display: block;
  padding: 0.26rem 0;
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.85);
}
.footer__columnas a:hover { color: #ffffff; text-decoration: underline; }
.footer__legal {
  grid-column: 1 / -1;
  padding-top: 1.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

/* ═══════════════ BOTÓN FLOTANTE DE WHATSAPP ═══════════════ */
.whatsapp-flotante {
  position: fixed;
  right: clamp(1rem, 3vw, 1.8rem);
  bottom: clamp(1rem, 3vw, 1.8rem);
  z-index: 260;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366; /* verde oficial de WhatsApp: reconocible al instante */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s var(--transicion), box-shadow 0.25s;
}
.whatsapp-flotante:hover { transform: scale(1.08); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); }
.whatsapp-flotante svg { width: 30px; height: 30px; fill: #ffffff; }

/* Barra de acciones fija en teléfono (sustituye a la burbuja en ≤640px) */
.barra-movil { display: none; }

/* ═══════════════ VALORES: por qué elegirnos (home) ═══════════════ */
.valores { padding: clamp(3.5rem, 8vh, 6rem) var(--margen); background: var(--gris-banda); }
.valores__grid {
  max-width: var(--ancho);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.valor { border-top: 3px solid var(--azul); padding-top: 1.2rem; }
.valor h3 { font-weight: 700; font-size: 1em; color: var(--tinta); margin-bottom: 0.2rem; }
.valor p { color: var(--tinta); font-size: 0.95em; }

/* ═══════════════ PADECIMIENTOS FRECUENTES (especialidades) ═══════════════ */
.padecimientos { padding: clamp(4rem, 9vh, 7rem) var(--margen); background: var(--gris-banda); }
.padecimientos__interior { max-width: var(--ancho); margin: 0 auto; }
.padecimientos__nota { color: var(--texto-suave); margin-top: 0.8rem; max-width: 60ch; }
.padecimientos__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2.6rem;
}
.padecimientos .grupo li { font-weight: 600; color: var(--tinta); }

/* ═══════════════ RESPONSIVE ═══════════════ */
/* En cuanto no caben los enlaces, entra la hamburguesa (antes había un hueco
   entre 641 y 1080 px sin menú de ningún tipo) */
@media (max-width: 1080px) {
  .nav__enlaces { display: none; }
  .nav__extras { display: none; }
  .nav__burger { display: flex; }
  .nav__agenda-movil { display: inline-flex; }
  /* La barra siempre delimitada del contenido en modo móvil */
  .nav { box-shadow: 0 1px 0 var(--linea); }
}
@media (max-width: 900px) {
  .split__interior { grid-template-columns: 1fr; }
  /* En los splits invertidos la foto va después del texto en móvil */
  .split--invertido .split__media { order: 2; }
  .split__media { aspect-ratio: 4 / 3; max-height: 460px; }
  .espec__grid { grid-template-columns: 1fr 1fr; }
  .equipo__grid { grid-template-columns: 1fr 1fr; }
  .pasos__grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .testimonios__grid { grid-template-columns: 1fr; }
  .valores__grid { grid-template-columns: 1fr 1fr; }
  .padecimientos__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { padding: 0.55rem var(--margen); }
  .nav__logo { gap: 0.5rem; }
  .nav__logo img { height: 38px; }
  .nav__nombre { font-size: 0.92em; }
  .hero { min-height: 76svh; }
  /* CTAs cómodos de tocar, a lo ancho */
  .hero__acciones .btn,
  .banda-cta .btn,
  .final .btn { width: 100%; }
  .hero__acciones { gap: 1.1rem; }

  /* Fotos a sangre completa: de borde a borde de la pantalla */
  .split__media {
    margin-left: calc(-1 * var(--margen));
    margin-right: calc(-1 * var(--margen));
  }

  /* Especialidades y testimonios: carrusel deslizable con imán */
  .espec__grid,
  .testimonios__grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    margin-left: calc(-1 * var(--margen));
    margin-right: calc(-1 * var(--margen));
    padding: 0 var(--margen) 0.6rem;
    scrollbar-width: none;
  }
  .espec__grid::-webkit-scrollbar,
  .testimonios__grid::-webkit-scrollbar { display: none; }
  .tarjeta, .testimonio {
    flex: 0 0 84%;
    scroll-snap-align: center;
  }

  .equipo__grid { grid-template-columns: 1fr; }
  .footer__interior { grid-template-columns: 1fr; gap: 2.4rem; }
  .footer__columnas { grid-template-columns: 1fr 1fr; }

  /* Barra de acciones fija: Llamar + WhatsApp (la burbuja se oculta) */
  .whatsapp-flotante { display: none; }
  .barra-movil {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 260;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    padding: 0.6rem var(--margen) calc(0.6rem + env(safe-area-inset-bottom));
    background: #ffffff;
    box-shadow: 0 -1px 0 var(--linea), 0 -8px 24px rgba(0, 0, 0, 0.06);
  }
  .barra-movil .btn { width: 100%; min-height: 2.6em; font-size: 0.95em; }
  body { padding-bottom: 74px; } /* que la barra fija no tape el footer */
}

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