/* ============================================
   WATWZ – We Are The World Zambia
   Brand Stylesheet
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================
   CSS Custom Properties (Brand Tokens)
   ============================================ */
:root {
  --green: #087443;
  --dark-green: #04532f;
  --gold: #f2b632;
  --cream: #fffaf0;
  --ink: #111817;
  --gray: #66706d;
  --light: #f4f7f5;
  --white: #ffffff;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1200px;
  --border-radius: 20px;
  --transition: 0.3s ease;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);

  --header-height: 80px;
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

h4 {
  font-size: 1.15rem;
}

p {
  margin-bottom: 1rem;
  color: var(--gray);
}

/* ============================================
   Utility Classes
   ============================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--light);
}

.text-center {
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--dark-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(8, 116, 67, 0.35);
}

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

.btn-outline:hover {
  background: var(--green);
  color: var(--white);
  transform: translateY(-2px);
}

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

.btn-brand:hover {
  background: var(--dark-green);
  border-color: var(--dark-green);
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}

.btn-gold:hover {
  background: #e6a820;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 182, 50, 0.4);
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.05rem;
}

/* ============================================
   Header
   ============================================ */
#siteHeader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
}

#siteHeader.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--green);
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(8,116,67,.25);
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header-login {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  padding: 8px 4px;
  transition: color var(--transition);
}

.header-login:hover {
  color: var(--green);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.desktop-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  position: relative;
}

.desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green);
  transition: width var(--transition);
}

.desktop-nav a:hover {
  color: var(--green);
}

.desktop-nav a:hover::after {
  width: 100%;
}

/* Prevent underline animation on dropdown items */
.site-header .nav-dropdown-menu a::after {
  display: none !important;
}
.site-header .nav-dropdown-menu a {
  position: relative !important;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
#mobileMenu {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 999;
  padding: 32px 24px;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

#mobileMenu.open {
  display: flex;
}

#mobileOverlay {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 998;
}

#mobileOverlay.open {
  display: block;
}

#mobileMenu a {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 12px 0;
  border-bottom: 1px solid var(--light);
  color: var(--ink);
}

#mobileMenu a:hover {
  color: var(--green);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 120px 24px 80px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(4, 83, 47, 0.85) 0%,
    rgba(8, 116, 67, 0.7) 50%,
    rgba(17, 24, 23, 0.6) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero .badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  color: var(--gold);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(242, 182, 50, 0.3);
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 600px;
  margin: 0 auto 36px;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================
   Grid Layouts
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.programmes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.wall-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
}

.light-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ============================================
   Cards – Base
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

/* Programme Cards */
.programme-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.programme-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--green);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.programme-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.programme-card:hover::before {
  transform: scaleX(1);
}

.programme-card .card-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
}

/* Story Cards */
.story-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.story-card .story-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.story-card .story-body {
  padding: 24px;
}

.story-card .story-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 10px;
}

.story-card .story-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.story-card .story-excerpt {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.5;
}

.story-card .story-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--light);
}

/* Wall Cards */
.wall-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.wall-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.wall-card .wall-quote {
  font-size: 1rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 20px;
  position: relative;
  padding-left: 20px;
  border-left: 3px solid var(--green);
}

.wall-card .wall-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Light Cards */
.light-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.light-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.light-card .light-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}

/* Community Cards */
.community-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.community-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.community-card .community-avatar {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.community-card .community-info {
  padding: 20px;
  text-align: center;
}

/* Stat Cards */
.stat-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.stat-card .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--gray);
  font-weight: 500;
}

/* ============================================
   Impact Section
   ============================================ */
.impact-section {
  background: var(--green);
  color: var(--white);
}

.impact-section h2,
.impact-section .eyebrow {
  color: var(--white);
}

.impact-section .eyebrow {
  color: var(--gold);
}

.impact-section .stat-number {
  color: var(--gold);
}

.impact-section .stat-label {
  color: rgba(255, 255, 255, 0.8);
}

.impact-section .stat-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.impact-section .stat-card:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-6px);
}

/* ============================================
   Humanity Wall
   ============================================ */
.humanity-wall .wall-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--ink);
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(8, 116, 67, 0.15);
}

.form-control::placeholder {
  color: #9ca3af;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2366706d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-green {
  background: rgba(8, 116, 67, 0.1);
  color: var(--green);
}

.badge-gold {
  background: rgba(242, 182, 50, 0.15);
  color: #b8860b;
}

.badge-gray {
  background: var(--light);
  color: var(--gray);
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray);
  background: var(--white);
  border: 1px solid #e5e7eb;
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: var(--green);
  color: var(--green);
}

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

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--light);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   Flash Messages
   ============================================ */
.flash {
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: flashIn 0.3s ease;
}

.flash-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.flash-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.flash-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

@keyframes flashIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Modals
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--border-radius);
  max-width: 540px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
  animation: modalIn 0.25s ease;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  font-size: 1.1rem;
  transition: background var(--transition);
}

