/* ============================================
   Rise Green Foundation - Premium NGO Website
   Custom styles layered on top of Tailwind
   ============================================ */

:root {
  --rgf-green: #14532D;
  --rgf-emerald: #16A34A;
  --rgf-gold: #EAB308;
  --rgf-charcoal: #1F2937;
  --rgf-light: #F0FDF4;
  --rgf-white: #FFFFFF;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--rgf-charcoal);
  background: #FFFFFF;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', 'Inter', sans-serif;
  color: var(--rgf-green);
  letter-spacing: -0.01em;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.5); }
  50% { box-shadow: 0 0 0 14px rgba(234, 179, 8, 0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------- Navbar ---------- */
.navbar-rgf {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(20,83,45,0.08);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.navbar-rgf.scrolled {
  box-shadow: 0 4px 24px rgba(20,83,45,0.08);
}
.nav-link-rgf {
  position: relative;
  font-weight: 500;
  color: var(--rgf-charcoal);
  transition: color 0.2s ease;
}
.nav-link-rgf::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--rgf-gold);
  transition: width 0.3s ease;
}
.nav-link-rgf:hover { color: var(--rgf-green); }
.nav-link-rgf:hover::after { width: 100%; }
.nav-link-rgf.active { color: var(--rgf-green); }
.nav-link-rgf.active::after { width: 100%; background: var(--rgf-emerald); }

/* ---------- Buttons ---------- */
.btn-rgf-primary {
  background: linear-gradient(135deg, var(--rgf-green), var(--rgf-emerald));
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 18px rgba(20,83,45,0.25);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-rgf-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(20,83,45,0.35);
  color: #fff;
}
.btn-rgf-gold {
  background: linear-gradient(135deg, var(--rgf-gold), #FACC15);
  color: var(--rgf-green);
  border: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 18px rgba(234,179,8,0.35);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-rgf-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(234,179,8,0.45);
  color: var(--rgf-green);
}
.btn-rgf-outline {
  background: transparent;
  color: var(--rgf-green);
  border: 2px solid var(--rgf-green);
  padding: 10px 26px;
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.25s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-rgf-outline:hover {
  background: var(--rgf-green);
  color: #fff;
}

/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(20,83,45,0.85), rgba(22,163,74,0.55));
}
.hero-section .hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: 0;
  transform: scale(1.05);
  animation: floatY 12s ease-in-out infinite;
}
.hero-section .hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(110deg, rgba(20,83,45,0.88) 0%, rgba(20,83,45,0.55) 50%, rgba(20,83,45,0.25) 100%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.25);
  margin-bottom: 20px;
}

/* ---------- Section helpers ---------- */
.section-pad { padding: 90px 0; }
.section-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.section-sub {
  color: #4B5563;
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 50px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--rgf-green), var(--rgf-emerald), var(--rgf-gold));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- Cards ---------- */
.programme-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(20,83,45,0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  height: 100%;
  border: 1px solid rgba(20,83,45,0.06);
}
.programme-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(20,83,45,0.16);
}
.programme-card img {
  width: 100%; height: 220px; object-fit: cover;
  transition: transform 0.5s ease;
}
.programme-card:hover img { transform: scale(1.08); }
.programme-card .card-body { padding: 24px; }

.value-card {
  background: linear-gradient(135deg, #fff, var(--rgf-light));
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  border: 1px solid rgba(20,83,45,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.value-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(20,83,45,0.12);
}
.value-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rgf-green), var(--rgf-emerald));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 14px;
  box-shadow: 0 6px 16px rgba(20,83,45,0.25);
}

/* ---------- Stats ---------- */
.stat-box {
  text-align: center;
  padding: 24px;
}
.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--rgf-green), var(--rgf-gold));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  line-height: 1;
}
.stat-label {
  color: #4B5563;
  font-weight: 500;
  margin-top: 8px;
  font-size: 0.95rem;
}

