/* ==========================================================================
   Dr. Luis Alejandro Novelo Rodríguez — Especialista en rodilla en Mérida
   Hoja de estilos única. Mobile first (320px) → 1440px+.
   Paleta tomada del logotipo: azul marino #1C2442 y azul #054578.
   ========================================================================== */

/* ------------------------------------------------------------- 1. Tokens */
:root {
  --navy-900: #10182F;
  --navy-800: #1C2442;
  --navy-700: #263155;
  --navy-600: #36426B;

  --blue-800: #043A66;
  --blue-700: #054578;
  --blue-600: #0A5C9E;
  --blue-500: #1476C8;
  --blue-300: #7FB4E4;
  --blue-100: #DCEAF7;
  --blue-50:  #EFF5FB;

  --ink:      #1C2442;
  --body:     #46506B;
  --muted:    #6B7590;
  --line:     #E1E8F2;
  --line-soft:#EDF2F8;
  --white:    #FFFFFF;
  --bg-soft:  #F5F8FC;

  --ok:       #128360;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(28, 36, 66, .06), 0 1px 3px rgba(28, 36, 66, .05);
  --shadow:    0 4px 16px rgba(28, 36, 66, .07);
  --shadow-md: 0 10px 30px rgba(28, 36, 66, .10);
  --shadow-lg: 0 24px 60px rgba(16, 24, 47, .16);

  --ff: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 20px;
  --maxw: 1200px;
  --header-h: 68px;
}

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

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

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

body {
  margin: 0;
  font-family: var(--ff);
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.02em;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .4em; }

strong { color: var(--ink); font-weight: 700; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--navy-800);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; color: #fff; }

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

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

.section { padding-block: 44px; }
.section--tight { padding-block: 30px; }
.section--soft { background: var(--bg-soft); }
.section--blue { background: var(--blue-50); }

.section-head { max-width: 720px; margin-bottom: 26px; }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--blue-600);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.section-title { font-size: clamp(1.55rem, 5.2vw, 2.1rem); }
.section-title .accent { color: var(--blue-600); }

.lede { font-size: 1.02rem; color: var(--body); }

/* ------------------------------------------------------------ 4. Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease,
              color .16s ease, border-color .16s ease;
}
.btn svg { flex: none; width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff;
  box-shadow: 0 6px 18px rgba(5, 69, 120, .28);
}
.btn--primary:hover { color: #fff; box-shadow: 0 10px 26px rgba(5, 69, 120, .34); }

.btn--ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { border-color: var(--blue-300); color: var(--blue-700); }

.btn--wa {
  background: #fff;
  border-color: #CDE9D6;
  color: #12784E;
  box-shadow: var(--shadow-sm);
}
.btn--wa:hover { color: #0C5C3B; border-color: #9FD6B6; }
.btn--wa svg { fill: #25D366; }

.btn--white { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-md); }
.btn--white:hover { color: var(--blue-800); }

.btn--outline-light { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn--outline-light:hover { background: rgba(255, 255, 255, .12); color: #fff; }

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

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

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-600);
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
}
.text-link::after { content: "→"; transition: transform .16s ease; }
.text-link:hover::after { transform: translateX(3px); }

/* -------------------------------------------------------- 5. Encabezado */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  text-decoration: none;
}
.brand img { height: 40px; width: auto; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--navy-800);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav { display: none; }

.site-nav__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__list a {
  display: block;
  padding: 12px 4px;
  color: var(--navy-800);
  font-weight: 600;
  font-size: .97rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
}
.site-nav__list a:hover { color: var(--blue-600); }
.site-nav__list a[aria-current="page"] { color: var(--blue-600); font-weight: 800; }

.site-nav__cta { padding-top: 16px; }

