/* ============================================================
   Helpy Charity - Custom Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Root Variables ─────────────────────────────────────── */
:root {
  --primary:        #0F5132;
  --primary-dark:   #0a3d26;
  --primary-light:  #1a7a4a;
  --secondary:      #F4C430;
  --secondary-dark: #d4a820;
  --text-dark:      #1a1a2e;
  --text-gray:      #6b7280;
  --bg-light:       #f8fafc;
  --border:         #e5e7eb;
  --shadow:         0 4px 24px rgba(0,0,0,0.08);
  --shadow-md:      0 8px 40px rgba(0,0,0,0.12);
}

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: #fff;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 {
  font-family: 'Poppins', sans-serif;
  line-height: 1.2;
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ── Navbar ─────────────────────────────────────────────── */
#navbar {
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
#navbar.scrolled {
  background: #fff !important;
  box-shadow: 0 2px 24px rgba(0,0,0,0.10);
}
#navbar.scrolled .nav-link { color: #1a1a2e !important; }
#navbar.scrolled .nav-logo { color: var(--primary) !important; }

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--secondary);
  transition: width 0.3s ease;
  border-radius: 2px;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* Dropdown */
.nav-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  pointer-events: none;
}
.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero-swiper {
  height: 100vh;
  min-height: 620px;
}
.hero-swiper .swiper-slide { position: relative; }

.hero-slide-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(60%);
  transform: scale(1.05);
  transition: transform 8s ease;
}
.swiper-slide-active .hero-slide-bg { transform: scale(1); }

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg,
    rgba(15,81,50,0.85) 0%,
    rgba(0,0,0,0.55) 60%,
    rgba(244,196,48,0.15) 100%);
}

.hero-content { position: relative; z-index: 10; }

.swiper-pagination-bullet {
  background: rgba(255,255,255,0.5) !important;
  opacity: 1 !important;
  transition: all 0.3s ease;
}
.swiper-pagination-bullet-active {
  background: var(--secondary) !important;
  width: 28px !important;
  border-radius: 4px !important;
}
.swiper-button-next,
.swiper-button-prev {
  color: #fff !important;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  width: 48px !important; height: 48px !important;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}
.swiper-button-next::after,
.swiper-button-prev::after { font-size: 16px !important; }
.swiper-button-next:hover,
.swiper-button-prev:hover { background: var(--secondary); }

/* ── Section Labels ─────────────────────────────────────── */
.section-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(15,81,50,0.08);
  color: var(--primary);
  border: 1px solid rgba(15,81,50,0.2);
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.section-divider {
  width: 56px; height: 4px;
  background: var(--secondary);
  border-radius: 2px;
  margin: 14px 0 24px;
}

/* ── Feature Cards ──────────────────────────────────────── */
.feature-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  transition: transform 0.3s ease;
}
.feature-card:hover .feature-icon { transform: scale(1.15) rotate(5deg); }

/* ── Cause Cards ────────────────────────────────────────── */
.cause-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
.cause-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.cause-img-wrapper { overflow: hidden; }
.cause-img { transition: transform 0.5s ease; }
.cause-card:hover .cause-img { transform: scale(1.07); }

/* Progress bar */
.progress-track {
  background: #e5e7eb;
  border-radius: 9999px;
  height: 8px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  width: 0;
  transition: width 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── How It Works ───────────────────────────────────────── */
.step-connector {
  position: absolute;
  top: 36px;
  left: calc(50% + 44px);
  width: calc(100% - 88px);
  border-top: 2px dashed rgba(15,81,50,0.3);
}

/* ── Testimonial Swiper ─────────────────────────────────── */
.testimonial-swiper .swiper-pagination-bullet {
  background: var(--primary) !important;
}
.testimonial-swiper .swiper-pagination-bullet-active {
  background: var(--secondary) !important;
  width: 20px !important;
  border-radius: 4px !important;
}
.quote-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.quote-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* ── Blog Cards ─────────────────────────────────────────── */
.blog-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.blog-img-wrapper { overflow: hidden; }
.blog-img { transition: transform 0.5s ease; }
.blog-card:hover .blog-img { transform: scale(1.07); }

/* ── Donation Form ──────────────────────────────────────── */
.amount-btn {
  transition: all 0.2s ease;
  border: 2px solid var(--border);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}
.amount-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(15,81,50,0.05);
}
.amount-btn.selected {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(244,196,48,0.4);
}
.form-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid var(--border);
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15,81,50,0.08);
}
.payment-method-btn {
  transition: all 0.2s ease;
  border: 2px solid var(--border);
}
.payment-method-btn:hover { border-color: var(--primary); }
.payment-method-btn.selected {
  border-color: var(--primary);
  background: rgba(15,81,50,0.05);
}

/* ── Stats Counter ──────────────────────────────────────── */
.stat-card { transition: transform 0.3s ease; }
.stat-card:hover { transform: translateY(-4px); }

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 14px 32px;
  border-radius: 9999px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(15,81,50,0.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 24px rgba(15,81,50,0.35);
  transform: translateY(-2px);
}
.btn-secondary {
  background: var(--secondary);
  color: var(--primary);
  padding: 14px 32px;
  border-radius: 9999px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  transition: all 0.3s ease;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(244,196,48,0.35);
}
.btn-secondary:hover {
  background: var(--secondary-dark);
  box-shadow: 0 6px 24px rgba(244,196,48,0.5);
  transform: translateY(-2px);
}
.btn-outline {
  border: 2px solid currentColor;
  padding: 12px 30px;
  border-radius: 9999px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline:hover { background: currentColor; }

/* ── Back-to-Top & Sticky Donate ────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 90px; right: 24px;
  width: 44px; height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(15,81,50,0.35);
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 999;
}
#back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

#sticky-donate {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 999;
  opacity: 0; visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}
#sticky-donate.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ── FAQ Accordion ──────────────────────────────────────── */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.faq-answer.open { max-height: 500px; }
.faq-item { transition: box-shadow 0.2s ease; }
.faq-item:hover { box-shadow: var(--shadow); }

/* ── Map Placeholder ────────────────────────────────────── */
.map-placeholder {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  position: relative;
  overflow: hidden;
}

/* ── Footer ─────────────────────────────────────────────── */
.footer-link {
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.footer-link:hover { color: var(--secondary); padding-left: 6px; }

/* ── Utility ────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.yellow-text { color: var(--secondary); }

/* ── Animations ─────────────────────────────────────────── */
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
.animate-float { animation: float 4s ease-in-out infinite; }

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}
.pulse-ring {
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--secondary);
  animation: pulse-ring 2s ease-out infinite;
}

/* ── Responsive tweaks ──────────────────────────────────── */
@media (max-width: 768px) {
  .hero-swiper { min-height: 500px; }
  .step-connector { display: none; }
}
