/* ===================================
   CEI CHARITY UGANDA - MODERN STYLES
   World-Class Design Framework
   =================================== */

/* CSS Custom Properties (Variables) */
:root {
  /* Brand Colors */
  --primary-color: #2E8B57; /* Sea Green - represents growth and hope */
  --primary-dark: #1F5F3F;
  --primary-light: #4CAF50;
  --secondary-color: #FF6B35; /* Vibrant Orange - represents energy and action */
  --secondary-dark: #E55722;
  --secondary-light: #FF8A65;
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  
  /* Accent Colors */
  --blue: #3B82F6;
  --blue-dark: #1E40AF;
  --green: #10B981;
  --yellow: #F59E0B;
  --red: #EF4444;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-secondary: 'Playfair Display', Georgia, serif;
  
  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

/* Import Modern Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--white);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-4) 0;
  color: var(--gray-900);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin: 0 0 var(--space-4) 0;
  line-height: 1.7;
}

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

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

/* Modern Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  min-height: 48px;
  gap: var(--space-2);
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.btn--secondary {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn--secondary:hover {
  background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary-color) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

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

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

.btn--large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  min-height: 56px;
}

/* Modern Header Styles */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 1030; /* above most content (like Bootstrap navbar) */
  transition: all var(--transition-fast);
}

.site-header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* allow wrapping to avoid overlap */
  gap: var(--space-3);
}

.site-header__logo img {
  height: 60px;
  width: auto;
  transition: transform var(--transition-fast);
}

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

/* Modern Navigation */
.navbar {
  background: transparent !important;
  padding: 0;
  flex-wrap: wrap;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-link {
  font-weight: 500;
  color: var(--gray-700) !important;
  padding: var(--space-2) var(--space-4) !important;
  border-radius: var(--radius);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color) !important;
  background: var(--gray-50);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all var(--transition-fast);
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

.dropdown-menu {
  background: var(--white) !important;
  border: 1px solid var(--gray-200) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-xl) !important;
  padding: var(--space-2) !important;
  margin-top: var(--space-2) !important;
  z-index: 2000; /* ensure it overlays hero/carousel */
}

.dropdown-item {
  padding: var(--space-2) var(--space-4) !important;
  border-radius: var(--radius) !important;
  transition: all var(--transition-fast);
  color: var(--gray-700) !important;
}

.dropdown-item:hover {
  background: var(--gray-50) !important;
  color: var(--primary-color) !important;
}

/* Modern Hero Section */
.charity-hero {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}

.charity-hero, .carousel, .carousel-inner, .carousel-item {
  z-index: 1; /* keep under dropdowns */
}

.carousel-item img {
  height: 600px !important;
  object-fit: cover;
  filter: brightness(0.8);
}

.carousel-caption {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  padding: var(--space-8) !important;
  bottom: var(--space-16) !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
  max-width: 800px;
  text-align: center;
}

.carousel-caption span {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
  color: var(--white) !important;
  padding: var(--space-4) var(--space-6) !important;
  border-radius: var(--radius-lg) !important;
  font-size: var(--text-xl) !important;
  font-weight: 600 !important;
  display: inline-block;
  box-shadow: var(--shadow-lg);
}

/* Modern CTA Section */
.charity-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  padding: var(--space-20) var(--space-6);
  max-width: 1200px;
  margin: 0 auto;
}

.charity-cta__text {
  padding-right: var(--space-8);
}

.charity-cta__text p {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--gray-700);
  margin-bottom: var(--space-6);
}

.charity-cta__image-contain img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  transition: transform var(--transition-slow);
}

.charity-cta__image-contain img:hover {
  transform: scale(1.02);
}

/* Card Grid Helpers (non-conflicting) */
/* Use Bootstrap rows/cols for layout; these helpers can be used for spacing if needed */
/* .col__container and .col__thirds removed in favor of Bootstrap grid */

/*
 * CEI Charity Uganda - Clean & Simple Design
 * Focus on readability and organization
 */

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f8f9fa;
  margin: 0;
  padding: 0;
}

/* Header - Clean and Simple */
.site-header {
  background: #fff;
  border-bottom: 2px solid #2E8B57;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.site-header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__logo img {
  height: 50px;
  width: auto;
}

.navbar-toggler {
  display: none;
  background: none;
  border: 1px solid #ddd;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
}

.navbar-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 20px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 10px 15px;
  transition: color 0.3s;
  white-space: nowrap;
}

.nav-link:hover {
  color: #2E8B57;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 10px 0;
  min-width: 200px;
  display: none;
  z-index: 1001;
}

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

.dropdown-item {
  display: block;
  padding: 8px 20px;
  color: #333;
  text-decoration: none;
  transition: background 0.3s;
}

.dropdown-item:hover {
  background: #f8f9fa;
  color: #2E8B57;
}