/* panel móvil abierto */
.site-nav.is-open {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  padding: 8px var(--gutter) 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

/* --------------------------------------------------------------- 6. Hero */
.hero {
  position: relative;
  padding-block: 36px 44px;
  background:
    radial-gradient(120% 90% at 88% 6%, var(--blue-100) 0%, rgba(220, 234, 247, 0) 58%),
    linear-gradient(180deg, #F7FAFD 0%, #FFFFFF 100%);
  overflow: hidden;
}
@media (max-width: 767px) {
  .hero::after { display: none; }
}

.hero::after {
  /* trama de puntos discreta, decorativa */
  content: "";
  position: absolute;
  right: -30px;
  bottom: 24px;
  width: 160px;
  height: 90px;
  background-image: radial-gradient(var(--blue-300) 1.6px, transparent 1.6px);
  background-size: 14px 14px;
  opacity: .5;
  pointer-events: none;
}

.hero__grid { display: grid; gap: 32px; position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2rem, 8.6vw, 2.6rem);
  letter-spacing: -.03em;
}
.hero h1 .accent { color: var(--blue-600); }
.hero__h1-name {
  display: block;
  margin-top: .18em;
  font-size: .6em;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--muted);
}

.hero__rule {
  width: 64px;
  height: 4px;
  margin: 18px 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-300));
}

.hero__lede { font-size: 1.05rem; max-width: 34em; }

.hero__cta { margin-top: 24px; }

.hero__media { position: relative; }
.hero__media::before {
  content: "";
  position: absolute;
  inset: auto -6% 8% -6%;
  height: 78%;
  border-radius: 50%;
  background: radial-gradient(60% 60% at 50% 50%, rgba(10, 92, 158, .16), rgba(10, 92, 158, 0) 70%);
}
.hero__photo {
  position: relative;
  width: 100%;
  border-radius: 190px 190px var(--radius-lg) var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--blue-50);
}
.hero__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 28%; }

.hero__badge {
  position: absolute;
  left: 0;
  bottom: -14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  background: #fff;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  font-size: .8rem;
  font-weight: 700;
  color: var(--navy-800);
  line-height: 1.25;
}
.hero__badge svg { flex: none; width: 26px; height: 26px; color: var(--blue-600); }
.hero__badge span { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); }

/* franja de confianza */
.trust {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
  margin-top: 60px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.trust__item { display: flex; align-items: flex-start; gap: 10px; }
.trust__item svg { flex: none; width: 22px; height: 22px; color: var(--blue-600); margin-top: 2px; }
.trust__item b { display: block; font-size: .86rem; color: var(--navy-800); line-height: 1.3; }
.trust__item span { font-size: .78rem; color: var(--muted); }

/* --------------------------------------------------- 7. Migas de pan */
.breadcrumbs {
  padding-block: 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-soft);
  font-size: .82rem;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumbs li { margin: 0; display: flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before { content: "›"; color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue-600); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--navy-800); font-weight: 700; }

/* Encabezado interior de página */
.page-head {
  padding-block: 40px 34px;
  background:
    radial-gradient(100% 120% at 92% 0%, var(--blue-100) 0%, rgba(220, 234, 247, 0) 60%),
    linear-gradient(180deg, #F7FAFD, #FFFFFF);
}
.page-head h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); }
.page-head .lede { max-width: 46em; }

/* Encabezado interior con foto al lado (una sola columna hasta 768px) */
.page-head--split { padding-bottom: 40px; }
.split--head .split__media img { aspect-ratio: 1 / 1; object-fit: cover; }
.split__media--cuadrada img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 55% 45%;
}


/* --------------------------------------------------------- 8. Tarjetas */
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }

.card {
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--blue-100); box-shadow: var(--shadow-md); }
.card h3 { font-size: 1.05rem; margin-bottom: .4em; }
.card p { font-size: .9rem; color: var(--body); }
.card .text-link { margin-top: auto; padding-top: 14px; }

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--blue-50);
  color: var(--blue-600);
}
.card__icon svg { width: 26px; height: 26px; }

.card--flat { box-shadow: none; }
.card--flat:hover { transform: none; box-shadow: var(--shadow-sm); }

