/* Design System & Global Styles */
:root {
  --primary-green: #15b358;
  --primary-green-dark: #0d8740;
  --accent-gold: #FFC107;
  --accent-gold-dark: #ff9800;
  --bg-dark: #05160c;
  --bg-light: #f8fafc;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);
  --radius-pill: 50px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Poppins', sans-serif;
  color: #334155;
  background-color: var(--bg-light);
  scroll-behavior: smooth;
}

/* Kustomisasi Ukuran Font <p> Global */
.home-wrapper p, p {
  font-size: 1.05rem !important;
  line-height: 1.8;
  color: #475569;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: var(--primary-green);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-green-dark);
}

/* Floating glassmorphic header - ALWAYS floating glass */
.home-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 10px 30px rgba(13, 135, 64, 0.05);
  padding: 10px 24px;
  transition: var(--transition);
  border-radius: 50px;
  width: calc(100% - 40px);
  max-width: 1200px;
}

/* Remove sharp white container boxes inside the glass floating menu */
.home-header nav.navbar,
.home-header .navbar,
.home-header .container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.home-header.scrolled {
  top: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 12px 35px rgba(13, 135, 64, 0.1);
  padding: 6px 24px;
}

.home-header .navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.home-header .navbar-brand > img {
  height: 52px;
  border-radius: 8px;
  margin-right: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.home-header-text h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-green-dark);
  margin: 0;
  line-height: 1.2;
}

.home-header-text h5 {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  margin: 2px 0 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.home-header-text h6 {
  font-size: 0.62rem;
  font-weight: 500;
  color: #94a3b8;
  margin: 2px 0 0;
}

/* Navbar navigation links */
.home-header .navbar-nav .nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569 !important;
  padding: 8px 18px !important;
  border-radius: 50px;
  transition: var(--transition);
  position: relative;
}

.home-header .navbar-nav .nav-link:hover:not(.active) {
  color: var(--primary-green-dark) !important;
  background: rgba(21, 179, 88, 0.08);
}

/* Menu active style (white text, bold, green pill background) */
.home-header .navbar-nav .nav-item.active .nav-link,
.home-header .navbar-nav .nav-link.active {
  color: #ffffff !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
  box-shadow: 0 4px 12px rgba(13, 135, 64, 0.25);
  padding: 8px 20px !important;
}

/* Striking gold login button style */
.btn-login-nav {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-dark) 100%) !important;
  color: #05160c !important;
  font-weight: 700 !important;
  border-radius: 50px !important;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4) !important;
  border: none !important;
  padding: 8px 24px !important;
  transition: var(--transition) !important;
}
.btn-login-nav:hover {
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.6) !important;
  color: #05160c !important;
}

/* Mobile toggle button */
.home-header .navbar-toggler {
  border: none;
  outline: none;
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition);
}

.home-header .navbar-toggler:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Hero banner and floating bubbles */
.home-banner {
  background: radial-gradient(circle at 15% 20%, rgba(21, 179, 88, 0.15) 0%, transparent 45%),
              radial-gradient(circle at 85% 80%, rgba(255, 193, 7, 0.08) 0%, transparent 45%),
              radial-gradient(circle at 50% 50%, rgba(13, 135, 64, 0.05) 0%, transparent 50%),
              var(--bg-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
  color: white;
  border-bottom: 4px solid var(--accent-gold);
  box-sizing: border-box;
}

/* Floating Bubbles Background (CSS-only, high performance) */
.bubbles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bubbles li {
  position: absolute;
  display: block;
  list-style: none;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
  bottom: -150px;
  border-radius: 50%;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.25), 0 0 15px rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  animation: bubble-drift 22s infinite linear;
}

.bubbles li:nth-child(1) { left: 10%; width: 80px; height: 80px; animation-delay: 0s; }
.bubbles li:nth-child(2) { left: 20%; width: 30px; height: 30px; animation-delay: 1.5s; animation-duration: 10s; }
.bubbles li:nth-child(3) { left: 35%; width: 50px; height: 50px; animation-delay: 3s; }
.bubbles li:nth-child(4) { left: 50%; width: 75px; height: 75px; animation-delay: 0s; animation-duration: 15s; }
.bubbles li:nth-child(5) { left: 65%; width: 25px; height: 25px; animation-delay: 2s; }
.bubbles li:nth-child(6) { left: 75%; width: 110px; height: 110px; animation-delay: 4s; }
.bubbles li:nth-child(7) { left: 90%; width: 40px; height: 40px; animation-delay: 1s; animation-duration: 12s; }
.bubbles li:nth-child(8) { left: 45%; width: 15px; height: 15px; animation-delay: 6s; animation-duration: 25s; }
.bubbles li:nth-child(9) { left: 80%; width: 90px; height: 90px; animation-delay: 8s; }
.bubbles li:nth-child(10) { left: 5%; width: 120px; height: 120px; animation-delay: 3s; animation-duration: 18s; }

