/* ==========================================================================
   Clínica Qhalida — Hoja de estilos principal
   Sitio desarrollado por Brandgineers
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --brand: #7962A8;
  --brand-green: #3CA66D;
  --navy: #30253F;
  --blue: #6B5199;
  --blue-dark: #533B7D;
  --teal: #287D51;
  --teal-dark: #216641;
  --teal-light: #9AD8B4;
  --red: #B42318;

  --ink: #30253F;
  --text: #5C5566;
  --text-2: #443B50;
  --on-dark: #E0D9EC;
  --on-dark-2: #C5BCD5;

  --bg: #FFFFFF;
  --soft: #F7F5FA;
  --line: #E5DEED;
  --line-2: #D3C9E2;
  --ph: #EBE5F1;

  --tint-red: #FDECEC;
  --tint-blue: #F0EAF7;
  --tint-teal: #E9F5EE;

  --font-display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;

  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 28px;
  --r-xl: 32px;
  --pill: 999px;

  --shadow-float: 0 20px 50px rgba(10, 37, 64, 0.14);
  --shadow-soft: 0 24px 60px rgba(10, 37, 64, 0.08);

  --container: 1240px;
  --gutter: 24px;
  --section: clamp(72px, 9vw, 112px);
  --header-h: 80px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

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

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: var(--pill);
  background: var(--navy);
  color: #FFFFFF;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #FFFFFF; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Iconos (sprite inline al inicio de cada página) */
.i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i--sm { width: 16px; height: 16px; }
.i--lg { width: 26px; height: 26px; }

/* ---------- 3. Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }
.section--soft { background: var(--soft); }
.section--navy { background: var(--navy); color: #FFFFFF; }
.section--flush-top { padding-top: 0; }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.grid--5 { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 16px; }
.grid--split { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: clamp(40px, 6vw, 72px); align-items: center; }
.grid--top { align-items: start; }
.grid--tight { gap: 14px; }

/* ---------- 4. Tipografía ---------- */
.h1, .h2, .h3, .h4 { font-family: var(--font-display); color: inherit; }