.header-cta .btn {
  background: #2E8B57;
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background 0.3s;
}

.header-cta .btn:hover {
  background: #1F5F3F;
}

/* Main Content */
main {
  margin-top: 0;
}

/* Hero Section - Simple and Clean */
.charity-hero {
  position: relative;
  overflow: hidden;
}

.carousel-item img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.carousel-caption {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 20px;
  color: white;
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
}

/* CTA Section - Clean and Modern */
.charity-cta {
  padding: 80px 0;
  color: var(--gray-800);
}

.charity-cta__body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.charity-cta__text {
  flex: 1;
}

.charity-cta__text h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.charity-cta__text p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 0;
}

.charity-cta__image-contain {
  flex: 0 0 300px;
}

.charity-cta__image-contain img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* Content Sections */
.section-padding {
  padding: 60px 0;
  background: white;
}

.container-modern {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-padding h2 {
  font-size: 2.2rem;
  color: #2E8B57;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

/* Cards Grid - Simple 3 Column Layout */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col-12 {
  width: 100%;
  padding: 0 15px;
}

.col-md-4 {
  width: 33.333%;
  padding: 0 15px;
}

.mb-4 {
  margin-bottom: 30px;
}

/* Feature Cards - Clean and Readable */
.featured-casestudy {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.featured-casestudy:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.featured-casestudy__item {
  text-decoration: none;
  color: inherit;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.featured-casestudy__item-heading {
  font-size: 1.3rem;
  color: #2E8B57;
  margin: 20px 20px 15px;
  font-weight: bold;
}

.featured-casestudy__item-summary {
  padding: 0 20px 20px;
  color: #666;
  line-height: 1.6;
  flex-grow: 1;
}

/* Donation Section - Clean Layout */
.charity-newsletter-signup {
  padding: 60px 0;
  color: var(--gray-800);
}

.charity-newsletter-signup .row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.charity-newsletter-signup .col-8 {
  flex: 0 0 66.67%;
  padding: 0 15px;
}

.charity-newsletter-signup .col-4 {
  flex: 0 0 33.33%;
  padding: 0 15px;
}

.charity-newsletter-signup h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
  font-weight: bold;
}

.charity-newsletter-signup h3 {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
  line-height: 1.5;
}

.charity-donate__cta-button-container {
  margin-top: 20px;
}

.charity-donate__cta-button-container .btn {
  background: white;
  color: #FF6B35;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
}

.charity-donate__cta-button-container .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.charity-donate__image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.charity-donate__image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Document and body setup */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Main content wrapper */
main {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Footer - Organized */
.footer-cta {
  background: #2E8B57;
  padding: 40px 0;
  text-align: center;
  color: white;
  margin-top: auto;
}

/* Ensure footer stays at bottom */
.footer-bottom {
  flex-shrink: 0;
}

.footer-cta h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.footer-cta p {
  margin-bottom: 25px;
  opacity: 0.9;
}

.footer-cta .btn {
  background: white;
  color: #2E8B57;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: transform 0.3s;
}

.footer-cta .btn:hover {
  transform: translateY(-2px);
}

.footer-main {
  background: #333;
  color: white;
  padding: 40px 0;
}

.footer-main .row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-main .col-sm {
  flex: 1;
  padding: 0 15px;
}

.footer-main h3 {
  color: #2E8B57;
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.footer-main ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-main li {
  margin-bottom: 8px;
}

.footer-main a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-main a:hover {
  color: #2E8B57;
}

.footer-bottom {
  background: #222;
  padding: 20px 0;
  text-align: center;
  color: #ccc;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
  .navbar-toggler {
    display: block;
  }

  .navbar-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .navbar-nav.active {
    display: flex;
  }

  .nav-link {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
  }

  .header-cta {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
  }

  .charity-cta__body {
    flex-direction: column;
    text-align: center;
  }

  .charity-cta__image-contain {
    order: -1;
    flex: none;
    width: 100%;
    max-width: 300px;
    margin-bottom: 30px;
  }

  .charity-newsletter-signup .row {
    flex-direction: column;
    text-align: center;
  }

  .footer-main .row {
    flex-direction: column;
    gap: 30px;
  }

  .col-md-4 {
    width: 100%;
  }

  .carousel-item img {
    height: 300px;
  }
}

/* Gallery Styles */
.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  cursor: pointer;
  height: 250px; /* Fixed height for uniformity */
  width: 100%; /* Full width of container */
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.gallery-item img {
  width: 100%;
  height: 250px; /* Fixed height for all images */
  object-fit: cover; /* Crop and fill to fixed height */
  object-position: center; /* Center the crop */
  transition: transform var(--transition-slow);
}

/* Footer Quick Links - Horizontal Layout */
.footer-main .col-sm:nth-child(2) div {
  display: flex;
  flex-direction: row !important;
  gap: 1rem;
  flex-wrap: wrap;
}
