/* =========================================================================
   Clinova24 — Sitio público
   Diseño con contraste WCAG AA. Mobile-first. Variables CSS.
   ========================================================================= */

:root {
  /* Paleta — todos los pares texto/fondo verificados ≥ 4.5:1 (AA) */
  --brand-900: #0B2545;   /* navy profundo — fondo dark */
  --brand-700: #13315C;   /* navy medio */
  --brand-600: #1E40AF;   /* primario */
  --brand-500: #2563EB;   /* primario brillante */
  --brand-100: #DBEAFE;   /* tinte fondo claro */
  --brand-50:  #EFF6FF;

  --teal-600:  #0E7C86;   /* acento salud */
  --teal-100:  #CFFAFE;

  --green-600: #047857;
  --green-100: #D1FAE5;

  --amber-500: #D97706;
  --red-600:   #B91C1C;

  --ink-900:   #0F172A;   /* texto principal */
  --ink-700:   #334155;
  --ink-500:   #64748B;
  --ink-400:   #94A3B8;
  --ink-200:   #E2E8F0;
  --ink-100:   #F1F5F9;
  --ink-50:    #F8FAFC;
  --white:     #FFFFFF;

  /* Tipografía */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Radio y sombras */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --shadow:    0 4px 12px rgba(15,23,42,.06), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg: 0 20px 40px -10px rgba(15,23,42,.15), 0 8px 16px -8px rgba(15,23,42,.1);

  /* Layout */
  --container: 1200px;
  --header-h:  72px;
}

/* ───── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { padding-left: 1.2em; }
button { font-family: inherit; }

/* Skip-link accesibilidad */
.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--brand-700); color: #fff; padding: 12px 16px;
  z-index: 999; text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ───── Tipografía ───────────────────────────────────────────────────── */
h1, h2, h3, h4 { color: var(--ink-900); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); letter-spacing: -.015em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.05rem; }
p  { margin: 0 0 1em; color: var(--ink-700); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-700); line-height: 1.6; }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--brand-600);
  margin-bottom: 12px;
}

/* ───── Layout ───────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section-tight { padding: clamp(32px, 5vw, 64px) 0; }
.section-dark { background: var(--brand-900); color: #fff; }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark p { color: rgba(255,255,255,.85); }
.section-tinted { background: var(--ink-50); }
.section-brand-tinted { background: linear-gradient(180deg, var(--brand-50) 0%, #fff 100%); }
.text-center { text-align: center; }
.max-prose { max-width: 720px; margin-left: auto; margin-right: auto; }

/* Grids reutilizables */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ───── Header ───────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--ink-200);
}
.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.25rem;
  color: var(--ink-900); text-decoration: none;
  letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--brand-600);
  color: #fff;
  border-radius: 9px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.nav { display: none; align-items: center; gap: 4px; }
@media (min-width: 960px) { .nav { display: flex; } }
.nav a {
  color: var(--ink-700);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .95rem;
  text-decoration: none;
}
.nav a:hover { background: var(--ink-100); color: var(--ink-900); }
.nav a[aria-current="page"] {
  color: var(--brand-600);
  background: var(--brand-50);
}

.nav-actions { display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .08s, background .12s, color .12s, border-color .12s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand-600); color: #fff;
}
.btn-primary:hover { background: var(--brand-700); text-decoration: none; color: #fff; }
.btn-ghost {
  background: transparent; color: var(--ink-700); border-color: var(--ink-200);
}
.btn-ghost:hover { background: var(--ink-100); color: var(--ink-900); text-decoration: none; }
.btn-on-dark {
  background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2);
}
.btn-on-dark:hover { background: rgba(255,255,255,.18); color:#fff; text-decoration: none; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }

/* Hamburger */
.hamburger {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--ink-200);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}
.hamburger svg { width: 20px; height: 20px; color: var(--ink-900); }
@media (min-width: 960px) { .hamburger { display: none; } }

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: #fff;
  z-index: 99;
  transform: translateY(-100%);
  transition: transform .25s ease;
  border-top: 1px solid var(--ink-200);
  overflow-y: auto;
}
.mobile-drawer[data-open="true"] { transform: translateY(0); }
.mobile-drawer__nav {
  padding: 16px 20px 32px;
  display: flex; flex-direction: column; gap: 4px;
}
.mobile-drawer__nav a {
  display: block;
  padding: 14px 14px;
  border-radius: 9px;
  color: var(--ink-900);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}
