/* CSS Variables for Design System - Hopenest Emulation */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  /* Brand Colors (Monochromatic Blue Palette) */
  --primary-color: #113662; /* The requested deep blue */
  --secondary-color: #1c528f; /* Medium blue shade */
  --accent-color: #2b74c4; /* Bright blue shade for accents/buttons */
  --accent-hover: #1e5a9c;
  
  /* Neutral Colors */
  --bg-color: #f8fafc; /* Slightly blue-tinted light background */
  --surface-color: #ffffff;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --white: #ffffff;
  --border-color: #e2e8f0;
  
  /* Typography */
  --font-heading: 'Nunito', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Layout & Sizing */
  --container-width: 1200px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  
  /* Other */
  --border-radius-sm: 6px;
  --border-radius: 12px; /* Softer, friendly corners */
  --border-radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --box-shadow: 0 10px 25px -5px rgba(17, 54, 98, 0.1), 0 8px 10px -6px rgba(17, 54, 98, 0.1);
  --box-shadow-hover: 0 20px 30px rgba(17, 54, 98, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.7;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}

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

a:hover {
  color: var(--accent-color);
}

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

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-bg {
  background-color: var(--surface-color);
}

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

.text-white {
  color: var(--white) !important;
}

/* Typography Utilities */
.heading-xl { font-size: 4rem; font-weight: 800; }
.heading-lg { font-size: 2.75rem; font-weight: 700; }
.heading-md { font-size: 1.75rem; }
.text-lead { font-size: 1.125rem; color: var(--text-light); margin-bottom: var(--spacing-md); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-weight: 700;
  font-family: var(--font-heading);
  border-radius: 50px; /* Pill-shaped buttons are common in modern charity themes */
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--white);
  box-shadow: 0 12px 25px rgba(43, 116, 196, 0.4);
  transform: translateY(-2px);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(43, 116, 196, 0.4);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--white);
  box-shadow: 0 12px 25px rgba(28, 82, 143, 0.4);
  transform: translateY(-2px);
}

.btn-secondary:hover {
  background-color: #0e9672;
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(18, 183, 139, 0.4);
}

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

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

/* Top Bar */
.top-bar {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-info, .top-bar-social {
  display: flex;
  gap: var(--spacing-md);
  list-style: none;
}

.top-bar a {
  color: #cbd5e1;
}

.top-bar a:hover {
  color: var(--white);
}

/* Navigation */
.header {
  background-color: var(--surface-color);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
}
.logo span {
  color: var(--accent-color);
}

.header-logo {
  max-height: 72px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-links a {
  color: var(--primary-color);
  font-weight: 700;
  font-family: var(--font-heading);
  position: relative;
}

.nav-links a.btn-primary {
  color: var(--white);
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-color);
  transition: var(--transition);
}

.nav-links a:not(.btn):hover::after,
.nav-links a.active:not(.btn)::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  color: var(--white);
  padding-top: var(--spacing-lg);
  padding-bottom: 120px; /* Space for overlapping cards */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(90deg, rgba(17, 54, 98, 0.9) 0%, rgba(17, 54, 98, 0.5) 100%);
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

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

.hero h1 {
  color: var(--white);
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

/* Overlapping Features */
.features-overlap {
  position: relative;
  z-index: 10;
  margin-top: -80px;
  margin-bottom: var(--spacing-xl);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.feature-box {
  background: var(--surface-color);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  transition: var(--transition);
  border-bottom: 4px solid transparent;
}

.feature-box:hover {
  transform: translateY(-10px);
  box-shadow: var(--box-shadow-hover);
  border-bottom-color: var(--secondary-color);
}

.feature-icon {
  width: 70px;
  height: 60px;
  background: rgba(28, 82, 143, 0.1);
  color: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto var(--spacing-sm);
  transition: var(--transition);
}

.feature-box:hover .feature-icon {
  background: var(--secondary-color);
  color: var(--white);
}

.feature-box h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

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

/* Cards & Grid Layouts */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-md);
}

.card {
  background: var(--surface-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
}

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

.card-img-wrapper {
  position: relative;
  overflow: hidden;
}

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

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

.card-category {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--secondary-color);
  color: var(--white);
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 2;
}

.card-content {
  padding: var(--spacing-md);
}

.card-content h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xs);
}

.card-content p {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
}

.progress-bar-wrapper {
  background: var(--bg-color);
  height: 10px;
  border-radius: 5px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.progress-bar {
  background: var(--accent-color);
  height: 100%;
  border-radius: 5px;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
}

/* Impact Section (Counter) */
.impact-section {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: var(--spacing-xl) 0;
  position: relative;
}

.impact-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  text-align: center;
}

.stat-number {
  font-size: 4rem;
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.25rem;
  font-weight: 600;
  opacity: 0.9;
}

/* Feature Section (Split image/text) */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.split-image {
  position: relative;
}

.split-image img {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
}

.split-image::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  width: 100%;
  height: 100%;
  border: 3px dashed var(--accent-color);
  border-radius: var(--border-radius-lg);
  z-index: -1;
}

/* Partners Section */
.partners-section {
  padding: var(--spacing-lg) 0;
  border-top: 1px solid var(--border-color);
  background-color: var(--surface-color);
}

.partners-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-lg);
}

.partner-logo {
  max-height: 60px;
  max-width: 160px;
  object-fit: contain;
  opacity: 0.6;
  transition: var(--transition);
  filter: grayscale(100%);
}

.partner-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer h4 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
  position: relative;
  padding-bottom: 0.5rem;
}

.footer h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent-color);
}

.footer p, .footer a {
  color: #a0aec0;
}

.footer a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

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

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

.footer-links a {
  transition: var(--transition);
}

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

/* Animations */
.fade-in {
  /* opacity: 0; Removed to prevent invisible content on JS failure */
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Dropdown Styles */
.nav-links li.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--white);
  min-width: 260px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  border-radius: var(--border-radius);
  z-index: 1000;
  top: 100%;
  left: 0;
  padding: 0.5rem 0;
}

.dropdown-content a {
  color: var(--text-dark) !important;
  padding: 1rem 1.5rem !important;
  display: block;
  font-weight: 500 !important;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background-color: var(--background-alt);
  color: var(--primary-color) !important;
}

/* Remove the active underline effect from dropdown items */
.dropdown-content a::after {
  display: none !important;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Responsive */
@media (max-width: 900px) {
  .split-section {
    grid-template-columns: 1fr;
  }
  
  /* Mobile Dropdown Fixes */
  .dropdown-content {
    position: static;
    box-shadow: none;
    background-color: transparent;
    padding-left: 1rem;
    display: none;
  }
  
  .dropdown:hover .dropdown-content,
  .dropdown:active .dropdown-content {
    display: block;
  }
  
  .split-image {
    order: -1;
    margin-bottom: var(--spacing-md);
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }

  .heading-xl { font-size: 2.75rem; }
  .heading-lg { font-size: 2.25rem; }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 90px;
    left: 0;
    width: 100%;
    background: var(--surface-color);
    flex-direction: column;
    padding: var(--spacing-md);
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    border-top: 1px solid var(--border-color);
  }
  
  .nav-links.active {
    display: flex;
  }

  .nav-links .btn {
    width: 100%;
    margin-top: var(--spacing-xs);
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }

  .features-overlap {
    margin-top: -40px;
  }
}
