/* =========================================================
   SAVE THE FAMILY FOUNDATION — STYLESHEET
   Design concept: "Sunrise over Mumias" — a rising gold/rust
   sunrise against deep forest teal, symbolizing hope restored.
   ========================================================= */

:root {
  --color-bg: #FBF8F2;
  --color-bg-alt: #F1E8D6;
  --color-dark: #16342C;
  --color-dark-2: #0E2420;
  --color-gold: #E8A93D;
  --color-gold-soft: #F3CE8C;
  --color-rust: #B44E2E;
  --color-rust-dark: #93401F;
  --color-text: #1E2622;
  --color-text-soft: #4B5750;
  --color-text-light: #F5EFE1;
  --color-text-light-soft: #C9D3CC;
  --color-line: rgba(22, 52, 44, 0.14);
  --color-line-light: rgba(245, 239, 225, 0.2);

  --font-display: 'Fraunces', serif;
  --font-body: 'Work Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --max-width: 1180px;
  --radius: 14px;
  --shadow-soft: 0 20px 40px -20px rgba(14, 36, 32, 0.25);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-dark);
}

em { font-style: italic; color: var(--color-gold); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
}

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-rust);
  margin-bottom: 12px;
  display: block;
}
.eyebrow-light { color: var(--color-gold); }

.section-lead {
  font-size: 1.1rem;
  color: var(--color-text-soft);
  max-width: 640px;
  margin-top: 16px;
}
.light-lead { color: var(--color-text-light-soft); }
.light-heading { color: var(--color-text-light); }

h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.25rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-rust {
  background: var(--color-rust);
  color: var(--color-text-light);
  box-shadow: 0 12px 24px -10px rgba(180, 78, 46, 0.55);
}
.btn-rust:hover { background: var(--color-rust-dark); }

.btn-dark {
  background: var(--color-dark);
  color: var(--color-text-light);
}
.btn-dark:hover { background: var(--color-dark-2); }

.btn-outline-light {
  border-color: var(--color-line-light);
  color: var(--color-text-light);
}
.btn-outline-light:hover { border-color: var(--color-gold); color: var(--color-gold); }

.btn-outline-dark {
  border-color: var(--color-dark);
  color: var(--color-dark);
}
.btn-outline-dark:hover { background: var(--color-dark); color: var(--color-text-light); }

.btn-group { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.btn-group-center { justify-content: flex-start; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(251, 248, 242, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark { display: flex; align-items: center; }
.logo-mark img { width: 42px; height: 42px; object-fit: contain; }
.logo-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.15;
  color: var(--color-dark);
}
.logo-text strong { font-weight: 700; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-dark);
  position: relative;
}
.main-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--color-gold);
  transition: width 0.2s ease;
}
.main-nav a:not(.btn):hover::after { width: 100%; }
.nav-donate { padding: 10px 22px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  width: 32px;
  height: 32px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  background: var(--color-dark);
  padding: 170px 0 0;
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-sunrise {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-sunrise svg { width: 100%; height: 100%; display: block; }

.hero-inner {
  position: relative;
  z-index: 2;
  padding-bottom: 60px;
}

.hero h1 {
  color: var(--color-text-light);
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  max-width: 900px;
  font-weight: 600;
}

.hero-lead {
  color: var(--color-text-light-soft);
  font-size: 1.15rem;
  max-width: 560px;
  margin-top: 22px;
}

.hero-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 340px;
  margin-top: 40px;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

/* =========================================================
   SECTIONS — generic
   ========================================================= */
.section { padding: 100px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-dark { background: var(--color-dark); }
.section-dark h3 { color: var(--color-text-light); }

/* ---------- Split layout ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split-reverse .split-media { order: 2; }
.split-reverse .split-content { order: 1; }
.transforming-lives { margin-top: 100px; }

.split-media img {
  width: 100%;
  aspect-ratio: 4 / 3.2;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.pillar-list {
  margin-top: 28px;
  border-top: 1px solid var(--color-line);
}
.pillar-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-line);
}
.pillar-index {
  font-weight: 600;
  color: var(--color-dark);
  min-width: 190px;
}
.pillar-desc { color: var(--color-text-soft); }

/* ---------- About / Vision-Mission ---------- */
.vm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 40px;
}
.vm-card {
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 32px;
}
.vm-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--color-rust);
  display: block;
  margin-bottom: 12px;
}
.vm-card p { color: var(--color-text-soft); font-size: 1.05rem; }