.mobile-drawer__nav a:hover { background: var(--ink-100); }
.mobile-drawer__nav a[aria-current="page"] { background: var(--brand-50); color: var(--brand-600); }
.mobile-drawer__cta {
  margin: 8px 20px 24px;
  display: flex; flex-direction: column; gap: 8px;
}

/* ───── Hero ─────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(180deg, var(--brand-50) 0%, #fff 100%);
  padding: clamp(56px, 8vw, 112px) 0 clamp(48px, 6vw, 96px);
  position: relative;
  overflow: hidden;
}
.hero__inner { display: grid; gap: 24px; max-width: 900px; }
.hero__title { font-size: clamp(2.1rem, 5.5vw, 3.75rem); }
.hero__title em { font-style: normal; color: var(--brand-600); }
.hero__lead { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--ink-700); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero__trust {
  margin-top: 28px; padding-top: 28px;
  border-top: 1px solid var(--ink-200);
  display: flex; flex-wrap: wrap; gap: 16px 36px;
  color: var(--ink-700); font-size: .95rem;
}
.hero__trust strong { color: var(--ink-900); }
.hero__trust .check {
  display: inline-flex; align-items: center; gap: 8px;
}
.hero__trust .check svg { width: 18px; height: 18px; color: var(--green-600); flex-shrink: 0; }

/* Inner-page hero (más compacto) */
.page-hero {
  background: linear-gradient(180deg, var(--brand-50) 0%, #fff 100%);
  padding: clamp(48px, 7vw, 80px) 0 clamp(28px, 5vw, 48px);
  border-bottom: 1px solid var(--ink-100);
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero .lead { max-width: 720px; }
.breadcrumb {
  display: flex; gap: 6px; font-size: .9rem; color: var(--ink-500);
  margin-bottom: 16px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--ink-500); }
.breadcrumb a:hover { color: var(--brand-600); }
.breadcrumb span[aria-current="page"] { color: var(--ink-900); font-weight: 600; }

/* ───── Card ─────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  height: 100%;
}
.card:hover { border-color: var(--brand-500); box-shadow: var(--shadow); }
.card__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-600);
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; }
.card ul { margin: 12px 0 0; padding-left: 1.1em; color: var(--ink-700); }
.card ul li { margin-bottom: 6px; }
.card__benefit {
  margin-top: 16px; padding: 12px 14px;
  background: var(--ink-50); border-left: 3px solid var(--brand-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .92rem; color: var(--ink-900);
}
.card__benefit strong { color: var(--brand-700); }

/* Cards en dark sections */
.section-dark .card {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.12);
  color: #fff;
}
.section-dark .card:hover { border-color: rgba(255,255,255,.3); }
.section-dark .card p { color: rgba(255,255,255,.8); }
.section-dark .card ul { color: rgba(255,255,255,.8); }
.section-dark .card__icon { background: rgba(255,255,255,.08); color: #fff; }
.section-dark .card__benefit { background: rgba(255,255,255,.05); color: rgba(255,255,255,.95); }
.section-dark .card__benefit strong { color: #fff; }

/* Bullet list with check icons */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  position: relative; padding-left: 32px; margin-bottom: 12px;
  color: var(--ink-700);
}
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 4px;
  width: 20px; height: 20px;
  background: var(--green-100);
  border-radius: 50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat; background-position: center;
}
.section-dark .checklist li { color: rgba(255,255,255,.9); }
.section-dark .checklist li::before { background-color: rgba(255,255,255,.15); }

