/* BIOSANEA SAC — globals.css
   Único archivo de estilos del sitio. Paleta medida del mockup (referencias/mockup_home.webp).
   Ver style_guide.md para el uso de cada token. */

:root {
  --navy: #084a71;          /* títulos */
  --navy-deep: #014b79;     /* banda inferior */
  --green: #359d21;         /* íconos, acentos, textos grandes */
  --green-btn: #2a7f1a;     /* botones con texto blanco (contraste 5:1) */
  --green-btn-hover: #226a15;
  --green-brand: #0b5b36;   /* verde del logotipo */
  --sky: #eaf5fd;           /* fondo de tarjeta de contacto */
  --mint: #f1f9f3;          /* fondo de secciones alternas */
  --ink: #1f2d38;           /* texto principal */
  --muted: #55646f;         /* texto secundario */
  --line: #d9e6ee;
  --white: #fff;
  --whatsapp: #25d366;
  --whatsapp-ink: #0b3d1f;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 28px rgba(8, 74, 113, .10);
  --shadow-lg: 0 16px 40px rgba(8, 74, 113, .16);
  --max: 1200px;
  --font-title: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.15; margin: 0; }
p { margin: 0; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px;
  font-family: var(--font-title); font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--green-btn); color: var(--white); }
.btn--primary:hover { background: var(--green-btn-hover); }
.btn--outline { background: var(--white); color: var(--green-btn); border-color: var(--green-btn); }
.btn--outline:hover { background: var(--mint); }
.btn--block { width: 100%; justify-content: center; border-radius: var(--radius-sm); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.site-header__logo img { height: 56px; width: auto; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
  font-family: var(--font-title); font-weight: 500; font-size: 16px;
  color: var(--navy); text-decoration: none; padding: 6px 0;
  border-bottom: 3px solid transparent;
}
.nav a:hover, .nav a[aria-current="true"] { border-bottom-color: var(--green); }
.site-header__cta { padding: 10px 18px; font-size: 15px; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--white); color: var(--navy); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Layout principal: contenido + columna lateral ---------- */
.top { padding: 24px 0 56px; }
.top__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }

/* Hero */
.hero {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 420px; display: flex; align-items: center;
  background: var(--sky);
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.9) 38%, rgba(255,255,255,0) 68%);
}
.hero__content { position: relative; z-index: 1; padding: 40px; max-width: 560px; }
.hero__title { font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; color: var(--navy); letter-spacing: -.5px; }
.hero__title span { display: block; color: var(--green); }
.hero__text { margin-top: 16px; font-size: 18px; color: var(--ink); max-width: 440px; }
.hero__actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  background: var(--white); color: var(--green-brand);
  border: 1px solid #cfe6d3; border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 600;
}
.hero__badge svg { width: 16px; height: 16px; color: var(--green); }

/* Encabezado de sección */
.section-head { margin-bottom: 24px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-title); font-size: 14px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: var(--green-btn);
}
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--green); }
.section-title { margin-top: 6px; font-size: clamp(26px, 3vw, 34px); font-weight: 700; color: var(--navy); }
.section-lead { margin-top: 10px; color: var(--muted); max-width: 640px; }

/* Servicios */
.services { margin-top: 48px; }
.services__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.service {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.service:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.service__img { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; }
.service__body { position: relative; padding: 36px 20px 22px; flex: 1; }
.service__icon {
  position: absolute; top: -30px; left: 18px;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--green); color: var(--white);
  display: grid; place-items: center; border: 4px solid var(--white);
}
.service__icon svg { width: 28px; height: 28px; }
.service__title { font-size: 19px; font-weight: 700; color: var(--navy); }
.service__text { margin-top: 6px; font-size: 15px; color: var(--muted); }
.service__link {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--green-btn); text-decoration: none;
}
.service__link:hover { text-decoration: underline; }

/* Columna lateral */
.aside { position: sticky; top: 96px; display: grid; gap: 22px; }
.contact-card { background: var(--sky); border-radius: var(--radius); padding: 26px 22px; }
.contact-card__title { font-size: 28px; font-weight: 700; color: var(--navy); }
.contact-card__lead { margin-top: 6px; font-size: 14px; color: var(--muted); }
.form { margin-top: 18px; display: grid; gap: 12px; }
.field { position: relative; }
.field svg {
  position: absolute; left: 14px; top: 15px; width: 18px; height: 18px;
  color: var(--navy); pointer-events: none;
}
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--white); border: 1.5px solid transparent; border-radius: var(--radius-sm);
  padding: 13px 14px 13px 42px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field select { appearance: none; cursor: pointer; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); outline: none; }
