:root{
  --bg:#0b1220;
  --panel:#0f172a;
  --muted:#93a4b8;
  --brand:#11a36d;
  --brand-2:#2cd4b1;
  --text:#e6edf6;
  --ring:rgba(17,163,109,.35);
  --radius:16px;
  --shadow:0 10px 30px rgba(0,0,0,.25);
  --max:1100px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(44,212,177,.16), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(17,163,109,.15), transparent 60%),
    var(--bg);
  line-height:1.5;
}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}

.wrap{max-width:var(--max);margin:0 auto;padding:24px}

/* Header */
.site-header{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 20px;margin-top:10px;background:rgba(15,23,42,.7);
  border:1px solid rgba(255,255,255,.06);border-radius:var(--radius);
  box-shadow: var(--shadow); backdrop-filter:saturate(1.2) blur(4px);
}
.brand{display:flex;align-items:center;gap:12px;font-weight:800;font-size:1.05rem;letter-spacing:.3px}
.brand .mark {
  padding: 0 .6rem;
  height: 34px;
  border-radius: 999px; /* fully rounded capsule */
  background: radial-gradient(120% 120% at 20% 10%, var(--brand-2), var(--brand));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #082016;
  font-weight: 900;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(0,255,170,.25);
  border: 1px solid rgba(255,255,255,.15);
}.brand-name{color:var(--text)}
.nav a{color:var(--text);opacity:.9;padding:.5rem .7rem;border-radius:10px}
.nav a:hover{background:rgba(255,255,255,.06);text-decoration:none}
.nav a.active{background:rgba(255,255,255,.12)}

/* Hero with image */
/* Hero as legacy banner (uses your /includes/BGO_banner_big.jpg) */
.hero {
  margin: 18px 0;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  background: #0f172a;
}

.hero--banner{
  /* Your banner is ~800x168; keep a graceful, responsive strip */
  background-image: var(--hero);
  background-size: cover;
  background-position: center;
  height: 180px;            /* default height for desktop */
}

@media (max-width: 900px){
  .hero--banner{ height: 150px; }
}
@media (max-width: 600px){
  .hero--banner{ height: 120px; }
}
.hero--image{
  background-image: var(--hero);
  background-size: cover;
  background-position: center;
  position:relative;
}
.hero--image::before{
  /* overlay to ensure text contrast over your legacy image */
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.35));
  border-radius:inherit;
}
.hero-grid{
  position:relative; z-index:1;
  display:grid;grid-template-columns:1fr; gap:26px;
  padding:38px 26px;
}
.hero-copy h1{margin:.2rem 0 0;font-size:clamp(28px,4.2vw,44px);line-height:1.1}
.hero-copy p{color:var(--muted);max-width:60ch;margin:.6rem 0 1.2rem}

/* Buttons */
.cta{display:flex;gap:12px;flex-wrap:wrap}
.btn{
  display:inline-flex;align-items:center;gap:.55rem;
  padding:.8rem 1rem;border-radius:12px;border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg, var(--brand), #0f8b63);
  color:#062015;font-weight:800; box-shadow:0 10px 24px var(--ring);
}
.btn:hover{transform:translateY(-1px)}
.btn.secondary{
  background:rgba(255,255,255,.06); color:var(--text); font-weight:700;
  border:1px solid rgba(255,255,255,.12); box-shadow:none;
}

/* Cards grid */
.grid{margin:26px 0; display:grid; gap:18px; grid-template-columns:repeat(3,1fr)}
@media (max-width:1000px){ .grid{grid-template-columns:1fr 1fr} }
@media (max-width:680px){ .grid{grid-template-columns:1fr} }

