/* ==========================================================================
   Bridges Africa NGO - Unified Design System & Styling
   Domain: bridges-africa.org
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --primary-emerald: #007A5E;
  --primary-emerald-hover: #006049;
  --primary-emerald-light: #E6F4F0;
  --sun-gold: #EFA00B;
  --sun-gold-hover: #D88E00;
  --sun-gold-light: #FEF8E7;
  --sky-blue: #0284C7;
  --sky-blue-light: #E0F2FE;
  
  --dark-navy: #0F172A;
  --slate-dark: #1E293B;
  --slate-gray: #475569;
  --slate-light: #64748B;
  --border-color: #E2E8F0;
  --bg-sand: #F8FAF6;
  --bg-white: #FFFFFF;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 16px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
  --shadow-emerald: 0 10px 25px -5px rgba(0, 122, 94, 0.25);

  /* Borders & Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-sand);
  color: var(--slate-gray);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--dark-navy);
  line-height: 1.2;
  font-weight: 700;
}

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

a:hover {
  color: var(--primary-emerald-hover);
}

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

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary-emerald);
  color: #ffffff;
  box-shadow: var(--shadow-emerald);
}

.btn-primary:hover {
  background-color: var(--primary-emerald-hover);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-accent {
  background-color: var(--sun-gold);
  color: var(--dark-navy);
  font-weight: 700;
}

.btn-accent:hover {
  background-color: var(--sun-gold-hover);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background-color: var(--primary-emerald);
  color: #ffffff;
}

.btn-outline-white {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.btn-outline-white:hover {
  background: #ffffff;
  color: var(--dark-navy);
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: var(--transition);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--dark-navy);
}

.brand-logo svg {
  width: 40px;
  height: 40px;
}

.brand-logo span.highlight {
  color: var(--primary-emerald);
}

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

.nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.975rem;
  color: var(--slate-dark);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-emerald);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--sun-gold);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark-navy);
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(135deg, #05261E 0%, #0F172A 100%);
  color: #ffffff;
  padding: 5rem 0 6rem 0;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 122, 94, 0.3) 0%, rgba(239, 160, 11, 0.05) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(239, 160, 11, 0.15);
  border: 1px solid rgba(239, 160, 11, 0.3);
  color: var(--sun-gold);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3.25rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-title .accent {
  color: var(--sun-gold);
}

.hero-description {
  font-size: 1.15rem;
  color: #CBD5E1;
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-media {
  position: relative;
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 4px solid rgba(255, 255, 255, 0.1);
}

.hero-image-wrapper img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.hero-floating-card {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-lg);
}

.hero-floating-card .stat-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-emerald);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.hero-floating-card .stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.hero-floating-card .stat-text {
  font-size: 0.85rem;
  color: #94A3B8;
}

/* Page Headers (Subpages) */
.page-header {
  background: linear-gradient(135deg, var(--dark-navy) 0%, #05261E 100%);
  color: #ffffff;
  padding: 4rem 0;
  text-align: center;
  position: relative;
}

.page-header h1 {
  font-size: 2.75rem;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.page-header p {
  color: #94A3B8;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Section Shared */
.section {
  padding: 5rem 0;
}

.section-title-wrapper {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--primary-emerald);
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.35rem;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--slate-light);
}

/* Impact Stats Bar */
.stats-bar {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-md);
  margin-top: -3rem;
  position: relative;
  z-index: 10;
  border: 1px solid var(--border-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  color: var(--primary-emerald);
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.stat-item p {
  font-weight: 600;
  color: var(--slate-dark);
  font-size: 0.95rem;
}

/* Cards & Grid Layouts */
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

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

.feature-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.75rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-emerald-light);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--primary-emerald-light);
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--slate-light);
  font-size: 0.95rem;
}

/* Program Card */
.program-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.program-img {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.program-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.program-card:hover .program-img img {
  transform: scale(1.05);
}

.program-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--dark-navy);
  color: #ffffff;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.program-content {
  padding: 1.75rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.program-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.program-content p {
  font-size: 0.95rem;
  color: var(--slate-light);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.program-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-dark);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.tab-btn {
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--slate-gray);
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover, .tab-btn.active {
  background: var(--primary-emerald);
  color: #ffffff;
  border-color: var(--primary-emerald);
}

/* Impact Stories / Testimonials */
.story-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid var(--border-color);
  position: relative;
}

.story-quote {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--slate-dark);
  margin-bottom: 1.5rem;
}

.story-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-emerald-light);
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.author-info h4 {
  font-size: 1rem;
}

.author-info p {
  font-size: 0.85rem;
  color: var(--slate-light);
}

/* Forms (Contact / Volunteer / Newsletter) */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3.5rem;
}

.contact-info-box {
  background: linear-gradient(135deg, var(--dark-navy) 0%, #05261E 100%);
  color: #ffffff;
  padding: 3rem 2.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-info-box h3 {
  color: #ffffff;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.contact-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.contact-detail-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--sun-gold);
  flex-shrink: 0;
}

.form-card {
  background: var(--bg-white);
  padding: 3rem 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--dark-navy);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  background: var(--bg-sand);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-emerald);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 122, 94, 0.1);
}

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

/* Accordion FAQ */
.accordion {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: left;
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark-navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.accordion-body {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--slate-light);
  display: none;
  font-size: 0.975rem;
}

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

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

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
}

.toast {
  background: var(--dark-navy);
  color: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--sun-gold);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: slideIn 0.3s forwards;
}

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

/* Footer */
.site-footer {
  background: var(--dark-navy);
  color: #94A3B8;
  padding: 4.5rem 0 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-brand h2 {
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.95rem;
  max-width: 320px;
  line-height: 1.7;
}

.footer-links-title {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.footer-nav {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 0.75rem;
}

.footer-nav a {
  color: #CBD5E1;
  font-size: 0.95rem;
}

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

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

.newsletter-form input {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  width: 100%;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--sun-gold);
}

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

/* Responsive Styles */
@media (max-width: 992px) {
  .hero-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-media {
    order: -1;
  }
  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.35rem;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border-color);
  }
  .nav-menu.active {
    display: flex;
  }
  .mobile-toggle {
    display: block;
  }
  .card-grid-3, .card-grid-2 {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
