/* ==========================================================
   Clínica Dental Dra. Eva Martín Molina
   Paleta tomada del logotipo (marino + azul cielo) y del
   verde agua del uniforme clínico.
   ========================================================== */

/* Fuentes alojadas en la propia web (licencia SIL OFL): no se conecta con Google. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("../assets/fonts/bricolage-grotesque.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../assets/fonts/figtree.woff2") format("woff2");
}

:root {
  --ink: #0f2745;       /* texto principal */
  --navy: #12386a;       /* marino del logo */
  --navy-deep: #0b2547;  /* fondo de la sección de la doctora */
  --sky: #8cc4f0;        /* azul cielo del logo */
  --mist: #eef5fc;       /* fondo suave */
  --line: #d3e2f1;       /* bordes */
  --muted: #4a5f7a;      /* texto secundario */
  --aqua: #2fae98;       /* estado "abierto" */
  --aqua-soft: #c9efe7;
  --white: #ffffff;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.625rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4: clamp(2.3rem, 1.5rem + 3.4vw, 3.9rem);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 9vw, 128px);
  --radius: 14px;
  --radius-lg: 28px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
figure { margin: 0; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  color: var(--navy);
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white);
  padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Botones y enlaces ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 2px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  font: 600 var(--step-0)/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--white); }

.btn-small { min-height: 42px; padding: 0 18px; font-size: 0.975rem; }

.text-link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--sky);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.text-link:hover { text-decoration-color: var(--navy); }

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img { width: 62px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.12rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.brand-sub { font-size: var(--step--1); color: var(--muted); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
}
.site-nav a:not(.btn) {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink);
  padding: 6px 0;
  background: linear-gradient(var(--sky), var(--sky)) left bottom / 0 2px no-repeat;
  transition: background-size .25s ease;
}
.site-nav a:not(.btn):hover { background-size: 100% 2px; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 0; border-radius: 12px;
  background: var(--mist);
  cursor: pointer;
  position: relative;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: absolute;
  left: 50%;
  width: 20px; height: 2px;
  margin-left: -10px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle-bars { top: 50%; margin-top: -1px; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(40px, 6vw, 88px) clamp(64px, 8vw, 112px);
  background:
    linear-gradient(180deg, var(--white) 0%, var(--mist) 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 20px;
}
.hero-kicker::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--sky);
  border-radius: 2px;
}

.hero h1 {
  font-size: var(--step-4);
  font-weight: 640;
  line-height: 1.04;
  letter-spacing: -0.032em;
  max-width: 15ch;
  margin-bottom: 24px;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--muted);
  max-width: 36ch;
  margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-media { position: relative; }

/* Forma inspirada en la curva del logotipo: una gran esquina redondeada
   que "barre" la foto, con un bloque azul cielo desplazado detrás. */
.hero-photo {
  position: relative;
  aspect-ratio: 4 / 4.4;
  border-radius: 46% 28px 28px 28px / 38% 28px 28px 28px;
  overflow: hidden;
  background: var(--sky);
  box-shadow: 0 30px 60px -30px rgba(15, 39, 69, 0.45);
}
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 72% 50%;
}
.hero-media::before {
  content: "";
  position: absolute;
  inset: 8% -9% -7% 14%;
  border-radius: 46% 28px 28px 28px / 38% 28px 28px 28px;
  background: var(--sky);
  opacity: .55;
  z-index: -1;
}
.hero-media { isolation: isolate; }

.status {
  position: absolute;
  left: clamp(-28px, -2vw, -12px);
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 16px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 18px 40px -18px rgba(15, 39, 69, 0.4);
  max-width: calc(100% - 24px);
}
.status-dot {
  flex: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #b9c6d6;
  box-shadow: 0 0 0 5px #e6edf5;
}
.status.is-open .status-dot {
  background: var(--aqua);
  box-shadow: 0 0 0 5px var(--aqua-soft);
  animation: pulse 2.4s ease-in-out infinite;
}
.status-text { display: flex; flex-direction: column; line-height: 1.3; }
.status-text strong { color: var(--navy); font-weight: 650; }
.status-text span { color: var(--muted); font-size: var(--step--1); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 5px var(--aqua-soft); }
  50% { box-shadow: 0 0 0 9px rgba(201, 239, 231, 0.35); }
}

/* ---------- Secciones ---------- */

.section { padding-block: var(--section); }