.modal-close:hover {
  background: #e5e7eb;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 32px;
}

.footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 0.9rem;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}

.social-links a:hover {
  background: var(--green);
  color: var(--white);
}

/* ============================================
   Scroll Reveal / Animations
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   Sticky Sidebar
   ============================================ */
.sidebar-sticky {
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 16px rgba(8, 116, 67, 0.35);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--dark-green);
  transform: translateY(-3px);
}

/* ============================================
   Tables (Admin)
   ============================================ */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-table th {
  background: var(--light);
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 14px 20px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--light);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: rgba(244, 247, 245, 0.5);
}

/* ============================================
   Dashboard Sidebar
   ============================================ */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  min-height: calc(100vh - var(--header-height));
  padding-top: calc(var(--header-height) + 32px);
}

.dashboard-sidebar {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 28px 20px;
  position: sticky;
  top: calc(var(--header-height) + 32px);
  align-self: start;
}

.dashboard-sidebar .sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--gray);
  transition: all var(--transition);
  margin-bottom: 4px;
}

.dashboard-sidebar .sidebar-nav a:hover,
.dashboard-sidebar .sidebar-nav a.active {
  background: var(--light);
  color: var(--green);
}

.dashboard-sidebar .sidebar-nav a.active {
  background: rgba(8, 116, 67, 0.08);
  font-weight: 600;
}

/* ============================================
   Profile Card
   ============================================ */
.profile-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 32px;
  text-align: center;
}

.profile-card .profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 auto 16px;
}

.profile-card .profile-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-card .profile-role {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 20px;
}

/* ============================================
   Tabs
   ============================================ */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--light);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 28px;
}

.tab-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray);
  transition: all var(--transition);
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  background: var(--white);
  color: var(--green);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================================
   Accordion (FAQ)
   ============================================ */
.accordion-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
  background: var(--white);
  color: var(--ink);
  transition: background var(--transition);
}

.accordion-header:hover {
  background: var(--light);
}

.accordion-icon {
  transition: transform var(--transition);
  font-size: 1.2rem;
  color: var(--gray);
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: 0 20px 18px;
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.7;
}

.accordion-item.open .accordion-body {
  display: block;
}

/* ============================================
   Heart / Vote Buttons
   ============================================ */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
  background: var(--light);
  color: var(--gray);
}

.action-btn:hover {
  background: #e5e7eb;
}

.action-btn.liked {
  background: #fef2f2;
  color: #dc2626;
}

.action-btn.voted {
  background: rgba(8, 116, 67, 0.08);
  color: var(--green);
}

/* ============================================
   Challenge Tracker
   ============================================ */
.challenge-day {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--white);
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all var(--transition);
}

.challenge-day:hover {
  border-color: var(--green);
}

.challenge-day.completed {
  background: rgba(8, 116, 67, 0.04);
  border-color: var(--green);
}

.challenge-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.challenge-day.completed .challenge-check {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--light);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 100px;
  transition: width 0.5s ease;
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: background var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  #siteHeader,
  .footer,
  .back-to-top,
  .hamburger,
  #mobileMenu,
  #mobileOverlay,
  .btn,
  .hero-buttons {
    display: none !important;
  }

  body {
    background: var(--white);
    color: var(--ink);
    font-size: 12pt;
  }

  .section {
    padding: 20px 0;
    page-break-inside: avoid;
  }

  .card,
  .stat-card,
  .programme-card,
  .wall-card {
    box-shadow: none;
    border: 1px solid #d1d5db;
    break-inside: avoid;
  }
}

/* ============================================
   Responsive – Tablet (900px)
   ============================================ */
@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }

  .header-cta .btn {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .programmes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wall-grid {
    grid-template-columns: 1fr;
  }

  .community-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .light-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
  }
}

/* ============================================
   Responsive – Small (600px)
   ============================================ */
@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 56px 0;
  }

  .hero {
    padding: 100px 16px 60px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .work-grid,
  .programmes-grid,
  .stories-grid,
  .community-grid,
  .stats,
  .light-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .pagination {
    flex-wrap: wrap;
  }

  .tabs {
    flex-wrap: wrap;
  }

  .modal {
    padding: 24px;
  }

  .admin-table {
    font-size: 0.8rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px 12px;
  }
}

/* ============================================
   Missing Utility Classes
   ============================================ */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 600px;
}

.text-center .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Hero Section (Inner Pages)
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--dark-green) 100%);
  color: #fff;
  padding: 120px 0 60px;
  text-align: center;
}

.hero h1 {
  color: #fff;
  margin-bottom: 12px;
}

.hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Card Styles
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

