/* ===== Variables — línea institucional (azul U. de Chile / sobriedad gob.cl) ===== */
:root {
  --navy: #0d2c54;        /* azul institucional profundo */
  --navy-dark: #08203f;
  --blue: #1c5fa8;        /* azul de enlace / acento */
  --red: #c8102e;         /* acento mínimo */
  --ink: #1f2733;
  --ink-soft: #4a5566;
  --bg: #ffffff;
  --bg-alt: #f3f5f9;
  --line: #d9dfe8;
  --radius: 4px;
  --max: 1080px;
  --font-head: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; color: var(--navy); }
p { margin: 0 0 1.1em; }
a { color: var(--blue); }
a:hover { color: var(--navy); }

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

/* ===== Franja superior ===== */
.topbar { background: var(--navy-dark); color: rgba(255,255,255,.82); font-size: .8rem; }
.topbar-inner { padding: 7px 28px; letter-spacing: .02em; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  color: #fff;
  border-bottom: 3px solid var(--red);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 50%;
  font-family: var(--font-head);
  font-size: 1.4rem;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; font-family: var(--font-head); font-weight: 600; font-size: 1.18rem; line-height: 1.15; }
.brand-text small { font-family: var(--font-body); font-weight: 400; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: rgba(255,255,255,.88); font-size: .94rem; text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; transition: border-color .2s, color .2s; }
.nav-links a:hover { color: #fff; border-bottom-color: var(--red); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: .25s; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 64px;
}
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--blue); margin-bottom: .8em; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); position: relative; padding-bottom: .35em; }
.hero h1::after { content: ""; display: block; width: 72px; height: 4px; background: var(--red); margin-top: .45em; }
.hero .lead { font-size: 1.16rem; color: var(--ink-soft); max-width: 44em; }

/* ===== Secciones ===== */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); padding-left: 16px; border-left: 4px solid var(--navy); }
.section .narrow > p { color: var(--ink-soft); font-size: 1.06rem; }

/* ===== Datos (sistema de salud) ===== */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.fact { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--navy); border-radius: var(--radius); padding: 26px 24px; }
.fact-num { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; color: var(--navy); margin-bottom: 8px; }
.fact p { color: var(--ink-soft); font-size: .96rem; margin: 0; }

/* ===== Ámbitos ===== */
.areas-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 36px; }
.area { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; }
.area h3 { font-size: 1.2rem; }
.area p { color: var(--ink-soft); margin: 0; }

/* ===== Credenciales ===== */
.credentials { background: var(--navy); color: rgba(255,255,255,.9); }
.credentials h2 { color: #fff; border-left-color: var(--red); }
.credentials p { color: rgba(255,255,255,.82); }
.cred-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.cred-list li { padding: 16px 20px; background: rgba(255,255,255,.06); border-left: 3px solid var(--red); border-radius: var(--radius); font-size: .98rem; }
.cred-list strong { color: #fff; }
.placeholder { color: #ffd0d6; font-style: italic; }

/* ===== Referencias ===== */
.ref-list { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 12px; }
.ref-list li { padding-left: 18px; position: relative; color: var(--ink-soft); }
.ref-list li::before { content: "→"; position: absolute; left: 0; color: var(--blue); }
.ref-list a { font-weight: 600; }
.ref-note { font-size: .9rem; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 16px; }

/* ===== Footer ===== */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,.78); padding: 48px 0 28px; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.footer-brand { color: #fff; font-size: 1.1rem; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,.78); font-size: .92rem; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.muted { color: rgba(255,255,255,.6); font-size: .9rem; margin: 6px 0 0; }
.disclaimer { font-size: .82rem; color: rgba(255,255,255,.6); border-top: 1px solid rgba(255,255,255,.15); padding-top: 22px; margin: 32px 0 0; line-height: 1.6; }
.disclaimer a { color: rgba(255,255,255,.85); }
.copyright { font-size: .82rem; color: rgba(255,255,255,.5); margin: 14px 0 0; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy); border-bottom: 3px solid var(--red);
    padding: 18px 28px; gap: 14px;
  }
  .facts { grid-template-columns: 1fr; }
  .areas-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}
