/* QuiroActiva — estética alineada con quiroactiva.com (Neve + marca)
   Colores tomados del sitio en vivo; estructura/SEO de la web estática. */
:root {
  /* Marca live (Neve accents) */
  --brand-blue: #506eb4;
  --brand-blue-dark: #3f5a96;
  --brand-blue-deep: #2f4578;
  --brand-green: #0ab42d;
  --brand-green-dark: #089424;
  --brand-green-deep: #06751c;
  /* Tokens de componentes (nombres legacy --teal*) */
  --teal-50: #eefaf0;
  --teal-100: #d4f5db;
  --teal-200: #a8eab6;
  --teal-500: #1fc43f;
  --teal-600: #0ab42d;
  --teal-700: #0ab42d;
  --teal-800: #089424;
  --teal-900: #06751c;
  --ink: #2c2c2c;
  --ink-soft: #333333;
  /* #4a4a4a ≈ 9.7:1 on white — better WCAG for body secondary text */
  --muted: #4a4a4a;
  --line: #e8e8e8;
  --bg: #ffffff;
  --bg-alt: #f8f8f8;
  --dark: #0d1821;
  --white: #ffffff;
  --shadow: 0 8px 28px -10px rgba(13, 24, 33, 0.18);
  --shadow-sm: 0 3px 12px -4px rgba(13, 24, 33, 0.12);
  --radius: 6px;
  --radius-sm: 4px;
  --max: 1170px;
  --font: "Roboto", "Roboto Fallback", Arial, Helvetica, system-ui, sans-serif;
  --display: "Roboto Slab", "Roboto Slab Fallback", Georgia, "Times New Roman", serif;
  --header-h: 78px;
  --topbar-h: 38px;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Fallback metric tuning: Arial ≈ Roboto so font-display swap barely shifts layout. */
@font-face {
  font-family: "Roboto Fallback";
  src: local("Arial"), local("Helvetica"), local("sans-serif");
  size-adjust: 100%;
  ascent-override: 92%;
  descent-override: 23%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Roboto Slab Fallback";
  src: local("Georgia"), local("Times New Roman"), local("serif");
  size-adjust: 98%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

a {
  color: var(--brand-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand-green);
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

h1 {
  font-family: var(--display);
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  letter-spacing: 0;
  color: var(--brand-blue-deep);
}

h2 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  letter-spacing: 0;
  color: var(--brand-blue-deep);
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
}

ul, ol {
  margin: 0;
  padding: 0;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.narrow {
  width: min(100% - 2rem, 760px);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Topbar */
.topbar {
  background: var(--dark);
  /* Lighter text on near-black for a11y contrast */
  color: #e8eef2;
  font-size: 0.82rem;
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
}

.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  padding: 0.45rem 0;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.topbar a {
  color: #f1f5f9;
  text-decoration: none;
}

.topbar a:hover {
  color: #fff;
}

.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.topbar__sep {
  opacity: 0.4;
}

.topbar__cta {
  margin-left: auto;
  font-weight: 600;
  color: var(--teal-200) !important;
}

@media (max-width: 720px) {
  .topbar__sep,
  .topbar__item:nth-child(3) {
    display: none;
  }
  .topbar__cta {
    margin-left: 0;
  }
}

/* Header — sticky; hide on scroll down / show on scroll up via JS */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.2s ease;
  will-change: transform;
}

.header.is-scrolled {
  box-shadow: 0 2px 12px rgba(13, 24, 33, 0.08);
}

.header.is-header-hidden {
  transform: translate3d(0, -100%, 0);
  box-shadow: none;
  pointer-events: none;
}

body.nav-open .header.is-header-hidden {
  transform: none;
  pointer-events: auto;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  /* Reserve space so logo decode doesn't shift header (CLS) */
  min-height: 46px;
  min-width: 140px;
  flex-shrink: 0;
}

.logo__img {
  height: 46px;
  width: auto;
  max-width: min(220px, 55vw);
  display: block;
  object-fit: contain;
}

.logo__mark {
  color: var(--teal-700);
  flex-shrink: 0;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo__text strong {
  font-size: 1.15rem;
  font-weight: 700;
}

.logo__text small {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.logo--light {
  color: #fff;
}

.logo--light .logo__mark {
  color: var(--teal-200);
}

.logo--light .logo__text small {
  color: #94a3b8;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.1rem;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav a:not(.btn):hover {
  color: var(--brand-green);
}

.nav__cta {
  margin-left: 0.35rem;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: calc(var(--topbar-h) + var(--header-h)) 0 auto 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav__cta {
    margin: 0.75rem 0 0;
    text-align: center;
  }
}

/* Buttons — estilo live: radio 4px, CTA verde, mayúsculas suaves */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-transform: capitalize;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: scale(1.03);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
}

.btn--lg {
  padding: 0.9rem 1.65rem;
  font-size: 1rem;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: var(--brand-green);
  color: #fff !important;
  box-shadow: 0 6px 16px -8px rgba(10, 180, 45, 0.55);
}

.btn--primary:hover {
  background: var(--brand-green-dark);
  color: #fff !important;
}

.btn--ghost {
  background: transparent;
  color: var(--brand-blue-deep) !important;
  border-color: #cfd6e4;
}

.btn--ghost:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue) !important;
  background: rgba(80, 110, 180, 0.06);
}

.btn--white {
  background: #fff;
  color: var(--brand-blue-deep) !important;
}

.btn--white:hover {
  background: #f0f4fa;
  color: var(--brand-blue-deep) !important;
}

.btn--outline-white {
  background: transparent;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn--outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff !important;
}

/* Hero — layout tipo live: copy a la izquierda + foto doctor */
.hero {
  position: relative;
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
  background: linear-gradient(180deg, #f4f7fb 0%, #ffffff 70%);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 100% 40%, rgba(80, 110, 180, 0.12), transparent 60%),
    radial-gradient(ellipse 40% 50% at 0% 80%, rgba(10, 180, 45, 0.06), transparent 55%);
  z-index: 0;
  pointer-events: none;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 2rem 3rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-green);
  margin: 0 0 0.85rem;
}

.hero h1 {
  margin-bottom: 0.85rem;
  max-width: 18ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--brand-green);
  font-weight: 600;
}

.hero__lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero__trust {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.hero__trust li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.hero__trust strong {
  display: block;
  color: var(--brand-blue-deep);
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
}

/* Foto del doctor en hero (como en live) */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero__photo-wrap {
  position: relative;
  width: min(100%, 380px);
  /* Fixed box before LCP image paints — critical for mobile CLS */
  aspect-ratio: 573 / 1024;
  max-height: 520px;
  margin-inline: auto;
  /* Avoid layout jump if max-height wins over aspect-ratio */
  contain: layout paint;
  overflow: hidden;
}

.hero__photo {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  /* Override global img height:auto — fill reserved wrap */
  aspect-ratio: auto;
  filter: drop-shadow(0 18px 30px rgba(13, 24, 33, 0.18));
}

.hero__card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow);
  margin-top: 1rem;
}

