/* ===========================
   KIVULINI – MAIN STYLESHEET
   Color Palette: Orange, Yellow, Green, Black
   =========================== */

:root {
  --orange: #F97316;
  --orange-dark: #C2410C;
  --orange-light: #FED7AA;
  --orange-pale: #FFF7ED;
  --yellow: #EAB308;
  --yellow-light: #FEF9C3;
  --green: #16A34A;
  --green-light: #DCFCE7;
  --black: #0F172A;
  --dark: #1E293B;
  --mid: #334155;
  --muted: #64748B;
  --light: #94A3B8;
  --border: #E2E8F0;
  --bg: #FAFAF9;
  --white: #FFFFFF;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(15,23,42,0.08);
  --shadow-lg: 0 12px 40px rgba(15,23,42,0.14);
  font-size: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  color: var(--dark);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.25;
  color: var(--black);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ======= TYPOGRAPHY HELPERS ======= */
.section-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.75rem;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-top: 0.25rem;
}

.section-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--orange);
  white-space: nowrap;
  transition: color 0.2s;
}

.section-link:hover {
  color: var(--orange-dark);
}

.link-arrow {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--orange);
  margin-top: 1.25rem;
  transition: gap 0.2s;
}

.link-arrow:hover {
  text-decoration: underline;
}

/* ======= BUTTONS ======= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: 50px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}

.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(249,115,22,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--orange);
  border-color: var(--orange);
}

.btn-outline:hover {
  background: var(--orange);
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--orange-dark);
  border-color: var(--white);
}

.btn-white:hover {
  background: var(--orange-light);
}

.btn-ghost-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}

.btn-ghost-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
}

.btn-green {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-green:hover {
  background: #15803D;
  transform: translateY(-1px);
}

/* ======= HEADER / NAV ======= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(15,23,42,0.08);
}

.nav-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-mark {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
}

.logo-mark.small {
  width: 40px;
  height: 40px;
}

.logo-mark.small img {
  width: 40px;
  height: 40px;
}

/* Footer logo on dark bg needs brightness boost */
.site-footer .logo-mark img {
  filter: brightness(0) invert(1);
}

.logo-name {
  display: block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--black);
  line-height: 1;
}

.logo-sub {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 1;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links > li > a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mid);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
  color: var(--orange);
  background: var(--orange-pale);
}

.nav-links .nav-cta {
  background: var(--orange);
  color: white !important;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
}

.nav-links .nav-cta:hover {
  background: var(--orange-dark) !important;
}

/* Dropdown */
.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  list-style: none;
  padding: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  transform: translateX(-50%) translateY(-8px);
}

.has-dropdown:hover .dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.dropdown li a {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mid);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.dropdown li a:hover {
  background: var(--orange-pale);
  color: var(--orange);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ======= HERO ======= */
/* stat items used inside slider stat bar */
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--orange);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.3rem;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.15);
}

/* Hero actions used inside slides */
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ======= MISSION SECTION ======= */
.mission-section {
  padding: 6rem 0;
  background: var(--white);
}

.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.mission-visual {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mission-card {
  padding: 2rem;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.mission-card.orange {
  background: var(--orange-pale);
  border-left: 4px solid var(--orange);
}

.mission-card.green {
  background: var(--green-light);
  border-left: 4px solid var(--green);
}

.mission-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--black);
}

.mission-card p {
  font-size: 0.95rem;
  color: var(--mid);
  line-height: 1.6;
}

.mission-icon {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.mission-text h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 1.25rem;
}

.mission-text p {
  color: var(--mid);
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* ======= PROGRAMS STRIP ======= */
.programs-strip {
  padding: 6rem 0;
  background: var(--bg);
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.program-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.25s;
  text-decoration: none;
  color: inherit;
}

.program-card:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.prog-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.program-card h3 {
  font-size: 1rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
}

.program-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--orange);
  margin-top: auto;
}

/* ======= WHERE WE WORK ======= */
.where-section {
  padding: 6rem 0;
  background: var(--white);
}

.where-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.where-text h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 1rem;
}

.where-text p {
  color: var(--mid);
  margin-bottom: 1.5rem;
}

.regions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.region-tag {
  background: var(--orange-pale);
  border: 1px solid var(--orange-light);
  color: var(--orange-dark);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 50px;
}

.map-placeholder {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ======= EVENTS ======= */
.events-section {
  padding: 6rem 0;
  background: var(--bg);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.event-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  gap: 1.25rem;
  transition: all 0.25s;
}

.event-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--orange-light);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--orange);
  color: white;
  border-radius: 10px;
  padding: 0.75rem;
  min-width: 56px;
  height: fit-content;
}

.event-day {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1;
}

.event-month {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.event-info {
  flex: 1;
}

.event-loc {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.event-info h3 {
  font-size: 1rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  margin: 0.35rem 0 0.5rem;
  color: var(--black);
}

.event-info p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.card-link-small {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--orange);
}

/* ======= DONATE CTA ======= */
.donate-cta {
  background: linear-gradient(135deg, var(--orange-dark), #9A3412);
  padding: 5rem 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.cta-text h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: white;
  margin-bottom: 0.75rem;
}

.cta-text p {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  max-width: 520px;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ======= PARTNERS ======= */
.partners-section {
  padding: 4rem 0;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.partners-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.partner-logo {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--mid);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  transition: border-color 0.2s;
}

.partner-logo:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

/* ======= FOOTER ======= */
.site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.75);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.footer-brand .reg {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1.25rem;
}

.social-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.social-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s;
}

.social-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
}

