/* Hope Haven Uganda - Main Stylesheet */

/* CSS Variables (Design Tokens) */
:root {
  /* Colors - HSL format */
  --bg-light: 35, 40%, 97%;
  --fg-light: 25, 25%, 15%;
  --primary: 15, 75%, 60%;
  --primary-fg: 0, 0%, 100%;
  --secondary: 145, 50%, 35%;
  --secondary-fg: 0, 0%, 100%;
  --accent: 42, 95%, 55%;
  --accent-fg: 25, 25%, 15%;
  --muted: 35, 25%, 92%;
  --muted-fg: 25, 15%, 45%;
  --border: 35, 20%, 88%;
  --card: 0, 0%, 100%;

  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Borders */
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;
  
  /* Transitions */
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: hsl(var(--bg-light));
  color: hsl(var(--fg-light));
  line-height: 1.6;
  overflow-x: hidden;
}

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

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }

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

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

ul {
  list-style: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: hsl(var(--card));
  border-bottom: 1px solid hsl(var(--border));
  z-index: 1000;
  transition: var(--transition);
}

.nav.scrolled {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--spacing-md);
  padding-bottom: var(--spacing-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: hsl(var(--fg-light));
}

.logo-icon {
  font-size: 2rem;
}

/* Logo image sizing and alignment (navbar & footer) */
.logo-img,
.footer-logo .logo-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.nav-link {
  font-weight: 500;
  color: hsl(var(--muted-fg));
  position: relative;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: hsl(var(--primary));
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: hsl(var(--fg-light));
  transition: var(--transition);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
}

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
}

.btn-primary:hover {
  background: hsl(var(--primary) / 0.9);
  transform: translateY(-2px);
}

.btn-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-fg));
}

.btn-secondary:hover {
  background: hsl(var(--secondary) / 0.9);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid hsl(var(--primary));
  color: hsl(var(--primary));
}

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

.btn-lg {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: 1.125rem;
}

.btn-full {
  width: 100%;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

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

.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7));
}

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

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: var(--spacing-3xl) 0;
}

.hero-title {
  font-size: 4rem;
  color: white;
  margin-bottom: var(--spacing-lg);
  max-width: 900px;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--spacing-2xl);
  max-width: 700px;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

/* Stats Section */
.stats-section {
  padding: var(--spacing-3xl) 0;
  background: hsl(var(--card));
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
}

.stat-card {
  text-align: center;
  padding: var(--spacing-xl);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: hsl(var(--primary));
  font-family: var(--font-heading);
}

.stat-label {
  font-size: 1.125rem;
  color: hsl(var(--muted-fg));
  margin-top: var(--spacing-sm);
}

/* Programs Section */
.programs-section {
  padding: var(--spacing-3xl) 0;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-3xl);
}

.section-header p {
  font-size: 1.25rem;
  color: hsl(var(--muted-fg));
}

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

.program-card {
  background: hsl(var(--card));
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  transition: var(--transition);
  position: relative;
}

.program-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.program-icon {
  position: absolute;
  top: var(--spacing-lg);
  left: var(--spacing-lg);
  font-size: 2.5rem;
  z-index: 10;
  background: hsl(var(--primary));
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.program-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.program-card h3 {
  padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-sm);
  font-size: 1.5rem;
}

.program-card p {
  padding: 0 var(--spacing-lg);
  color: hsl(var(--muted-fg));
  margin-bottom: var(--spacing-lg);
}

.program-card .btn {
  margin: 0 var(--spacing-lg) var(--spacing-lg);
}

/* CTA Section */
.cta-section {
  padding: var(--spacing-3xl) 0;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
  text-align: center;
  color: white;
}

.cta-section h2 {
  color: white;
  margin-bottom: var(--spacing-lg);
}

.cta-section p {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-2xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.95);
}

.cta-buttons {
  display: flex;
  gap: var(--spacing-lg);
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  background: hsl(var(--fg-light));
  color: rgba(255, 255, 255, 0.9);
  padding: var(--spacing-3xl) 0 var(--spacing-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--spacing-md);
  color: white;
}

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

.footer-col ul li {
  margin-bottom: var(--spacing-sm);
}