.hero__card h2 {
  font-family: var(--font);
  font-size: 1.2rem;
  color: var(--brand-blue-deep);
  margin-bottom: 0.4rem;
}

.hero__card > p {
  color: var(--muted);
  font-size: 0.92rem;
}

.check-list {
  list-style: none;
  margin: 1rem 0 1.25rem;
}

.check-list li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.7rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--teal-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%230ab42d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E") center/12px no-repeat;
}

.hero__card-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.75rem 0 0;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero h1,
  .hero__lead {
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__trust {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }

  .hero__photo-wrap {
    /* Smaller reserved box on mobile = less viewport shift if anything reflows */
    width: min(58vw, 240px);
    max-height: min(42vh, 340px);
    margin-inline: auto;
  }
}

/* Strip */
.strip {
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 1.5rem 0;
}

.strip__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.strip__item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.strip__icon {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand-blue);
  line-height: 1;
  min-width: 1.6rem;
}

.strip__item strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.strip__item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .strip__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .strip__grid {
    grid-template-columns: 1fr;
  }
}

/* Sections */
.section {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section--dark {
  background: linear-gradient(160deg, var(--dark) 0%, #152433 55%, #1a3a28 100%);
  color: #c5cdd4;
}

.section__header {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section__header--light .eyebrow {
  /* Brighter on dark section for contrast */
  color: #a8f0b6;
}

.section__header--light h2 {
  color: #fff;
}

.section__header--center {
  text-align: center;
  margin-inline: auto;
}

.section__intro {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

.section--dark .section__intro {
  color: #94a3b8;
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.4rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(80, 110, 180, 0.35);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: rgba(80, 110, 180, 0.1);
  color: var(--brand-blue);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.45rem;
}

.card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

@media (max-width: 1000px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Split */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}

.split__text p {
  max-width: 36rem;
}

.highlight-line {
  background: var(--teal-50);
  border-left: 4px solid var(--teal-600);
  padding: 0.9rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
}

.split__panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.factor-list {
  list-style: none;
  display: grid;
  gap: 1.1rem;
  margin-top: 1.25rem;
}

.factor-list li {
  display: grid;
  gap: 0.25rem;
  padding-left: 1rem;
  border-left: 3px solid var(--teal-500);
}

.factor-list strong {
  color: var(--ink);
}

.factor-list span {
  font-size: 0.92rem;
  color: var(--muted);
}

@media (max-width: 800px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* Steps — 3 etapas (estilo image-box del sitio live) */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: none;
  margin-bottom: 2.5rem;
}

.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.5rem 1.75rem;
  position: relative;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}

.step:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}

.step__icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.15rem;
  display: grid;
  place-items: center;
}

.step__icon img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.step__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: var(--display);
  font-size: 1.1rem;
  margin: 0 auto 1rem;
}