.h1 {
  font-size: clamp(38px, 5.2vw, 64px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.h1--page { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -0.03em; }

.h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.h2--sm { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; letter-spacing: -0.02em; }

.h3 { font-size: 21px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.h3--lg { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; }
.h4 { font-size: 19px; line-height: 1.3; font-weight: 700; }

.eyebrow {
  display: block;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--teal);
}
.section--navy .eyebrow,
.eyebrow--light { color: var(--teal-light); }

.lead { font-size: 19px; color: var(--text); max-width: 60ch; }
.section--navy .lead,
.page-hero--navy .lead { color: var(--on-dark); }
.note { font-size: 14px; color: var(--text); }

.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head .lead { margin-top: 16px; font-size: 17px; }
.section-head--row {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.section-head--row > div { max-width: 640px; }

/* ---------- 5. Botones y enlaces ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: var(--pill);
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn--md { min-height: 48px; padding: 0 24px; }
.btn--block { width: 100%; }

.btn--primary { background: var(--teal); color: #FFFFFF; }
.btn--primary:hover { background: var(--teal-dark); color: #FFFFFF; }

.btn--outline { background: #FFFFFF; border-color: var(--line-2); color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); color: var(--ink); }

.btn--white { background: #FFFFFF; color: var(--ink); }
.btn--white:hover { background: var(--soft); color: var(--ink); }

.btn--outline-light { border-color: rgba(255, 255, 255, 0.6); color: #FFFFFF; }
.btn--outline-light:hover { border-color: #FFFFFF; background: rgba(255, 255, 255, 0.08); color: #FFFFFF; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}
.link-arrow .i { width: 18px; height: 18px; stroke-width: 2; transition: transform .2s ease; }
.link-arrow:hover .i { transform: translateX(3px); }

/* ---------- 6. Elementos ---------- */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.icon-badge--lg { width: 56px; height: 56px; border-radius: 18px; }
.icon-badge--lg .i { width: 26px; height: 26px; }
.icon-badge--red { background: var(--tint-red); color: var(--red); }
.icon-badge--blue { background: var(--tint-blue); color: var(--blue); }
.icon-badge--teal { background: var(--tint-teal); color: var(--teal); }
.icon-badge--navy { background: var(--navy); color: #FFFFFF; }
.icon-badge--solid-teal { background: var(--teal); color: #FFFFFF; }
.icon-badge--solid-blue { background: var(--blue); color: #FFFFFF; }
.icon-badge--white { background: #FFFFFF; color: var(--ink); }
.icon-badge--outline { background: #FFFFFF; border: 1.5px solid var(--line-2); color: var(--ink); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--pill);
  background: var(--soft);
  font-size: 14px;
  color: var(--text-2);
}
.tag--white { background: #FFFFFF; color: var(--teal-dark); font-weight: 700; font-size: 13px; padding: 5px 12px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--pill);
  background: #FFFFFF;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--teal-dark);
}
.pill__dot { width: 8px; height: 8px; border-radius: var(--pill); background: currentColor; }

.cat { font-size: 14px; font-weight: 700; }
.cat--red { color: var(--red); }
.cat--blue { color: var(--blue); }
.cat--teal { color: var(--teal-dark); }

.checks { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 15px; color: var(--text-2); }
.checks li { display: flex; align-items: center; gap: 8px; }
.checks .i { color: var(--teal); stroke-width: 2.2; width: 18px; height: 18px; }

/* Imagen o marcador de posición.
   Para reemplazar: cambia el <div class="ph">…</div> por <img src="…" alt="…">. */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--ph);
}
.media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media--hero { min-height: 540px; }
.media--tall { min-height: 480px; }
.media--split { min-height: 440px; }
.media--card { height: 220px; border-radius: 0; }
.media--news { height: 220px; border-radius: var(--r-md); }
.media--portrait { height: 320px; border-radius: 20px; }
.media--portrait-sm { height: 300px; border-radius: 20px; }
.media--gallery { height: 380px; border-radius: var(--r-lg); }
.media--map { height: 280px; border-radius: 0; }

.ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: #3D5468;
}
.ph .i { width: 32px; height: 32px; stroke-width: 1.6; }

/* Chips de filtro */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--pill);
  border: 1px solid var(--line-2);
  background: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.filter:hover { border-color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }

[data-cat][hidden] { display: none !important; }

/* ---------- 7. Barra superior y encabezado ---------- */
.topbar { background: var(--navy); color: var(--on-dark); font-size: 13px; }
.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 10px;
}
.topbar__group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.topbar a { color: #FFFFFF; text-decoration: none; }
.topbar a:hover { color: var(--teal-light); }
.topbar__item { display: inline-flex; align-items: center; gap: 8px; }
.topbar__item .i { width: 15px; height: 15px; }
.topbar__sep { width: 1px; height: 16px; background: rgba(255, 255, 255, 0.25); }
.topbar a.topbar__social { display: inline-flex; color: var(--on-dark); }
.topbar a.topbar__social:hover { color: #FFFFFF; }
.topbar__social .i { width: 16px; height: 16px; }
.topbar__strong { font-weight: 600; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(10, 37, 64, 0.08); }
.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo img { height: 64px; width: auto; }

.menu { display: flex; align-items: center; gap: 24px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--pill);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
.nav__link:hover { background: var(--soft); color: var(--ink); }
.nav__link[aria-current="page"] { background: var(--tint-blue); color: var(--blue); font-weight: 700; }
.menu__actions-mobile { display: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .btn .i { width: 18px; height: 18px; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--pill);
  border: 1.5px solid var(--line-2);
  background: #FFFFFF;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle .i { width: 22px; height: 22px; }
.nav-toggle .i--close { display: none; }
.nav-toggle[aria-expanded="true"] .i--menu { display: none; }
.nav-toggle[aria-expanded="true"] .i--close { display: block; }

/* ---------- 8. Hero: slider Cardiología / Respiratorio ---------- */
.hero { background: var(--soft); padding: 72px 0 120px; }

.slider { position: relative; }
.slides { display: grid; }
.slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 56px;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility 0s linear .6s;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .6s ease, visibility 0s; }

.slide__text { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.slide__text .lead { max-width: 540px; }
.slide__visual { position: relative; }

.float-card {
  position: absolute;
  left: -24px;
  bottom: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 300px;
  padding: 18px 20px;
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: var(--shadow-float);
}
.float-card__text { display: flex; flex-direction: column; line-height: 1.3; }
.float-card__label { font-size: 13px; color: var(--text); }
.float-card__value { font-weight: 700; }

/* Ilustración animada del órgano (corazón / pulmones) */
.organ {
  position: absolute;
  right: 24px;
  top: 24px;
  width: 168px;
  padding: 18px 18px 14px;
  border-radius: 24px;
  background: var(--navy);
  color: #FFFFFF;
  box-shadow: var(--shadow-float);
}
.organ svg { width: 100%; height: auto; overflow: visible; }
.organ__caption { display: block; margin-top: 8px; font-size: 13px; color: var(--on-dark); text-align: center; }
.organ__shape { fill: none; stroke: rgba(255, 255, 255, 0.92); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.organ__ecg {
  fill: none;
  stroke: var(--teal-light);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: ecg 2.6s ease-in-out infinite;
}
.organ__lungs { transform-box: view-box; transform-origin: 100px 115px; animation: breathe 4.2s ease-in-out infinite; }
.organ__air { fill: none; stroke: var(--teal-light); stroke-width: 3; stroke-linecap: round; }

@keyframes ecg {
  0% { stroke-dashoffset: 320; opacity: 1; }
  60% { stroke-dashoffset: 0; opacity: 1; }
  85% { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: 320; opacity: 0; }
}
@keyframes breathe {
  0%, 100% { transform: scale(0.94); }
  50% { transform: scale(1.04); }
}

.slider__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 40px; }
.slider__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--pill);
  border: 1.5px solid var(--line-2);
  background: #FFFFFF;
  color: var(--ink);
  cursor: pointer;
}
.slider__btn:hover { border-color: var(--ink); }
.slider__btn .i { width: 18px; height: 18px; }
.slider__btn .i--play { display: none; }
.slider__btn[aria-pressed="true"] .i--pause { display: none; }
.slider__btn[aria-pressed="true"] .i--play { display: block; }
.slider__dots { display: flex; gap: 8px; }
.slider__dot {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--pill);
  border: 1.5px solid var(--line-2);
  background: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}
.slider__dot[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }

/* ---------- 9. Accesos rápidos ---------- */
.quick { position: relative; z-index: 2; margin-top: -72px; }
.quick__panel {
  padding: 28px;
  border-radius: var(--r-lg);
  background: #FFFFFF;
  box-shadow: 0 24px 60px rgba(10, 37, 64, 0.12);
}
.quick__title { margin: 0 0 20px 4px; font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.quick__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: var(--soft);
  color: var(--ink);
  text-decoration: none;
  transition: background-color .2s ease;
}
.quick__item:hover { background: var(--tint-blue); color: var(--ink); }
.quick__text { display: flex; flex-direction: column; line-height: 1.3; }
.quick__text strong { font-weight: 700; }
.quick__text span { font-size: 14px; color: var(--text); }

/* ---------- 10. Tarjetas ---------- */
.spec-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #FFFFFF;
}
.spec-card__body { display: flex; flex-direction: column; gap: 14px; flex-grow: 1; padding: 28px; }
.spec-card__icon { position: relative; margin-top: -58px; border: 4px solid #FFFFFF; box-sizing: content-box; }
.spec-card__body > p { font-size: 16px; color: var(--text); }
.spec-card .link-arrow { margin-top: auto; padding-top: 8px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 32px;
  padding: clamp(32px, 4vw, 48px);
  border-radius: var(--r-xl);
  background: var(--navy);
  color: #FFFFFF;
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat__value { font-family: var(--font-display); font-size: 48px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stat__label { font-size: 15px; color: var(--on-dark); }

.service-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: var(--r-md);
  background: var(--soft);
}
.service-card > .i { width: 28px; height: 28px; color: var(--blue); }
.service-card p { font-size: 15px; color: var(--text); }
.service-card .tag--white { margin-top: auto; align-self: flex-start; }

.line-card {
  display: flex;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.line-card .h4 { margin-bottom: 6px; font-size: 20px; }
.line-card p { font-size: 16px; color: var(--text); }

.doctor-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: #FFFFFF;
}
.doctor-card--bordered { border: 1px solid var(--line); padding: 14px; }
.doctor-card__info { display: flex; flex-direction: column; gap: 4px; padding: 0 8px 8px; }
.doctor-card__meta { font-size: 15px; color: var(--text); }

.features { display: flex; flex-direction: column; gap: 28px; }
.feature { display: flex; gap: 18px; }
.feature .h4 { margin-bottom: 4px; }
.feature p { font-size: 16px; color: var(--text); }

.news-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}
.news-card:hover { color: var(--ink); }
.news-card:hover .news-card__title { text-decoration: underline; text-underline-offset: 4px; }
.news-card__title { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.3; }
.news-card__excerpt { font-size: 15px; color: var(--text); }

.news-featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--navy);
  color: #FFFFFF;
  text-decoration: none;
}
.news-featured:hover { color: #FFFFFF; }
.news-featured .media { min-height: 420px; border-radius: 0; }
.news-featured__body { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: clamp(32px, 5vw, 56px); }
.news-featured__badge { align-self: flex-start; padding: 6px 14px; border-radius: var(--pill); background: rgba(255, 255, 255, 0.12); font-size: 14px; font-weight: 600; }
.news-featured__title { font-family: var(--font-display); font-size: clamp(26px, 2.8vw, 38px); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.news-featured__excerpt { color: var(--on-dark); }
.news-featured .link-arrow { color: var(--teal-light); }

/* ---------- 11. Bandas CTA ---------- */
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(32px, 5vw, 56px);
  border-radius: var(--r-xl);
}
.cta > div:first-child { max-width: 620px; }
.cta .h2 { margin-bottom: 10px; }
.cta p { font-size: 18px; }
.cta--teal { background: var(--teal); color: #FFFFFF; }
.cta--teal p { color: #E2F4F3; }
.cta--soft { background: var(--soft); }
.cta--soft p { color: var(--text); }

/* ---------- 12. Encabezados de páginas internas ---------- */
.page-hero { padding: 72px 0 88px; }
.page-hero--navy { background: var(--navy); color: #FFFFFF; }
.page-hero--soft { background: var(--soft); }
.page-hero__inner { display: flex; flex-direction: column; gap: 20px; }
.page-hero .h1 { max-width: 860px; }
.page-hero .lead { max-width: 640px; }

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--text); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }
.page-hero--navy .breadcrumb ol { color: var(--on-dark-2); }
.page-hero--navy .breadcrumb a { color: var(--on-dark); }
.page-hero--navy .breadcrumb a:hover { color: #FFFFFF; }
.page-hero--navy .breadcrumb [aria-current="page"] { color: #FFFFFF; }

.anchor-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.anchor-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.anchor-nav a:hover { background: rgba(255, 255, 255, 0.16); color: #FFFFFF; }

/* ---------- 13. Servicios ---------- */
.specialty { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.specialty > p { color: var(--text); }
.conditions { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.condition {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--soft);
}
.section--soft .condition { background: #FFFFFF; }
.condition strong { font-weight: 700; }
.condition span { font-size: 15px; color: var(--text); }

.exam {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  font-weight: 600;
}
.exam__dot { width: 10px; height: 10px; border-radius: var(--pill); flex-shrink: 0; }
.exam__dot--red { background: var(--red); }
.exam__dot--blue { background: var(--blue); }
.exam__dot--teal { background: var(--teal); }
.exam-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: 14px; color: var(--text); }
.exam-legend span { display: inline-flex; align-items: center; gap: 8px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 20px; counter-reset: step; }
.step { display: flex; flex-direction: column; gap: 8px; padding-top: 22px; border-top: 2px solid rgba(255, 255, 255, 0.25); }
.step:first-child { border-top-color: var(--teal-light); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--teal-light);
}
.step p { font-size: 16px; color: var(--on-dark); }

/* ---------- 14. Nuestra Clínica ---------- */
.statement { display: flex; flex-direction: column; gap: 16px; padding: clamp(32px, 4vw, 48px); border-radius: var(--r-xl); }
.statement p { font-size: 16px; }
.statement--navy { background: var(--navy); color: #FFFFFF; }
.statement--navy p { color: var(--on-dark); }
.statement--teal { background: var(--tint-teal); }
.statement--teal .eyebrow { color: var(--teal-dark); }
.statement--teal p { color: var(--text-2); }

.value { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 24px; background: #FFFFFF; }
.value p { font-size: 16px; color: var(--text); }

.prose { display: flex; flex-direction: column; gap: 20px; color: var(--text); }
.prose .lead { color: var(--ink); }

/* ---------- 15. Código de Conducta ---------- */
.principles { display: flex; flex-direction: column; gap: 14px; }
.principle { display: flex; align-items: center; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-md); }

.doc-card { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: clamp(32px, 4vw, 44px); border-radius: var(--r-xl); }
.doc-card p { color: var(--text); }
.doc-card--soft { background: var(--soft); }
.doc-card--navy { background: var(--navy); color: #FFFFFF; }
.doc-card--navy p { color: var(--on-dark); }

/* ---------- 16. Contacto ---------- */
.contact-stack { display: flex; flex-direction: column; gap: 14px; }
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: var(--r-md);
  background: #FFFFFF;
  color: var(--ink);
  text-decoration: none;
}
a.contact-card:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.contact-card__label { font-size: 14px; color: var(--text); }
.contact-card__value { font-size: 18px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.contact-card__value--sm { font-size: 16px; }
.contact-card .icon-badge { width: 44px; height: 44px; border-radius: 12px; }

.map-card { overflow: hidden; border-radius: var(--r-md); background: #FFFFFF; }
.map-card iframe { display: block; width: 100%; height: 280px; border: 0; }
.map-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; }
.map-card__address { display: flex; flex-direction: column; line-height: 1.35; }
.map-card__address span { font-size: 15px; color: var(--text); }

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(28px, 4vw, 40px);
  border-radius: var(--r-lg);
  background: #FFFFFF;
  box-shadow: var(--shadow-soft);
}
.form__head p { margin-top: 6px; font-size: 16px; color: var(--text); }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line-2);
  background: #FFFFFF;
  font-size: 16px;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 120px; padding: 14px 16px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(11, 92, 173, 0.15); }
.field input::placeholder,
.field textarea::placeholder { color: #6B7D8F; }
.field [aria-invalid="true"] { border-color: var(--red); }
.field__error { font-size: 13px; font-weight: 600; color: var(--red); }

.consent { display: flex; gap: 10px; align-items: flex-start; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--teal); }
.consent label { font-size: 14px; line-height: 1.5; color: var(--text); }

.form__status { font-size: 15px; font-weight: 600; }
.form__status:empty { display: none; }
.form__status--ok { color: var(--teal-dark); }
.form__status--error { color: var(--red); }

.info-block { display: flex; flex-direction: column; gap: 8px; }
.info-block p { font-size: 16px; color: var(--text); }

/* ---------- 17. Pie de página ---------- */
.site-footer { background: var(--navy); color: var(--on-dark); font-size: 15px; line-height: 1.6; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: #FFFFFF; }
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 48px 40px;
  padding-block: 72px 40px;
}
.footer__brand { display: flex; flex-direction: column; gap: 20px; }
.footer__logo { display: inline-flex; align-self: flex-start; padding: 10px 14px; border-radius: 16px; background: #FFFFFF; }
.footer__logo img { height: 64px; width: auto; }
.footer__brand p { max-width: 300px; }
.footer__col { display: flex; flex-direction: column; gap: 12px; }
.footer__title { margin-bottom: 4px; font-family: var(--font-display); font-size: 15px; font-weight: 700; color: #FFFFFF; }
.footer__title--spaced { margin-top: 16px; }
.footer__contact { display: flex; gap: 10px; align-items: flex-start; }
.footer__contact .i { width: 18px; height: 18px; margin-top: 3px; color: var(--teal-light); }

.socials { display: flex; gap: 10px; }
.site-footer .socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}
.site-footer .socials a:hover { background: rgba(255, 255, 255, 0.1); }
.socials .i { width: 18px; height: 18px; }

.site-footer .libro {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 260px;
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: #FFFFFF;
  color: var(--ink);
}
.site-footer .libro:hover { color: var(--ink); background: var(--soft); }
.libro .i { width: 26px; height: 26px; color: var(--blue); }
.libro__text { display: flex; flex-direction: column; line-height: 1.25; }
.libro__text strong { font-size: 15px; }
.libro__text span { font-size: 12px; color: var(--text); }

.footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 22px;
  font-size: 13px;
  color: var(--on-dark-2);
}

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: var(--pill);
  background: var(--teal);
  color: #FFFFFF;
  box-shadow: var(--shadow-float);
}
.wa-float:hover { background: var(--teal-dark); color: #FFFFFF; }
.wa-float .i { width: 26px; height: 26px; }

/* ---------- 18. Responsive ---------- */
@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .header-actions .btn--outline { display: none; }

  .menu {
    position: absolute;
    left: calc(var(--gutter) * -1);
    right: calc(var(--gutter) * -1);
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px var(--gutter) 24px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(10, 37, 64, 0.1);
  }
  .menu.is-open { display: flex; }
  .nav { flex-direction: column; align-items: stretch; }
  .nav__link { min-height: 48px; font-size: 17px; }
  .menu__actions-mobile { display: flex; flex-direction: column; gap: 10px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .topbar__hide-sm { display: none !important; }
  .header-actions .btn--primary { display: none; }
  .logo img { height: 52px; }
  .hero { padding: 48px 0 104px; }
  .media--hero { min-height: 380px; }
  .slider__dot { padding: 0 12px; }
  .btn { white-space: normal; text-align: center; line-height: 1.2; }
  .float-card { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .organ { width: 124px; right: 12px; top: 12px; padding: 14px 14px 10px; }
  .stat__value { font-size: 40px; }
  .media--split, .media--tall { min-height: 300px; }
  .news-featured .media { min-height: 260px; }
  .wa-float { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .organ__ecg { stroke-dashoffset: 0; }
}

@media print {
  .topbar, .site-header, .wa-float, .slider__controls { display: none !important; }
  .slide { opacity: 1; visibility: visible; }
}

/* Qhalida CMS: logo palette, accessible defaults and editable imagery. */
.logo img,.footer__logo img { width:auto; object-fit:contain; max-width:200px; }
.logo img {height:68px;} .footer__logo img {height:86px; background:#fff; padding:8px; border-radius:12px;}
.cms-optional-image[src=""],.cms-optional-image:not([src]){display:none;}
a[aria-disabled="true"]{opacity:.55;cursor:default;}
.cms-empty {grid-column:1/-1; padding:24px; border:1px solid var(--line); border-radius:var(--r-sm); color:var(--text);}
.cms-article {max-width:920px; padding-block:56px;}
.cms-article__image {width:100%;max-height:500px;object-fit:cover;border-radius:22px;}
.cms-article__content img {max-width:100%;height:auto;} .cms-article__content table{width:100%;border-collapse:collapse;}
.cms-article__content td,.cms-article__content th{padding:8px;border:1px solid var(--line);}
.cms-article__summary{font-size:1.15rem;color:var(--text);} .cms-article time{display:block;margin-bottom:20px;}
