/* =========================================================
   Dra. Rocío Rojas Moreno — Otorrinolaringología
   Hoja de estilos única. Mobile first.
   Orden: tokens → reset → utilidades → layout → secciones
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* Paleta tomada de la identidad de la doctora */
  --rosa-900: #6E3F3E;
  --rosa-800: #8A5250;
  --rosa-700: #9E5F5D;
  --rosa-600: #B4736F;
  --rosa-500: #C08582;   /* color de marca */
  --rosa-400: #D3A29E;
  --rosa-300: #E8C7C1;
  --rosa-200: #F3DED8;
  --rosa-100: #FAEDE8;
  --crema:    #FDF6F2;
  --blanco:   #FFFFFF;

  --tinta:    #3A3331;
  --gris:     #6E6462;
  --gris-cl:  #8C817E;
  --linea:    #EBD9D3;

  --verde-wa: #25D366;

  /* Tipografía */
  --f-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-texto:   "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Escala fluida */
  --t-h1:   clamp(2.1rem, 1.35rem + 3.6vw, 3.9rem);
  --t-h2:   clamp(1.75rem, 1.2rem + 2.4vw, 2.9rem);
  --t-h3:   clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --t-body: clamp(1.0625rem, 1rem + 0.25vw, 1.15rem);

  /* Ritmo */
  --sp-sec: clamp(3.5rem, 2rem + 7vw, 7rem);
  --radio:  16px;
  --radio-sm: 10px;
  --sombra: 0 1px 2px rgba(110, 63, 62, .04), 0 8px 24px -12px rgba(110, 63, 62, .18);
  --sombra-lg: 0 4px 12px rgba(110, 63, 62, .06), 0 24px 48px -20px rgba(110, 63, 62, .28);

  --cta-h: 62px; /* alto de la barra fija móvil */
}

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

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

body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--tinta);
  background: var(--blanco);
  overflow-x: hidden;
  /* espacio para la barra fija de móvil */
  padding-bottom: calc(var(--cta-h) + env(safe-area-inset-bottom, 0px));
}

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

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; font-weight: 600; }
h1 { font-family: var(--f-display); font-size: var(--t-h1); font-weight: 600; letter-spacing: -.01em; }
h2 { font-family: var(--f-display); font-size: var(--t-h2); font-weight: 600; color: var(--rosa-900); }
h3 { font-size: var(--t-h3); font-weight: 500; }
p  { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--rosa-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rosa-900); }

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

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--rosa-700); color: #fff; padding: .6rem 1rem;
  border-radius: 8px; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 8px; color: #fff; }

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

/* ---------- 3. Layout / utilidades ---------- */
.wrap {
  width: min(100% - 2.5rem, 1180px);
  margin-inline: auto;
}
.wrap--narrow { width: min(100% - 2.5rem, 780px); }

.section { padding-block: var(--sp-sec); }
.section--alt { background: var(--crema); }

.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem); }
.section__sub { color: var(--gris); margin-bottom: 0; }

.eyebrow {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rosa-600);
  margin-bottom: .75rem;
}