.footer-col a:hover {
  color: hsl(var(--primary));
}

.social-links {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.social-links a {
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
}

.social-links a:hover {
  background: hsl(var(--primary));
}

/* Standardized social icon buttons */
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  font-size: 1.1rem;
}
.social-btn i {
  line-height: 1;
}
.social-btn:hover {
  background: hsl(var(--primary));
  color: var(--primary-fg);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-lg);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* Page Header */
.page-header {
  padding: 120px 0 var(--spacing-3xl);
  text-align: center;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--accent) / 0.1));
}

.page-header h1 {
  margin-bottom: var(--spacing-md);
}

.page-header p {
  font-size: 1.25rem;
  color: hsl(var(--muted-fg));
}

/* Content Sections */
.content-section {
  padding: var(--spacing-3xl) 0;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-3xl);
  align-items: center;
}

.content-text h2 {
  margin-bottom: var(--spacing-lg);
}

.content-text p {
  color: hsl(var(--muted-fg));
  margin-bottom: var(--spacing-lg);
  font-size: 1.125rem;
  line-height: 1.8;
}

.rounded-image {
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Mission, Vision, Values */
.mvv-section {
  padding: var(--spacing-3xl) 0;
  background: hsl(var(--muted));
}

.mvv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.mvv-card {
  background: hsl(var(--card));
  padding: var(--spacing-2xl);
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
}

.mvv-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

.mvv-card h3 {
  color: hsl(var(--primary));
  margin-bottom: var(--spacing-md);
}

.values-list {
  list-style: none;
}

.values-list li {
  margin-bottom: var(--spacing-md);
  color: hsl(var(--muted-fg));
}

.values-list strong {
  color: hsl(var(--fg-light));
}

/* Impact Section */
.impact-section {
  padding: var(--spacing-3xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

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

.impact-card {
  text-align: center;
  padding: var(--spacing-xl);
  background: hsl(var(--card));
  border-radius: var(--radius-lg);
  border: 2px solid hsl(var(--primary));
}

.impact-card h3 {
  font-size: 2.5rem;
  color: hsl(var(--primary));
  margin-bottom: var(--spacing-sm);
}

.impact-card p {
  color: hsl(var(--muted-fg));
}

/* Programs Detail */
.programs-detail-section {
  padding: var(--spacing-3xl) 0;
}

.program-detail-card {
  background: hsl(var(--card));
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  margin-bottom: var(--spacing-3xl);
}

.program-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.program-detail-grid.reverse {
  direction: rtl;
}

.program-detail-grid.reverse > * {
  direction: ltr;
}

.program-detail-image {
  position: relative;
  min-height: 400px;
}

.program-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.program-detail-icon {
  position: absolute;
  top: var(--spacing-xl);
  left: var(--spacing-xl);
  font-size: 3rem;
  background: hsl(var(--primary));
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.program-detail-content {
  padding: var(--spacing-3xl);
}

.lead {
  font-size: 1.25rem;
  color: hsl(var(--muted-fg));
  margin-bottom: var(--spacing-xl);
}

.check-list {
  list-style: none;
  margin-bottom: var(--spacing-xl);
}

.check-list li {
  padding-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  position: relative;
  color: hsl(var(--muted-fg));
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: hsl(var(--primary));
  font-weight: bold;
}

.impact-box {
  background: hsl(var(--muted));
  padding: var(--spacing-lg);
  border-radius: var(--radius);
  border-left: 4px solid hsl(var(--primary));
}

.impact-box strong {
  color: hsl(var(--primary));
}

/* Contact Section */
.contact-section {
  padding: var(--spacing-3xl) 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-3xl);
}

.contact-form-wrapper h2 {
  margin-bottom: var(--spacing-xl);
}

/* Forms */
.contact-form,
.donation-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
}

.form-group label {
  font-weight: 600;
  color: hsl(var(--fg-light));
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: var(--spacing-md);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.form-group input[type="checkbox"] {
  width: auto;
  margin-right: var(--spacing-sm);
}

.form-note {
  font-size: 0.875rem;
  color: hsl(var(--muted-fg));
  text-align: center;
  margin-top: var(--spacing-md);
}

/* Contact Info */
.contact-info-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.contact-info-card {
  background: hsl(var(--muted));
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
}

.contact-info-card h3 {
  margin-bottom: var(--spacing-md);
  color: hsl(var(--primary));
}

/* Involvement Section */
.involvement-section {
  padding: var(--spacing-3xl) 0;
  background: hsl(var(--muted));
}

.involvement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
}

.involvement-card {
  background: hsl(var(--card));
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
  text-align: center;
}

.involvement-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

.involvement-card h3 {
  margin-bottom: var(--spacing-md);
}

.involvement-card p {
  color: hsl(var(--muted-fg));
  margin-bottom: var(--spacing-lg);
}

/* Donation Section */
.donation-section {
  padding: var(--spacing-3xl) 0;
}

.donation-section .container {
  max-width: 900px;
}

.donation-card {
  background: hsl(var(--card));
  padding: var(--spacing-3xl);
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
  margin-bottom: var(--spacing-3xl);
}

.subtitle {
  color: hsl(var(--muted-fg));
  font-size: 1.125rem;
  margin-bottom: var(--spacing-2xl);
}

.donation-amounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-2xl);
}

