/* ==========================================================================
   Design System & Styling - Website Desa Koto Lubuk Jambi
   ========================================================================== */

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

:root {
  /* Color Palette */
  --primary: #0f5132;
  --primary-light: #198754;
  --primary-dark: #09331f;
  --primary-subtle: #e8f5e9;
  --secondary: #d97706;
  --secondary-light: #f59e0b;
  --secondary-subtle: #fef3c7;
  --accent: #0284c7;
  --accent-light: #38bdf8;

  /* Neutral Colors */
  --dark: #0f172a;
  --text: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg-light: #f8fafc;
  --bg-subtle: #f1f5f9;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --border-focus: #0f5132;

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 25px rgba(15, 81, 50, 0.2);

  /* Layout & Geometry */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --container: 1240px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--dark);
  font-weight: 700;
  line-height: 1.25;
}

.font-heading {
  font-family: 'Playfair Display', serif;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 81, 50, 0.35);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 81, 50, 0.45);
}

.btn-secondary {
  background-color: var(--secondary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

.btn-secondary:hover {
  background-color: #b45309;
  transform: translateY(-2px);
}

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

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

.btn-outline-white {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
  color: #ffffff;
  backdrop-filter: blur(10px);
}

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

/* Header & Glassmorphic Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: var(--transition);
}

.top-bar {
  background: var(--primary-dark);
  color: #ffffff;
  font-size: 0.85rem;
  padding: 0.4rem 0;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.top-info {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.top-info span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.top-datetime {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.825rem;
  color: #f1f5f9;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.top-datetime span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
}

.brand-logo {
  width: 48px;
  height: 48px;
  background: transparent;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.brand-text h1 {
  font-size: 1.2rem;
  color: var(--primary-dark);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Nav Menu & Page Navigation Tabs */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--text);
  border-radius: var(--radius-full);
  transition: var(--transition);
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-subtle);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--dark);
  cursor: pointer;
}

/* Page Section View Container */
.page-view {
  display: none;
  animation: fadeIn 0.4s ease-in-out forwards;
}

.page-view.active-view {
  display: block;
}

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

/* Section Common Styling */
.section {
  padding: 5rem 0;
}

.section-bg-light {
  background-color: var(--bg-light);
}

.section-bg-subtle {
  background-color: var(--bg-subtle);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem auto;
}

.section-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background-color: var(--primary-subtle);
  color: var(--primary);
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.25rem;
  color: var(--dark);
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(9, 51, 31, 0.88), rgba(15, 81, 50, 0.75)),
              url('../assets/images/hero.jpg') center/cover no-repeat;
  color: #ffffff;
  padding: 6rem 0 8rem 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(217, 119, 6, 0.25) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #fef3c7;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-title span {
  color: var(--secondary-light);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #e2e8f0;
  margin-bottom: 2.25rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Quick Stats Bar */
.stats-bar {
  margin-top: -4rem;
  position: relative;
  z-index: 30;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: var(--card-bg);
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  border-color: var(--primary-light);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Sambutan Kades Section */
.sambutan-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3.5rem;
  align-items: center;
}

.sambutan-img-wrap {
  position: relative;
}

.sambutan-img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  min-height: 420px;
  background: #cbd5e1;
}

.sambutan-badge {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  background: var(--primary-dark);
  color: #ffffff;
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border-left: 5px solid var(--secondary);
}

.sambutan-badge h4 {
  color: #ffffff;
  font-size: 1.1rem;
}

.sambutan-badge p {
  color: var(--secondary-light);
  font-size: 0.85rem;
}

.quote-box {
  background: var(--bg-subtle);
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--dark);
  font-size: 1.05rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Grid & Card Components */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

/* News / Berita Cards */
.card-news {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card-news:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card-news-img {
  height: 210px;
  width: 100%;
  object-fit: cover;
  background: #cbd5e1;
}

.card-news-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-news-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.card-news-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.card-news-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.card-news-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Aparatur Desa / Perangkat Grid */
.card-perangkat {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card-perangkat:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.avatar-perangkat {
  width: 130px;
  height: 130px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin: 0 auto 1.25rem auto;
  border: 4px solid var(--primary-subtle);
  background: #e2e8f0;
}

.card-perangkat h4 {
  font-size: 1.15rem;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.card-perangkat p {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.perangkat-contact {
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* Dusun Card */
.card-dusun {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.card-dusun::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--primary);
}

.card-dusun:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-dusun-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card-dusun-title {
  font-size: 1.25rem;
  color: var(--dark);
}

.card-dusun-badge {
  background: var(--secondary-subtle);
  color: var(--secondary);
  font-size: 0.775rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.dusun-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Galeri Grid */
.galeri-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.galeri-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 240px;
  cursor: pointer;
}

.galeri-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  background: #cbd5e1;
}

.galeri-item:hover img {
  transform: scale(1.08);
}

.galeri-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  color: #ffffff;
  opacity: 0;
  transition: var(--transition);
}

.galeri-item:hover .galeri-overlay {
  opacity: 1;
}

/* Map Embed Wrapper */
.map-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 420px;
  border: 1px solid var(--border);
  background: #e2e8f0;
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-answer {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--text-muted);
  display: none;
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-icon {
  transition: transform 0.3s ease;
}

/* Contact Form & Info Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
}

.contact-info-card {
  background: var(--primary-dark);
  color: #ffffff;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.contact-item {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--secondary-light);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--dark);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 81, 50, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Footer Component */
.site-footer {
  background: var(--dark);
  color: #94a3b8;
  padding: 5rem 0 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand h2 {
  color: #ffffff;
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.footer-title {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--secondary-light);
  padding-left: 4px;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-btn:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.875rem;
}

/* Modal Lightbox */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-subtle);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
}

/* Filter Buttons */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Floating WhatsApp Button Widget */
.whatsapp-float-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: #ffffff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  z-index: 9999;
  transition: var(--transition);
  text-decoration: none;
  animation: pulse-wa 2s infinite;
}