.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 500; text-decoration: none;
  color: var(--rosa-700);
}
.link-arrow::after { content: "→"; transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .95rem 1.6rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit; font-weight: 500; line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .12s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn .ico { width: 20px; height: 20px; flex: none; }

.btn--primary {
  background: var(--rosa-500); color: #fff;
  box-shadow: 0 8px 20px -10px rgba(110, 63, 62, .6);
}
.btn--primary:hover { background: var(--rosa-700); color: #fff; }

.btn--ghost {
  background: transparent; color: var(--rosa-800); border-color: var(--rosa-300);
}
.btn--ghost:hover { background: var(--rosa-100); color: var(--rosa-900); border-color: var(--rosa-400); }

.btn--sm { padding: .65rem 1.2rem; font-size: .95rem; }
.btn--block { width: 100%; }

/* Animación de entrada.
   Solo se oculta si hay JS (.js en <html>): si el script falla o está bloqueado,
   el contenido se ve normal en lugar de quedar invisible. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s, border-color .25s;
}
.site-header.is-stuck {
  border-bottom-color: var(--linea);
  box-shadow: 0 6px 24px -18px rgba(110, 63, 62, .6);
}

.header-inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 66px;
}

.brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--rosa-800);
  margin-right: auto;
  min-width: 0;   /* permite encoger antes que desbordar el header */
}
/* Isotipo real, extraído del logo original. Es trazo fino: por debajo de
   ~34 px pierde legibilidad, por eso no baja de aquí en ningún breakpoint. */
.brand__mark { width: 38px; height: 38px; flex: none; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
/* Red de seguridad: si el nombre no cupiera, se recorta en vez de romper
   el header. No debería activarse nunca con los tamaños actuales. */
.brand__text strong, .brand__text em {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand__text strong {
  font-family: var(--f-display);
  font-size: 1.05rem; font-weight: 600; letter-spacing: .01em;
  color: var(--rosa-800);
}
.brand__text em {
  font-style: normal; font-size: .62rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--rosa-500);
}

.header-cta { display: none; }

/* Instagram: solo icono, en el header. Está siempre visible porque el header
   es sticky, y no compite con los CTA de cita del hero. 44 px de lado para
   cumplir el mínimo de objetivo táctil. */
.ig-link {
  display: grid; place-content: center;
  width: 44px; height: 44px; flex: none;
  border-radius: 12px;
  color: var(--rosa-600);
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.ig-link svg { width: 22px; height: 22px; }
.ig-link:hover { background: var(--rosa-100); color: var(--rosa-800); }

.nav-toggle {
  width: 44px; height: 44px; flex: none;
  display: grid; place-content: center; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 0;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: var(--rosa-800); transition: transform .25s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--linea);
  box-shadow: var(--sombra);
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
}
.nav.is-open { grid-template-rows: 1fr; }
.nav > ul { overflow: hidden; }
.nav a {
  display: block;
  padding: .95rem 1.25rem;
  color: var(--tinta); text-decoration: none;
  border-bottom: 1px solid var(--rosa-100);
}
.nav a:hover { background: var(--crema); color: var(--rosa-800); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(120% 90% at 100% 0%, var(--rosa-200) 0%, transparent 60%),
    linear-gradient(180deg, var(--crema) 0%, var(--blanco) 100%);
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 5rem) clamp(3rem, 2rem + 5vw, 5.5rem);
  overflow: hidden;
}
.hero__inner { display: grid; gap: clamp(2rem, 1rem + 4vw, 3.5rem); }

.hero h1 { color: var(--rosa-900); margin-bottom: .6rem; }
.hero h1 em { font-style: italic; color: var(--rosa-600); }

.hero .lead {
  font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem);
  color: var(--gris);
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.75rem; }
.hero__actions .btn { flex: 1 1 auto; min-width: 15rem; }

.hero__badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.hero__badges li {
  font-size: .82rem; letter-spacing: .02em;
  padding: .38rem .85rem;
  border-radius: 999px;
  background: var(--blanco);
  border: 1px solid var(--rosa-200);
  color: var(--rosa-800);
}

.hero__figure { margin: 0; }
.hero__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 72% center;
  border-radius: var(--radio);
  box-shadow: var(--sombra-lg);
}

/* ---------- 6. Barra de confianza ---------- */
.trust {
  background: var(--rosa-500);
  color: #fff;
  padding-block: clamp(2rem, 1.2rem + 3vw, 3rem);
}
.trust__grid { display: grid; gap: 1.75rem; }
.trust__item svg { width: 26px; height: 26px; color: var(--rosa-200); margin-bottom: .6rem; }
.trust__item h3 { color: #fff; margin-bottom: .25rem; font-weight: 500; }
.trust__item p { margin: 0; font-size: .93rem; color: rgba(255,255,255,.85); line-height: 1.5; }

/* ---------- 7. Padecimientos ---------- */
.cats { display: grid; gap: 1.25rem; }

.cat {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: clamp(1.5rem, 1rem + 2vw, 2.1rem);
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.cat:hover {
  border-color: var(--rosa-300);
  box-shadow: var(--sombra);
  transform: translateY(-3px);
}
.cat__head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.1rem; }
.cat__ico {
  width: 44px; height: 44px; flex: none; padding: 10px;
  border-radius: 12px;
  background: var(--rosa-100);
  color: var(--rosa-600);
}
.cat__head h3 {
  margin: 0;
  font-family: var(--f-display);
  font-size: 1.5rem; font-weight: 600;
  color: var(--rosa-900);
}
.cat__list li {
  position: relative;
  padding: .42rem 0 .42rem 1.5rem;
  color: var(--gris);
  border-bottom: 1px solid var(--rosa-100);
}
.cat__list li:last-child { border-bottom: 0; }
.cat__list li::before {
  content: ""; position: absolute; left: 0; top: 1.05em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--rosa-400);
}
.cat--wide { background: var(--crema); border-color: var(--rosa-200); }
.cat__note {
  margin: 1.1rem 0 0;
  font-size: .9rem; color: var(--gris-cl);
  border-left: 3px solid var(--rosa-300);
  padding-left: .9rem;
}

