/* ============================================
   PROFIL DESA - DESIGN SYSTEM
   Premium Government Website Theme
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

/* ---- CSS Variables ---- */
:root {
  --primary: #15803d;
  --primary-light: #22c55e;
  --primary-dark: #166534;
  --primary-50: #f0fdf4;
  --primary-100: #dcfce7;
  --primary-200: #bbf7d0;
  --primary-600: #16a34a;
  --primary-700: #15803d;
  --primary-800: #166534;
  --primary-900: #14532d;
  --secondary: #0f766e;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --dark: #1e293b;
  --dark-2: #334155;
  --dark-3: #475569;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-lg:
    0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: var(--dark);
  background: var(--gray-50);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--primary-dark);
}

/* ---- Top Bar ---- */
.top-bar {
  background: linear-gradient(
    135deg,
    var(--primary-900) 0%,
    var(--primary-dark) 100%
  );
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  padding: 6px 0;
}
.top-bar a {
  color: rgba(255, 255, 255, 0.85);
}
.top-bar a:hover {
  color: var(--white);
}
.top-bar i {
  margin-right: 4px;
}

/* ---- Navbar ---- */
.navbar-desa {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 12px 0;
  transition: var(--transition);
  z-index: 1040;
}
.navbar-desa.scrolled {
  box-shadow: var(--shadow-md);
  padding: 8px 0;
}
.navbar-desa .navbar-brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary-dark) !important;
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-desa .navbar-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}
.navbar-desa .nav-link {
  color: var(--dark-2) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 16px !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.navbar-desa .nav-link:hover,
.navbar-desa .nav-link.active {
  color: var(--primary) !important;
  background: var(--primary-50);
}
.navbar-desa .dropdown-menu {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  margin-top: 8px;
}
.navbar-desa .dropdown-item {
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.88rem;
  transition: var(--transition);
}
.navbar-desa .dropdown-item:hover {
  background: var(--primary-50);
  color: var(--primary);
}

/* ---- Hero Section ---- */
.hero-section {
  background: linear-gradient(
    135deg,
    var(--primary-900) 0%,
    var(--primary-dark) 40%,
    var(--secondary) 100%
  );
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 120px 0 120px;
  position: relative;
  overflow: hidden;
  color: white;
}
.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 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%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-section::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 100px;
  background: var(--gray-50);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.95);
}
.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}
.hero-subtitle {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 32px;
  max-width: 550px;
  line-height: 1.8;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.hero-btn-primary {
  background: var(--white);
  color: var(--primary-dark);
}
.hero-btn-primary:hover {
  background: var(--primary-100);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.hero-btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
}
.hero-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--white);
}
.hero-stats-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}
.hero-stats-card:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-4px);
}
.hero-stats-card .stat-number {
  font-size: 2rem;
  font-weight: 800;
  display: block;
}
.hero-stats-card .stat-label {
  font-size: 0.8rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ---- Section Styles ---- */
.section-padding {
  padding: 80px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 50px;
}
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-50);
  color: var(--primary);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
}
.section-subtitle {
  color: var(--gray-500);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}
.section-alt {
  background: var(--white);
}

