/* ===================================================================
   KRDO Design System — shared across all pages
   Multi-color professional palette: green (identity) + teal + amber
   =================================================================== */

:root {
  --green: #1f7a3d;
  --green-dark: #0f4a24;
  --green-light: #e8f4ec;

  --teal: #157a8c;
  --teal-dark: #0b4652;
  --teal-light: #e5f3f5;

  --amber: #c98a1f;
  --amber-light: #fbf1de;

  --orange: #e8863b;
  --orange-dark: #c96a24;

  --sand: #faf6ef;

  --ink: #16241c;
  --gray: #5b6b62;
  --border: #e3e8e5;
  --bg: #ffffff;
  --bg-soft: #f7faf8;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(15, 74, 36, 0.08);
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 14px; font-weight: 800; }
p { margin: 0 0 16px; color: var(--gray); }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 10px;
  display: block;
}

/* ---------- Top bar ---------- */
.topbar {
  background: linear-gradient(90deg, var(--green-dark), var(--teal-dark));
  color: #fff;
  font-size: 0.85rem;
  padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.topbar a { color: #fff; text-decoration: none; }
.lang-toggle {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.lang-toggle:hover { background: rgba(255,255,255,0.28); }

/* ---------- Header ---------- */
header.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.nav-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.logo { font-size: 1.5rem; font-weight: 900; color: var(--green-dark); text-decoration: none; letter-spacing: -0.5px; }
.logo span { color: var(--orange); }
nav.main-nav { display: flex; align-items: center; gap: 28px; }
nav.main-nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; position: relative; }
nav.main-nav a:hover { color: var(--teal); }
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { filter: brightness(0.92); }
.btn-outline { background: transparent; color: var(--green-dark); border: 2px solid var(--green-dark); }
.btn-outline:hover { background: var(--green-dark); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, #16241c, #0b1f13);
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.8s ease;
}
.hero-slide.active { opacity: 1; }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(6,14,9,0.72) 0%, rgba(6,14,9,0.42) 32%, rgba(6,14,9,0.08) 58%, rgba(6,14,9,0) 72%),
    linear-gradient(0deg, rgba(6,14,9,0.55) 0%, rgba(6,14,9,0) 45%);
}
.hero-content { position: relative; z-index: 2; padding: 60px 0; }
.hero h1 { font-size: 3rem; max-width: 720px; margin-bottom: 18px; }
.hero p.lead { font-size: 1.2rem; max-width: 640px; color: rgba(255,255,255,0.92); }
.hero-actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
section.soft { background: var(--bg-soft); }
section.sand { background: var(--sand); }
section.teal-soft { background: var(--teal-light); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head h2 { font-size: 2.1rem; }

/* ---------- Cards grid ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--green);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(15,74,36,0.14); }
.card:nth-child(4n+2) { border-top-color: var(--teal); }
.card:nth-child(4n+3) { border-top-color: var(--amber); }
.card:nth-child(4n+4) { border-top-color: var(--orange); }
.card .icon-wrap {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-light); margin-bottom: 16px;
}
.card:nth-child(4n+2) .icon-wrap { background: var(--teal-light); }
.card:nth-child(4n+3) .icon-wrap { background: var(--amber-light); }
.card:nth-child(4n+4) .icon-wrap { background: #fdece0; }
.card .icon { width: 26px; height: 26px; color: var(--green); }
.card:nth-child(4n+2) .icon { color: var(--teal); }
.card:nth-child(4n+3) .icon { color: var(--amber); }
.card:nth-child(4n+4) .icon { color: var(--orange); }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }

/* ---------- Story / article cards ---------- */
.story-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.story-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.story-card .thumb { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--green-light); }
.story-card .body { padding: 18px 20px 22px; }
.story-card .tag { font-size: 0.75rem; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: 0.5px; }
.story-card h3 { font-size: 1.05rem; margin: 8px 0 6px; }
.story-card p { font-size: 0.92rem; margin: 0; }

