/* ============================================================
   Dr. Iván Chávez Monteagudo — Traumatología y Ortopedia
   Hoja de estilos global
   Paleta basada en los colores reales del logotipo del cliente
   (azul petróleo + verde oliva). Tipografía: Fraunces (títulos,
   con carácter editorial/humano) + Work Sans (texto, legible en
   pantallas clínicas).
   ============================================================ */

/* ---------- Fuentes ---------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Work+Sans:wght@400;500;600;700&display=swap');

/* ---------- Tokens de diseño ---------- */
:root{
  /* Marca (extraída del logotipo y material gráfico existente del cliente) */
  --navy:            #16323e;
  --navy-soft:       #24485a;
  --olive:           #8bab3d;
  --olive-dark:      #6f8f2f;
  --olive-soft:      #eaf1da;

  /* Neutrales cálidos (no gris puro) */
  --paper:           #faf9f5;
  --paper-raised:    #ffffff;
  --ink:             #1c2321;
  --ink-soft:        #4d564f;
  --ink-faint:       #7c837a;
  --rule:            #e3e1d6;

  /* Semántico */
  --focus:           #2f6fed;
  --warn:            #a15c2c;
  --gold:            #f2b705;

  /* Tipografía */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Espaciado / forma */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 22px;
  --container: 1180px;
  --shadow-card: 0 1px 2px rgba(22,50,62,.06), 0 12px 30px -14px rgba(22,50,62,.22);
}

/* ---------- Reset ligero ---------- */
*, *::before, *::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *, *::before, *::after{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; }
}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font-body);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; }
h1,h2,h3,h4{ font-family:var(--font-display); font-weight:600; line-height:1.15; margin:0 0 .5em; text-wrap:balance; color:var(--navy); }
/* Los <h2> no tenían tamaño propio en ningún lado (heredaban el default
   del navegador, ~24px) — es el título principal de casi cada sección
   del sitio, así que se define aquí una escala explícita y más grande. */
h2{ font-size:clamp(26px, 3.2vw, 36px); }
h3{ font-size:clamp(18px, 2vw, 21px); }
p{ margin:0 0 1em; color:var(--ink-soft); max-width:64ch; }
ul{ margin:0; padding:0; list-style:none; }
:focus-visible{ outline:3px solid var(--focus); outline-offset:2px; }

.container{ max-width:var(--container); margin:0 auto; padding:0 24px; }
.section{ padding:72px 0; }
.section--tight{ padding:48px 0; }
.section--alt{ background:var(--paper-raised); }
.eyebrow{
  display:inline-block; font-family:var(--font-body); font-weight:700; font-size:12.5px;
  letter-spacing:.09em; text-transform:uppercase; color:var(--olive-dark); margin-bottom:10px;
}