.amount-btn {
  padding: var(--spacing-lg);
  background: hsl(var(--muted));
  border: 2px solid hsl(var(--border));
  border-radius: var(--radius);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.amount-btn:hover {
  background: hsl(var(--primary) / 0.1);
  border-color: hsl(var(--primary));
}

.amount-btn.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
  border-color: hsl(var(--primary));
}

/* Impact Breakdown */
.impact-breakdown {
  background: hsl(var(--card));
  padding: var(--spacing-2xl);
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
}

.impact-breakdown h2 {
  margin-bottom: var(--spacing-md);
}

.impact-breakdown > p {
  color: hsl(var(--muted-fg));
  margin-bottom: var(--spacing-xl);
}

.impact-item {
  display: flex;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  border-radius: var(--radius);
  background: hsl(var(--muted));
}

.impact-amount {
  font-size: 2rem;
  font-weight: 800;
  color: hsl(var(--primary));
  font-family: var(--font-heading);
  flex-shrink: 0;
}

.impact-description h4 {
  margin-bottom: var(--spacing-xs);
  font-size: 1.125rem;
}

.impact-description p {
  color: hsl(var(--muted-fg));
  font-size: 0.9375rem;
}

/* Other Ways Section */
.other-ways-section {
  padding: var(--spacing-3xl) 0;
  background: hsl(var(--muted));
}

.ways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
}

.way-card {
  background: hsl(var(--card));
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
}

.way-icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

.way-card h3 {
  margin-bottom: var(--spacing-md);
  color: hsl(var(--primary));
}

.way-card p {
  color: hsl(var(--muted-fg));
  line-height: 1.8;
}

.way-card a {
  color: hsl(var(--primary));
  text-decoration: underline;
}

/* Payment logo sizing (inline SVGs for Western Union / Sendwave) */
.payment-logo {
  width: 56px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
}
.payment-logo svg {
  width: 56px;
  height: 40px;
  display: block;
}

/* Branding tweaks: ensure logo text has no underline and use primary color accents */
.logo, .logo:link, .logo:visited, .logo:hover, .logo:active {
  text-decoration: none;
}

.logo .logo-text {
  color: hsl(var(--primary));
  font-weight: 800;
  text-decoration: none;
}

/* Apply brand color to headings and standard links to bring pages in line with logo theme */
h2, h3, h4 {
  color: hsl(var(--primary));
}

/* Keep hero and CTA specific overrides (they appear later) — apply primary to regular content links */
a:not(.btn):not(.social-links a) {
  color: hsl(var(--primary));
}

/* Make small accents use the accent color */
.subtitle, .lead, .stat-label {
  color: hsl(var(--accent));
}

/* Responsive Design */
@media (max-width: 1024px) {
  .program-detail-grid {
    grid-template-columns: 1fr;
  }
  
  .program-detail-grid.reverse {
    direction: ltr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: hsl(var(--card));
    flex-direction: column;
    padding: var(--spacing-xl);
    gap: var(--spacing-md);
    border-bottom: 1px solid hsl(var(--border));
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
  }
}