/* ============================================================
   CUARTO DE SALUD FAMILIAR — global.css
   Estilos compartidos en todas las páginas
   ============================================================ */

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--text-primary); background: var(--white); line-height: 1.6; overflow-x: hidden; }
img  { max-width: 100%; display: block; }
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  /* Paleta muestreada del catálogo oficial (portada) */
  --green-olive:   #5F7248;   /* oliva/salvia — color firma (banner CATÁLOGO, títulos) */
  --green-primary: #6E8C33;   /* verde hoja (cruz / figuras del logo, acentos y CTA) */
  --green-dark:    #2F5320;   /* verde bosque — cintillas y footer */
  --green-mid:     #4E7233;
  --green-light:   #B2BE97;   /* salvia claro */
  --green-pale:    #ECEEE2;   /* tinte salvia pálido sobre crema */
  --navy-primary:  #1E3A63;   /* azul marino del catálogo (deportivo / empresarial) */
  --navy-dark:     #152945;
  --navy-mid:      #2E5A94;
  --blue-accent:   #3375AE;   /* azul del logo / palabra BIENESTAR */
  --white:         #ffffff;
  --cream:         #EEEBE3;   /* crema cálido del catálogo */
  --warm-gray:     #E4E1D7;
  --text-primary:  #22331A;   /* verde muy oscuro del texto "SALUD FAMILIAR" */
  --text-secondary:#4a5340;
  --text-muted:    #7a7f6c;
  --wood-tone:     #C4A06A;
  --border-subtle: rgba(47,83,32,0.12);
  --border-medium: rgba(47,83,32,0.20);
  --shadow-sm:     0 2px 8px rgba(47,83,32,0.06);
  --shadow-card:   0 4px 24px rgba(47,83,32,0.08);
  --shadow-lift:   0 8px 40px rgba(47,83,32,0.14);
  --shadow-modal:  0 24px 80px rgba(0,0,0,0.30);
  --radius-sm:     6px;
  --radius-card:   12px;
  --radius-lg:     20px;
  --radius-btn:    8px;
  --sp:            8px;
  --nav-h:         72px;
  --transition:    0.3s ease;
}