/* ---------- Salto de accesibilidad ---------- */
.skip-link{
  position:absolute; left:-9999px; top:auto; background:var(--navy); color:#fff;
  padding:12px 20px; border-radius:0 0 8px 0; z-index:1000; font-weight:600;
}
.skip-link:focus{ left:0; top:0; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header{
  position:sticky; top:0; z-index:100; background:rgba(250,249,245,.92);
  backdrop-filter:saturate(150%) blur(8px); border-bottom:1px solid var(--rule);
}
.nav{ display:flex; align-items:center; justify-content:space-between; gap:20px; padding:10px 0; }
.brand{ display:flex; align-items:center; gap:10px; text-decoration:none; }
/* Logotipo oficial del cliente, usado tal cual (sin recolorear). Solo se
   controla su altura de despliegue; el archivo en sí no se modifica. */
.brand-logo{ height:74px; width:auto; display:block; }

.nav-links{ display:flex; align-items:center; gap:28px; }
.nav-links a{
  display:block; text-decoration:none; font-weight:600; font-size:14.5px; color:var(--ink-soft);
  padding:6px 2px; border-bottom:2px solid transparent;
}
.nav-links a:hover, .nav-links a[aria-current="page"]{ color:var(--navy); border-bottom-color:var(--olive); }

.nav-actions{ display:flex; align-items:center; gap:14px; }
.nav-toggle{
  display:none; background:none; border:1.5px solid var(--rule); border-radius:8px;
  width:42px; height:42px; align-items:center; justify-content:center; cursor:pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content:""; display:block; width:20px; height:2px; background:var(--navy); position:relative; transition:transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before{ position:absolute; top:-6px; } .nav-toggle span::after{ position:absolute; top:6px; }
.nav-toggle[aria-expanded="true"] span{ background:transparent; }
.nav-toggle[aria-expanded="true"] span::before{ transform:rotate(45deg); top:0; }
.nav-toggle[aria-expanded="true"] span::after{ transform:rotate(-45deg); top:0; }

/* ---------- Botones ---------- */
.btn{
  display:inline-flex; align-items:center; gap:9px; font-family:var(--font-body); font-weight:700;
  font-size:14.5px; padding:12px 22px; border-radius:30px; text-decoration:none; border:2px solid transparent;
  cursor:pointer; transition:transform .15s ease, box-shadow .15s ease;
}
.btn:hover{ transform:translateY(-1px); }
.btn-whatsapp{ background:var(--olive); color:var(--navy); }
.btn-whatsapp:hover{ background:var(--olive-dark); color:#fff; }
.btn-outline{ border-color:var(--navy); color:var(--navy); background:transparent; }
.btn-outline:hover{ background:var(--navy); color:#fff; }
.btn-sm{ padding:9px 16px; font-size:13.5px; }
.wa-icon{ width:16px; height:16px; flex:none; }

/* Botón flotante de WhatsApp — fijo en toda la navegación, con los colores
   y el ícono reconocibles de la marca oficial de WhatsApp. */
.wa-float{
  position:fixed; right:22px; bottom:22px; z-index:200;
  width:58px; height:58px; border-radius:50%;
  background:#25D366; color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 26px -8px rgba(0,0,0,.4);
  transition:transform .15s ease;
}
.wa-float:hover{ transform:scale(1.07); }
.wa-float svg{ width:30px; height:30px; }
@media (max-width:480px){ .wa-float{ width:52px; height:52px; right:16px; bottom:16px; } .wa-float svg{ width:27px; height:27px; } }

/* Redes sociales flotantes — más chicas, apiladas arriba del WhatsApp */
.social-float{
  position:fixed; right:32px; bottom:100px; z-index:200;
  display:flex; flex-direction:column; align-items:center; gap:18px;
}
.social-float a{
  width:40px; height:40px; border-radius:50%; color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 8px 18px -8px rgba(0,0,0,.4); transition:transform .15s ease;
}
.social-float a:hover{ transform:scale(1.08); }
.social-float svg{ width:19px; height:19px; }
.social-float .fb{ background:#1877F2; }
.social-float .ig{ background:radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
@media (max-width:480px){
  .social-float{ right:25px; bottom:82px; gap:12px; }
  .social-float a{ width:34px; height:34px; }
  .social-float svg{ width:16px; height:16px; }
}

/* Burbuja de invitación a contactar — aparece unos segundos después de
   cargar la página, señalando el botón de WhatsApp. Se puede cerrar y no
   vuelve a aparecer en la misma sesión. */
.wa-bubble{
  position:fixed; right:92px; bottom:24px; z-index:199; max-width:220px;
  background:#fff; color:var(--ink); border-radius:14px; padding:13px 28px 13px 16px;
  box-shadow:0 14px 32px -10px rgba(0,0,0,.32);
  font-family:var(--font-body); font-size:13.5px; line-height:1.45;
  opacity:0; transform:translateY(10px) scale(.96); pointer-events:none;
  transition:opacity .35s ease, transform .35s ease;
}
.wa-bubble.show{ opacity:1; transform:translateY(0) scale(1); pointer-events:auto; }
.wa-bubble::after{
  content:""; position:absolute; right:-6px; bottom:20px;
  width:13px; height:13px; background:#fff; transform:rotate(45deg);
  box-shadow:3px -3px 6px -3px rgba(0,0,0,.12);
}
.wa-bubble p{ margin:0; }
.wa-bubble-close{
  position:absolute; top:6px; right:8px; width:20px; height:20px; border:none; background:none;
  color:var(--ink-faint); font-size:17px; line-height:1; cursor:pointer; padding:0;
}
.wa-bubble-close:hover{ color:var(--ink); }
@media (max-width:480px){ .wa-bubble{ right:70px; bottom:20px; max-width:158px; padding:10px 24px 10px 13px; font-size:12.5px; } .wa-bubble::after{ bottom:16px; } }
@media (prefers-reduced-motion: reduce){ .wa-bubble{ transition:none; } }

/* ============================================================
   HERO
   ============================================================ */
/* Fondo del above-the-fold: foto real con un velo del color de fondo del
   sitio para que la imagen se aprecie sin restar legibilidad al texto. */
.hero{
  padding:56px 0 72px;
  position:relative;
  background:
    linear-gradient(100deg, var(--paper) 0%, var(--paper) 38%, rgba(250,249,245,.88) 58%, rgba(250,249,245,.72) 100%),
    url('../assets/img/hero-bg.jpg') center 30%/cover no-repeat;
}
.hero-grid{ display:grid; grid-template-columns:1.15fr 0.85fr; gap:48px; align-items:center; position:relative; }
.hero-photo-wrap{ position:relative; z-index:1; }
/* Sombra de contacto suave: ancla la foto transparente al fondo de la
   página sin volver a un bloque de color sólido detrás. */
.hero-photo-wrap::after{
  content:""; position:absolute; left:50%; bottom:2%; transform:translateX(-50%);
  width:62%; height:22px; border-radius:50%;
  background:radial-gradient(ellipse at center, rgba(22,50,62,.28) 0%, rgba(22,50,62,0) 72%);
  z-index:-1;
}

/* La fotografía real es un recorte con fondo transparente: se muestra
   directamente sobre el fondo de la página, sin bloque de color detrás. */
.hero-photo-panel{
  aspect-ratio:4/5; display:flex; align-items:flex-end; justify-content:center;
}
.hero-photo{
  max-height:100%; width:auto; object-fit:contain; display:block;
}
.hero-photo--headshot{
  border-radius:var(--radius-lg); overflow:hidden; box-shadow:var(--shadow-card);
  aspect-ratio:4/5; object-fit:cover; background:var(--navy-soft);
}
.hero-chip{
  position:absolute; background:var(--paper-raised); border-radius:999px; padding:8px 16px;
  box-shadow:var(--shadow-card); font-weight:700; font-size:13px; color:var(--navy);
  display:flex; align-items:center; gap:7px;
}
.hero-chip::before{ content:""; width:8px; height:8px; border-radius:50%; background:var(--olive); flex:none; }
.hero-chip--1{ top:8%; right:-6%; }
.hero-chip--2{ bottom:14%; left:-8%; }
.hero-chip--3{ bottom:-4%; right:12%; }

.hero-content{ display:flex; flex-direction:column; gap:18px; }
.rating-badge{ display:flex; align-items:center; gap:10px; }
.stars{ color:var(--gold); letter-spacing:2px; font-size:17px; }
.rating-badge span:not(.stars){ font-weight:600; color:var(--ink-soft); font-size:14px; }
.hero-content h1{ font-size:clamp(30px, 4vw, 46px); }
.hero-sub{ font-size:17px; max-width:52ch; }

/* Fila de contacto: sin tarjeta/bloque de color, solo el botón (con el
   número dentro) y una etiqueta corta al lado. */
.contact-row{ display:flex; flex-wrap:wrap; align-items:center; gap:14px; }
.contact-row .wa-label{
  font-family:var(--font-body); font-weight:600; font-size:13.5px; color:var(--ink-soft);
}
.btn-whatsapp .btn-phone{ font-variant-numeric:tabular-nums; letter-spacing:.02em; }

.phone-visible{ font-family:var(--font-body); font-weight:700; font-size:17px; color:var(--navy); letter-spacing:.02em; }
.phone-visible small{ display:block; font-weight:600; font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-faint); }

/* ============================================================
   TARJETAS / GRILLAS
   ============================================================ */
.grid{ display:grid; gap:22px; }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-2{ grid-template-columns:repeat(2,1fr); }

/* Si un elemento queda solo en la última fila, se centra en vez de dejar
   espacio vacío a la derecha. */
.grid-3 > :last-child:nth-child(3n+1){ grid-column:2; }
.grid-2 > :last-child:nth-child(2n+1){ grid-column:1 / -1; max-width:calc(50% - 11px); margin-inline:auto; }
.specialty-rows > :last-child:nth-child(3n+1){ grid-column:2; }
@media (max-width:900px){
  .grid-3 > :last-child:nth-child(3n+1){ grid-column:auto; }
  .specialty-rows > :last-child:nth-child(3n+1){ grid-column:auto; }
  .specialty-rows > :last-child:nth-child(2n+1){ grid-column:1 / -1; max-width:calc(50% - 12px); margin-inline:auto; }
}
@media (max-width:640px){
  .grid-2 > :last-child:nth-child(2n+1){ max-width:100%; }
  .specialty-rows > :last-child:nth-child(2n+1){ max-width:100%; }
}

.card{
  background:var(--paper-raised); border:1px solid var(--rule); border-radius:var(--radius-md);
  padding:26px; box-shadow:var(--shadow-card);
}
.card h3{ font-size:19px; }
.card-icon{
  width:44px; height:44px; border-radius:12px; background:var(--olive-soft); color:var(--olive-dark);
  display:flex; align-items:center; justify-content:center; margin-bottom:14px; font-size:20px;
}
.card-icon--outline{
  background:none; border-radius:0; width:34px; height:34px; color:var(--olive-dark);
}
.card-icon--outline svg{ width:100%; height:100%; stroke:currentColor; fill:none; stroke-width:1.5; }

.stat-card{ text-align:left; }
.stat-card .num{ font-family:var(--font-display); font-size:34px; color:var(--navy); font-weight:600; }
.stat-card p{ margin:4px 0 0; font-size:14px; }

/* Variante de alto contraste (azul petróleo) para "Por qué elegirme" */
.stat-card--navy{
  background:var(--navy); border-color:var(--navy);
  position:relative; overflow:hidden; text-align:left;
}
.stat-card--navy::before{
  content:""; position:absolute; top:0; left:0; right:0; height:4px; background:var(--olive);
}
.stat-card--navy .stat-icon{
  width:40px; height:40px; border-radius:10px; border:1.5px solid rgba(255,255,255,.25);
  display:flex; align-items:center; justify-content:center; margin-bottom:16px;
  color:var(--olive);
}
.stat-card--navy .stat-icon svg{ width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.6; }
.stat-card--navy .num{ color:#fff; }
.stat-card--navy p{ color:#c7d3cc; }

.section-head{ text-align:center; max-width:640px; margin:0 auto; }
.section-head.reveal{ margin-bottom:0; }

/* Tarjetas de especialidad con enlace */
.spec-card{ text-decoration:none; display:block; transition:transform .15s ease, box-shadow .15s ease; }
.spec-card img{ width:100%; aspect-ratio:16/10; object-fit:cover; border-radius:var(--radius-sm); margin-bottom:14px; display:block; }
.spec-card:hover{ transform:translateY(-3px); box-shadow:0 18px 34px -18px rgba(22,50,62,.35); }
.go{ margin-top:12px; font-weight:700; color:var(--olive-dark); font-size:13.5px; display:inline-flex; align-items:center; gap:6px; text-decoration:none; }

/* ============================================================
   TIMELINE (Sobre mí)
   ============================================================ */
.timeline{ position:relative; padding-left:28px; border-left:2px solid var(--rule); display:flex; flex-direction:column; gap:32px; }
.timeline-item{ position:relative; }
.timeline-item::before{
  content:""; position:absolute; left:-35px; top:4px; width:12px; height:12px; border-radius:50%;
  background:var(--olive); border:3px solid var(--paper);
}
.timeline-item .when{ font-weight:700; font-size:13px; color:var(--olive-dark); letter-spacing:.04em; text-transform:uppercase; }
.timeline-item h3{ font-size:18px; margin-top:4px; }
.timeline-item .inst-logo{ height:52px; width:auto; max-width:180px; object-fit:contain; margin-top:12px; display:block; }

.card-logo-row{ display:flex; align-items:center; gap:20px; margin-top:14px; }
.card-logo-row img{ height:52px; width:auto; max-width:140px; object-fit:contain; }

/* ============================================================
   CONFIANZA / RESEÑAS (sección compacta, sin página propia)
   ============================================================ */
.trust-band{
  background:var(--navy); color:#fff; border-radius:var(--radius-lg); padding:44px;
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:24px 48px;
}
.trust-band h2, .trust-band p{ color:#fff; }
.trust-band-copy p{ color:#d9e2d3; margin-bottom:0; }
.trust-band-copy{ text-align:center; }
.trust-band-copy .rating-badge{ justify-content:center; }
.trust-band .contact-row{ justify-content:center; }

.formacion-grid{ grid-template-columns:0.85fr 1.15fr; gap:44px; align-items:center; }

.contact-location-grid{ display:grid; grid-template-columns:1fr 1fr; gap:40px; }

/* ============================================================
   SEGUROS
   ============================================================ */
.insurers-list{ display:flex; flex-wrap:wrap; gap:10px; }
.insurers-list li{
  background:var(--paper-raised); border:1px solid var(--rule); border-radius:999px;
  padding:9px 18px; font-weight:600; font-size:13.5px; color:var(--navy);
}

/* Logotipos reales de aseguradoras y métodos de pago — sin recuadro por
   logo; un solo fondo blanco cubre toda la fila. */
.logo-row{
  display:flex; flex-wrap:wrap; align-items:center; gap:24px;
  background:var(--paper-raised); border:1px solid var(--rule); border-radius:var(--radius-md);
  padding:20px 22px;
}
.logo-row img{ height:40px; width:auto; max-width:110px; object-fit:contain; }
.logo-row.logo-row--payments img{ height:30px; }

/* Galería de fotos reales del consultorio */
.office-gallery{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.office-gallery img{
  border-radius:var(--radius-md); aspect-ratio:4/5; object-fit:cover;
  box-shadow:var(--shadow-card);
}
@media (max-width:640px){ .office-gallery{ grid-template-columns:1fr 1fr; } }

/* ============================================================
   FORMACIÓN Y TRAYECTORIA — foto + cédulas + tabs
   ============================================================ */
.trayectoria-photo{
  border-radius:var(--radius-lg); overflow:hidden; box-shadow:var(--shadow-card);
  aspect-ratio:4/5; object-fit:cover; width:100%;
}
.cedulas-list{ display:flex; flex-direction:column; gap:4px; margin:14px 0 22px; }
.cedulas-list li{ font-size:14px; color:var(--ink-soft); }
.cedulas-list strong{ color:var(--navy); }

.tabs-nav{ display:flex; flex-wrap:wrap; gap:6px; border-bottom:1px solid var(--rule); margin-bottom:20px; }
.tabs-nav button{
  font-family:var(--font-body); font-weight:600; font-size:13.5px; color:var(--ink-soft);
  background:none; border:none; padding:10px 14px; cursor:pointer; border-bottom:2px solid transparent;
  margin-bottom:-1px;
}
.tabs-nav button:hover{ color:var(--navy); }
.tabs-nav button[aria-selected="true"]{ color:var(--navy); border-bottom-color:var(--olive); }
.tabs-panel{ font-size:14.5px; color:var(--ink-soft); line-height:1.65; }
.tabs-panel[hidden]{ display:none; }
.tabs-panel ul{ display:flex; flex-direction:column; gap:8px; }
.tabs-panel li{ position:relative; padding-left:18px; }
.tabs-panel li::before{ content:"—"; position:absolute; left:0; color:var(--olive-dark); font-weight:700; }

/* ============================================================
   CARRUSEL EN MARQUESINA — instituciones y seguros
   ============================================================ */
.marquee{
  overflow:hidden; -webkit-mask-image:linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
  mask-image:linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
}
/* Nota técnica: NO se usa `gap` aquí. Con contenido duplicado para el loop
   infinito, `gap` solo inserta espacio ENTRE elementos (n-1 huecos), no
   después del último — eso desincroniza el punto medio (50%) del punto
   real donde empieza la copia duplicada y se ve como un salto/corte en
   cada vuelta. Con `margin-right` en cada elemento (incluido el último de
   cada mitad) el punto medio cae exactamente donde debe, y el loop es
   perfectamente continuo. */
.marquee-track{ display:flex; align-items:center; width:max-content; animation:marquee-scroll 32s linear infinite; }
.marquee-track > *{ margin-right:36px; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track{ animation-play-state:paused; }
@keyframes marquee-scroll{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }
@media (prefers-reduced-motion: reduce){ .marquee-track{ animation:none; flex-wrap:wrap; width:100%; } }

.marquee-chip{
  flex:none; font-family:var(--font-body); font-weight:600; font-size:13.5px; color:var(--navy);
  background:var(--paper-raised); border:1px solid var(--rule); border-radius:999px; padding:10px 20px;
  white-space:nowrap;
}
/* Fondo blanco compartido por todo el carril (no por logo) — cubre tanto los
   logos con transparencia real como los que ya traen fondo blanco de fábrica,
   para que el conjunto se vea uniforme en vez de "caja dentro de caja". */
.marquee--logos{
  background:var(--paper-raised); border:1px solid var(--rule); border-radius:var(--radius-md);
  padding:22px 0;
}
.marquee-track img{
  flex:none; height:70px; width:auto; max-width:180px; object-fit:contain;
}

/* Fila estática de logotipos (sin carrusel) — para cuando ya caben todos
   uno al lado del otro sin necesidad de animación. */
.logo-static-row{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:40px;
}
.logo-static-row img{ height:64px; width:auto; max-width:170px; object-fit:contain; }

/* ============================================================
   TESTIMONIALES — reseñas reales de Google
   ============================================================ */
.testi-track{
  display:flex; gap:22px; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:6px;
  scrollbar-width:none;
}
.testi-track::-webkit-scrollbar{ display:none; }
.testi-card{
  flex:0 0 auto; width:min(360px, 82vw); scroll-snap-align:start;
  background:var(--paper-raised); border:1px solid var(--rule); border-radius:var(--radius-md);
  padding:24px; box-shadow:var(--shadow-card); display:flex; flex-direction:column; gap:12px;
}
.testi-card .stars{ font-size:14px; }
.testi-card blockquote{ margin:0; font-size:14px; line-height:1.6; color:var(--ink-soft); flex:1; }
.testi-card footer{ display:flex; align-items:center; justify-content:space-between; font-size:13px; }
.testi-card footer strong{ color:var(--navy); }
.testi-card footer a{ color:var(--olive-dark); font-weight:600; text-decoration:none; }
.testi-nav{ display:flex; gap:10px; justify-content:center; margin-top:20px; }
.testi-nav button{
  width:38px; height:38px; border-radius:50%; border:1.5px solid var(--rule); background:var(--paper-raised);
  color:var(--navy); cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.testi-nav button:hover{ border-color:var(--olive); color:var(--olive-dark); }

/* ============================================================
   ÁREAS DE ESPECIALIDAD — 3 columnas, imagen cuadrada arriba
   ============================================================ */
.specialty-rows{ display:grid; grid-template-columns:repeat(3, 1fr); gap:24px; }
.specialty-row{
  display:flex; flex-direction:column;
  background:var(--paper-raised); border:1px solid var(--rule); border-radius:var(--radius-md);
  padding:20px; box-shadow:var(--shadow-card);
}
.specialty-row img{
  width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:var(--radius-sm); display:block; margin-bottom:16px;
}
.specialty-media--placeholder{
  width:100%; aspect-ratio:1/1; border-radius:var(--radius-sm); margin-bottom:16px;
  border:1.5px dashed var(--rule-strong); display:flex; align-items:center; justify-content:center;
  color:var(--ink-faint); font-size:12px; text-align:center; padding:10px;
}
.specialty-icon{ width:34px; height:34px; margin-bottom:10px; color:var(--olive-dark); }
.specialty-icon svg{ width:100%; height:100%; stroke:currentColor; fill:none; stroke-width:1.4; }
.specialty-row h3{ font-size:19px; margin-bottom:6px; }
.specialty-row p{ font-size:14.5px; margin-bottom:10px; }
@media (max-width:900px){ .specialty-rows{ grid-template-columns:1fr 1fr; } }
@media (max-width:640px){
  .specialty-rows{ grid-template-columns:1fr; }
  .specialty-row{ align-items:center; text-align:center; }
}

/* ============================================================
   UBICACIÓN — sección creativa en Inicio
   ============================================================ */
.location-wrap{ display:grid; grid-template-columns:1.1fr 0.9fr; gap:40px; align-items:center; }
.location-collage{ position:relative; display:grid; grid-template-columns:1.3fr 1fr; grid-template-rows:1fr 1fr; gap:14px; }
.location-collage img{ border-radius:var(--radius-md); box-shadow:var(--shadow-card); object-fit:cover; width:100%; height:100%; }
.location-collage img:nth-child(1){ grid-row:1 / 3; aspect-ratio:3/4; }
.location-collage img:nth-child(2),
.location-collage img:nth-child(3){ aspect-ratio:16/10; }
@media (max-width:480px){ .location-collage{ grid-template-columns:1fr 1fr; } }
.location-info .cedulas-list{ margin:0 0 22px; }
.location-line{ display:flex; align-items:flex-start; gap:10px; margin-bottom:14px; }
.location-line svg{ width:18px; height:18px; flex:none; margin-top:3px; stroke:var(--olive-dark); fill:none; stroke-width:1.7; }
.location-line p{ margin-bottom:0; }
@media (max-width:820px){ .location-wrap{ grid-template-columns:1fr; } }

/* ============================================================
   FOOTER + FRANJA LEGAL
   ============================================================ */
.legal-strip{
  background:var(--olive-soft); border-top:1px dashed var(--olive-dark); border-bottom:1px dashed var(--olive-dark);
  padding:18px 0; font-size:13.5px; color:var(--navy);
}
.legal-strip .container{ display:flex; flex-wrap:wrap; gap:10px 30px; justify-content:space-between; }
.legal-strip strong{ font-weight:700; }

.site-footer{ background:var(--navy); color:#dfe6e0; padding:56px 0 28px; }
.site-footer h4{ color:#fff; font-family:var(--font-body); font-size:14px; letter-spacing:.05em; text-transform:uppercase; margin-bottom:14px; }
.site-footer a{ color:#c9d6cd; text-decoration:none; }
.site-footer a:hover{ color:#fff; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:32px; }
.footer-grid p, .footer-grid li{ font-size:14px; color:#b9c4bd; margin-bottom:8px; }
.footer-bottom{ margin-top:40px; padding-top:24px; border-top:1px solid rgba(255,255,255,.12); font-size:12.5px; color:#93a099; text-align:center; }

/* Íconos junto a los datos de contacto del pie de página */
.footer-line{ display:flex; align-items:flex-start; gap:9px; margin-bottom:10px; }
.footer-line svg{ width:16px; height:16px; flex:none; margin-top:2px; stroke:var(--olive); fill:none; stroke-width:1.7; }
.footer-line svg.filled{ fill:var(--olive); stroke:none; }
.footer-line p{ margin-bottom:0; }

/* ============================================================
   PÁGINAS INTERNAS (sobre-mi, servicios, contacto)
   ============================================================ */
.page-hero{ padding:52px 0 20px; }
.page-hero .eyebrow{ margin-bottom:6px; }
.page-hero h1{ font-size:clamp(28px,3.6vw,40px); }

/* Migas de pan — con enlace de regreso a cada nivel anterior */
.breadcrumb{
  display:flex; flex-wrap:wrap; align-items:center; gap:7px;
  font-family:var(--font-body); font-weight:600; font-size:12.5px; letter-spacing:.03em;
  color:var(--ink-faint); margin-bottom:14px;
}
.breadcrumb a{ color:var(--ink-faint); text-decoration:none; }
.breadcrumb a:hover{ color:var(--olive-dark); text-decoration:underline; }
.breadcrumb .sep{ color:var(--rule-strong); }
.breadcrumb [aria-current]{ color:var(--navy); }

.page-hero-grid{ display:grid; grid-template-columns:1fr 1.3fr; gap:36px; align-items:center; }
.service-photo{
  border-radius:var(--radius-lg); overflow:hidden; box-shadow:var(--shadow-card);
  aspect-ratio:4/5; object-fit:cover;
}
@media (max-width:820px){
  .page-hero-grid{ grid-template-columns:1fr; }
  .service-photo{ max-width:340px; margin:0 auto; }
  .page-hero-grid > div:first-child{ text-align:center; }
  .page-hero-grid .breadcrumb{ justify-content:center; }
}

.service-detail-grid{ display:grid; grid-template-columns:1.1fr .9fr; gap:40px; align-items:start; }
.symptom-list li{ position:relative; padding-left:26px; margin-bottom:10px; color:var(--ink-soft); }
.symptom-list li::before{ content:"—"; position:absolute; left:0; color:var(--olive-dark); font-weight:700; }

.diag-list{ display:flex; flex-wrap:wrap; gap:10px; }
.diag-list li{ background:var(--olive-soft); color:var(--navy); border-radius:8px; padding:7px 14px; font-size:13.5px; font-weight:600; }

/* Formulario de contacto */
.form-field{ display:flex; flex-direction:column; gap:6px; margin-bottom:18px; }
.form-field label{ font-weight:700; font-size:13.5px; color:var(--navy); }
.form-field input, .form-field textarea, .form-field select{
  font-family:var(--font-body); font-size:15px; padding:12px 14px; border:1.5px solid var(--rule);
  border-radius:var(--radius-sm); background:var(--paper-raised); color:var(--ink); width:100%;
}
.form-field select{
  appearance:none; padding-right:38px; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234d564f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 14px center; background-size:16px;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus{ border-color:var(--olive-dark); outline:none; }
.form-error{ font-size:12.5px; color:var(--warn); min-height:16px; }
.form-status{ font-size:14px; font-weight:600; margin-top:6px; }
.form-status.ok{ color:var(--olive-dark); }
.form-status.err{ color:var(--warn); }

.map-embed{
  border-radius:var(--radius-md); overflow:hidden; border:1px solid var(--rule); aspect-ratio:4/3;
}
.map-embed--wide{ margin-top:32px; aspect-ratio:21/7; }
@media (max-width:720px){
  .map-embed{ aspect-ratio:auto; height:350px; width:100%; }
}
.map-embed iframe{ width:100%; height:100%; border:0; }

/* ---------- Animación de entrada por scroll (GSAP), respeta reduced-motion ---------- */
.reveal{ opacity:1; }
.js-gsap-ready .reveal{ opacity:0; }

/* ---------- Responsive ---------- */
@media (max-width:900px){
  .hero-grid, .service-detail-grid{ grid-template-columns:1fr; }
  .hero-photo-wrap{ max-width:340px; margin:0 auto; }
  .footer-grid{ grid-template-columns:1fr 1fr; }
  .grid-3{ grid-template-columns:1fr 1fr; }
  /* Above-the-fold del hero centrado en móvil */
  .hero-content{ text-align:center; }
  .hero-content .rating-badge, .hero-content .contact-row{ justify-content:center; }
  .hero-sub{ margin-inline:auto; }
}
/* El menú cambia a hamburguesa antes del punto de quiebre general del
   layout: entre ~720-880px el renglón (marca + 4 enlaces + WhatsApp)
   no cabe en una sola línea y el texto se envuelve. */
@media (max-width:880px){
  .nav-links{
    position:absolute; top:100%; left:0; right:0; background:var(--paper-raised);
    flex-direction:column; align-items:stretch; padding:10px 24px 18px; gap:2px;
    border-bottom:1px solid var(--rule); display:none;
    box-shadow:0 16px 30px -18px rgba(22,50,62,.35);
  }
  .nav-links.open{ display:flex; }
  .nav-links a{ padding:16px 4px; border-bottom:1px solid var(--rule); font-size:15.5px; }
  .nav-toggle{ display:flex; }
  .nav-actions .btn-whatsapp span.long{ display:none; }
}
@media (max-width:640px){
  .rating-badge{ flex-direction:column; gap:6px; }
}
@media (max-width:720px){
  .grid-3, .grid-2{ grid-template-columns:1fr; }
  .footer-grid{ grid-template-columns:1fr; text-align:center; }
  .footer-grid > div{ display:flex; flex-direction:column; align-items:center; }
  .footer-line{ justify-content:center; text-align:left; }
  .trust-band{ flex-direction:column; align-items:center; text-align:center; }
  .trust-band .rating-badge{ justify-content:center; }
  .location-wrap{ text-align:center; }
  .location-info a.btn{ margin-inline:auto; }
  .contact-location-grid{ grid-template-columns:1fr; gap:24px; }
  .contact-location-grid .map-embed{ order:-1; }
  #procedimientos .card{ text-align:center; }
  #procedimientos .card-icon{ margin-inline:auto; }
}

/* Formación y trayectoria (Inicio) centrada en móvil */
@media (max-width:860px){
  #formacion > .container > .grid{ grid-template-columns:1fr; text-align:center; }
  #formacion .trayectoria-photo{ max-width:260px; aspect-ratio:1/1; margin:0 auto; }
  #formacion .rating-badge{ justify-content:center; }
  #formacion .tabs-nav{ justify-content:center; }
  #formacion .tabs-panel{ text-align:left; }
  #formacion .cedulas-list{ align-items:center; }
}