/* Pill / tag */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-50); color: var(--brand-700);
  padding: 4px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.tag-green { background: var(--green-100); color: var(--green-600); }
.tag-teal  { background: var(--teal-100);  color: var(--teal-600); }

/* Section header */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--ink-700); font-size: 1.05rem; }

/* Stats strip */
.stats {
  display: grid; gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  text-align: center;
  padding: 24px 16px;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
}
.stat__num { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--brand-600); display: block; margin-bottom: 6px; letter-spacing: -.02em; }
.stat__lbl { font-size: .9rem; color: var(--ink-700); }

/* CTA banner */
.cta-banner {
  background: var(--brand-700);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(32px, 5vw, 56px);
  text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,.9); max-width: 640px; margin: 0 auto 24px; }
.cta-banner .cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* FAQ accordion */
.faq { max-width: 820px; margin: 0 auto; }
.faq__item {
  border-bottom: 1px solid var(--ink-200);
}
.faq__q {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 20px 4px;
  background: transparent;
  border: none;
  text-align: left;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink-900);
  cursor: pointer;
}
.faq__q:hover { color: var(--brand-600); }
.faq__q svg { width: 20px; height: 20px; transition: transform .2s; color: var(--ink-500); flex-shrink: 0; margin-left: 12px; }
.faq__item[data-open="true"] .faq__q svg { transform: rotate(45deg); color: var(--brand-600); }
.faq__a {
  display: none;
  padding: 0 4px 24px;
  color: var(--ink-700);
  line-height: 1.7;
}
.faq__a p { margin: 0 0 12px; }
.faq__a p:last-child { margin-bottom: 0; }
.faq__item[data-open="true"] .faq__a { display: block; }

/* Two-col split section */
.split {
  display: grid; gap: 32px;
  align-items: center;
}
@media (min-width: 1024px) { .split { grid-template-columns: 1.05fr 1fr; gap: 56px; } }
.split--reverse > :first-child { order: 2; }
@media (min-width: 1024px) {
  .split--reverse > :first-child { order: 0; }
}

/* Compliance / cert badges */
.compliance-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .compliance-grid { grid-template-columns: repeat(4, 1fr); } }
.compliance-badge {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; gap: 12px;
}
.compliance-badge__icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  background: var(--brand-50);
  color: var(--brand-600);
  border-radius: 9px;
  display: grid; place-items: center;
}
.compliance-badge__icon svg { width: 22px; height: 22px; }
.compliance-badge__title { font-weight: 700; font-size: .95rem; color: var(--ink-900); line-height: 1.3; }
.compliance-badge__sub { font-size: .82rem; color: var(--ink-500); margin-top: 2px; }

/* ───── Forms ────────────────────────────────────────────────────────── */
.form { display: grid; gap: 16px; }
.form label { font-weight: 600; font-size: .92rem; color: var(--ink-900); display: block; margin-bottom: 6px; }
.form input, .form textarea, .form select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--ink-200);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-900);
  font-family: inherit;
  transition: border-color .12s, box-shadow .12s;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.form textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

/* ───── Footer ───────────────────────────────────────────────────────── */
.site-footer {
  background: var(--brand-900);
  color: rgba(255,255,255,.78);
  padding: 56px 0 24px;
}
.site-footer a { color: rgba(255,255,255,.78); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid {
  display: grid; gap: 36px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer__brand .brand { color: #fff; }
.footer__brand .brand__mark { background: var(--brand-500); }
.footer__brand p { color: rgba(255,255,255,.7); margin-top: 12px; max-width: 320px; }
.footer__col h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin-bottom: 8px; }
.footer__legal {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .85rem;
  display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between;
  color: rgba(255,255,255,.55);
}

/* Utilities */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; } .mt-5 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