.section h2 {
  font-size: var(--step-3);
  font-weight: 640;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

/* ---------- Tratamientos ---------- */

.treat-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.treat-intro {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}
.treat-intro h2 { margin-bottom: 20px; }
.treat-intro p { color: var(--muted); max-width: 34ch; margin-bottom: 24px; }

.treat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.treat { border-bottom: 1px solid var(--line); }

.treat summary {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name icon" "short icon";
  column-gap: 24px;
  row-gap: 4px;
  padding: 26px 4px;
  cursor: pointer;
  list-style: none;
}
.treat summary::-webkit-details-marker { display: none; }

.treat-name {
  grid-area: name;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.018em;
  line-height: 1.2;
  transition: color .2s ease;
}
.treat-short { grid-area: short; color: var(--muted); }

.treat-icon {
  grid-area: icon;
  align-self: center;
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  transition: background-color .2s ease, border-color .2s ease, transform .3s ease;
}
.treat-icon::before, .treat-icon::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 2px;
  margin: -1px 0 0 -7px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .3s ease, background-color .2s ease;
}
.treat-icon::after { transform: rotate(90deg); }

.treat summary:hover .treat-icon { border-color: var(--navy); }
.treat details[open] .treat-icon { background: var(--navy); border-color: var(--navy); transform: rotate(180deg); }
.treat details[open] .treat-icon::before,
.treat details[open] .treat-icon::after { background: var(--white); }
.treat details[open] .treat-icon::after { transform: rotate(0deg); }

.treat-body {
  padding: 0 72px 28px 4px;
  max-width: 62ch;
}
.treat-body p:last-child { margin-bottom: 0; }

/* ---------- Doctora ---------- */

.doctor {
  background: var(--navy-deep);
  color: #dbe7f5;
}
.doctor h2 { color: var(--white); margin-bottom: 16px; }

.doctor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.doctor-photo {
  border-radius: var(--radius-lg) var(--radius-lg) 46% var(--radius-lg) / var(--radius-lg) var(--radius-lg) 38% var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 10 / 9;
}
.doctor-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

.doctor-lead {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.4;
  color: var(--sky);
  margin-bottom: 24px;
  max-width: 30ch;
}
.doctor-copy > p:not(.doctor-lead) { max-width: 52ch; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 36px 0 0;
  padding-top: 28px;
  border-top: 1px solid rgba(140, 196, 240, 0.25);
}
.facts dt { font-size: var(--step--1); color: #9fb5cf; margin-bottom: 4px; }
.facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}

/* ---------- Clínica y contacto ---------- */

.clinic-photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.clinic-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}
.clinic-photo figcaption {
  position: absolute;
  left: 20px; bottom: 20px;
  max-width: calc(100% - 40px);
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: var(--step--1);
}

.visit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  grid-template-areas:
    "main hours"
    "map  map";
  gap: clamp(32px, 5vw, 64px);
}
.visit-main { grid-area: main; }
.visit-main h2 { margin-bottom: 14px; }
.visit-lead { color: var(--muted); max-width: 44ch; margin-bottom: 36px; }

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
}
.contact-label {
  display: block;
  font-size: var(--step--1);
  color: var(--muted);
  margin-bottom: 4px;
}
.contact-list address { font-style: normal; margin-bottom: 8px; font-size: var(--step-1); line-height: 1.45; }
.contact-list a:not(.text-link) {
  font-size: var(--step-1);
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
}
.contact-list a:not(.text-link):hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-list .contact-big {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hours {
  grid-area: hours;
  align-self: start;
  background: var(--mist);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
}
.hours h3 { font-size: var(--step-1); font-weight: 650; margin-bottom: 16px; }
.hours table { width: 100%; border-collapse: collapse; }
.hours th, .hours td {
  text-align: left;
  vertical-align: top;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
}
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours .closed td { color: var(--muted); }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 650; color: var(--navy); }
.hours tr.is-today th::after {
  content: "Hoy";
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: 2px;
}

.map {
  grid-area: map;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 30%, rgba(140, 196, 240, .35), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(140, 196, 240, .25), transparent 40%),
    var(--mist);
  min-height: 240px;
  display: grid;
}
.map:has(iframe) { min-height: 400px; }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }
.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 32px 16px;
  color: var(--navy);
}
.map-placeholder p { margin: 0; }
.map-placeholder .btn { margin-top: 12px; }
.map-note { font-size: var(--step--1); color: var(--muted); margin-top: 4px !important; }

