/* ==========================================
   Design System & Variables
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,600;0,700;1,600&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --kh-dark-green: #14532d;
  --kh-green: #166534;
  --kh-orange: #d97706;
  --kh-bg: #f8fafc;
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Lora', serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--kh-bg);
  color: #374151;
  scroll-behavior: smooth;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  margin: 0;
  color: var(--kh-dark-green) !important;
}

/* ==========================================
   Layout Containers
   ========================================== */
.kh-container {
  max-width: 1000px;
  margin: 0 auto;
  background-color: var(--kh-bg);
  padding-bottom: 80px; 
  position: relative;
  box-shadow: 0 0 25px rgba(0,0,0,0.05);
}

/* Mobile Full-Width Breakout */
@media (max-width: 767px) {
  .kh-container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    box-shadow: none !important;
  }
}

/* ==========================================
   Header & Navbar
   ========================================== */
.kh-navbar {
  background: #ffffff;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 50;
}

.kh-nav-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
}

.kh-nav-title {
  font-size: clamp(15px, 4vw, 18px);
  font-weight: 700;
  color: var(--kh-dark-green) !important;
  font-family: var(--font-serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================
   Hero Section
   ========================================== */
.kh-hero {
  background-color: var(--kh-dark-green);
  background-image: url('https://images.unsplash.com/photo-1591604129939-f1efa4d9f7fa?q=80&w=1000&auto=format&fit=crop');
  background-blend-mode: overlay;
  background-size: cover;
  background-position: center;
  padding: 60px 20px 90px;
  text-align: center;
  color: #ffffff;
}

.kh-hero h1 {
  color: #ffffff !important;
  font-size: clamp(28px, 6vw, 48px);
  line-height: 1.3;
  margin-bottom: 15px;
}

.kh-hero p {
  font-size: clamp(14px, 3.5vw, 16px);
  line-height: 1.6;
  margin: 0 auto 25px;
  opacity: 0.9;
  max-width: 600px;
  color: #ffffff !important;
}

.kh-btn-orange {
  background-color: var(--kh-orange);
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 15px 35px;
  border-radius: 30px;
  text-decoration: none;
  display: inline-block;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(217, 121, 6, 0.2);
}

.kh-btn-orange:hover {
  background-color: #b45309;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(217, 121, 6, 0.3);
}

/* ==========================================
   Campaign Stats Box
   ========================================== */
.kh-stats-box {
  background: #ffffff;
  border-radius: 8px;
  margin: -50px 20px 20px;
  padding: 25px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 10;
}

.kh-stats-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 5px;
}

.kh-raised {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 700;
  color: var(--kh-dark-green) !important;
  line-height: 1;
}

.kh-target {
  font-size: 14px;
  color: #4b5563 !important;
  font-weight: 600;
}

.kh-bar-bg {
  background: #e5e7eb;
  height: 10px;
  border-radius: 5px;
  margin-bottom: 15px;
  overflow: hidden;
}

.kh-bar-fill {
  background: #22c55e;
  height: 100%;
  width: 26.8%;
  border-radius: 5px;
}

.kh-stats-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #6b7280 !important;
  font-weight: 500;
}

/* ==========================================
   Trust Badges
   ========================================== */
.kh-badges {
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.kh-badge {
  background: #ffffff;
  border-radius: 8px;
  padding: 25px 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #f3f4f6;
}

.kh-badge-icon {
  color: var(--kh-green) !important;
  font-size: 28px;
  margin-bottom: 10px;
}

.kh-badge h3 {
  font-size: 18px;
  margin-bottom: 8px;
  font-family: var(--font-serif);
}

.kh-badge p {
  font-size: 14px;
  color: #6b7280 !important;
  margin: 0;
}

/* ==========================================
   Campaign Story Section
   ========================================== */
.kh-story {
  background: #ffffff;
  padding: 40px 20px;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.kh-story h2 {
  font-size: clamp(24px, 5vw, 32px);
  margin-bottom: 20px;
}

.kh-quote {
  background: #ecfdf5;
  border-left: 4px solid var(--kh-green);
  padding: 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 25px;
  color: var(--kh-green) !important;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
}

.kh-quote span {
  font-weight: 400;
  font-size: 14px;
  color: var(--kh-green) !important;
  display: block;
  margin-top: 10px;
  opacity: 0.8;
}

.kh-story-text {
  font-size: 16px;
  color: #4b5563 !important;
  line-height: 1.6;
  margin-bottom: 20px;
}

.kh-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
}

.kh-checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937 !important;
  margin-bottom: 15px;
}

