/* =========================================================
   WRASAI UGANDA — design system
   Palette pulled from the logo (indigo woman / water drop / leaves)
   and from the actual field photos: red laterite courtyards,
   brick-and-thatch homes, blue plastic tarps and chairs.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700;9..144,900&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Color */
  --earth:        #B5502E;   /* red laterite soil — the ground every photo stands on */
  --earth-dark:   #7C3620;
  --indigo:       #4B1E6E;   /* deepened brand purple, from the logo figure */
  --indigo-light: #7A3FAF;
  --water:        #2C7DA0;   /* the logo's water drop */
  --leaf:         #5E8C3A;   /* the logo's leaves */
  --ink:          #2A2320;
  --ink-soft:     #5C5049;
  --cream:        #FBF6EC;   /* warm paper background */
  --card:         #FFFFFF;
  --line:         #E7DCC9;

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Work Sans', 'Segoe UI', Tahoma, sans-serif;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(75, 30, 110, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--cream);
  color: var(--ink);
  padding-top: 84px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--indigo); }

::selection { background: var(--earth); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* =========================================================
   NAVBAR
   ========================================================= */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  width: 100%;
  background: linear-gradient(120deg, var(--indigo) 0%, #3A1657 100%);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 10px 28px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.18);
}

nav.site-nav .logo {
  height: 56px;
  width: 56px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 18px;
  border: 2px solid rgba(255,255,255,0.5);
}

nav.site-nav .brand {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.8rem, 1.5vw, 1.05rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin-right: auto;
  text-decoration: none;
  white-space: normal;
  max-width: 380px;
}

nav.site-nav .nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

nav.site-nav .nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
}

nav.site-nav .nav-links a {
  color: rgba(255,255,255,0.92);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 999px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

nav.site-nav .nav-links a:hover,
nav.site-nav .nav-links a:focus-visible {
  background-color: rgba(255,255,255,0.16);
  outline: none;
}

nav.site-nav .nav-links a.current {
  background-color: var(--earth);
  color: #fff;
}

nav.site-nav .nav-links a.donate-link {
  background-color: var(--earth);
  color: #fff;
}
nav.site-nav .nav-links a.donate-link:hover {
  background-color: var(--earth-dark);
}

@media (max-width: 980px) {
  nav.site-nav .nav-toggle { display: block; }
  nav.site-nav .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--indigo);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 18px;
    display: none;
    gap: 4px;
  }
  nav.site-nav .nav-links.open { display: flex; }
  nav.site-nav .nav-links a { text-align: center; padding: 12px; }
}

/* =========================================================
   SHARED LAYOUT PRIMITIVES
   ========================================================= */
.container {
  max-width: 960px;
  margin: 48px auto;
  background: var(--card);
  padding: 44px 48px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--earth);
  margin-bottom: 10px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--indigo);
  margin-top: 0;
  line-height: 1.2;
}

h1 { font-size: 2.6rem; font-weight: 700; }
h2 { font-size: 1.9rem; font-weight: 700; margin-bottom: 0.9rem; }
h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.6rem; color: var(--earth-dark); }

.section-title { text-align: center; margin-bottom: 8px; }
.section-sub {
  text-align: center;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto 36px;
}

p, li { font-size: 16px; color: var(--ink); }

ul.drop-list { list-style: none; padding-left: 0; margin: 0; }
ul.drop-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
}
ul.drop-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 10px;
  height: 13px;
  background: var(--water);
  clip-path: path("M5 0 C5 0 10 8 10 10.5 A5 5 0 1 1 0 10.5 C0 8 5 0 5 0 Z");
}

/* Earth-tone wave divider — the signature motif, echoing the red-soil
   courtyards where the work in every photo actually happens */
.soil-divider {
  width: 100%;
  height: 60px;
  display: block;
  margin-top: -1px;
}

/* =========================================================
   HERO (home page)
   ========================================================= */