.card{
  background:var(--panel); border:1px solid rgba(255,255,255,.06);
  border-radius:var(--radius); padding:20px; box-shadow:var(--shadow);
  display:flex;flex-direction:column; gap:10px; position:relative; overflow:hidden;
}
.card .tag{
  font-size:.78rem;color:#0c2a1f;background:linear-gradient(180deg, var(--brand-2), var(--brand));
  padding:.25rem .55rem;border-radius:999px;font-weight:800;display:inline-block
}
.card h3{margin:.25rem 0 .2rem}
.card p{color:var(--muted);margin:0}
.card .actions{margin-top:auto;display:flex;gap:10px;flex-wrap:wrap}
.ghost{border:1px solid rgba(255,255,255,.18);padding:.55rem .8rem;border-radius:10px}
.ghost:hover{background:rgba(255,255,255,.06);text-decoration:none}
/* Images inside .thumb (focus cards) */
.thumb {
  aspect-ratio: 3 / 2;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Panels & footer */
.panelsec{
  background:var(--panel); border:1px solid rgba(255,255,255,.06);
  border-radius:var(--radius); padding:22px; box-shadow:var(--shadow); margin:22px 0;
}
.muted{color:var(--muted)}
.small{font-size:.9rem}
.site-footer{margin:30px 0 40px;color:var(--muted);font-size:.95rem}
.site-footer a{color:var(--muted)}
/* Donorbox embed tweaks */
#donate .donorbox-embed iframe {
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
/* Responsive 16:9 video wrapper */
.video-embed{
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 8px auto 0;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.video-embed iframe{
  position:absolute; inset:0; width:100%; height:100%;
  display:block;
}
/* =========================
   RESPONSIVE LAYER (global)
   ========================= */

/* Utility grids you can reuse */
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.grid-auto-2 { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; }

/* Image helpers */
.img-fluid, .pure-img, .thumb img { width:100%; height:auto; display:block; }

/* Better blockquotes inside dark panels */
blockquote.center {
  color: var(--muted);
  text-align: center;
  margin: .5rem 0 1rem;
  font-style: italic;
}

/* Make long words/URLs wrap gracefully */
p, li, h1, h2, h3, h4 { overflow-wrap: anywhere; }

/* =========================
   LAYOUT TWEAKS (RESPONSIVE)
   ========================= */

/* Slightly tighter gaps when grid collapses at your existing 1000px breakpoint */
@media (max-width: 1000px){
  .grid { gap: 16px; }
}

/* Phone-first fixes */
@media (max-width: 850px){

  /* Force any ad-hoc two-column grids to stack */
  .grid-2,
  .grid-auto-2,
  #about .grid,
  #region .grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Keep cards readable when stacked */
  .grid article.card {
    margin: 0 auto;
    width: 100%;
    max-width: 560px;
  }

  /* Story text panel gets its own box on mobile */
  #about .grid > div:last-child {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,.22);
  }

  /* Stats cards in the Region section */
  #region .card {
    padding: 14px !important;
    margin: 0 !important;
  }

  /* Charts & map never crop */
  #region img,
  #region .thumb img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* Video stays 16:9 and full width */
  .video-embed {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
  }
}

/* Ultra-small devices */
@media (max-width: 500px){
  body, p, li { font-size: .95rem; }
  .card { padding: 16px; }
  h1 { font-size: 1.6rem; line-height: 1.2; }
}

/* Optional helper grids you can use in markup */
.region-stats { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; }
@media (max-width: 850px){ .region-stats { grid-template-columns:1fr; } }

/* Optional: chart panel styling */
.chart-panel {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 10px;
}
.chart-panel img { width:100%; height:auto; display:block; border-radius:10px; }

/* =========================
   HEADER: MOBILE FIXES
   ========================= */

@media (max-width: 900px){
  .site-header{
    padding: 12px 14px;
    gap: 10px;
  }
  .brand .mark{ height: 32px; font-size: .95rem; padding: 0 .55rem; }
}

@media (max-width: 680px){
  .site-header{
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .brand{ justify-content: space-between; }

  /* Nav becomes its own row with wrap */
  .nav{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
  }
  .nav a{
    padding: .45rem .6rem;
    font-size: .95rem;
    line-height: 1.1;
    border-radius: 8px;
  }

  /* Prevent squish on very narrow screens */
  .wrap{ padding: 18px; }
  .brand-name{ font-size: 1rem; }
  .brand .mark{ height: 30px; padding: 0 .5rem; }
}

@media (max-width: 380px){
  .nav{
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .nav a{ flex: 0 0 auto; }
}

/* =========================
   HERO BANNER (DEDUPED)
   ========================= */

/* Tablet and down: show more of the right side (your text is on the right) */
@media (max-width: 900px){
  .hero--banner {
    background-position: right center;
    height: 150px; /* keep your earlier scale */
  }
}

/* Phones: crop further left, reduce height */
@media (max-width: 600px){
  .hero--banner {
    background-position: 85% center; /* push focus toward the right */
    background-size: cover;
    height: 110px;
  }
}

/* Ultra-small phones */
@media (max-width: 380px){
  .hero--banner { height: 96px; }
}