/* ===== FONTS & BASE ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --green-900: #14532d;
  --green-800: #166534;
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --green-400: #4ade80;
  --green-100: #dcfce7;
  --green-50:  #f0fdf4;
  --gold:      #d4a847;
  --cream:     #fefdf8;
  --dark:      #0f1f14;
  --gray-800:  #1f2937;
  --gray-600:  #4b5563;
  --gray-400:  #9ca3af;
  --gray-100:  #f3f4f6;
  --white-100: #ffffff;

  --font-display: 'Playfair Display', serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--gray-800);
  overflow-x: hidden;
}

/* ===== DARK MODE ===== */
body.dark {
  --cream:    #0f1f14;
  --gray-800: #f9fafb;
  --gray-600: #e5e7eb;
  --gray-100: #1a2e1f;
  background: #0f1f14;
  color: #f9fafb;
}
body.dark .bg-white { background: #1a2e1f !important; }
body.dark .bg-gray-50 { background: #162318 !important; }
body.dark .text-gray-600 { color: #a3b8a8 !important; }
body.dark .text-gray-800 { color: #e5e7eb !important; }
body.dark nav { background: rgba(15,31,20,0.97) !important; }
body.dark .card-glass { background: rgba(26,46,31,0.9) !important; border-color: rgba(34,197,94,0.2) !important; }
body.dark .border-gray-100 { border-color: rgba(34,197,94,0.15) !important; }
body.dark .shadow-sm { box-shadow: 0 1px 8px rgba(0,0,0,0.4) !important; }

/* ===== NAVBAR ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(22,163,74,0.15);
  transition: all 0.3s ease;
}
nav.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.25s ease;
  font-size: 0.9rem;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--green-600);
  transform: scaleX(0); transition: transform 0.25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--green-700); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

/* ===== HERO ===== */
.hero-gradient {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 50%, #1a5c2a 100%);
}
.hero-pattern {
  background-image:
    radial-gradient(circle at 20% 50%, rgba(34,197,94,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(212,168,71,0.1) 0%, transparent 40%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-text-shadow { text-shadow: 0 2px 20px rgba(0,0,0,0.3); }

/* ===== CARDS ===== */
.card-glass {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(34,197,94,0.15);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-glass:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(22,163,74,0.12);
}
.card-stat {
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  border-radius: 16px;
  color: white;
  position: relative;
  overflow: hidden;
}
.card-stat::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 100px; height: 100px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-600);
  color: white;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none; cursor: pointer;
}
.btn-primary:hover {
  background: var(--green-700);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22,163,74,0.35);
}
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  color: white;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.6);
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
  transform: translateY(-2px);
}
.btn-gold {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold);
  color: white;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none; cursor: pointer;
}
.btn-gold:hover {
  background: #b8932e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212,168,71,0.4);
}

/* ===== SECTION TITLES ===== */
.section-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-100);
  color: var(--green-700);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
}
body.dark .section-title { color: #e5e7eb; }
.section-divider {
  width: 60px; height: 4px;
  background: linear-gradient(90deg, var(--green-600), var(--gold));
  border-radius: 4px;
  margin: 16px 0 24px;
}

/* ===== TIMELINE ===== */
.timeline-item {
  position: relative;
  padding-left: 40px;
  padding-bottom: 32px;
}
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute; left: 11px; top: 24px; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--green-500), var(--green-100));
}
.timeline-dot {
  position: absolute; left: 0; top: 4px;
  width: 24px; height: 24px;
  background: var(--green-600);
  border-radius: 50%;
  border: 3px solid var(--green-100);
  display: flex; align-items: center; justify-content: center;
}

/* ===== ORG CHART ===== */
.org-card {
  background: white;
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.3s ease;
}
body.dark .org-card { background: #1a2e1f; }
.org-card:hover {
  border-color: var(--green-500);
  box-shadow: 0 8px 24px rgba(22,163,74,0.15);
  transform: translateY(-3px);
}
.org-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-600), var(--green-400));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.6rem; color: white;
  font-weight: 700;
}

/* ===== GALLERY ===== */
.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.gallery-item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  opacity: 0; transition: opacity 0.3s ease;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-overlay {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ===== LIGHTBOX ===== */
#lightbox {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(8px);
}
#lightbox.active { opacity: 1; pointer-events: all; }
#lightbox img {
  max-width: 90vw; max-height: 85vh;
  border-radius: 12px;
  transform: scale(0.85); transition: transform 0.3s ease;
  object-fit: contain;
}
#lightbox.active img { transform: scale(1); }