/* ---------- Pie ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 48px;
  font-size: var(--step--1);
  color: var(--muted);
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 32px 48px;
  align-items: start;
}
.footer-brand { display: flex; align-items: flex-start; gap: 16px; }
.footer-brand img { width: 54px; margin-top: 4px; }
.footer-brand p { margin: 0; line-height: 1.6; }
.footer-brand a { color: var(--navy); font-weight: 600; text-decoration: none; }
.footer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.footer-h { margin: 0 0 10px; font-weight: 650; color: var(--navy); }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-cols a { text-decoration: none; color: var(--ink); }
.footer-cols a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 4px; }

.footer-legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  margin: 8px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.footer-legal p { margin: 0; }
.footer-legal nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-legal a { color: var(--muted); }
.footer-legal a:hover { color: var(--navy); }
.footer-reg { width: 100%; }

.treat-body .text-link { display: inline-block; margin-top: 14px; }

/* ---------- Páginas de tratamiento ---------- */

.page-hero {
  background: linear-gradient(180deg, var(--white) 0%, var(--mist) 100%);
  padding-block: clamp(28px, 4vw, 48px) clamp(48px, 6vw, 80px);
}
.page-hero h1 {
  font-size: var(--step-4);
  font-weight: 640;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin: 20px 0 20px;
}
.page-hero .lead { max-width: 48ch; }

.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: var(--step--1);
  color: var(--muted);
}
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--line); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--navy); }
.crumbs [aria-current] { color: var(--ink); }

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
  padding-block: clamp(48px, 6vw, 80px);
}

.prose { max-width: 68ch; }
.prose h2 {
  font-size: var(--step-2);
  font-weight: 640;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 48px 0 14px;
}
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--navy); text-decoration-color: var(--sky); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.prose strong { color: var(--navy); font-weight: 650; }
.prose-note { margin-top: 40px; font-size: var(--step--1); color: var(--muted); }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: paso;
  display: grid;
  gap: 4px;
}
.steps li {
  counter-increment: paso;
  position: relative;
  padding: 0 0 20px 56px;
  margin: 0;
}
.steps li::before {
  content: counter(paso);
  position: absolute;
  left: 0; top: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font: 650 1rem/36px var(--font-display);
  text-align: center;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px; top: 42px; bottom: 4px;
  width: 2px;
  background: var(--line);
}
.steps h3 { font-size: var(--step-0); font-weight: 650; margin: 6px 0 4px; }
.steps p { margin: 0; color: var(--muted); }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 40px 18px 0;
  position: relative;
  font-weight: 600;
  color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  font: 400 1.5rem/1 var(--font-body);
  color: var(--navy);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 20px; color: var(--muted); }

.page-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.aside-card {
  background: var(--mist);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  gap: 16px;
}
.aside-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 650;
  color: var(--navy);
}
.status-inline {
  position: static;
  box-shadow: none;
  max-width: none;
  padding: 12px 14px;
}
.btn-block { width: 100%; justify-content: center; }
.aside-card address { font-style: normal; line-height: 1.5; }
.aside-card .text-link { justify-self: start; }
.aside-hours { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.aside-hours th, .aside-hours td {
  text-align: left;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  vertical-align: top;
}
.aside-hours td { text-align: right; font-variant-numeric: tabular-nums; }
.aside-hours tr:last-child th, .aside-hours tr:last-child td { border-bottom: 0; }
.aside-hours .closed td { color: var(--muted); }
.aside-hours tr.is-today th, .aside-hours tr.is-today td { font-weight: 650; color: var(--navy); }
.aside-doc { margin: 0; font-size: var(--step--1); color: var(--muted); }

.related {
  background: var(--mist);
  padding-block: clamp(48px, 6vw, 80px);
}
.related h2 { font-size: var(--step-2); font-weight: 640; margin-bottom: 20px; }
.related-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.related-list a,
.treat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 22px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .2s ease;
}
.related-list a:hover, .treat-card:hover { border-color: var(--navy); }
.related-name, .treat-card-name {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 620;
  color: var(--navy);
}
.related-short, .treat-card-short { color: var(--muted); }

.treat-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.treat-card { padding: 28px; gap: 8px; }
.treat-card-more {
  margin-top: auto;
  padding-top: 12px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--sky);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* ---------- Blog ---------- */

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  color: var(--muted);
  font-size: var(--step--1);
}
.post-meta time { font-weight: 600; color: var(--navy); }

.prose h3 { font-size: var(--step-1); font-weight: 650; margin: 32px 0 10px; }
.prose ol { padding-left: 1.4em; margin: 0 0 1em; }

