/* =========================================================
   Thera+Vida — global.css
   Base, header, footer, botones y bloques compartidos.
   Colores extraídos del logo.
   ========================================================= */

:root {
  --navy: #012d6e;
  --navy-deep: #021f4d;
  --teal: #00968b;
  --teal-dark: #00796f;
  --teal-hover: #006a61;
  --mist: #eef4fa;
  --teal-mist: #e8f5f3;
  --ink: #33425a;
  --muted: #5d6b80;
  --line: #d7e3ee;
  --white: #ffffff;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --content-width: 1290px;
  --edge: 20px;
  --section-pad: 96px;
  --header-h: 84px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; background: var(--mist); }
a { color: var(--teal-dark); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.08;
  margin: 0 0 .5em;
  text-wrap: balance;
  font-variant-numeric: lining-nums;
}
h1 { font-size: clamp(2.6rem, 5.4vw, 4.5rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
p { margin: 0 0 1.1em; max-width: 64ch; }
figure { margin: 0; }
strong { color: var(--navy); }

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--edge);
}
.narrow { max-width: 860px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  padding: 17px 35px;
  border-radius: 100px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-deep); }
.btn-outline { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-whatsapp { background: var(--teal-dark); color: var(--white); }
.btn-whatsapp:hover { background: var(--teal-hover); }
.btn-whatsapp::before,
.wa-float::before {
  content: "";
  width: 1.15em; height: 1.15em;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--wa-icon) center / contain no-repeat;
          mask: var(--wa-icon) center / contain no-repeat;
}
:root {
  --wa-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2Zm0 18.2a8.2 8.2 0 0 1-4.2-1.2l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2Zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8s-.4-.1-.6.1-.7.8-.8 1-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.3-.4.3-.4.7-1.3.1-.2 0-.3 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.1 5.1 0 0 0 1.1 2.7 11.6 11.6 0 0 0 4.5 4c1.7.7 2.3.8 3.2.6a2.7 2.7 0 0 0 1.8-1.2 2.2 2.2 0 0 0 .1-1.2c0-.1-.2-.2-.5-.3Z'/%3E%3C/svg%3E");
}

/* Botón de catálogo: el más visible del sitio */
.btn-catalog {
  background: var(--teal);
  color: var(--white);
  font-size: 21px;
  padding: 22px 48px;
  box-shadow: 0 14px 30px -12px rgba(0, 150, 139, .7);
}
.btn-catalog:hover { background: var(--teal-dark); box-shadow: 0 18px 34px -12px rgba(0, 121, 111, .75); }
.btn-catalog::before {
  content: "";
  width: 1.1em; height: 1.1em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A1.5 1.5 0 0 1 5.5 4H10v16H5.5A1.5 1.5 0 0 1 4 18.5v-13ZM14 4h4.5A1.5 1.5 0 0 1 20 5.5v13a1.5 1.5 0 0 1-1.5 1.5H14V4Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A1.5 1.5 0 0 1 5.5 4H10v16H5.5A1.5 1.5 0 0 1 4 18.5v-13ZM14 4h4.5A1.5 1.5 0 0 1 20 5.5v13a1.5 1.5 0 0 1-1.5 1.5H14V4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.btn-small { font-size: 15px; padding: 12px 22px; }
.btn-large { font-size: 20px; padding: 20px 44px; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 28px; }

/* ---------- Header (componente) ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  transition: background-color .25s ease, box-shadow .25s ease, height .25s ease;
}
.site-header.is-scrolled {
  background: var(--white);
  box-shadow: 0 2px 18px rgba(1, 45, 110, .08);
  --header-h: 70px;
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand img { height: 46px; width: auto; background: none; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav > a:not(.btn),
.sub-toggle {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--navy);
  text-decoration: none;
  padding: 6px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  cursor: pointer;
}
.main-nav > a:not(.btn):hover,
.main-nav > a[aria-current="page"],
.sub-toggle:hover { border-bottom-color: var(--teal); }

.has-sub { position: relative; }
.sub-toggle { display: inline-flex; align-items: center; gap: 6px; }
.sub-toggle::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}
.sub-toggle[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.sub-menu {
  list-style: none;
  margin: 0;
  padding: 10px;
  position: absolute;
  top: calc(100% + 10px);
  left: -16px;
  min-width: 290px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 20px 40px -18px rgba(1, 45, 110, .35);
  display: none;
}
.sub-menu.is-open { display: block; }
.sub-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--navy);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.35;
  text-decoration: none;
}
.sub-menu a:hover { background: var(--mist); }

.menu-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 0; border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(1, 45, 110, .12);
  cursor: pointer;
  position: relative;
}
.menu-toggle-bar,
.menu-toggle-bar::before,
.menu-toggle-bar::after {
  position: absolute; left: 13px;
  width: 20px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .2s ease;
}
.menu-toggle-bar { top: 22px; }
.menu-toggle-bar::before, .menu-toggle-bar::after { content: ""; left: 0; }
.menu-toggle-bar::before { top: -6px; }
.menu-toggle-bar::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Migas de pan ---------- */
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  padding: 0;
  margin: 0 0 22px;
  font-size: 14px;
  font-weight: 500;
}
.breadcrumbs li { display: flex; align-items: center; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin: 0 10px; color: var(--teal); }
.breadcrumbs a { color: var(--navy); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ---------- Secciones ---------- */
.section { padding: var(--section-pad) 0; }
.section-alt { background: var(--mist); }
.section-tint { background: var(--teal-mist); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.split-copy .btn { margin-top: 10px; }
.rounded {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
}
.rounded.wide { aspect-ratio: 4 / 3; }

/* Franja de valores */
.values { position: relative; margin-top: -70px; z-index: 2; }
.values-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--white);
  border-radius: 28px;
  box-shadow: 0 20px 50px -24px rgba(1, 45, 110, .25);
  padding: 26px 10px;
  max-width: calc(var(--content-width) - 40px);
}
.value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 6px 18px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  color: var(--navy);
}
.value + .value { border-left: 1px solid var(--line); }
.value svg {
  flex: none; width: 38px; height: 38px;
  fill: none; stroke: var(--teal); stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Contadores */
.counter { text-align: center; margin-top: 18px; }
.counter-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 76px;
  line-height: 1;
  color: var(--teal);
  font-variant-numeric: lining-nums tabular-nums;
}
.counter-label { display: block; font-size: 18px; font-weight: 600; color: var(--navy); margin-top: 4px; }