.values-objectives {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 56px;
}
.values-objectives h3 { margin-bottom: 18px; }

.chip-list { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-list li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--color-dark);
  color: var(--color-text-light);
}

.check-list li {
  position: relative;
  padding: 8px 0 8px 30px;
  color: var(--color-text-soft);
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 13px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-gold);
}

/* ---------- Programs ---------- */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.program-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.program-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.program-media { height: 170px; overflow: hidden; }
.program-media img { width: 100%; height: 100%; object-fit: cover; }
.program-card h3 { padding: 20px 20px 6px; font-size: 1.1rem; }
.program-card p { padding: 0 20px 24px; color: var(--color-text-soft); font-size: 0.95rem; }

/* ---------- Impact ---------- */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.impact-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.impact-card img { width: 100%; height: 100%; object-fit: cover; }
.impact-card figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 16px;
  background: linear-gradient(to top, rgba(14, 36, 32, 0.9), transparent);
  color: var(--color-text-light);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 48px;
}
.gallery-item {
  border: none;
  background: none;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(14, 36, 32, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 60px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.lightbox.open { display: flex; opacity: 1; }

.lightbox img {
  max-width: min(84vw, 900px);
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  animation: lightbox-pop 0.25s ease;
}

@keyframes lightbox-pop {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--color-text-light);
  font-size: 2rem;
  line-height: 1;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
}
.lightbox-close:hover { background: var(--color-rust); }

.lightbox-nav {
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--color-text-light);
  font-size: 2.4rem;
  line-height: 1;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.lightbox-nav:hover { background: var(--color-gold); color: var(--color-dark); }
.lightbox-prev { margin-right: 24px; }
.lightbox-next { margin-left: 24px; }

.lightbox-counter {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text-light-soft);
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  .lightbox { padding: 20px; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.8rem; }
  .lightbox-prev { margin-right: 10px; }
  .lightbox-next { margin-left: 10px; }
}

/* ---------- Get Involved ---------- */
.journey-box {
  margin-top: 40px;
  padding: 36px;
  background: var(--color-bg);
  border-left: 4px solid var(--color-gold);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.journey-box h3 { margin-bottom: 12px; }
.journey-box p { color: var(--color-text-soft); }

/* ---------- Donate ---------- */
.donate-card {
  margin-top: 40px;
  max-width: 560px;
  background: var(--color-dark);
  color: var(--color-text-light);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-soft);
}
.donate-card h3 { color: var(--color-text-light); margin-bottom: 24px; }

.bank-details { display: flex; flex-direction: column; gap: 16px; }
.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-line-light);
}
.bank-row dt { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; color: var(--color-gold); letter-spacing: 0.06em; }
.bank-row dd { font-weight: 600; display: flex; align-items: center; gap: 10px; }

.copy-btn {
  background: var(--color-gold);
  color: var(--color-dark);
  border: none;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  transition: background 0.2s ease;
}
.copy-btn:hover { background: var(--color-gold-soft); }
.copy-btn.copied { background: #6FBF8B; }

.donate-thanks {
  margin-top: 24px;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-text-light-soft);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  margin-top: 48px;
}

.contact-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-line-light);
}
.contact-icon svg { width: 22px; height: 22px; color: var(--color-gold); }
.contact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-light-soft);
  margin-bottom: 4px;
}
.contact-list li div { display: flex; flex-direction: column; gap: 2px; color: var(--color-text-light); }
.contact-list a:hover { color: var(--color-gold); }