/* ---------- Feature list ---------- */
.feature-list li {
  padding: 10px 0;
  display: flex; gap: 12px; align-items: flex-start;
}
.feature-list .fi {
  color: var(--rgf-emerald);
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.footer-rgf {
  background: linear-gradient(180deg, var(--rgf-green), #0B3B1E);
  color: #D1FAE5;
  padding: 70px 0 30px;
}
.footer-rgf h5 { color: #fff; font-weight: 700; margin-bottom: 18px; }
.footer-rgf a { color: #D1FAE5; text-decoration: none; transition: color 0.2s; }
.footer-rgf a:hover { color: var(--rgf-gold); }
.footer-link { display: block; margin-bottom: 8px; font-size: 0.95rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 40px;
  padding-top: 20px;
  font-size: 0.9rem;
  color: #A7F3D0;
}

/* ---------- Back to top ---------- */
#backToTop {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--rgf-gold);
  color: var(--rgf-green);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}
#backToTop.show {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed;
  bottom: 82px; right: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  z-index: 999;
  box-shadow: 0 6px 18px rgba(37,211,102,0.4);
  transition: transform 0.25s ease;
  text-decoration: none;
}
.wa-float:hover { transform: scale(1.1); color: #fff; }

/* ---------- Gallery / Lightbox ---------- */
.gallery-item {
  position: relative; overflow: hidden; border-radius: 14px; cursor: pointer;
}
.gallery-item img {
  width: 100%; height: 220px; object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.12); }
.gallery-item .overlay {
  position: absolute; inset: 0;
  background: rgba(20,83,45,0.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
  color: #fff; font-size: 1.6rem;
}
.gallery-item:hover .overlay { opacity: 1; }

.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.92);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 92%; max-height: 92vh; border-radius: 10px; }
.lightbox .close-lb {
  position: absolute; top: 20px; right: 30px;
  color: #fff; font-size: 2.2rem; cursor: pointer; background: none; border: none;
}

/* ---------- Project filter ---------- */
.filter-btn {
  border: 2px solid var(--rgf-green);
  color: var(--rgf-green);
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  margin: 4px;
  transition: all 0.25s;
  cursor: pointer;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--rgf-green);
  color: #fff;
}
.project-card { transition: all 0.3s ease; }
.project-card.hide { display: none; }

/* ---------- Page header ---------- */
.page-header {
  position: relative;
  padding: 150px 0 90px;
  background: linear-gradient(120deg, var(--rgf-green), var(--rgf-emerald));
  color: #fff;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background: url('https://images.unsplash.com/photo-1509099836639-19ba1796093a?auto=format&fit=crop&w=1600&q=60') center/cover;
  opacity: 0.18;
}
.page-header h1 { color: #fff; font-size: 3rem; font-weight: 800; }
.page-header p { color: #E5E7EB; font-size: 1.1rem; max-width: 700px; }

/* ---------- Contact form ---------- */
.form-control-rgf {
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  padding: 12px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control-rgf:focus {
  border-color: var(--rgf-emerald);
  box-shadow: 0 0 0 4px rgba(22,163,74,0.12);
  outline: none;
}
.error-text { color: #DC2626; font-size: 0.85rem; margin-top: 4px; display: none; }
.error-text.show { display: block; }
.form-control-rgf.is-invalid { border-color: #DC2626; }

/* ---------- Accordion-ish objective ---------- */
.obj-block {
  background: #fff;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 6px 24px rgba(20,83,45,0.06);
  border-left: 5px solid var(--rgf-emerald);
  transition: transform 0.3s ease;
}
.obj-block:hover { transform: translateY(-4px); }

/* Mobile menu open state */
.nav-menu.open {
  display: flex !important;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .section-pad { padding: 60px 0; }
  .section-title { font-size: 1.8rem; }
  .hero-section { min-height: 80vh; }
  .page-header { padding: 120px 0 60px; }
  .page-header h1 { font-size: 2rem; }
  .stat-number { font-size: 2.2rem; }
  .navbar-rgf .h-20 { height: 64px; }
  .hero-badge { font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .section-pad { padding: 48px 0; }
  .section-title { font-size: 1.5rem; }
  .page-header h1 { font-size: 1.6rem; }
  .btn-rgf-primary, .btn-rgf-gold, .btn-rgf-outline { padding: 10px 20px; font-size: 0.9rem; }
  .hero-section { min-height: 70vh; }
  .wa-float { bottom: 70px; right: 16px; width: 48px; height: 48px; font-size: 1.4rem; }
  #backToTop { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}

/* Prevent overflow */
img { max-width: 100%; height: auto; }
body { overflow-x: hidden; }