.kh-check {
  color: var(--kh-dark-green) !important;
  font-size: 18px;
}

.kh-loader {
  width: 18px;
  height: 18px;
  border: 3px solid #d1d5db;
  border-top-color: var(--kh-dark-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.kh-middle-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: block;
  margin-top: 20px;
}

/* ==========================================
   Donation Grid Section
   ========================================== */
.kh-donate-sec {
  padding: 50px 20px;
  text-align: center;
}

.kh-donate-sec h2 {
  font-size: clamp(26px, 5.5vw, 36px);
  margin-bottom: 10px;
}

.kh-donate-sec > p {
  font-size: 16px;
  color: #6b7280 !important;
  margin-bottom: 30px;
}

.kh-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.kh-card {
  position: relative;
  background: #ffffff;
  border-radius: 8px;
  padding: 25px 15px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #e5e7eb;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.kh-card:hover {
  border-color: var(--kh-dark-green);
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.kh-card.active {
  border-color: var(--kh-dark-green);
  box-shadow: 0 0 0 2px var(--kh-dark-green);
}

.kh-ribbon-straight {
  background: var(--kh-orange);
  color: #ffffff !important;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: absolute;
  top: -12px;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.3);
}

.kh-amt {
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 800;
  color: var(--kh-dark-green) !important;
  margin: 0;
}

.kh-btn-green {
  background: var(--kh-dark-green);
  color: #ffffff !important;
  padding: 10px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.kh-card:hover .kh-btn-green {
  background: var(--kh-green);
}

/* Custom Card & Input */
.kh-card.custom-card {
  cursor: default;
}

.kh-card.custom-card:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-color: #e5e7eb;
}

.kh-card.custom-card.focused {
  border-color: var(--kh-dark-green);
  box-shadow: 0 0 0 2px var(--kh-dark-green);
}

.kh-custom-input {
  background: #ffffff;
  color: var(--kh-dark-green) !important;
  font-size: 15px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  text-align: center;
  outline: none;
  width: 100%;
  margin-bottom: 5px;
  transition: border-color 0.2s ease;
}

.kh-custom-input:focus {
  border-color: var(--kh-dark-green);
}

.kh-custom-input::placeholder {
  color: #9ca3af;
  font-weight: normal;
}

.kh-btn-outline {
  background: #ffffff;
  color: var(--kh-dark-green) !important;
  border: 2px solid var(--kh-dark-green);
  padding: 8px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
  transition: all 0.3s ease;
  cursor: pointer;
}

.kh-btn-outline:hover {
  background: var(--kh-dark-green);
  color: #ffffff !important;
}

/* ==========================================
   Footer Section
   ========================================== */
.kh-footer {
  background: var(--kh-dark-green) !important;
  padding: 40px 20px;
  text-align: center;
  border-top: none;
}

.kh-footer-title {
  font-family: var(--font-serif);
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 700;
  color: #ffffff !important;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
}

.kh-footer-title .kh-nav-logo-img {
  box-shadow: none;
}

.kh-footer p {
  font-size: 14px;
  color: #f3f4f6 !important;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.6;
}

.kh-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.kh-legal-links span {
  color: #f3f4f6;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.3s ease;
}

.kh-legal-links span:hover {
  color: var(--kh-orange);
}

.kh-copy {
  font-size: 13px;
  color: #9ca3af !important;
  font-weight: 500;
  border-top: 1px solid #166534;
  padding-top: 20px;
  margin-top: 20px;
}

/* ==========================================
   Sticky Bottom Action Button
   ========================================== */
.kh-sticky-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  padding: 12px 20px;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
  z-index: 100;
  display: flex;
  justify-content: center;
}