/* fila con icono (columna de ventajas) */
.feature {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.feature__icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue-600);
}
.feature__icon svg { width: 21px; height: 21px; }
.feature h3 { font-size: .98rem; margin-bottom: .2em; }
.feature p { font-size: .86rem; margin: 0; }

/* ------------------------------------------------------ 9. Bloque "por qué" */
.split { display: grid; gap: 28px; align-items: center; }

.split__media { position: relative; }
.split__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  object-fit: cover;
}

.checklist { margin: 20px 0; padding: 0; list-style: none; }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: .95rem;
  color: var(--body);
}
.checklist svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--blue-600); }

/* ------------------------------------------------- 10. Listado de síntomas */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips li {
  margin: 0;
  padding: 9px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy-700);
}

/* ------------------------------------------------------------ 11. Pestañas */
.tabs__list {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs__list::-webkit-scrollbar { display: none; }

.tabs__tab {
  flex: none;
  min-height: 44px;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  color: var(--navy-700);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.tabs__tab:hover { border-color: var(--blue-300); color: var(--blue-700); }
.tabs__tab[aria-selected="true"] {
  background: var(--blue-700);
  border-color: var(--blue-700);
  color: #fff;
}

/* sin JS todos los paneles quedan visibles; con JS se ocultan los inactivos */
.tabs__panel + .tabs__panel { margin-top: 40px; }
.tabs__panel[hidden] { display: none; }

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2, .panel-head h3 { margin: 0; font-size: clamp(1.3rem, 4vw, 1.6rem); }

/* --------------------------------------------------------------- 12. FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; }

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq details[open] { border-color: var(--blue-100); box-shadow: var(--shadow-sm); }

.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  min-height: 44px;
  font-size: .98rem;
  font-weight: 700;
  color: var(--navy-800);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-right: 2.5px solid var(--blue-600);
  border-bottom: 2.5px solid var(--blue-600);
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 10px; }
.faq summary:hover { color: var(--blue-700); }
.faq__body { padding: 0 18px 18px; font-size: .93rem; }

/* ------------------------------------------------------ 13. Cita / banda */
.quote {
  position: relative;
  padding: 32px 22px;
  background: var(--blue-50);
  border-radius: var(--radius-lg);
  text-align: center;
}
.quote__mark {
  font-size: 3rem;
  line-height: .6;
  color: var(--blue-300);
  font-weight: 800;
}
.quote p {
  margin: 14px 0 12px;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--navy-800);
  line-height: 1.45;
}
.quote cite { font-style: normal; font-size: .86rem; color: var(--muted); }
.section--blue .quote { background: #fff; box-shadow: var(--shadow-sm); }
.quote__avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(28, 36, 66, .16);
}
.quote--perfil .quote__mark { font-size: 2.2rem; }


.cta-band {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--blue-700), var(--navy-800));
  color: #fff;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.cta-band h2 { color: #fff; font-size: clamp(1.3rem, 5vw, 1.6rem); margin-bottom: .3em; }