/* ===== UMKM FILTER ===== */
.filter-btn {
  padding: 8px 20px;
  border-radius: 50px;
  border: 2px solid rgba(22,163,74,0.3);
  background: transparent;
  color: var(--gray-600);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--green-600);
  border-color: var(--green-600);
  color: white;
}

/* ===== FORM ===== */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(22,163,74,0.2);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: white;
  color: var(--gray-800);
  transition: border-color 0.25s ease;
  outline: none;
}
body.dark .form-input { background: #1a2e1f; color: #e5e7eb; border-color: rgba(34,197,94,0.25); }
.form-input:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(34,197,94,0.12); }
.form-input.error { border-color: #ef4444; }
.form-error { color: #ef4444; font-size: 0.8rem; margin-top: 4px; display: none; }
.form-error.show { display: block; }

/* ===== COUNTER ===== */
.counter-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
}

/* ===== MOBILE MENU ===== */
#mobile-menu {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(22,163,74,0.1);
  padding: 16px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
body.dark #mobile-menu { background: rgba(15,31,20,0.98); }
#mobile-menu.open { display: block; }
#mobile-menu a {
  display: block;
  padding: 10px 24px;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.2s;
}
#mobile-menu a:hover { color: var(--green-700); }

/* ===== FOOTER ===== */
footer { background: var(--green-900); }

/* ===== FLOATING WHATSAPP ===== */
.float-wa {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  width: 56px; height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 4px 16px rgba(37,211,102,0.5);
  text-decoration: none;
  transition: all 0.3s ease;
  animation: float-pulse 2s ease-in-out infinite;
}
.float-wa:hover { transform: scale(1.1); box-shadow: 0 8px 24px rgba(37,211,102,0.6); }
@keyframes float-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.float-wa:hover { animation: none; }

/* ===== SCROLL TO TOP ===== */
#scroll-top {
  position: fixed; bottom: 90px; right: 24px; z-index: 999;
  width: 44px; height: 44px;
  background: var(--green-600);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; cursor: pointer;
  box-shadow: 0 4px 12px rgba(22,163,74,0.3);
  opacity: 0; pointer-events: none;
  transition: all 0.3s ease;
  border: none;
}
#scroll-top.visible { opacity: 1; pointer-events: all; }
#scroll-top:hover { background: var(--green-700); transform: translateY(-2px); }

/* ===== PAGE HERO ===== */
.page-hero {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
  padding: 120px 0 60px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath fill-rule='evenodd' d='M0 0h40v40H0V0zm40 40h40v40H40V40zm0-40h2l-2 2V0zm0 4l4-4h2l-6 6V4zm0 4l8-8h2L40 10V8zm0 4L52 0h2L40 14v-2zm0 4L56 0h2L40 18v-2zm0 4L60 0h2L40 22v-2zm0 4L64 0h2L40 26v-2zm0 4L68 0h2L40 30v-2zm0 4L72 0h2L40 34v-2zm0 4L76 0h2L40 38v-2zm0 4L80 0v2L42 40h-2zm4 0L80 4v2L46 40h-2zm4 0L80 8v2L50 40h-2zm4 0l28-28v2L54 40h-2zm4 0l24-24v2L58 40h-2zm4 0l20-20v2L62 40h-2zm4 0l16-16v2L66 40h-2zm4 0l12-12v2L70 40h-2zm4 0l8-8v2l-6 6h-2zm4 0l4-4v2l-2 2h-2z'/%3E%3C/g%3E%3C/svg%3E");
}
.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: white;
}

/* ===== NOTICE / ALERT ===== */
.alert-success {
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 16px 20px;
  color: #15803d;
  display: flex; align-items: center; gap: 12px;
  font-weight: 500;
  opacity: 0; transform: translateY(-10px);
  transition: all 0.4s ease;
}
.alert-success.show { opacity: 1; transform: translateY(0); }

/* ===== MAP ===== */
.map-container {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* ===== ANIMATIONS ===== */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.animate-fade-up { animation: fade-in-up 0.7s ease forwards; }
.animate-fade-in { animation: fade-in 0.7s ease forwards; }

/* ===== CHART CONTAINER ===== */
.chart-wrapper {
  position: relative;
  padding: 20px;
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(34,197,94,0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
body.dark .chart-wrapper { background: #1a2e1f; border-color: rgba(34,197,94,0.2); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .section-title { font-size: 1.8rem; }
}