.hero {
  position: relative;
  min-height: 74vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(43,20,10,0.35) 0%, rgba(43,20,10,0.55) 55%, rgba(43,20,10,0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 28px 80px;
  text-align: center;
}

.hero-content .eyebrow { color: #F0C29A; }

.hero-content h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 18px;
}

.hero-content p {
  color: rgba(255,255,255,0.92);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  padding: 13px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary {
  background-color: var(--earth);
  color: #fff;
  box-shadow: 0 8px 20px rgba(181, 80, 46, 0.4);
}
.btn-primary:hover { background-color: var(--earth-dark); transform: translateY(-2px); }

.btn-outline {
  background-color: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-outline:hover { background-color: rgba(255,255,255,0.15); transform: translateY(-2px); }

.btn-solid {
  background-color: var(--indigo);
  color: #fff;
}
.btn-solid:hover { background-color: var(--indigo-light); transform: translateY(-2px); }

/* =========================================================
   CARD GRIDS (objectives / focus areas)
   ========================================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
  margin: 0 auto 10px;
}

.info-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.info-card .badge {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
  margin-bottom: 14px;
}
.badge.b-water { background: var(--water); }
.badge.b-leaf { background: var(--leaf); }
.badge.b-earth { background: var(--earth); }
.badge.b-indigo { background: var(--indigo); }

.info-card h3 { margin-bottom: 8px; }
.info-card p { color: var(--ink-soft); margin-bottom: 0; font-size: 15px; }

/* =========================================================
   STORY / FEATURE SPLIT (home page image feature)
   ========================================================= */
.story-section {
  max-width: 1000px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.story-grid img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.story-caption {
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
  max-width: 640px;
  margin: 18px auto 0;
  font-size: 15px;
}

@media (max-width: 700px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-grid img { height: 240px; }
}

/* =========================================================
   GALLERY
   ========================================================= */
.slideshow-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.slide { display: none; position: relative; }
.slide.fade-in { animation: fadeSlide 0.8s ease; }

.slide img { width: 100%; height: auto; max-height: 480px; object-fit: cover; display: block; }

@keyframes fadeSlide { from { opacity: 0.25; } to { opacity: 1; } }

.caption, .caption2 {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(0deg, rgba(42,20,10,0.88), rgba(42,20,10,0));
  color: #fff;
  padding: 30px 18px 14px;
  font-size: 15px;
  text-align: center;
}

.dots { text-align: center; margin-top: 18px; }

.dot {
  height: 12px; width: 12px;
  margin: 0 5px;
  background-color: var(--line);
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.dot:hover, .dot.active { background-color: var(--earth); transform: scale(1.15); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.gallery-item img { width: 100%; height: 220px; object-fit: cover; }

.gallery-item .caption, .gallery-item .caption2 {
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 24px 12px 10px;
  font-size: 13.5px;
}
.gallery-item:hover .caption,
.gallery-item:hover .caption2 { opacity: 1; }

/* =========================================================
   FORMS
   ========================================================= */
form.styled-form {
  display: flex;
  flex-direction: column;
}

form.styled-form label {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--indigo);
  font-size: 15px;
}

form.styled-form input,
form.styled-form textarea {
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  font-size: 16px;
  font-family: var(--font-body);
  resize: vertical;
  background: var(--cream);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

form.styled-form input:focus,
form.styled-form textarea:focus {
  border-color: var(--water);
  outline: none;
  box-shadow: 0 0 0 3px rgba(44,125,160,0.18);
  background: #fff;
}

.confirmation {
  margin-top: 15px;
  padding: 14px 16px;
  border-radius: 8px;
  background-color: #e4f2df;
  color: #33551f;
  border: 1px solid #bcdcaa;
  display: none;
  font-weight: 600;
}

/* =========================================================
   DONATE PAGE
   ========================================================= */
.donate-hero {
  text-align: center;
}

.donate-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 34px;
  text-align: left;
}

.donate-methods .info-card p { margin-bottom: 6px; }
.donate-methods .info-card strong { color: var(--indigo); }

.copy-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14.5px;
}
.copy-field:last-of-type { border-bottom: none; }
.copy-field span { color: var(--ink); word-break: break-word; }
.copy-field strong { color: var(--indigo); }

.copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--water);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.copy-btn:hover { background: var(--indigo); }
.copy-btn:active { transform: scale(0.96); }
.copy-btn.copied { background: var(--leaf); }

/* =========================================================
   FOOTER
   ========================================================= */
footer.site-footer {
  background: linear-gradient(135deg, #3A1657 0%, #1E0A30 100%);
  color: #fff;
  text-align: center;
  padding: 56px 20px 30px;
  margin-top: 70px;
  border-top: 5px solid var(--earth);
}

footer .footer-logo img {
  width: 84px;
  height: auto;
  border-radius: 50%;
  margin-bottom: 16px;
  border: 2px solid rgba(255,255,255,0.4);
}

footer .footer-links a {
  color: #fff;
  text-decoration: none;
  margin: 0 14px;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.3s ease;
}
footer .footer-links a:hover { color: var(--earth); }

.social-icons { margin-top: 22px; }
.social-icons a {
  color: #fff;
  margin: 0 10px;
  font-size: 20px;
  transition: color 0.3s ease;
}
.social-icons a:hover { color: var(--earth); }

.footer-info {
  margin-top: 22px;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
}
.footer-info a { color: #F0C29A; text-decoration: none; }

.vision {
  margin-top: 26px;
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  font-style: italic;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.copyright {
  margin-top: 22px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* =========================================================
   PAGE HERO (smaller hero banner for interior pages —
   ties About/Gallery/Contact/Donate back to the homepage look)
   ========================================================= */
.page-hero {
  position: relative;
  min-height: 34vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
  text-align: center;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(75,30,110,0.82) 0%, rgba(43,20,10,0.72) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  padding: 40px 24px;
}

.page-hero-content .eyebrow { color: #F0C29A; }

.page-hero-content h1 {
  color: #fff;
  margin-bottom: 6px;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}

.page-hero-content p {
  color: rgba(255,255,255,0.9);
  max-width: 560px;
  margin: 8px auto 0;
  font-size: 16px;
}

/* =========================================================
   SCROLL-REVEAL ANIMATION
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   BACK TO TOP BUTTON
   ========================================================= */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--earth);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
  z-index: 900;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--earth-dark); }

/* =========================================================
   FACT CALLOUT (sourced statistics, e.g. WHO figures)
   ========================================================= */
.fact-callout {
  background: var(--cream);
  border-left: 4px solid var(--water);
  border-radius: 10px;
  padding: 20px 22px;
  margin: 0 auto 30px;
  max-width: 780px;
  font-size: 15px;
  color: var(--ink-soft);
}
.fact-callout strong { color: var(--indigo); }
.fact-callout .fact-source {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
}

/* =========================================================
   MAP EMBED (contact page)
   ========================================================= */
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 34px;
}
.map-wrap iframe {
  width: 100%;
  height: 280px;
  border: 0;
  display: block;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 700px) {
  .container { padding: 30px 22px; margin: 30px auto; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}