/* ---------- 8. La doctora ---------- */
.doctora { display: grid; gap: clamp(2rem, 1rem + 4vw, 3.5rem); align-items: start; }

.doctora__media { margin: 0; }
.doctora__media img {
  width: 100%;
  border-radius: var(--radio);
  box-shadow: var(--sombra-lg);
  background: #fff;
}
.doctora__media figcaption {
  margin-top: .8rem;
  font-size: .85rem; color: var(--gris-cl); text-align: center;
}

.doctora__text p { color: var(--gris); }
.doctora__text strong { color: var(--tinta); font-weight: 500; }

.creds {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem; margin: 2rem 0;
  padding: 1.4rem;
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--radio-sm);
}
.creds dt {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--rosa-500); margin-bottom: .15rem;
}
.creds dd { margin: 0; font-weight: 500; color: var(--tinta); font-size: .98rem; }

/* ---------- 9. Pasos de la consulta ---------- */
.steps { display: grid; gap: 1.25rem; counter-reset: paso; }

.step {
  position: relative;
  padding: 1.6rem 1.6rem 1.4rem;
  background: var(--crema);
  border-radius: var(--radio);
  border: 1px solid var(--rosa-100);
}
.step__num {
  display: grid; place-content: center;
  width: 38px; height: 38px; margin-bottom: .9rem;
  border-radius: 50%;
  background: var(--rosa-500); color: #fff;
  font-family: var(--f-display); font-size: 1.2rem; font-weight: 600;
}
.step h3 { color: var(--rosa-900); margin-bottom: .35rem; }
.step p { margin: 0; color: var(--gris); font-size: .97rem; }

.alert {
  display: flex; gap: 1rem; align-items: flex-start;
  margin-top: 2rem;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radio-sm);
  background: #FFF6F2;
  border: 1px solid var(--rosa-300);
  border-left: 4px solid var(--rosa-600);
}
.alert svg { width: 24px; height: 24px; flex: none; color: var(--rosa-600); margin-top: .15rem; }
.alert p { margin: 0; font-size: .95rem; color: var(--rosa-900); }

/* ---------- 10. Galería de temas ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}
.gcard {
  position: relative;
  display: block; padding: 0; margin: 0;
  border: 1px solid var(--linea);
  border-radius: var(--radio-sm);
  overflow: hidden;
  background: var(--blanco);
  cursor: pointer;
  font: inherit; text-align: left;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.gcard:hover { transform: translateY(-4px); box-shadow: var(--sombra-lg); border-color: var(--rosa-300); }
.gcard img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: top center;
}
.gcard__label {
  display: block;
  padding: .7rem .85rem;
  font-size: .88rem; font-weight: 500; color: var(--rosa-800);
  border-top: 1px solid var(--rosa-100);
}

/* ---------- 11. FAQ ---------- */
.faq { display: grid; gap: .7rem; }

.faq__item {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--radio-sm);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.faq__item[open] { border-color: var(--rosa-300); box-shadow: var(--sombra); }

.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.25rem;
  cursor: pointer;
  font-weight: 500; color: var(--rosa-900);
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  flex: none;
  font-size: 1.5rem; line-height: 1; font-weight: 300;
  color: var(--rosa-500);
  transition: transform .25s;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary:hover { background: var(--crema); }

.faq__body { padding: 0 1.25rem 1.25rem; }
.faq__body p { margin: 0; color: var(--gris); font-size: .97rem; }

/* ---------- 12. Contacto ---------- */
.contacto { display: grid; gap: clamp(2rem, 1rem + 3vw, 3rem); }