.post-cta {
  margin-top: 48px;
  padding: clamp(20px, 3vw, 28px);
  background: var(--mist);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
}
.post-cta p { margin-bottom: 8px; }
.post-cta p:last-child { margin-bottom: 0; }
.post-cta-title { font-family: var(--font-display); font-size: var(--step-1); font-weight: 650; color: var(--navy); }
.post-cta-links { font-weight: 600; }

.post-cards .related-name { font-size: var(--step-0); line-height: 1.3; margin: 2px 0 4px; }
.post-card-date { font-size: var(--step--1); color: var(--muted); }

.section-blog { padding-block: clamp(48px, 6vw, 80px); }
.section-blog h2 { font-size: var(--step-2); font-weight: 640; margin-bottom: 20px; }
.home-blog { background: var(--mist); }
.home-blog h2 { font-size: var(--step-3); }

.blog-index { padding-block: clamp(40px, 5vw, 64px) var(--section); }
.blog-index .post-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 36px;
}
.pager-info { color: var(--muted); font-size: var(--step--1); }

/* ---------- Páginas legales ---------- */

.header-back { font-weight: 600; color: var(--navy); text-decoration: none; }
.header-back:hover { text-decoration: underline; text-underline-offset: 4px; }

.legal {
  padding-block: clamp(48px, 7vw, 96px) var(--section);
}
.legal .wrap { max-width: 780px; }
.legal h1 {
  font-size: var(--step-3);
  font-weight: 640;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.legal-updated { color: var(--muted); margin-bottom: 40px; }
.legal h2 {
  font-size: var(--step-1);
  font-weight: 650;
  margin: 44px 0 12px;
}
.legal p, .legal li { max-width: 68ch; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--navy); text-decoration-color: var(--sky); text-underline-offset: 3px; }

.legal-data {
  margin: 0 0 8px;
  padding: clamp(20px, 3vw, 32px);
  background: var(--mist);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 28px;
}
.legal-data dt { color: var(--muted); }
.legal-data dd { margin: 0; font-weight: 500; }

/* ---------- Barra de llamada (solo móvil) ---------- */

.call-bar { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid,
  .treat-grid,
  .doctor-grid { grid-template-columns: 1fr; }

  .hero-media { max-width: 560px; }
  .hero-photo { aspect-ratio: 4 / 3.4; }

  .treat-intro { position: static; }

  .visit-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "main" "hours" "map";
  }

  .page-grid { grid-template-columns: 1fr; }
  .page-aside { position: static; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  :root { --header-h: 66px; }

  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(15, 39, 69, 0.3);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .site-nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: opacity .2s ease, transform .2s ease;
  }
  .site-nav a:not(.btn) {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    background: none;
    font-size: var(--step-1);
  }
  .site-nav .btn { margin-top: 20px; justify-content: center; min-height: 52px; }

  .brand img { width: 52px; }
  .brand-name { font-size: 1rem; }

  .call-bar {
    position: fixed;
    left: 12px; right: 12px; bottom: 12px;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    transition: transform .3s ease, opacity .3s ease;
  }
  .call-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 54px;
    border-radius: 999px;
    border: 2px solid var(--navy);
    background: var(--navy);
    color: var(--white);
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 16px 32px -12px rgba(11, 37, 71, 0.6);
  }
  .call-bar .call-wa { background: var(--white); color: var(--navy); }
  .call-bar.is-hidden {
    transform: translateY(140%);
    opacity: 0;
    pointer-events: none;
  }
  .site-footer { padding-bottom: 104px; }
}

@media (max-width: 560px) {
  .hero h1 { letter-spacing: -0.025em; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .blog-index .post-cards { grid-template-columns: 1fr; }
  .hero-media::before { inset: 8% -6% -5% 12%; }
  .status { left: 12px; bottom: 12px; }

  .treat summary { column-gap: 16px; padding-block: 22px; }
  .treat-icon { width: 38px; height: 38px; }
  .treat-body { padding-right: 4px; }

  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:last-child { grid-column: 1 / -1; }

  .clinic-photo { aspect-ratio: 4 / 3; }
  .clinic-photo figcaption { left: 12px; bottom: 12px; max-width: calc(100% - 24px); }

  .footer-inner { grid-template-columns: 1fr; }

  .legal-data { grid-template-columns: 1fr; gap: 2px; }
  .legal-data dd { margin-bottom: 10px; }
}

@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;
  }
}