/* ---- Cards ---- */
.card-modern {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}
.card-modern:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: var(--primary-200);
}
.card-modern .card-img-top {
  height: 220px;
  object-fit: cover;
}
.card-modern .card-body {
  padding: 24px;
}
.card-modern .card-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark);
  margin-bottom: 10px;
}
.card-modern .card-text {
  color: var(--gray-500);
  font-size: 0.9rem;
}
.card-modern .card-badge {
  display: inline-block;
  background: var(--primary-50);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.card-modern .card-footer {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-modern .card-date {
  font-size: 0.8rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- Stat Cards ---- */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    180deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  border-radius: 4px 0 0 4px;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.stat-card .stat-icon.bg-green {
  background: var(--primary-100);
  color: var(--primary);
}
.stat-card .stat-icon.bg-blue {
  background: #dbeafe;
  color: #2563eb;
}
.stat-card .stat-icon.bg-amber {
  background: #fef3c7;
  color: #d97706;
}
.stat-card .stat-icon.bg-rose {
  background: #ffe4e6;
  color: #e11d48;
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ---- Quick Access Menu ---- */
.quick-menu-item {
  text-align: center;
  padding: 24px 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.quick-menu-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
  border-color: var(--primary-200);
}
.quick-menu-item .menu-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 14px;
  transition: var(--transition);
}
.quick-menu-item:hover .menu-icon {
  transform: scale(1.1);
}
.quick-menu-item .menu-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--dark);
}

/* ---- Sambutan Section ---- */
.sambutan-section {
  background: var(--white);
}
.sambutan-photo {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 6px solid var(--white);
  outline: 2px solid var(--primary-200);
}
.sambutan-content h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}
.sambutan-content .nama-kades {
  color: var(--primary);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 20px;
}

/* ---- Footer ---- */
.footer-desa {
  background: linear-gradient(135deg, var(--dark) 0%, #0f172a 100%);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 0;
}
.footer-desa h5 {
  color: var(--white);
  font-weight: 700;
  margin-bottom: 20px;
  font-size: 1.05rem;
}
.footer-desa a {
  color: rgba(255, 255, 255, 0.6);
}
.footer-desa a:hover {
  color: var(--primary-light);
}
.footer-desa .footer-links li {
  margin-bottom: 10px;
}
.footer-desa .footer-links li a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.footer-desa .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
  margin-top: 40px;
  font-size: 0.85rem;
}
.footer-desa .social-icons a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  margin-right: 8px;
  transition: var(--transition);
}
.footer-desa .social-icons a:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
}

/* ---- Buttons ---- */
.btn-desa {
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}
.btn-desa-primary {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  color: white;
}
.btn-desa-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -8px rgba(22, 163, 74, 0.5);
  color: white;
}
.btn-desa-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-desa-outline:hover {
  background: var(--primary);
  color: white;
}

/* ---- Page Header ---- */
.page-header {
  background: linear-gradient(
    135deg,
    var(--primary-900) 0%,
    var(--primary-dark) 50%,
    var(--secondary) 100%
  );
  padding: 100px 0 100px;
  color: white;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--gray-50);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.page-header .breadcrumb {
  background: none;
  margin: 0;
  padding: 0;
}
.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}
.page-header .breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.95);
}
.page-header .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.4);
}

/* ---- Budget Progress ---- */
.budget-progress {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--gray-200);
  margin-bottom: 16px;
}
.budget-progress .progress {
  height: 10px;
  border-radius: 10px;
  background: var(--gray-200);
}
.budget-progress .progress-bar {
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
}

/* ---- Org Chart ---- */
.org-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  border: 2px solid var(--gray-200);
  transition: var(--transition);
}
.org-card:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-md);
}
.org-card .org-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 14px;
}
.org-card .org-name {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}
.org-card .org-jabatan {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ---- Leaflet Map ---- */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--gray-200);
}
.map-fullpage {
  height: calc(100vh - 200px);
  min-height: 500px;
}
.map-legend {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-md);
}

/* ---- Animations ---- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Budget Item Cards ---- */
.budget-item-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
}
.budget-item-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-200);
  transform: translateY(-3px);
}
.budget-title {
  font-weight: 700;
  color: var(--dark);
  font-size: 1.05rem;
}
.progress-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.progress-percent {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}
.budget-sub-stat {
  padding: 10px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}
.budget-sub-stat .label {
  font-size: 0.7rem;
  color: var(--gray-400);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2px;
}
.budget-sub-stat .value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark-2);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-section {
    min-height: auto;
    padding: 130px 0 120px;
  }
  .section-title {
    font-size: 1.7rem;
  }
  .section-padding {
    padding: 50px 0;
  }
  .page-header {
    padding: 80px 0 80px;
  }
  .page-header h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .stat-card .stat-value {
    font-size: 1.5rem;
  }
  .budget-item-card {
    padding: 18px;
  }
}