.field input[aria-invalid="true"] { border-color: #c62828; }
.form__note { font-size: 12.5px; color: var(--muted); text-align: center; }
.form__error { font-size: 13px; color: #b71c1c; min-height: 1em; }

.promo {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 420px;
  display: flex; align-items: flex-start;
}
.promo__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.55) 34%, rgba(255,255,255,0) 55%);
}
.promo__text {
  position: relative; z-index: 1; padding: 26px 22px;
  font-family: var(--font-title); font-style: italic; font-weight: 700;
  font-size: 27px; line-height: 1.2; color: var(--navy);
}
.promo__text span { color: var(--green-btn); }

/* Nosotros */
.about { background: var(--mint); padding: 72px 0; }
.about__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.about__img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.about__text p + p { margin-top: 14px; }
.about__text { margin-top: 18px; color: var(--ink); }
.checks { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks svg { width: 22px; height: 22px; color: var(--green); flex: none; margin-top: 1px; }

/* Autorización sanitaria */
.license { padding: 72px 0; }
.license__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.license__card {
  margin-top: 22px; border: 1.5px solid #cfe6d3; border-radius: var(--radius);
  padding: 22px; background: var(--white); box-shadow: var(--shadow);
}
.license__row { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.license__row:last-child { border-bottom: 0; }
.license__row dt { color: var(--muted); }
.license__row dd { margin: 0; font-weight: 600; color: var(--navy); }
.license__figure { margin: 0; }
.license__figure img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.license__figure figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }

/* Zona de atención */
.area { position: relative; min-height: 360px; display: flex; align-items: flex-end; overflow: hidden; }
.area__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.area::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(1,40,66,.85) 0%, rgba(1,40,66,.25) 60%, rgba(1,40,66,0) 100%); }
.area__content { position: relative; z-index: 1; padding: 48px 16px; color: var(--white); }
.area__title { font-size: clamp(26px, 3vw, 36px); font-weight: 700; }
.area__text { margin-top: 8px; font-size: 18px; max-width: 620px; }
.area__places { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
.area__places li { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 14px; font-size: 14px; }

/* Banda inferior */
.site-footer { background: var(--navy-deep); color: var(--white); }
.site-footer__band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: 26px 16px; }
.site-footer__item { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-size: 16px; }
.site-footer__item svg { width: 20px; height: 20px; flex: none; }
a.site-footer__item:hover { text-decoration: underline; }
.site-footer__motto { font-style: italic; opacity: .95; }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.15); padding: 16px; font-size: 13px; text-align: center; opacity: .8; }

/* Botón flotante WhatsApp */
.whatsapp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--whatsapp); color: var(--white);
  display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0,0,0,.25);
  transition: transform .2s ease;
}
.whatsapp-float:hover { transform: scale(1.06); }
.whatsapp-float svg { width: 34px; height: 34px; }

/* Página 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 16px; }
.notfound__title { font-size: 64px; color: var(--navy); }
.notfound p { margin: 12px 0 24px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .top__grid { grid-template-columns: 1fr; }
  .aside { position: static; grid-template-columns: 1fr 1fr; }
  .promo { min-height: 100%; }
}
@media (max-width: 900px) {
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about__grid, .license__grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 820px) {
  .nav-toggle { display: grid; place-items: center; }
  .site-header__cta { display: none; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .nav a:hover, .nav a[aria-current="true"] { border-bottom-color: var(--line); color: var(--green-btn); }
}
@media (max-width: 640px) {
  .site-header__logo img { height: 46px; }
  .hero { min-height: 0; flex-direction: column; align-items: stretch; }
  .hero__img { position: relative; height: 230px; order: -1; }
  .hero::after { display: none; }
  .hero__content { padding: 24px 20px 28px; }
  .hero__text { font-size: 16px; }
  .services__grid { grid-template-columns: 1fr; }
  .aside { grid-template-columns: 1fr; }
  .promo { min-height: 380px; }
  .license__row { grid-template-columns: 1fr; gap: 2px; }
  .site-footer__band { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .service, .btn, .whatsapp-float { transition: none; }
}