.step h3 {
  color: var(--brand-blue-deep);
  margin-bottom: 0.65rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 800px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.banner-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-deep) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
}

.banner-cta h3 {
  color: #fff;
  font-family: var(--font);
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.banner-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.banner-cta .btn--primary {
  background: var(--brand-green);
  color: #fff !important;
  box-shadow: none;
}

.banner-cta .btn--primary:hover {
  background: var(--brand-green-dark);
}

/* Why */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.why-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.why-card h3 {
  color: #fff;
  font-size: 1.05rem;
}

.why-card p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.93rem;
}

@media (max-width: 800px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 801px) and (max-width: 1000px) {
  .why-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Doctor */
.doctor {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3rem;
  align-items: center;
}

.doctor__visual {
  position: relative;
}

.doctor__frame {
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, #e8eef8, #f8f8f8);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: end center;
}

.doctor__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  aspect-ratio: auto;
}

.doctor__placeholder {
  text-align: center;
  padding: 2rem;
  color: var(--brand-blue-deep);
}

.doctor__initials {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 700;
}

.doctor__placeholder p {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

.doctor__badge {
  position: absolute;
  left: -0.5rem;
  bottom: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  z-index: 1;
}

.doctor__badge span {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brand-green);
  line-height: 1;
}

.doctor__badge small {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.25;
}

.doctor__role {
  color: var(--brand-blue);
  font-weight: 600;
  margin-bottom: 1rem;
}

.cred-list {
  list-style: none;
  margin: 1.25rem 0 1.75rem;
  display: grid;
  gap: 0.55rem;
}

.cred-list li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.95rem;
}

.cred-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-green);
  font-weight: 700;
}

@media (max-width: 800px) {
  .doctor {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .doctor__frame {
    aspect-ratio: 16 / 11;
  }

  .doctor__badge {
    left: 0.75rem;
  }
}

/* Mission vision */
.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.mv-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.mv-card p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 700px) {
  .mv-grid {
    grid-template-columns: 1fr;
  }
}