.whatsapp-float-btn:hover {
  background-color: #128c7e;
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.65);
  color: #ffffff;
}

@keyframes pulse-wa {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.social-btn.whatsapp-btn:hover {
  background-color: #25d366 !important;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-title { font-size: 2.75rem; }
  .sambutan-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .top-bar { display: none; }
  .nav-menu {
    position: fixed;
    top: 73px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 73px);
    background: var(--card-bg);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    align-items: flex-start;
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.active { left: 0; }
  .nav-toggle { display: block; }
  .hero-title { font-size: 2.15rem; }
  .hero-subtitle { font-size: 1rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .whatsapp-float-btn { width: 52px; height: 52px; bottom: 20px; right: 20px; }
}

/* ==========================================================================
   DINAMIS ANIMASI CSS & MIKRO-INTERAKSI SANGAT HALUS
   ========================================================================== */

/* Keyframe Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatBadge {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(15, 81, 50, 0.35);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(15, 81, 50, 0);
  }
}

@keyframes barGrow {
  from {
    width: 0%;
  }
}

/* Page View Switching Transition */
.page-view {
  display: none;
  opacity: 0;
}

.page-view.active {
  display: block;
  animation: fadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Nav Link Hover Underline Animation */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 99px;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: translateX(-50%);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Card Hover Lift & Zoom Effects */
.card-feature,
.card-news,
.galeri-item,
.card-dusun,
.stat-card,
.contact-info-card,
.contact-form-card {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, border-color 0.35s ease !important;
}

.card-feature:hover,
.card-news:hover,
.galeri-item:hover,
.card-dusun:hover,
.stat-card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

/* Image Zoom inside Cards */
.card-news-img,
.galeri-item img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.card-news:hover .card-news-img,
.galeri-item:hover img {
  transform: scale(1.08) rotate(0.4deg);
}

/* Button Interactive Press Animation */
.btn {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, box-shadow 0.3s ease !important;
}

.btn:active {
  transform: scale(0.95) !important;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(15, 81, 50, 0.45);
}

.btn-secondary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(217, 119, 6, 0.45);
}

/* Section Header Entrance Animation */
.section-header {
  animation: fadeInDown 0.5s ease-out;
}

.section-badge {
  animation: floatBadge 4s ease-in-out infinite;
}

/* Accordion Smooth Expand */
.faq-answer {
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease, opacity 0.35s ease !important;
}

.faq-icon {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Modal Popup Scale In Animation */
.modal-overlay {
  transition: opacity 0.35s ease, visibility 0.35s ease !important;
}

.modal-content {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease !important;
}

.modal-overlay.active .modal-content {
  animation: scaleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* APBDes Progress Bar Animation */
#apbdesPendapatanList > div > div > div {
  animation: barGrow 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   ORGANIZATIONAL TREE CHART (BAGAN HIRARKI CABANG SOTK DESA)
   ========================================================================== */
.org-tree-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem 1.5rem;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}

.org-node-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  position: relative;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  min-width: 220px;
  max-width: 260px;
}

.org-node-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.org-node-card.level-puncak {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #ffffff;
  border: 3px solid var(--secondary-light);
  box-shadow: 0 12px 30px rgba(15, 81, 50, 0.35);
  min-width: 290px;
}

.org-node-card.level-puncak h4 {
  color: #ffffff;
  font-size: 1.2rem;
}

.org-node-card.level-puncak p {
  color: var(--secondary-light);
  font-weight: 700;
}

.org-node-avatar {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.75rem auto;
  border: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.org-node-card.level-puncak .org-node-avatar {
  width: 90px;
  height: 90px;
  border-color: var(--secondary-light);
}

.org-connector-vertical {
  width: 3px;
  height: 30px;
  background: var(--primary);
  margin: 0 auto;
}

.org-branch-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  width: 100%;
  position: relative;
}

/* ==========================================================================
   LOADING & ERROR STATES (PRELOADER, SKELETON, ERROR CARDS, TOAST)
   ========================================================================== */

/* 1. Global Page Preloader */
.page-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.preloader-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.preloader-subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spin {
  display: inline-block;
  animation: spin 1s linear infinite;
}

/* 2. Skeleton Loading Shimmer Effect */
.skeleton-box {
  background: #e2e8f0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.skeleton-box::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
  animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
  100% { transform: translateX(100%); }
}

.skeleton-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.skeleton-img {
  height: 180px;
  border-radius: var(--radius-md);
}

.skeleton-line {
  height: 16px;
  border-radius: 4px;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.full { width: 100%; }

/* 3. Error Fallback Card Component */
.state-error-card {
  background: #fff5f5;
  border: 2px dashed #feb2b2;
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin: 1.5rem 0;
  width: 100%;
  animation: fadeInDown 0.4s ease-out;
}

.state-error-icon {
  font-size: 3.5rem;
  color: #e53e3e;
  margin-bottom: 1rem;
  display: inline-block;
}

.state-error-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #9b2c2c;
  margin-bottom: 0.5rem;
}

.state-error-desc {
  font-size: 0.95rem;
  color: #742a2a;
  max-width: 500px;
  margin: 0 auto 1.5rem auto;
  line-height: 1.6;
}

.btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: #ffffff;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.btn-retry:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 4. Floating Offline Network Toast Alert */
.network-toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: #ffffff;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 999999;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.network-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.network-toast.offline {
  background: #dc2626;
}

.network-toast.online {
  background: #16a34a;
}