@keyframes bubble-drift {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-1200px) scale(1.1) rotate(360deg);
    opacity: 0;
  }
}

/* Carousel text styling */
.carousel-item h5 {
  font-size: 2.3rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.carousel-item h5 span.gold-text {
  color: var(--accent-gold);
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.carousel-item p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  margin-bottom: 25px;
  font-weight: 300;
}

.carousel-item ul {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.carousel-item ul li {
  position: relative;
  padding-left: 28px;
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 12px;
  font-weight: 500;
}

.carousel-item ul li::before {
  content: '\f058';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--accent-gold);
  font-size: 1.1rem;
}

/* Carousel indicators */
.carousel-indicators {
  justify-content: flex-start;
  margin-left: 0;
  bottom: -40px;
}

.carousel-indicators li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  border: none;
  margin-right: 8px;
  transition: var(--transition);
}

.carousel-indicators li.active {
  width: 28px;
  border-radius: 5px;
  background-color: var(--primary-green);
}

/* Glassmorphic Login Card */
.card-login-premium {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  z-index: 2;
}

.card-login-premium:hover {
  transform: translateY(-5px);
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.25);
}

.features-list-item {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.features-list-item:hover {
  transform: translateX(8px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.icon-circle-white {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent-gold);
  margin-right: 16px;
  min-width: 44px;
  transition: var(--transition);
}

.features-list-item:hover .icon-circle-white {
  background-color: var(--primary-green);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 15px var(--primary-green);
}

/* Content sections */
section {
  padding: 100px 0;
  position: relative;
}

section#tentang {
  background-color: #ffffff;
}

.section-badge {
  display: inline-block;
  background-color: rgba(21, 179, 88, 0.08);
  color: var(--primary-green-dark);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  border: 1px solid rgba(21, 179, 88, 0.15);
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.3;
}

.section-subtitle {
  font-size: 1rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 45px;
}

.about-image-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 25px 50px rgba(13, 135, 64, 0.08);
  padding: 14px;
  transition: var(--transition);
}

.about-image-card::after {
  content: '';
  position: absolute;
  top: 14px; left: 14px; right: 14px; bottom: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(21, 179, 88, 0.25);
  pointer-events: none;
}

.about-image-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 35px 70px rgba(13, 135, 64, 0.15);
}

/* Statistics Section Cards */
section#statistik {
  background-color: #f8fafc;
}

.stat-card-premium {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: white;
  position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1;
}

/* Watermark decoration inside statistics card */
.stat-card-watermark {
  position: absolute;
  bottom: -20px;
  right: -10px;
  font-size: 6.5rem;
  color: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: -1;
  transition: var(--transition);
}

.stat-card-premium:hover .stat-card-watermark {
  transform: scale(1.1) rotate(-10deg);
  color: rgba(255, 255, 255, 0.12);
}

.stat-card-premium:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(13, 135, 64, 0.15);
}

.stat-card-premium::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.stat-card-body {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.stat-card-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 22px;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.stat-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 6px;
}

.stat-card-number {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1;
}

.stat-card-progress {
  height: 6px;
  background-color: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  margin-bottom: 10px;
  overflow: hidden;
}

.stat-card-progress-bar {
  height: 100%;
  background-color: white;
  border-radius: 3px;
}