/* Testimonials */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.quote {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quote blockquote {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.quote figcaption {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
}

.quote figcaption::before {
  content: "— ";
  color: var(--teal-600);
}

@media (max-width: 900px) {
  .testimonials {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .testimonials {
    grid-template-columns: 1fr;
  }
}

/* Sede */
.sede {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.info-list {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.info-list li {
  display: grid;
  gap: 0.2rem;
}

.info-list strong {
  color: var(--ink);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.info-list a {
  text-decoration: none;
  font-weight: 600;
}

.sede__hours-title {
  font-family: var(--font);
  font-size: 1rem;
  margin: 1.5rem 0 0.75rem;
}

.hours {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}

.hours th,
.hours td {
  text-align: left;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.hours th {
  font-weight: 600;
  color: var(--ink);
  width: 35%;
}

.hours td {
  color: var(--muted);
}

.sede__map-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--line);
  /* Reserve map area so iframe load does not shift layout */
  aspect-ratio: 16 / 10;
  min-height: 280px;
  contain: layout paint;
}

.sede__map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  display: block;
  pointer-events: none;
}

.sede__map-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  cursor: pointer;
  background: transparent;
  text-indent: -9999px;
  overflow: hidden;
}

.sede__map-badge {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  z-index: 3;
  pointer-events: none;
  background: rgba(13, 24, 33, 0.92);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border-radius: 4px;
  box-shadow: 0 6px 16px -6px rgba(15, 23, 42, 0.45);
}

.map-actions {
  margin: 0.85rem 0 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.map-note {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

@media (max-width: 800px) {
  .sede {
    grid-template-columns: 1fr;
  }
}

/* FAQ */
.faq {
  display: grid;
  gap: 0.65rem;
}

.faq__item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 1.15rem;
}

.faq__item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--ink);
  padding: 1.1rem 0;
  position: relative;
  padding-right: 2rem;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.35rem;
  color: var(--teal-700);
  font-weight: 500;
}

.faq__item[open] summary::after {
  content: "−";
}

.faq__a {
  padding: 0 0 1.1rem;
  border-top: 1px solid var(--line);
}

.faq__a p {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Family split (estilo live) */
.family {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.family .mv-grid {
  grid-template-columns: 1fr;
}

.family__img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-sm);
  background: var(--bg-alt);
}

@media (max-width: 800px) {
  .family {
    grid-template-columns: 1fr;
  }
}

/* Final CTA */
.final-cta {
  background: linear-gradient(120deg, var(--dark) 0%, #1a2d48 45%, #145c28 100%);
  color: #fff;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  text-align: center;
}

.final-cta h2 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.final-cta p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

.final-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Footer */
.footer {
  background: var(--dark);
  color: #94a3b8;
  padding: 3.5rem 0 1.5rem;
  font-size: 0.95rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer h3 {
  color: #fff;
  font-family: var(--font);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.footer__brand p {
  margin: 1rem 0 0;
  max-width: 22rem;
  font-size: 0.92rem;
}

.footer__links {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.footer__links a {
  color: #94a3b8;
  text-decoration: none;
}

.footer__links a:hover {
  color: #fff;
}

.footer__bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
}

.footer__bottom p {
  margin: 0;
}

.footer__seo {
  color: #64748b;
  max-width: 36rem;
}

@media (max-width: 800px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ========== Premium scroll reveals (opacity + transform only) ========== */
.reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

.reveal--delay {
  transition-delay: 0.1s;
}

.reveal-stagger > * {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.02s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.14s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.26s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.32s; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.38s; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.44s; }
.reveal-stagger.is-visible > *:nth-child(n + 9) { transition-delay: 0.48s; }

.header.is-scrolled {
  box-shadow: 0 4px 20px -8px rgba(30, 63, 122, 0.12);
}

/* Blog cluster — últimos posts en home */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.blog-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.blog-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.blog-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e8eef8;
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: auto;
  transition: transform 0.35s ease;
}

.blog-card:hover .blog-card__media img {
  transform: scale(1.04);
}

.blog-card__body {
  padding: 1.15rem 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card__date {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.blog-card h3 {
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.55rem;
  line-height: 1.35;
}

.blog-card h3 a {
  text-decoration: none;
  color: var(--brand-blue-deep);
}

.blog-card h3 a:hover {
  color: var(--brand-green);
}

.blog-card__excerpt {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--muted);
  flex: 1;
}

.blog-card__more {
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--brand-green);
}

.blog-card__more:hover {
  color: var(--brand-green-dark);
}

.blog-footer {
  margin-top: 2rem;
  text-align: center;
}

@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }
  .blog-grid .blog-card:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    justify-self: center;
    width: 100%;
  }
}

/* ========== WordPress: blog archive / single / page heroes ========== */
.page-hero {
  background: linear-gradient(180deg, #f4f7fc 0%, #fff 100%);
  padding: 2.5rem 0 1.75rem;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  margin: 0.35rem 0 0.65rem;
  color: var(--brand-blue-deep);
}

.page-hero__lead {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.page-hero--post {
  text-align: left;
}

.breadcrumbs {
  margin-bottom: 0.5rem;
}

.breadcrumbs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumbs__list li:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  opacity: 0.6;
}

.breadcrumbs a {
  color: var(--brand-blue);
  text-decoration: none;
}

.section--blog-index {
  padding-top: 2rem;
}

.blog-infinite {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  margin: 2rem 0 1rem;
  padding: 0.5rem 0 1.5rem;
}

.blog-infinite__spinner {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.blog-infinite__spinner[hidden] {
  display: none !important;
}

.blog-infinite__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-blue);
  opacity: 0.35;
  animation: qa-bounce 0.9s ease-in-out infinite;
}

.blog-infinite__dot:nth-child(2) {
  animation-delay: 0.15s;
  background: var(--brand-green);
}

.blog-infinite__dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes qa-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.3;
  }
  40% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

.blog-load-hint {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  text-align: center;
}

.blog-grid--archive {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .blog-grid--archive {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .blog-grid--archive {
    grid-template-columns: 1fr;
  }
}

.blog-card .blog-card__media:empty {
  min-height: 160px;
  background: linear-gradient(135deg, #e8eef8, #f3fbea);
}

/* Pagination */
.navigation.pagination {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
}

.navigation.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  background: #fff;
}

.navigation.pagination .page-numbers.current,
.navigation.pagination .page-numbers:hover {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Single post */
.single-post__thumb {
  margin: 1.5rem auto 0;
}

.single-post__image {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.post-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.5rem;
}

.meta-sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}

.prose,
.entry-content {
  padding: 2rem 0 1rem;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.prose > *:first-child,
.entry-content > *:first-child {
  margin-top: 0;
}

.prose h2,
.entry-content h2,
.prose h3,
.entry-content h3 {
  font-family: var(--display);
  color: var(--brand-blue-deep);
  margin-top: 1.75rem;
  line-height: 1.25;
}

.prose p,
.entry-content p {
  margin: 0 0 1.1rem;
}

.prose img,
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.prose ul,
.entry-content ul,
.prose ol,
.entry-content ol {
  margin: 0 0 1.1rem 1.2rem;
  padding: 0;
}

.prose a,
.entry-content a {
  color: var(--brand-blue);
}

.prose a:hover,
.entry-content a:hover {
  color: var(--brand-green);
}

.prose blockquote,
.entry-content blockquote {
  margin: 1.25rem 0;
  padding: 0.85rem 1.1rem;
  border-left: 4px solid var(--brand-green);
  background: var(--bg-alt);
  color: var(--ink);
}

.narrow {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.single-post__footer {
  padding-bottom: 3rem;
}

.qa-inline-cta {
  background: linear-gradient(135deg, #eef4ff, #eefaf0);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  margin: 1.5rem 0;
}

.qa-inline-cta h3 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  color: var(--brand-blue-deep);
}

.qa-inline-cta p {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.post-tags {
  font-size: 0.9rem;
  color: var(--muted);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.post-nav a {
  text-decoration: none;
  color: var(--brand-blue);
  font-weight: 600;
  font-size: 0.95rem;
}

.post-nav a:hover {
  color: var(--brand-green);
}

@media (max-width: 600px) {
  .post-nav {
    grid-template-columns: 1fr;
  }
}

/* Page content (nosotros, etc.) */
.page .entry-content,
.page-template-default .entry-content {
  padding: 2rem 0 3rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .card,
  .nav,
  .header {
    transition: none;
  }

  .header.is-header-hidden {
    transform: none !important;
    pointer-events: auto !important;
  }

  .reveal,
  .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }
}