.footer-col h4 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col ul a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
}

.footer-col ul a:hover {
  color: var(--orange);
}

.footer-col address {
  font-style: normal;
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.footer-col address a {
  color: var(--orange);
}

.newsletter-mini p {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.5rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  outline: none;
  font-family: inherit;
  min-width: 0;
}

.newsletter-form input::placeholder {
  color: rgba(255,255,255,0.35);
}

.newsletter-form input:focus {
  border-color: var(--orange);
}

.newsletter-form button {
  background: var(--orange);
  color: white;
  border: none;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  font-family: inherit;
}

.newsletter-form button:hover {
  background: var(--orange-dark);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.footer-bottom a {
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: var(--orange);
}

/* ======= PAGE HERO (sub-pages) ======= */
.page-hero {
  background: linear-gradient(135deg, #1a0a00 0%, #2d1200 60%, #1a2200 100%);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    url('https://kivulini.or.tz/images/slider/slide1.jpg'),
    url('https://kivulini.or.tz/images/slide1.jpg'),
    url('https://kivulini.or.tz/images/hero.jpg');
  background-size: cover;
  background-position: center top;
  opacity: 0.18;
  mix-blend-mode: luminosity;
  pointer-events: none;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(249,115,22,0.2), transparent 60%);
  z-index: 1;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
}

.page-hero .breadcrumb {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
}

.page-hero .breadcrumb a {
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}

.page-hero .breadcrumb a:hover { color: var(--orange); }

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: white;
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 600px;
}

/* ======= ABOUT PAGE ======= */
.content-section {
  padding: 5rem 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.prose h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.prose h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
}

.prose p {
  color: var(--mid);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.prose ul {
  margin: 0.5rem 0 1rem 1.5rem;
  color: var(--mid);
}

.prose ul li {
  margin-bottom: 0.5rem;
}

.principles-list {
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.principles-list li {
  padding: 1.25rem;
  background: var(--bg);
  border-radius: var(--radius);
  border-left: 3px solid var(--orange);
}

.principles-list li strong {
  display: block;
  font-size: 0.9rem;
  color: var(--black);
  margin-bottom: 0.25rem;
}

.principles-list li span {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ======= PROGRAMS PAGE ======= */
.program-full {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.program-full:last-child {
  border-bottom: none;
}

.program-full-inner {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 2rem;
  align-items: start;
}

.prog-number {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--orange-light);
  line-height: 1;
}

.program-full h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.program-full p {
  color: var(--mid);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

/* ======= STAFF PAGE ======= */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.staff-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s;
}

.staff-card:hover {
  box-shadow: var(--shadow);
}

.staff-avatar {
  height: 180px;
  background: linear-gradient(135deg, var(--orange-pale), var(--green-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--orange);
}

.staff-info {
  padding: 1.25rem;
}

.staff-info h3 {
  font-size: 1rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.25rem;
}

.staff-info .role {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ======= WHERE WE WORK MAP PAGE ======= */
.map-page-container {
  padding: 4rem 0;
}

.region-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}

.region-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-top: 3px solid var(--orange);
}

.region-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.region-card p {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ======= STORIES / EVENTS ======= */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.story-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
}

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

.story-img {
  height: 180px;
  background: linear-gradient(135deg, var(--orange-pale), var(--yellow-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.story-body {
  padding: 1.5rem;
}

.story-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  background: var(--orange-pale);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.story-body h3 {
  font-size: 1rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.story-body p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ======= CAREERS PAGE ======= */
.job-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.job-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  transition: border-color 0.2s;
}

.job-card:hover {
  border-color: var(--orange);
}

.job-meta {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.job-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: var(--bg);
  color: var(--mid);
  border: 1px solid var(--border);
}

.job-badge.open {
  background: var(--green-light);
  color: #166534;
  border-color: #bbf7d0;
}

/* ======= DONATE PAGE ======= */
.donate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.donation-amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.amount-btn {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s;
  font-family: inherit;
  color: var(--dark);
}

.amount-btn:hover,
.amount-btn.active {
  border-color: var(--orange);
  background: var(--orange-pale);
  color: var(--orange-dark);
}

.donate-form input,
.donate-form select,
.donate-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--dark);
  background: var(--white);
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.donate-form input:focus,
.donate-form select:focus {
  border-color: var(--orange);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ======= LIBRARY PAGE ======= */
.library-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.tab-btn.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

/* ======= CONTACT PAGE ======= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--orange-pale);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-info-item h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--black);
  font-family: 'Source Sans 3', sans-serif;
  margin-bottom: 0.25rem;
}

.contact-info-item p,
.contact-info-item a {
  font-size: 0.9rem;
  color: var(--mid);
}

.contact-info-item a:hover {
  color: var(--orange);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--dark);
  background: var(--white);
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--orange);
}

/* ======= RESPONSIVE ======= */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mission-grid,
  .where-grid,
  .two-col,
  .donate-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .stat-divider { display: none; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links > li > a {
    padding: 0.75rem 1rem;
  }

  .dropdown {
    position: static;
    opacity: 1;
    pointer-events: all;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--bg);
    margin-top: 0.25rem;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: 4rem 1.5rem 0;
  }

  .hero-stat-bar {
    margin-top: 2rem;
  }

  .cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .cta-actions {
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .donation-amounts {
    grid-template-columns: repeat(3, 1fr);
  }

  .container {
    padding: 0 1.25rem;
  }
}

/* ======= ANIMATIONS ======= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ======= PARTNER LOGOS REAL ======= */
.partner-logo-real {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 64px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.partner-logo-real:hover {
  border-color: var(--orange);
  box-shadow: 0 2px 12px rgba(249,115,22,0.12);
}

.partner-logo-real img {
  max-height: 38px;
  max-width: 130px;
  object-fit: contain;
  filter: grayscale(30%);
  transition: filter 0.2s;
}

.partner-logo-real:hover img {
  filter: grayscale(0%);
}

/* ======= HERO with overlay image ======= */
.hero-with-image {
  background: linear-gradient(135deg, #1a0a00 0%, #2d1200 40%, #1a2200 100%);
}

.hero-overlay-image {
  position: absolute;
  inset: 0;
  background-image: 
    url('https://kivulini.or.tz/images/slider/slide1.jpg'),
    url('https://kivulini.or.tz/images/slide1.jpg'),
    url('https://kivulini.or.tz/images/hero.jpg'),
    url('https://kivulini.or.tz/images/banner.jpg');
  background-size: cover;
  background-position: center top;
  opacity: 0.3;
  mix-blend-mode: luminosity;
}

/* ======= FOOTER CREDIT ======= */
.footer-credit {
  text-align: center;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
}

.footer-credit a {
  color: rgba(255,255,255,0.4);
  font-weight: 600;
  transition: color 0.2s;
}

.footer-credit a:hover {
  color: var(--orange);
}

/* ==============================
   HERO SLIDER
   ============================== */

.hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  max-height: 860px;
  overflow: hidden;
  background: #0f0800;
}

/* ── Slides ── */
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.9s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.30) 40%,
    rgba(0,0,0,0.72) 80%,
    rgba(0,0,0,0.82) 100%
  );
}

/* ── Slide content ── */
.slide-content {
  position: relative;
  z-index: 3;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  padding: 0 2rem 4rem;
}

.slide-content .hero-badge {
  display: inline-block;
  background: rgba(249,115,22,0.25);
  border: 1px solid rgba(249,115,22,0.5);
  color: #FED7AA;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  animation: none;
}

.slide.active .slide-content .hero-badge {
  animation: slideUp 0.6s 0.1s both ease;
}

.slide-content h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  max-width: 680px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  animation: none;
}

.slide.active .slide-content h1 {
  animation: slideUp 0.6s 0.2s both ease;
}

.slide-content h1 em {
  font-style: italic;
  color: var(--orange);
}

.slide-content p {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: rgba(255,255,255,0.82);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 2rem;
  animation: none;
}

.slide.active .slide-content p {
  animation: slideUp 0.6s 0.3s both ease;
}

.slide-content .hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: none;
}

.slide.active .slide-content .hero-actions {
  animation: slideUp 0.6s 0.4s both ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Outline white button variant for slider */
.btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: 50px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.6);
  text-decoration: none;
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
}

/* ── Navigation arrows ── */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  backdrop-filter: blur(4px);
}

.slider-arrow:hover {
  background: var(--orange);
  border-color: var(--orange);
  transform: translateY(-50%) scale(1.08);
}

.slider-arrow.prev { left: 1.5rem; }
.slider-arrow.next { right: 1.5rem; }

/* ── Dots ── */
.slider-dots {
  position: absolute;
  bottom: 8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.6rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  padding: 0;
}

.dot.active {
  background: var(--orange);
  transform: scale(1.3);
}

/* ── Stat bar sits at the bottom ── */
.hero-slider .hero-stat-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(15,8,0,0.75);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(249,115,22,0.25);
  padding: 1.25rem 2rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── Progress bar ── */
.hero-slider::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--orange);
  z-index: 20;
  animation: sliderProgress 5s linear infinite;
}

@keyframes sliderProgress {
  from { width: 0; }
  to   { width: 100%; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-slider {
    height: 100svh;
    min-height: 520px;
    max-height: none;
  }

  .slide-content {
    padding: 0 1.25rem 3.5rem;
  }

  .slide-content h1 {
    font-size: clamp(1.9rem, 8vw, 2.8rem);
  }

  .slider-arrow {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .slider-arrow.prev { left: 0.75rem; }
  .slider-arrow.next { right: 0.75rem; }

  .slider-dots { bottom: 7rem; }

  .hero-slider .hero-stat-bar {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .stat-number { font-size: 1.5rem; }
}