.stat-card-desc {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* Stat card gradient maps */
.bg-stat-dpc { background: linear-gradient(135deg, #059669 0%, #047857 100%); } /* Emerald */
.bg-stat-madrasah { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); } /* Sky Blue */
.bg-stat-guru { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); } /* Amber Gold */
.bg-stat-santri { background: linear-gradient(135deg, #ec4899 0%, #db2777 100%); } /* Rose/Pink */

/* Tabbed Charts and Tables */
.card-stats-wrapper {
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
  background-color: #ffffff;
}

.card-stats-wrapper .card-header {
  background-color: #ffffff;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding: 24px;
}

.card-stats-wrapper .card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
}

.card-stats-wrapper .nav-pills {
  background-color: #f1f5f9;
  padding: 4px;
  border-radius: 50px;
  border: 1px solid #e2e8f0;
  display: inline-flex;
}

.card-stats-wrapper .nav-pills .nav-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  padding: 8px 24px;
  border-radius: 50px;
  transition: var(--transition);
  background-color: transparent;
  margin-left: 0;
}

.card-stats-wrapper .nav-pills .nav-link.active {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
  color: white;
  box-shadow: 0 4px 10px rgba(13, 135, 64, 0.2);
}

/* DataTables Style */
#dt-table {
  border-collapse: separate !important;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  margin-top: 15px !important;
  margin-bottom: 15px !important;
}

#dt-table thead th {
  background-color: #f8fafc !important;
  color: #475569;
  font-weight: 700;
  border-bottom: 2px solid #e2e8f0;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  padding: 16px;
  border-top: none;
}

#dt-table tbody td {
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.92rem;
}

#dt-table tbody tr:hover {
  background-color: rgba(21, 179, 88, 0.03) !important;
}

.dataTables_wrapper .dataTables_filter input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 12px;
  outline: none;
  transition: var(--transition);
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(21, 179, 88, 0.15);
}

.dataTables_wrapper .dataTables_length select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px;
  outline: none;
}

/* GIS Pemetaan Section */
section#gis {
  background-color: #ffffff;
}

.map-container-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(13, 135, 64, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.8);
  background-color: #ffffff;
  padding: 12px;
  transition: var(--transition);
}

#map-canvas {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

/* Footer Section (Galaxy style background, text white, padding) */
.home-footer {
  background: radial-gradient(circle at 15% 20%, rgba(21, 179, 88, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 85% 80%, rgba(255, 193, 7, 0.06) 0%, transparent 40%),
              var(--bg-dark);
  color: #ffffff !important;
  padding: 80px 0 40px;
  font-size: 0.9rem;
  border-top: 4px solid var(--accent-gold);
  position: relative;
  overflow: hidden;
}

.home-footer p {
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 0.95rem !important;
}

.footer-nav-links a {
  transition: var(--transition);
  color: rgba(255, 255, 255, 0.7) !important;
}

.footer-nav-links a:hover {
  color: var(--primary-green) !important;
  padding-left: 5px;
}

/* Elegant CTA styles */
.hover-scale {
  transition: var(--transition) !important;
}

.hover-scale:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(21, 179, 88, 0.4) !important;
}

@keyframes arrow-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

.animate-arrow {
  animation: arrow-bounce 1s infinite;
}

/* Professional Preloader Styles */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease-out;
}

.preloader-content {
  text-align: center;
  position: relative;
}

.preloader-logo-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  animation: preloader-pulse 2s infinite ease-in-out;
}

.preloader-ring {
  position: absolute;
  width: 110px;
  height: 110px;
  border: 3px solid transparent;
  border-top-color: var(--primary-green);
  border-bottom-color: var(--primary-green);
  border-radius: 50%;
  animation: preloader-spin 1.5s linear infinite;
  z-index: 5;
}

.preloader-ring-inner {
  position: absolute;
  width: 96px;
  height: 96px;
  border: 2px solid transparent;
  border-left-color: var(--accent-gold);
  border-right-color: var(--accent-gold);
  border-radius: 50%;
  animation: preloader-spin-reverse 1.2s linear infinite;
  z-index: 4;
}

.preloader-text {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-green-dark);
  letter-spacing: 1.5px;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.preloader-subtext {
  font-size: 0.8rem;
  color: #64748B;
  letter-spacing: 0.5px;
}

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

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

@keyframes preloader-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.preloader-progress-container {
  width: 180px;
  height: 6px;
  background-color: #E2E8F0;
  border-radius: 3px;
  margin: 20px auto 8px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.preloader-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-green) 0%, var(--accent-gold) 100%);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.preloader-percentage {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-green-dark);
}

.blink {
  animation: blink 1s infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (max-width: 991px) {
  .home-header {
    border-radius: 20px !important;
    padding: 10px 16px !important;
    width: calc(100% - 24px) !important;
  }
  .home-header.scrolled {
    top: 10px !important;
    padding: 8px 16px !important;
  }
  .home-header .navbar-collapse {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 15px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  }
}