.datos { display: grid; gap: 1.4rem; margin-bottom: 2rem; }
.datos li { display: flex; gap: .9rem; align-items: flex-start; }
.datos svg {
  width: 22px; height: 22px; flex: none; margin-top: .25rem;
  color: var(--rosa-500);
}
.datos h3 { margin: 0 0 .15rem; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rosa-600); }
.datos p { margin: 0; color: var(--gris); line-height: 1.55; }
.datos a { color: var(--tinta); text-decoration: none; font-weight: 500; }
.datos a:hover { color: var(--rosa-700); text-decoration: underline; }

.contacto__cta { display: grid; gap: .7rem; max-width: 24rem; }

.contacto__mapa iframe {
  width: 100%; height: 340px; border: 0;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  filter: saturate(.85);
}
.contacto__mapa .link-arrow { margin-top: .9rem; }

/* ---------- 12b. Cierre con CTA ----------
   La ubicación se subió arriba, así que la página cierra con una acción
   en vez de terminar en las preguntas frecuentes. */
.cierre {
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
  background:
    radial-gradient(90% 120% at 50% 0%, var(--rosa-200) 0%, transparent 65%),
    var(--crema);
  text-align: center;
}
.cierre__inner h2 { margin-bottom: .4rem; }
.cierre__inner > p { color: var(--gris); margin-bottom: 1.75rem; }
.cierre__acciones { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.cierre__acciones .btn { flex: 0 1 auto; min-width: 15rem; }

/* ---------- 13. Footer ---------- */
.site-footer {
  background: var(--rosa-900);
  color: rgba(255,255,255,.78);
  padding-top: clamp(2.5rem, 1.5rem + 4vw, 4rem);
  font-size: .93rem;
}
.footer__grid { display: grid; gap: 2rem; padding-bottom: 2.5rem; }
.footer__mark {
  width: 64px; height: 64px;
  margin-bottom: 1rem;
  opacity: .9;
}
.footer__brand strong {
  display: block;
  font-family: var(--f-display); font-size: 1.25rem; font-weight: 600;
  color: #fff; margin-bottom: .5rem;
}
.footer__brand p { margin: 0; line-height: 1.7; }

.footer__nav { display: grid; gap: .5rem; align-content: start; }
.footer__nav a { color: rgba(255,255,255,.8); text-decoration: none; }
.footer__nav a:hover { color: #fff; text-decoration: underline; }

.footer__legal p { margin: 0 0 .7rem; font-size: .85rem; line-height: 1.6; color: rgba(255,255,255,.6); }
.footer__legal strong { color: rgba(255,255,255,.85); }
.footer__privacy a { color: rgba(255,255,255,.85); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.14);
  padding-block: 1.25rem;
}
.footer__bottom p { margin: 0; font-size: .82rem; color: rgba(255,255,255,.55); }

/* ---------- 14. CTA fija móvil ---------- */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: grid; grid-template-columns: 1fr 1fr;
  background: #fff;
  border-top: 1px solid var(--linea);
  box-shadow: 0 -6px 24px -16px rgba(110, 63, 62, .7);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-cta__btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  height: var(--cta-h);
  font-weight: 500; font-size: 1rem; text-decoration: none;
}
.mobile-cta__btn svg { width: 21px; height: 21px; }
.mobile-cta__btn--wa { background: var(--verde-wa); color: #fff; }
.mobile-cta__btn--tel { background: var(--rosa-500); color: #fff; }
.mobile-cta__btn:hover { color: #fff; filter: brightness(.95); }

/* ---------- 15. Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 1rem;
  background: rgba(58, 40, 39, .93);
  backdrop-filter: blur(4px);
  animation: fade .2s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox__fig { margin: 0; max-width: min(100%, 720px); max-height: 100%; }
.lightbox__fig img {
  max-width: 100%; max-height: 80vh;
  margin-inline: auto;
  border-radius: var(--radio-sm);
  object-fit: contain;
}
.lightbox__fig figcaption {
  margin-top: .9rem; text-align: center;
  color: rgba(255,255,255,.8); font-size: .9rem;
}

.lightbox__close, .lightbox__nav {
  position: absolute;
  display: grid; place-content: center;
  width: 46px; height: 46px;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff;
  font-size: 1.9rem; line-height: 1; cursor: pointer;
  transition: background-color .2s;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.28); }
.lightbox__close { top: 1rem; right: 1rem; font-size: 1.7rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 2.2rem; }
.lightbox__nav--prev { left: .5rem; }
.lightbox__nav--next { right: .5rem; }

body.no-scroll { overflow: hidden; }

/* =========================================================
   BREAKPOINTS
   ========================================================= */

/* ---- ≤ 859.98px : hero centrado ----
   Mientras el hero es de una sola columna, el texto alineado a la izquierda
   deja mucho aire muerto a la derecha. Centrado equilibra el bloque.
   A partir de 860 px vuelve a la izquierda, que es lo correcto con la foto
   al lado. */
@media (max-width: 859.98px) {
  .hero__text { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__badges { justify-content: center; }
}

/* ---- ≤ 420px : el header con logotipo + Instagram + menú va justo ----
   Nombre y especialidad miden lo mismo (~151 px cada línea) y no caben junto
   a los dos botones de 44 px. Se reduce solo el header, no el resto. */
@media (max-width: 420px) {
  .header-inner { width: min(100% - 1.5rem, 1180px); gap: .5rem; }
  .brand { gap: .45rem; }
  .brand__mark { width: 32px; height: 32px; }
  .brand__text strong { font-size: .9rem; }
  .brand__text em { font-size: .5rem; letter-spacing: .08em; }
}

/* ---- ≥ 560px ---- */
@media (min-width: 560px) {
  .trust__grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

/* ---- ≥ 860px : el contenido pasa a varias columnas ----
   Ojo: el menú horizontal NO entra aquí. Entre 860 y 1040 px el logo,
   los 6 enlaces y el botón de cita no caben en una línea y el header
   se desbordaba, así que la navegación cambia más arriba (1040 px). */
@media (min-width: 860px) {
  html { scroll-padding-top: 90px; }

  .header-inner { min-height: 78px; gap: 1.75rem; }
  .brand__mark { width: 46px; height: 46px; }
  .brand__text strong { font-size: 1.2rem; }

  .hero__inner { grid-template-columns: 1.05fr .95fr; align-items: center; }
  .hero__actions .btn { flex: 0 1 auto; min-width: 0; }
  .hero__figure img { aspect-ratio: 5 / 4; object-position: 68% center; }

  .trust__grid { grid-template-columns: repeat(4, 1fr); }

  .cats { grid-template-columns: repeat(3, 1fr); }
  .cat--wide { grid-column: 1 / -1; }
  .cat__list--cols { columns: 2; column-gap: 2.5rem; }
  .cat__list--cols li { break-inside: avoid; }

  .doctora { grid-template-columns: 0.85fr 1.15fr; gap: 4rem; }

  .steps { grid-template-columns: repeat(4, 1fr); }

  .contacto { grid-template-columns: 1fr 1.15fr; align-items: start; }
  .contacto__mapa iframe { height: 100%; min-height: 460px; }

  .footer__grid { grid-template-columns: 1.2fr .8fr 1.4fr; gap: 3rem; }
}

/* ---- ≥ 1140px : navegación de escritorio ----
   El umbral se calcula sobre lo que ocupa la fila completa: logotipo (252) +
   menú (595) + Instagram (44) + botón de cita (102) + 3 gaps (84) = 1077,
   más los 40 px de padding del wrap. Por debajo se mantienen el menú
   hamburguesa y la barra fija inferior, que es el patrón correcto en tablet. */
@media (min-width: 1140px) {
  body { padding-bottom: 0; }
  .mobile-cta { display: none; }

  .nav-toggle { display: none; }
  .header-cta { display: inline-flex; }

  .nav {
    position: static;
    background: none; border: 0; box-shadow: none;
    display: block;
    margin-left: auto;
  }
  .nav > ul { display: flex; gap: .25rem; overflow: visible; }
  .nav a {
    padding: .5rem .7rem;
    border: 0; border-radius: 8px;
    font-size: .92rem;
    white-space: nowrap;
    color: var(--gris);
  }
  .nav a:hover { background: var(--rosa-100); color: var(--rosa-800); }
}

/* ---- ≥ 1100px ---- */
@media (min-width: 1100px) {
  .gallery { grid-template-columns: repeat(5, 1fr); }
  .hero__figure img { aspect-ratio: 1 / 1; }
}
