/* ============================================
   HOPEVILLAS - African Children's Hope Foundation
   Main Stylesheet
   ============================================ */

/* ---------- CSS Variables / Brand Tokens ---------- */
:root {
  --green-dark: #1a5632;
  --green-mid: #228B22;
  --green-light: #e8f5e9;
  --gold: #E8A317;
  --gold-light: #fdf3dc;
  --maroon: #8B1A1A;
  --cream: #FFF9F0;
  --white: #ffffff;
  --black: #1a1a1a;
  --gray-100: #f7f7f7;
  --gray-200: #e5e5e5;
  --gray-400: #999;
  --gray-600: #666;
  --gray-800: #333;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--gray-800);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color var(--transition); }
ul { list-style: none; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; color: var(--green-dark); }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h4 { font-size: 1.2rem; }

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-title { margin-bottom: 20px; }

.section-desc {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 680px;
  margin-bottom: 48px;
}

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

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

.btn-primary {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: #c98b12;
  border-color: #c98b12;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 163, 23, 0.35);
}

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

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

.btn-donate {
  background: var(--maroon);
  color: var(--white);
  border-color: var(--maroon);
  font-size: 1.05rem;
  padding: 16px 40px;
}
.btn-donate:hover {
  background: #6e1515;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 26, 26, 0.35);
}

/* ---------- Top Bar ---------- */
.top-bar {
  background: var(--green-dark);
  color: var(--white);
  font-size: 0.82rem;
  padding: 8px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.top-bar a { color: var(--gold); }
.top-bar a:hover { text-decoration: underline; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.logo-link { display: flex; align-items: center; gap: 12px; }
.logo-link img { height: 56px; width: auto; }
.logo-text { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; color: var(--green-dark); line-height: 1.2; }
.logo-text small { display: block; font-family: var(--font-body); font-size: 0.65rem; font-weight: 400; color: var(--gray-600); letter-spacing: 1px; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-800);
  border-radius: 8px;
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--green-dark);
  background: var(--green-light);
}
.nav-links .btn { padding: 10px 24px; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-800);
  margin: 6px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,86,50,0.88) 0%, rgba(26,86,50,0.6) 50%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 700px;
  padding: 80px 0;
}

.hero h1 { color: var(--white); margin-bottom: 8px; }

.hero-tagline {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-style: italic;
  color: var(--gold);
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.15rem;
  line-height: 1.8;
  opacity: 0.92;
  margin-bottom: 36px;
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Stats Bar ---------- */
.stats-bar {
  background: var(--white);
  margin-top: -48px;
  position: relative;
  z-index: 3;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.stat-item {
  padding: 36px 24px;
  text-align: center;
  border-right: 1px solid var(--gray-200);
}
.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
  margin-bottom: 6px;
}

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

/* ---------- Section Padding ---------- */
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-alt { background: var(--gray-100); }
.section-cream { background: var(--cream); }
.section-green { background: var(--green-dark); color: var(--white); }
.section-green h2, .section-green h3 { color: var(--white); }
.section-green .section-desc { color: rgba(255,255,255,0.8); }

/* ---------- Mission Section ---------- */
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.mission-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}

.mission-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.mission-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: var(--gold);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
}

.mission-text .section-desc { margin-bottom: 24px; }

.mission-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.value-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--green-light);
  border-radius: var(--radius-sm);
}

.value-icon {
  width: 36px;
  height: 36px;
  background: var(--green-dark);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.value-item span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-dark);
}

/* ---------- Projects / Cards ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.project-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.project-card-img {
  height: 240px;
  overflow: hidden;
  position: relative;
}
.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.project-card:hover .project-card-img img { transform: scale(1.06); }

.project-card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--gold);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-card-body { padding: 28px; }
.project-card-body h3 { margin-bottom: 12px; font-size: 1.4rem; }
.project-card-body p { color: var(--gray-600); font-size: 0.95rem; margin-bottom: 20px; }

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---------- Programs Section ---------- */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.program-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border-top: 4px solid transparent;
}
.program-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--gold);
}

.program-icon {
  width: 64px;
  height: 64px;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 20px;
}

.program-card h4 { margin-bottom: 10px; }
.program-card p { font-size: 0.9rem; color: var(--gray-600); }

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--green-dark) 0%, #0d3d1f 100%);
  padding: 80px 0;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: var(--gold);
  opacity: 0.08;
  border-radius: 50%;
}

.cta-banner h2 { color: var(--white); margin-bottom: 16px; }
.cta-banner p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto 32px; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.08); }

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(0,0,0,0.6));
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-overlay span { color: var(--white); font-weight: 600; font-size: 0.9rem; }

.gallery-filter {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 20px;
  border: 2px solid var(--gray-200);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--white);
  color: var(--gray-600);
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--green-dark);
  color: var(--green-dark);
  background: var(--green-light);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: var(--green-light);
  border-radius: 3px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 48px;
  position: relative;
}

.timeline-item:nth-child(odd) { flex-direction: row-reverse; text-align: right; }

.timeline-dot {
  width: 20px;
  height: 20px;
  background: var(--gold);
  border: 4px solid var(--white);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.timeline-content {
  width: 45%;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.timeline-year {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--gold);
  font-weight: 700;
}

/* ---------- Contact Form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--green-light);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--green-dark);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--gray-800);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  background: var(--white);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--green-dark);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--black);
  color: var(--gray-400);
  padding: 80px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand img { height: 52px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; margin-bottom: 20px; }

.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: all var(--transition);
}
.footer-social a:hover { background: var(--gold); color: var(--white); }

.footer-col h4 { color: var(--white); font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin-bottom: 20px; }
.footer-col a { display: block; font-size: 0.9rem; padding: 6px 0; color: var(--gray-400); }
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  padding: 24px 0;
  text-align: center;
  font-size: 0.82rem;
}

/* ---------- Page Header ---------- */
.page-header {
  background: linear-gradient(135deg, var(--green-dark) 0%, #0d3d1f 100%);
  padding: 120px 0 60px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--white);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.page-header h1 { color: var(--white); margin-bottom: 12px; }
.page-header p { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.6);
}
.breadcrumb a { color: var(--gold); }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Get Involved ---------- */
.involve-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.involve-card {
  background: var(--white);
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border-bottom: 4px solid transparent;
}
.involve-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--gold);
}

.involve-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--green-light), var(--gold-light));
  color: var(--green-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 24px;
}

.involve-card h3 { margin-bottom: 12px; font-size: 1.3rem; }
.involve-card p { color: var(--gray-600); font-size: 0.95rem; margin-bottom: 24px; }

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: var(--radius); }
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .mission-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-md);
    gap: 8px;
  }
  .nav-links.active { display: flex; }
  .mobile-toggle { display: block; }
  .top-bar { display: none; }

  .hero { min-height: 70vh; }
  .hero-content { padding: 60px 0; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item { padding: 24px 16px; }
  .stat-number { font-size: 2rem; }

  .section { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .timeline::before { left: 20px; }
  .timeline-dot { left: 20px; }
  .timeline-content { width: calc(100% - 60px); margin-left: 50px; }
  .timeline-item:nth-child(odd) { flex-direction: row; text-align: left; }
  .timeline-item:nth-child(odd) .timeline-content { margin-left: 50px; }

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

  .mission-values { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--gray-200); }
  .stat-item:last-child { border-bottom: none; }
  .hero-buttons { flex-direction: column; }
  .projects-grid { grid-template-columns: 1fr; }
}