/* ── Typography scale ────────────────────────────────────── */
.heading-xl { font-size: clamp(2.4rem,5vw,4rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.heading-lg { font-size: clamp(1.8rem,3.5vw,2.6rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.heading-md { font-size: clamp(1.3rem,2.5vw,1.8rem); font-weight: 700; line-height: 1.3; }
.heading-sm { font-size: 1.15rem; font-weight: 700; line-height: 1.4; }
.body-lg    { font-size: 1.1rem; line-height: 1.7; }
.body-sm    { font-size: 0.9rem; line-height: 1.6; }

/* ── Layout ──────────────────────────────────────────────── */
.container   { max-width: 1200px; margin: 0 auto; padding: 0 calc(var(--sp)*3); }
.section     { padding: calc(var(--sp)*12) 0; }
.section-alt { background: var(--cream); }
.section-dark{ background: var(--navy-primary); color: var(--white); }
.text-center { text-align: center; }
.text-green  { color: var(--green-primary); }
.text-navy   { color: var(--navy-primary); }
.text-white  { color: var(--white); }
.text-secondary { color: var(--text-secondary); }
.text-muted  { color: var(--text-muted); }

/* ── Section label chip ──────────────────────────────────── */
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-pale); color: var(--green-dark);
  padding: 6px 16px; border-radius: 20px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; margin-bottom: 16px;
}
.section-label.light { background: rgba(255,255,255,0.12); color: var(--white); }
.section-label.navy  { background: rgba(30,58,99,0.08); color: var(--navy-primary); }

/* ── Divider ─────────────────────────────────────────────── */
.divider { width: 56px; height: 4px; background: var(--green-primary); border-radius: 2px; margin: calc(var(--sp)*2) 0 calc(var(--sp)*4); }
.divider.center { margin-left: auto; margin-right: auto; }
.section-divider { height: 1px; background: var(--border-subtle); margin: 0; }

/* ── Bg helpers ──────────────────────────────────────────── */
.bg-cream { background: var(--cream); }
.bg-white { background: var(--white); }

/* ── Section header ──────────────────────────────────────── */
.section-header { text-align: center; max-width: 680px; margin: 0 auto calc(var(--sp)*5); }
.section-header p { color: var(--text-secondary); margin-top: 12px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-btn);
  font-size: 0.95rem; font-weight: 600; white-space: nowrap;
  transition: var(--transition); text-decoration: none;
}
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--green-primary); color: var(--white); box-shadow: 0 4px 16px rgba(110,140,51,0.35); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(110,140,51,0.40); }
.btn-navy    { background: var(--navy-primary); color: var(--white); box-shadow: 0 4px 16px rgba(30,58,99,0.30); }
.btn-navy:hover { background: var(--navy-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.65); }
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
.btn-ghost   { background: transparent; color: var(--navy-primary); border: 2px solid var(--border-medium); }
.btn-ghost:hover { background: var(--navy-primary); color: var(--white); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 0.70rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.badge-navy   { background: var(--navy-primary); color: var(--white); }
.badge-green  { background: var(--green-dark); color: var(--white); }
.badge-blue   { background: var(--blue-accent); color: var(--white); }
.badge-gold   { background: #C8860A; color: var(--white); }
.badge-teal   { background: #00695c; color: var(--white); }
.badge-purple { background: #6a1b9a; color: var(--white); }

/* ── Scroll reveal ───────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.40s; }
.reveal-delay-5 { transition-delay: 0.50s; }

/* ── Heading defaults ────────────────────────────────────── */
h1 { font-size: clamp(2rem,4vw,3.2rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem,3vw,2.2rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 12px; }
h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
h4 { font-size: 0.95rem; font-weight: 700; }
p  { margin-bottom: 0; }

/* ── Page hero (interior pages) ──────────────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 64px) 0 64px;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-olive) 60%, var(--green-mid) 100%);
  color: var(--white); text-align: center; position: relative; overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; opacity: 0.12;
}
.page-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(34,51,26,0.86) 0%, rgba(47,83,32,0.72) 55%, rgba(95,114,72,0.58) 100%);
}
.page-hero-content { position: relative; z-index: 1; }
.page-hero-title { color: var(--white); margin: 12px 0 16px; }
.page-hero-desc  { color: rgba(255,255,255,0.75); max-width: 580px; margin: 0 auto; font-size: 1.05rem; }

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  font-size: 0.82rem; color: rgba(255,255,255,0.55); margin-bottom: 12px;
}
.breadcrumb a { color: var(--green-light); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { opacity: 0.4; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h); display: flex; align-items: center;
  padding: 0 calc(var(--sp)*3);
  transition: background 0.4s, box-shadow 0.4s;
}
.nav.scrolled { background: var(--white); box-shadow: 0 2px 20px rgba(30,58,99,0.10); }
.nav-inner {
  max-width: 1200px; width: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

/* Logo */
.nav-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-logo-mark { height: 46px; width: auto; display: block; }
.nav-logo-text { display: flex; flex-direction: column; }
.nav-logo-name { font-size: 0.95rem; font-weight: 800; line-height: 1.1; transition: color 0.3s; }
.nav-logo-tag  { font-size: 0.60rem; letter-spacing: 0.06em; font-weight: 500; transition: color 0.3s; }
.nav:not(.scrolled) .nav-logo-name { color: var(--white); }
.nav:not(.scrolled) .nav-logo-tag  { color: rgba(255,255,255,0.55); }
.nav.scrolled .nav-logo-name { color: var(--green-dark); }
.nav.scrolled .nav-logo-tag  { color: var(--text-muted); }

/* For pages with non-dark hero, force scrolled look from start */
.nav.always-solid { background: var(--white); box-shadow: 0 2px 20px rgba(30,58,99,0.10); }
.nav.always-solid .nav-logo-name { color: var(--green-dark); }
.nav.always-solid .nav-logo-tag  { color: var(--text-muted); }
.nav.always-solid .nav-links a   { color: var(--text-secondary); }
.nav.always-solid .nav-burger span { background: var(--navy-primary); }

/* Links */
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500;
  transition: var(--transition); position: relative;
}
.nav:not(.scrolled):not(.always-solid) .nav-links a { color: rgba(255,255,255,0.85); }
.nav.scrolled .nav-links a, .nav.always-solid .nav-links a { color: var(--text-secondary); }
.nav-links a:hover { color: var(--white) !important; background: rgba(255,255,255,0.15); }
.nav.scrolled .nav-links a:hover, .nav.always-solid .nav-links a:hover { color: var(--green-dark) !important; background: var(--green-pale); }
.nav-links a.current { color: var(--white) !important; background: rgba(255,255,255,0.15); }
.nav.scrolled .nav-links a.current, .nav.always-solid .nav-links a.current { color: var(--green-dark) !important; background: var(--green-pale); }

.nav-cta { flex-shrink: 0; }
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--transition); }
.nav.scrolled .nav-burger span { background: var(--navy-primary); }

/* Mobile menu */
.nav-mobile {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: var(--white); padding: calc(var(--nav-h) + 16px) 24px 32px;
  flex-direction: column; gap: 4px; overflow-y: auto;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 14px 16px; border-radius: var(--radius-card);
  font-size: 1rem; font-weight: 600; color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle); transition: var(--transition);
}
.nav-mobile a:hover, .nav-mobile a.current { background: var(--green-pale); color: var(--green-dark); border-color: transparent; }
.nav-mobile .btn { margin-top: 12px; justify-content: center; }
.nav-mobile-close {
  position: absolute; top: 20px; right: 24px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--warm-gray); color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; cursor: pointer; border: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--green-dark); color: rgba(255,255,255,0.72); padding: calc(var(--sp)*8) 0 calc(var(--sp)*4); }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: calc(var(--sp)*6); border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: calc(var(--sp)*4);
}
.footer-logo-mark { height: 60px; width: auto; margin-bottom: 14px; }
.footer-brand-name { color: var(--white); font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
.footer-brand-tag  { color: var(--green-light); font-size: 0.78rem; font-style: italic; margin-bottom: 14px; }
.footer-brand-desc { font-size: 0.83rem; line-height: 1.7; color: rgba(255,255,255,0.50); }
.footer-socials    { display: flex; gap: 10px; margin-top: 18px; }
.footer-social-btn {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.55);
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.footer-social-btn:hover { background: var(--green-primary); color: var(--white); }
.footer-col h4 { color: var(--white); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col a  { display: block; font-size: 0.83rem; color: rgba(255,255,255,0.50); margin-bottom: 9px; transition: var(--transition); }
.footer-col a:hover { color: var(--green-light); padding-left: 4px; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; font-size: 0.78rem; color: rgba(255,255,255,0.30);
}
.footer-bottom a { color: rgba(255,255,255,0.45); }
.footer-bottom a:hover { color: var(--green-light); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .section { padding: calc(var(--sp)*8) 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