/* ---------- Impact strip ---------- */
.impact-strip { background: linear-gradient(90deg, var(--green-dark), var(--teal-dark)); color: #fff; padding: 46px 0; }
.impact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; text-align: center; }
.impact-grid .num { font-size: 2.2rem; font-weight: 900; color: #fff; }
.impact-grid .label { font-size: 0.9rem; color: rgba(255,255,255,0.8); }

/* ---------- Gallery (photo showcase / slides) ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 130px; gap: 12px; }
.gallery-item {
  position: relative; overflow: hidden; border-radius: 12px; cursor: pointer;
  grid-column: span 2; grid-row: span 2; border: none; padding: 0; background: none;
}
.gallery-item.wide { grid-column: span 4; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(11,40,20,0.82) 100%);
  padding: 14px; opacity: 0; transition: opacity 0.25s ease;
}
.gallery-item:hover .overlay { opacity: 1; }
.gallery-item .overlay span { color: #fff; font-weight: 700; font-size: 0.86rem; line-height: 1.3; text-align: left; }
.gallery-item .chip {
  position: absolute; top: 10px; left: 10px; font-size: 0.68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.4px; padding: 4px 10px; border-radius: 999px;
  color: #fff; background: var(--green);
}
.gallery-item.c-teal .chip { background: var(--teal); }
.gallery-item.c-amber .chip { background: var(--amber); }
.gallery-item.c-orange .chip { background: var(--orange); }
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 110px; }
  .gallery-item.wide { grid-column: span 4; }
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; }
  .gallery-item, .gallery-item.wide { grid-column: span 2; grid-row: span 2; }
}

/* Lightbox for gallery */
.lightbox {
  position: fixed; inset: 0; background: rgba(8,20,12,0.92); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 10px; }
.lightbox .lb-caption { position: absolute; bottom: 26px; left: 0; right: 0; color: #fff; text-align: center; margin: 0 auto; max-width: 700px; font-size: 0.95rem; }
.lightbox .lb-close { position: absolute; top: 22px; right: 30px; color: #fff; font-size: 2rem; background: none; border: none; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); color: #fff; border: none; width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; }
.lightbox .lb-prev { left: 20px; }
.lightbox .lb-next { right: 20px; }

/* ---------- Contact / get involved ---------- */
.contact-block { background: linear-gradient(120deg, var(--green-dark), var(--teal-dark)); color: #fff; border-radius: var(--radius); padding: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-block h2, .contact-block p { color: #fff; }
.contact-block .form-panel { background: #fff; border-radius: var(--radius); padding: 26px; }
.form-panel label { display: block; font-weight: 600; font-size: 0.88rem; margin: 12px 0 6px; color: var(--ink); }
.form-panel input, .form-panel textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.95rem; font-family: inherit;
}
.form-panel textarea { min-height: 110px; resize: vertical; }
.status-msg { margin-top: 12px; font-size: 0.9rem; font-weight: 600; }
.status-msg.ok { color: var(--green); }
.status-msg.err { color: #c0392b; }

/* ---------- Footer ---------- */
footer.site-footer { background: #0b1f13; color: #cfe3d5; padding: 56px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer-grid h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-grid a { display: block; color: #cfe3d5; text-decoration: none; font-size: 0.9rem; margin-bottom: 8px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: #90a89a; }
.footer-bottom .copyright { cursor: default; user-select: none; }

/* ---------- Language visibility ---------- */
[data-lang="so"] { display: none; }
body.lang-so [data-lang="en"] { display: none; }
body.lang-so [data-lang="so"] { display: inherit; }

/* ---------- Carousel (article galleries / hero) ---------- */
.carousel { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--green-light); }
.carousel-track { position: relative; width: 100%; aspect-ratio: 16/9; }
.carousel-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease;
  background-size: cover; background-position: center;
}
.carousel-slide.active { opacity: 1; }
.carousel-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.carousel-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,0.5); padding: 0; }
.carousel-dots button.active { background: #fff; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.35); color: #fff; border: none; width: 38px; height: 38px;
  border-radius: 50%; font-size: 1.1rem; z-index: 3;
}
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }

/* ---------- Article page ---------- */
.article-head { padding: 50px 0 30px; }
.article-head .tag { color: var(--orange); font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.5px; }
.article-head h1 { font-size: 2.3rem; margin: 10px 0; }
.article-meta { color: var(--gray); font-size: 0.9rem; }
.article-body { max-width: 760px; margin: 34px auto 0; font-size: 1.05rem; }
.article-body p { color: var(--ink); margin-bottom: 20px; }
.attachment-box { border: 1px dashed var(--border); border-radius: 10px; padding: 16px 20px; display: flex; align-items: center; gap: 12px; margin-top: 30px; }
.attachment-box a { font-weight: 700; color: var(--green); text-decoration: none; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
@media (max-width: 760px) {
  .hero h1 { font-size: 2.1rem; }
  .contact-block { grid-template-columns: 1fr; padding: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  nav.main-nav { display: none; }
}