/* Lista con check */
.check-list { list-style: none; padding: 0; margin: 8px 0 28px; max-width: 64ch; }
.check-list li {
  position: relative;
  padding: 12px 0 12px 38px;
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
}
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: 13px;
  width: 24px; height: 24px; border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 12.5 3.5 3.5 7.5-8'/%3E%3C/svg%3E") center / 15px no-repeat,
    var(--teal);
}
.check-list a { font-weight: 600; }

/* Pasos (secuencia real) */
.steps { list-style: none; counter-reset: paso; padding: 0; margin: 10px 0 30px; }
.steps li { counter-increment: paso; position: relative; padding: 0 0 22px 64px; }
.steps li::before {
  content: counter(paso);
  position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  font-variant-numeric: lining-nums;
  color: var(--white); background: var(--teal-dark);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute;
  left: 21px; top: 48px; bottom: 4px; width: 2px; background: var(--line);
}
.steps strong { display: block; font-size: 18px; margin-bottom: 2px; }
.steps span { display: block; max-width: 58ch; }

/* Zonas de cobertura */
.zones { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.zones li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
}
.section-alt .zones li { background: var(--white); }

/* Preguntas frecuentes */
.faq { max-width: 860px; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 44px 18px 0;
  position: relative;
  font-weight: 600;
  font-size: 18px;
  color: var(--navy);
  line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute; right: 8px; top: 50%;
  width: 18px; height: 18px; margin-top: -9px;
  background:
    linear-gradient(var(--teal), var(--teal)) center / 100% 2px no-repeat,
    linear-gradient(var(--teal), var(--teal)) center / 2px 100% no-repeat;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; }

/* Banda de llamado a la acción */
.cta-band { background: var(--navy); color: #dfe8f5; text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { margin: 0 auto 26px; }
.cta-band .btn-row { justify-content: center; }
.cta-band .btn-outline { color: var(--white); box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.cta-band .btn-outline:hover { background: var(--white); color: var(--navy); }

/* Aviso médico */
.notice {
  border-left: 4px solid var(--teal);
  background: var(--teal-mist);
  padding: 18px 22px;
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  max-width: 64ch;
  margin-top: 28px;
}
.notice p { margin: 0; }

/* ---------- Footer (componente) ---------- */
.site-footer { background: var(--mist); padding: 70px 0 30px; font-size: 15px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, 1fr);
  gap: 36px;
}
.footer-logo { width: 190px; background: none; margin-bottom: 18px; }
.footer-brand p { font-size: 15px; }
.footer-col h3 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}
.footer-col h3 a { color: var(--navy); text-decoration: none; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; line-height: 1.4; }
.footer-col a { color: var(--ink); text-decoration: none; }
.footer-col a:hover { color: var(--teal-dark); text-decoration: underline; }
.footer-contact a { color: var(--navy); font-weight: 600; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: 44px;
  padding-top: 22px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.footer-bottom p { max-width: none; margin: 0 0 6px; }

/* ---------- WhatsApp flotante (componente) ---------- */
.wa-float {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 90;
  width: 60px; height: 60px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--teal-dark);
  color: var(--white);
  font-size: 30px;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .45);
  transition: transform .2s ease, background-color .2s ease;
}
.wa-float:hover { transform: scale(1.06); background: var(--teal-hover); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 1024px) {
  :root { --section-pad: 72px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .split-copy { text-align: center; }
  .split-copy p { margin-left: auto; margin-right: auto; }
  .split-copy .check-list, .split-copy .steps { text-align: left; margin-left: auto; margin-right: auto; }
  .split-copy .btn-row { justify-content: center; }
  .split .rounded { max-width: 520px; margin: 0 auto; }
  .split-reverse > figure { order: -1; }
  .values-inner { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .value:nth-child(3) { border-left: 0; }
}

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%; left: var(--edge); right: var(--edge);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 40px -20px rgba(1, 45, 110, .35);
    padding: 16px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav > a:not(.btn), .sub-toggle {
    width: 100%; text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
  }
  .sub-toggle { justify-content: space-between; }
  .sub-menu { position: static; box-shadow: none; min-width: 0; padding: 4px 0 8px 10px; }
  .main-nav .btn { margin-top: 8px; }
}

@media (max-width: 640px) {
  :root { --section-pad: 56px; --header-h: 72px; }
  body { font-size: 16px; }
  .brand img { height: 38px; }
  .btn { width: 100%; }
  .btn-catalog { font-size: 18px; padding: 20px 24px; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .values-inner { grid-template-columns: minmax(0, 1fr); padding: 10px 18px; }
  .value { justify-content: flex-start; padding: 12px 4px; }
  .value + .value { border-left: 0; border-top: 1px solid var(--line); }
  .counter-number { font-size: 64px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .wa-float { width: 54px; height: 54px; font-size: 27px; right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