/* ============================================
   Form Controls
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
}

.form-control:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(8, 116, 67, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2366706d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ============================================
   Responsive Grid Overrides
   ============================================ */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 100px 0 40px;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .section {
    padding: 48px 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 80px 0 32px;
  }
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(8, 116, 67, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s ease;
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--dark-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(8, 116, 67, 0.4);
}

/* ============================================
   GLOBAL ADDITIONS — scroll effects, header, lightbox
   ============================================ */

/* Header scroll effect */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.12); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; height: 72px;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { width: 40px; height: 40px; background: var(--green); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; flex-shrink: 0; }
.logo-text { font-weight: 700; font-size: 0.82rem; color: var(--ink); letter-spacing: 0.5px; line-height: 1.3; }
.logo-divider { color: var(--gold); margin: 0 2px; }
.desktop-nav { display: flex; gap: 4px; }
.nav-link { padding: 8px 14px; border-radius: 6px; font-size: 0.88rem; font-weight: 500; color: var(--gray); transition: all 0.2s; white-space: nowrap; }
.nav-link:hover, .nav-link.active { color: var(--green); background: rgba(8,116,67,0.07); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.header-cta { padding: 9px 18px; font-size: 0.82rem; white-space: nowrap; }
.header-cta-alt { padding: 9px 18px; font-size: 0.82rem; white-space: nowrap; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: all 0.3s; display: block; }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile overlay */
.mobile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 998; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.mobile-overlay.open { opacity: 1; pointer-events: auto; }

/* Mobile menu drawer */
.mobile-menu { position: fixed; top: 72px; right: 0; bottom: 0; width: min(320px, 100vw); background: #fff; z-index: 999; transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1); overflow-y: auto; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-inner { padding: 24px; display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-link { display: block; padding: 13px 16px; border-radius: 8px; font-weight: 500; color: var(--gray); transition: all 0.2s; font-size: 1rem; }
.mobile-nav-link:hover { color: var(--green); background: rgba(8,116,67,0.07); }
.mobile-ctas { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.mobile-ctas .btn { justify-content: center; }

/* Lightbox */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.93); z-index: 9999; display: none; align-items: center; justify-content: center; }
.lightbox-overlay.open { display: flex; }
.lightbox-overlay > img { max-width: 92vw; max-height: 90vh; border-radius: 8px; object-fit: contain; }
.lightbox-close { position: absolute; top: 20px; right: 24px; background: rgba(255,255,255,0.1); border: none; color: #fff; font-size: 2rem; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* Fade-up reveal */
.fade-up { opacity: 0; transform: translateY(28px); transition: opacity 0.65s ease, transform 0.65s ease; }
.fade-up.visible { opacity: 1; transform: none; }

/* Page hero (inner pages) */
.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  align-items: center;
  padding: 130px 0 80px;
  margin-top: var(--header-height);
  color: #fff;
  background: var(--dark-green);
  text-align: center;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  z-index: 0;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(4,83,47,.72) 0%, rgba(8,116,67,.85) 100%);
  z-index: 1;
}
.page-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.1;
}
.page-hero p { color: rgba(255,255,255,.88); max-width: 620px; margin: 0 auto; line-height: 1.75; }
.page-hero .badge-gold { background: var(--gold); color: var(--ink); }
.page-hero .section-label { color: rgba(255,255,255,0.7); }

/* Main content offset for fixed header */
main > section:first-child, main > div:first-child { scroll-margin-top: 72px; }

/* ============================================
   Programmes Dropdown Navigation
   ============================================ */
.site-header .desktop-nav {
  position: relative;
}
.site-header .nav-dropdown {
  position: relative;
}
.site-header .nav-dropdown > .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gray);
  transition: all 0.2s;
  white-space: nowrap;
  cursor: pointer;
}
.site-header .nav-dropdown > .nav-link:hover,
.site-header .nav-dropdown.open > .nav-link {
  color: var(--green);
  background: rgba(8,116,67,0.07);
}
.site-header .nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 12px;
  padding: 8px 0;
  min-width: 240px;
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
  border: 1px solid #e5e7eb;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  z-index: 1001;
  pointer-events: none;
}
.site-header .nav-dropdown:hover > .nav-dropdown-menu,
.site-header .nav-dropdown:focus-within > .nav-dropdown-menu,
.site-header .nav-dropdown.open > .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.site-header .nav-dropdown-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gray);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
  position: relative;
}
.site-header .nav-dropdown-menu a:hover {
  background: var(--light);
  color: var(--green);
  padding-left: 24px;
}
.site-header .nav-dropdown-menu a::after {
  display: none !important;
}
.site-header .nav-dropdown .nav-link svg {
  transition: transform 0.2s;
}
.site-header .nav-dropdown:hover .nav-link svg,
.site-header .nav-dropdown.open .nav-link svg {
  transform: rotate(180deg);
}
@media (max-width: 900px) {
  .desktop-nav, .header-actions { display: none; }
  .hamburger { display: flex; }
  .logo-text { font-size: 0.72rem; }
}