.quick-connect { margin-top: 32px; }
.quick-connect-buttons { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.quick-btn {
  border: 1px solid var(--color-line-light);
  color: var(--color-text-light);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.quick-btn:hover { border-color: var(--color-gold); color: var(--color-gold); }
.quick-whatsapp { border-color: #3FBF6A; color: #6FDF97; }
.quick-whatsapp:hover { background: #3FBF6A; color: var(--color-dark); }

.social-icons { display: flex; gap: 14px; margin-top: 16px; }
.social-icons svg { width: 20px; height: 20px; }
.social-icons a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--color-line-light);
  color: var(--color-text-light);
  transition: background 0.2s ease, color 0.2s ease;
}
.social-icons a:hover { background: var(--color-gold); color: var(--color-dark); }

/* ---------- Contact form ---------- */
.contact-form {
  background: var(--color-text-light);
  border-radius: var(--radius);
  padding: 36px;
}
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-soft);
}
.form-row input, .form-row textarea, .form-row select {
  border: 1px solid var(--color-line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  color: var(--color-text);
}
.form-row textarea { resize: vertical; }
.form-submit { width: 100%; margin-top: 6px; }
.form-note { margin-top: 12px; font-size: 0.82rem; color: var(--color-text-soft); text-align: center; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--color-dark-2); color: var(--color-text-light-soft); padding-top: 72px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--color-line-light);
}
.footer-logo { color: var(--color-text-light); font-size: 1.05rem; margin-bottom: 14px; display: inline-block; }
.footer-about p { font-size: 0.92rem; max-width: 260px; }
.footer-col h4 {
  color: var(--color-text-light);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; font-size: 0.92rem; }
.footer-col a:hover { color: var(--color-gold); }
.footer-social-heading { margin-top: 24px; }
.footer-socials a { border-color: var(--color-line-light); width: 36px; height: 36px; }

.footer-bottom {
  text-align: center;
  padding: 22px 0;
  font-size: 0.82rem;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-rust);
  color: var(--color-text-light);
  border-radius: 50%;
  font-size: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 90;
  box-shadow: var(--shadow-soft);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .split, .vm-grid, .values-objectives, .contact-grid { grid-template-columns: 1fr; }
  .programs-grid { grid-template-columns: repeat(2, 1fr); }
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
  .split-reverse .split-media, .split-reverse .split-content { order: initial; }
  .transforming-lives .split-media { order: -1; }
}

@media (max-width: 860px) {
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    border-bottom: 1px solid var(--color-line);
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-donate { align-self: flex-start; }
}

@media (max-width: 640px) {
  .section { padding: 70px 0; }
  .hero { padding-top: 130px; }
  .hero-image { height: 240px; }
  .programs-grid { grid-template-columns: 1fr; }
  .impact-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .btn-group { flex-direction: column; align-items: stretch; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
/* ===========================
   TEAM SECTION
=========================== */

.team-section{
    padding:80px 8%;
    background:#f5f7fb;
}

.section-title{
    text-align:center;
    margin-bottom:50px;
}

.section-title h2{
    font-size:38px;
    color:#0b3d91;
    margin-bottom:10px;
}

.section-title p{
    color:#666;
    max-width:700px;
    margin:auto;
    line-height:1.8;
}

.team-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:35px;
}

.team-card{
    background:#fff;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 10px 25px rgba(0,0,0,.12);
    transition:.4s;
}

.team-card:hover{
    transform:translateY(-10px);
    box-shadow:0 18px 40px rgba(0,0,0,.2);
}

.team-image{
    width:100%;
    height:320px;
    overflow:hidden;
}

.team-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:.5s;
}

.team-card:hover img{
    transform:scale(1.08);
}

.team-content{
    padding:25px;
}

.team-content h3{
    color:#111;
    margin-bottom:8px;
    font-size:24px;
}

.role{
    display:inline-block;
    background:#0b3d91;
    color:#fff;
    padding:8px 16px;
    border-radius:25px;
    font-size:14px;
    font-weight:600;
    margin-bottom:18px;
}

.team-content p{
    color:#555;
    line-height:1.7;
    font-size:15px;
}

/* Mobile */

@media(max-width:768px){

.team-section{
    padding:60px 20px;
}

.section-title h2{
    font-size:30px;
}

.team-image{
    height:280px;
}

}