/* CBIO Initiatives for Global Health — shared stylesheet
   Linked by every page. Page-specific rules stay in a <style> block on that page.
   Edit here to change the look of the whole site. */

:root{
  --blue:hsl(204,79%,38%);
  --blue-dark:hsl(204,79%,28%);
  --light:hsl(240,11%,93%);
  --ink:#1a1a1a;
  --muted:#555;
}

*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Poppins',sans-serif;color:var(--ink);line-height:1.6;background:#fff}
h1,h2,h3,h4{font-family:'Urbanist',sans-serif;line-height:1.2}
a{color:var(--blue)}
p+p{margin-top:.8rem}

/* ---------- header ---------- */
header{border-bottom:1px solid var(--light);padding:1rem 5%;display:flex;flex-wrap:wrap;
align-items:center;justify-content:space-between;gap:.75rem}
.logo-link{display:inline-block;line-height:0}
.logo{max-height:131px;width:auto}
nav a{margin-left:1.1rem;text-decoration:none;color:var(--ink);font-size:.95rem}
nav a:hover,nav a.current{color:var(--blue)}

/* ---------- page banners ---------- */
.hero{position:relative;color:#fff}
.hero img{display:block;width:100%;height:min(58vh,460px);object-fit:cover}
.hero img.anchor-top{object-position:50% 0}
.hero .overlay{position:absolute;inset:0;
background:linear-gradient(rgba(10,30,50,.25),rgba(10,30,50,.6));
display:flex;flex-direction:column;justify-content:flex-end;padding:2.5rem 5%}
.hero h1{font-size:clamp(1.5rem,4vw,2.6rem);max-width:34ch;text-shadow:0 1px 6px rgba(0,0,0,.5)}
.hero p{margin-top:.5rem;max-width:52ch;font-size:1.02rem;text-shadow:0 1px 6px rgba(0,0,0,.5)}
.hero .btn{align-self:flex-start}
.hero.tall img{height:min(70vh,560px)}

.band{background:var(--blue);color:#fff;padding:3rem 5%}
.band h1{font-size:2.1rem;font-weight:700;max-width:40ch}
.band p{max-width:52rem;margin-top:.6rem;font-size:1.02rem}
.band a{color:#fff}

.btn{display:inline-block;background:var(--blue);color:#fff;text-decoration:none;font-weight:600;
padding:.65rem 1.5rem;border-radius:6px;margin-top:1.1rem}
.btn:hover{background:var(--blue-dark)}

/* ---------- layout & headings ---------- */
main{max-width:70rem;margin:0 auto;padding:0 5%}
section{padding:2.6rem 0;border-bottom:1px solid var(--light)}
section:last-of-type{border-bottom:0}
h2{color:var(--blue-dark);font-size:1.7rem;margin-bottom:1rem}
h3{color:var(--ink);font-size:1.15rem;margin-bottom:.4rem}
ul.plain{margin:.6rem 0 0 1.3rem}
ul.plain li{padding:.18rem 0}

/* Library pages: no <section> wrappers, so main carries the vertical padding
   and each h2 gets a rule beneath it to separate topic groups. */
body.library main{padding:2.5rem 5%}
body.library h2{margin:2.2rem 0 .8rem;border-bottom:2px solid var(--light);padding-bottom:.3rem}
body.library h2:first-of-type{margin-top:0}
body.library h3{font-size:1.1rem;margin:1.6rem 0 .5rem}

/* ---------- shared components ---------- */
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1.2rem;margin-top:1.6rem}
.card{border:1px solid var(--light);border-radius:8px;padding:1.3rem;text-decoration:none;
color:var(--ink);display:block;transition:border-color .15s}
.card:hover{border-color:var(--blue)}
.card h3{color:var(--blue-dark);font-size:1.1rem;margin:0 0 .4rem}
.card p{font-size:.94rem;color:var(--muted)}
.card .count{font-size:.8rem;color:var(--blue);font-weight:600}
.card a{font-weight:600;text-decoration:none}

.two-col{display:grid;grid-template-columns:1.2fr 1fr;gap:2rem;align-items:center}
.two-col img{width:100%;border-radius:8px;display:block}

.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1.4rem;margin:1.6rem 0}
.stat{background:var(--light);border-radius:8px;padding:1.4rem}
.stat .num{font-family:'Urbanist',sans-serif;font-weight:700;font-size:2.3rem;color:var(--blue);line-height:1.15}
.stat p{font-size:.95rem;color:var(--ink);margin-top:.3rem}

.pioneers{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1.4rem;margin-top:1.6rem;max-width:34rem}
.pioneers img{width:100%;border-radius:8px;display:block}

.crumb{font-size:.9rem;margin-bottom:1.5rem}
.crumb a{text-decoration:none}

ul.docs{list-style:none}
ul.docs li{padding:.42rem 0;border-bottom:1px solid var(--light);display:flex;align-items:baseline;gap:.6rem}
ul.docs a{text-decoration:none}
ul.docs a:hover{text-decoration:underline}
.badge{font-size:.68rem;font-weight:600;letter-spacing:.05em;color:var(--blue-dark);
background:var(--light);border-radius:3px;padding:.1rem .4rem;flex:none;
min-width:4.2rem;text-align:center}
.note{font-size:.92rem;color:var(--muted);margin:.6rem 0 1rem}

.video{margin:2rem 0;max-width:44rem}
.video iframe{width:100%;aspect-ratio:16/9;border:0;border-radius:8px}

/* ---------- footer ---------- */
footer{background:#fff;margin-top:2.5rem;padding:2rem 5%;font-size:.95rem;color:var(--ink)}
footer .foot-wrap{max-width:70rem;margin:0 auto;display:flex;align-items:center;
justify-content:space-between;gap:1.5rem;flex-wrap:wrap}
footer .foot-logo{max-height:131px;width:auto;display:block}
footer .foot-contact h4{font-family:'Urbanist',sans-serif;font-size:1.08rem;margin:0 0 .25rem}
footer .foot-contact p{margin:0}
footer a{color:var(--blue)}
footer .foot-social{display:flex;gap:.9rem;margin-top:.7rem}
footer .foot-social a{color:var(--muted);display:inline-flex}
footer .foot-social a:hover{color:var(--blue)}
footer .foot-social svg{width:22px;height:22px;fill:currentColor}

/* ---------- responsive ---------- */
@media(max-width:767px){
  .logo{max-height:105px}
  .two-col{grid-template-columns:1fr}
}
@media(max-width:640px){
  nav a{margin-left:.8rem}
  .band h1{font-size:1.6rem}
  footer .foot-wrap{flex-direction:column;align-items:flex-start}
  footer .foot-logo{margin:0 auto}
}