.kh-sticky-btn {
  background: var(--kh-dark-green);
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 700;
  padding: 15px;
  border-radius: 8px;
  width: 100%;
  max-width: 800px;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 6px rgba(20, 83, 45, 0.2);
  transition: all 0.3s ease;
}

.kh-sticky-btn:hover {
  background: var(--kh-green);
  transform: translateY(-2px);
}

/* ==========================================
   Toast Alerts
   ========================================== */
#kh-toast {
  visibility: hidden;
  min-width: 320px;
  background-color: #1f2937;
  color: #ffffff;
  border-radius: 8px;
  padding: 18px 24px;
  position: fixed;
  z-index: 9999;
  left: 50%;
  top: 90px;
  transform: translateX(-50%);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 15px;
  border-left: 5px solid var(--kh-orange);
}

#kh-toast.show {
  visibility: visible;
  animation: dropin 0.5s forwards, dropout 0.5s 4.5s forwards;
}

@keyframes dropin {
  from { top: 0; opacity: 0; }
  to { top: 90px; opacity: 1; }
}

@keyframes dropout {
  from { top: 90px; opacity: 1; }
  to { top: 0; opacity: 0; }
}

.kh-toast-icon {
  font-size: 26px;
}

.kh-toast-text {
  font-size: 15px;
  line-height: 1.5;
  color: #ffffff !important;
}

.kh-toast-text strong {
  color: #f59e0b;
}

.kh-toast-time {
  font-size: 13px;
  color: #9ca3af !important;
  margin-top: 3px;
}

/* ==========================================
   Modals (Legal & Content Overlays)
   ========================================== */
.kh-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 99999;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}

.kh-modal-box {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  text-align: left;
  animation: modalFadeIn 0.3s ease-out;
}

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

.kh-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: #6b7280;
  font-weight: bold;
  line-height: 1;
}

.kh-modal-close:hover {
  color: #ef4444;
}

.kh-modal-box h3 {
  font-size: 22px;
  color: var(--kh-dark-green) !important;
  margin-bottom: 15px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 10px;
}

.kh-modal-box p, 
.kh-modal-box li {
  font-size: 14.5px;
  color: #4b5563 !important;
  line-height: 1.6;
  margin-bottom: 10px;
}

.kh-modal-box ul {
  padding-left: 20px;
  margin-bottom: 15px;
}

/* ==========================================
   Desktop Specifications (min-width: 768px)
   ========================================== */
@media (min-width: 768px) {
  .kh-nav-title {
    font-size: 24px;
  } 
  
  .kh-nav-logo-img {
    width: 50px;
    height: 50px;
  }
  
  .kh-hero {
    padding: 90px 40px 120px;
  }
  
  .kh-hero h1 {
    font-size: 48px;
  }
  
  .kh-badges {
    grid-template-columns: repeat(3, 1fr);
    padding: 0 40px 40px;
  }
  
  .kh-stats-box {
    margin: -70px 40px 40px;
    padding: 40px;
  }
  
  .kh-story {
    padding: 60px 40px;
  }
  
  .kh-donate-sec {
    padding: 70px 40px;
  }
  
  .kh-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }
  
  .kh-footer {
    padding: 60px 40px;
  }
}

/* ==========================================
   Donor Form Styles
   ========================================== */
.kh-form-group {
  margin-bottom: 15px;
  text-align: left;
}

.kh-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--kh-dark-green);
  margin-bottom: 5px;
}

.kh-form-input {
  width: 100%;
  padding: 12px 15px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
  background-color: #ffffff;
  transition: border-color 0.2s ease;
}

.kh-form-input:focus {
  border-color: var(--kh-dark-green);
  box-shadow: 0 0 0 2px rgba(20, 83, 45, 0.1);
}