.cta-band p { color: rgba(255, 255, 255, .82); font-size: .95rem; margin: 0; }
.cta-band__actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------ 14. Sedes */
.sede {
  padding: 22px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.sede h3 { font-size: 1.05rem; margin-bottom: .5em; }
.sede dl { margin: 0; font-size: .92rem; }
.sede dt {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 14px;
}
.sede dt:first-child { margin-top: 0; }
.sede dd { margin: 2px 0 0; color: var(--body); }

.map-embed {
  margin-top: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.map-embed iframe { display: block; width: 100%; height: 320px; border: 0; }
.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  padding: 28px 20px;
  text-align: center;
  background: var(--blue-50);
}
.map-placeholder p { font-size: .88rem; color: var(--muted); margin: 0; }

/* -------------------------------------------------------- 15. Formulario */
.form-card {
  padding: 24px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form-grid { display: grid; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label {
  font-size: .86rem;
  font-weight: 700;
  color: var(--navy-800);
}
.field .hint { font-size: .78rem; color: var(--muted); }

.field input[type="text"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(20, 118, 200, .14);
  outline: none;
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #C0392B; }

.field__error {
  display: none;
  font-size: .8rem;
  font-weight: 600;
  color: #B33227;
}
.field__error.is-visible { display: block; }

.field--check {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}
.field--check .field__error { width: 100%; }
.field--check input { flex: none; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--blue-600); }
.field--check label { font-weight: 500; font-size: .86rem; color: var(--body); }

.form-note {
  margin-top: 4px;
  padding: 12px 14px;
  background: var(--blue-50);
  border-radius: 12px;
  font-size: .82rem;
  color: var(--navy-700);
}

/* --------------------------------------------------------------- 16. Pie */
.site-footer {
  margin-top: 8px;
  padding-top: 44px;
  background: var(--navy-800);
  color: rgba(255, 255, 255, .72);
  font-size: .9rem;
}
.site-footer h2, .site-footer h3 { color: #fff; }

.footer-grid { display: grid; gap: 32px; }

.footer-brand { margin-bottom: 18px; }
.footer-brand img { width: 240px; max-width: 100%; height: auto; }

.footer-col h3 {
  margin-bottom: 14px;
  font-size: .95rem;
  font-weight: 800;
}
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: rgba(255, 255, 255, .74); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }

.footer-contact li { display: flex; align-items: flex-start; gap: 10px; }
.footer-contact svg { flex: none; width: 17px; height: 17px; margin-top: 4px; color: var(--blue-300); }

.footer-legal {
  margin-top: 36px;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .78rem;
  line-height: 1.7;
}
.footer-legal p { margin: 0 0 6px; color: rgba(255, 255, 255, .55); }
.footer-legal a { color: rgba(255, 255, 255, .72); }
.footer-legal__row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; }

/* barra fija de acciones en móvil */
.action-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.action-bar .btn { min-height: 46px; padding-inline: 14px; font-size: .88rem; }
body { padding-bottom: 74px; }

/* Boton flotante de WhatsApp.
   Hasta 1023px manda la barra fija de acciones (Agendar + WhatsApp); de ahi
   en adelante esa barra se oculta y toma el relevo este boton. */
.wa-flotante {
  display: none;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 95;
  align-items: center;
  gap: 0;
  height: 58px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  background: #25D366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(18, 120, 78, .34);
  transition: gap .22s ease, padding .22s ease, box-shadow .18s ease, transform .18s ease;
}
.wa-flotante svg { flex: none; width: 30px; height: 30px; fill: #fff; }
.wa-flotante span {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  transition: max-width .22s ease;
}
.wa-flotante:hover,
.wa-flotante:focus-visible {
  color: #fff;
  gap: 10px;
  padding-right: 22px;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(18, 120, 78, .42);
}
.wa-flotante:hover span,
.wa-flotante:focus-visible span { max-width: 190px; }

/* Aparece justo donde desaparece la barra fija de acciones (1024px),
   para que nunca haya dos botones de WhatsApp a la vez. */
@media (min-width: 1024px) {
  .wa-flotante { display: inline-flex; right: 28px; bottom: 28px; }
}

/* Sin animacion de despliegue si el visitante la ha desactivado */
@media (prefers-reduced-motion: reduce) {
  .wa-flotante span { max-width: 190px; }
  .wa-flotante { gap: 10px; padding-right: 22px; }
}

/* ---------------------------------------------------------- 17. Utilidades */
.stack > * + * { margin-top: 14px; }
.mt-32 { margin-top: 26px; }
.mt-40 { margin-top: 34px; }
.center { text-align: center; }
.prose h2 { font-size: clamp(1.35rem, 4.6vw, 1.7rem); margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.08rem; margin-top: 1.5em; }
.prose p, .prose ul { max-width: 68ch; }

.note {
  padding: 16px 18px;
  background: var(--blue-50);
  border-left: 4px solid var(--blue-500);
  border-radius: 0 12px 12px 0;
  font-size: .9rem;
  color: var(--navy-700);
}

/* Hueco para una imagen que aun no esta lista (se sustituye por la definitiva) */
.media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 24px;
  text-align: center;
  color: var(--muted);
  background:
    repeating-linear-gradient(135deg, #fff 0 14px, var(--blue-50) 14px 28px);
  border: 2px dashed var(--blue-100);
  border-radius: var(--radius-lg);
}
.media-placeholder svg { width: 34px; height: 34px; color: var(--blue-300); }
.media-placeholder b { display: block; font-size: .95rem; color: var(--navy-700); }
.media-placeholder span { font-size: .82rem; }
.media-placeholder--cuadrada { aspect-ratio: 1 / 1; max-width: 440px; margin-inline: auto; }
.media-placeholder--ancha { aspect-ratio: 16 / 9; }

/* ------------------------------------------------------- 18. Breakpoints */
@media (min-width: 480px) {
  :root { --gutter: 24px; }
  .action-bar { padding-inline: 20px; }
}

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cta-band { grid-template-columns: 1fr auto; align-items: center; padding: 32px; }
}

@media (min-width: 768px) {
  body { font-size: 16.5px; }
  .section { padding-block: 56px; }
  .section--tight { padding-block: 38px; }
  .hero { padding-block: 48px 56px; }
  .hero__grid { grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center; }
  .hero__photo img { aspect-ratio: 3 / 4; }
  .hero__badge { left: -14px; bottom: 24px; }
  .trust { margin-top: 72px; padding-top: 40px; }
  .split { grid-template-columns: 1fr 1fr; gap: 40px; }
  .split--head { grid-template-columns: 1.02fr .98fr; gap: 44px; align-items: center; }
  /* la imagen cambia de lado respecto al bloque anterior */
  .split--invertido .split__media { order: -1; }
  .form-card { padding: 32px; }
  .form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid--2 .field--full { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { padding-block: 56px 46px; }
  .quote { padding: 44px 56px; }
  .quote p { font-size: 1.28rem; }
}

@media (min-width: 1024px) {
  :root { --header-h: 76px; --gutter: 32px; }

  body { padding-bottom: 0; }
  .action-bar { display: none; }

  .nav-toggle { display: none; }
  .brand img { height: 46px; }
  .site-nav { display: flex; align-items: center; }
  .site-nav__list { display: flex; align-items: center; gap: 4px; }
  .site-nav__list a {
    padding: 8px 14px;
    border-bottom: 0;
    border-radius: var(--radius-pill);
    font-size: .93rem;
  }
  .site-nav__list a:hover { background: var(--blue-50); }
  .site-nav__list a[aria-current="page"] { background: var(--blue-50); }
  .site-nav__cta { padding: 0 0 0 12px; }
  .site-nav__cta .btn { min-height: 46px; padding: 11px 20px; }

  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid { gap: 20px; }

  .section { padding-block: 64px; }
  .hero { padding-block: 56px 64px; }
  .hero__grid { grid-template-columns: 1.1fr .9fr; gap: 56px; }
  .hero h1 { font-size: clamp(2.5rem, 3.6vw, 3.2rem); }

  .split--3 { grid-template-columns: 1fr 1fr 1fr; align-items: stretch; gap: 24px; }
  .split--3 .split__media img { height: 100%; }

  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 40px; }
  .footer-legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
  .footer-legal__row { margin-top: 0; }

  .section-title { font-size: clamp(1.8rem, 2.4vw, 2.3rem); }
}

@media (min-width: 1440px) {
  :root { --maxw: 1240px; }
}

/* ----------------------------------------------------------- 19. Impresión */
@media print {
  .site-header, .action-bar, .wa-flotante, .cta-band, .site-footer { display: none; }
  body { padding: 0; color: #000; }
  .faq details { border: 0; }
}
