/* ==============================
   ROOT & RESET
============================== */
:root {
  --bg: #bfdbfe;
  --bg2: #93c5fd;
  --navy: #1e3a8a;
  --navy-dark: #0f2460;
  --navy-mid: #1d4ed8;
  --card-bg: #2563eb;
  --card-bg2: #3b82f6;
  --card-info: #4a7fcb;
  --white: #ffffff;
  --text-dark: #1e3a8a;
  --text-light: #e0f2fe;
  --accent: #22d3ee;
  --green-wa: #25D366;
  --nav-h: 72px;
  --nav-outer-h: 88px;
  --font: 'Poppins', sans-serif;
}

div,
p {
  max-width: 100%;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-dark);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==============================
   PARTICLE CANVAS
============================== */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.nav-wrapper,
.main-content,
#footer {
  position: relative;
  z-index: 1;
}

/* ==============================
   LOADING SCREEN
============================== */
#loadingScreen {
  position: fixed;
  inset: 0;
  background: var(--navy-dark);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loadingScreen.hide {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.loader-logo img {
  height: 80px;
  mix-blend-mode: screen;
  animation: pulseLogo 1.2s ease-in-out infinite;
}

.loader-logo span {
  color: #fff;
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 4px;
}

.loader-logo span em {
  font-style: normal;
  color: #93c5fd;
  font-size: 0.8rem;
  display: block;
  text-align: center;
  letter-spacing: 6px;
}

.loader-bar {
  width: 180px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  overflow: hidden;
}

.loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  border-radius: 4px;
  animation: fillBar 1.8s ease forwards;
}

@keyframes pulseLogo {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.06);
    opacity: 0.85;
  }
}

@keyframes fillBar {
  0% {
    width: 0%;
  }

  100% {
    width: 100%;
  }
}

/* ==============================
   NAVBAR — FLOATING PILL
============================== */
.nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 10px 24px;
  pointer-events: none;
}

#navbar {
  pointer-events: all;
  max-width: 1100px;
  margin: 0 auto;
  background: var(--navy-dark);
  height: var(--nav-h);
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(15, 36, 96, 0.45), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: box-shadow 0.3s, background 0.3s;
}

#navbar.scrolled {
  background: rgba(15, 36, 96, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 40px rgba(15, 36, 96, 0.5);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-img {
  height: 46px;
  width: auto;
  mix-blend-mode: screen;
  display: block;
}

.nav-logo-full {
  height: 40px;
  width: auto;
  mix-blend-mode: normal;
  display: block;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 6px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: #93c5fd;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  padding: 7px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==============================
   MAIN CONTENT
============================== */
.main-content {
  flex: 1;
  padding-top: var(--nav-outer-h);
}

/* Placeholder — hapus saat sudah ada konten */
.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 60vh;
  color: var(--navy);
  opacity: 0.4;
}

.placeholder-content p {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 1px;
}

/* ==============================
   FOOTER
============================== */
#footer {
  background: var(--bg);
  position: relative;
}

.footer-logo-img {
  height: 140px;
  width: auto;
  mix-blend-mode: screen;
  display: block;
}

.footer-wave {
  line-height: 0;
  overflow: hidden;
}

.footer-wave svg {
  width: 100%;
  height: 80px;
  display: block;
  margin-bottom: -2px;
}

.footer-body {
  background: var(--navy-dark);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 60px;
  padding: 48px 32px 40px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col li a {
  text-decoration: none;
  color: #93c5fd;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-col li a:hover {
  color: #fff;
}

.footer-sosmed {
  display: flex;
  gap: 12px;
  align-items: center;
}

.sosmed-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.sosmed-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.footer-copy {
  background: #000;
  text-align: center;
  padding: 14px;
  color: #9ca3af;
  font-size: 0.82rem;
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 768px) {
  :root {
    --nav-outer-h: 80px;
  }

  .nav-wrapper {
    padding: 8px 16px;
  }

  #navbar {
    border-radius: 14px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-outer-h);
    left: 16px;
    right: 16px;
    background: var(--navy-dark);
    border-radius: 14px;
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .35s, box-shadow .35s;
    padding: 0;
    box-shadow: none;
  }

  .nav-links.open {
    max-height: 400px;
    padding: 12px 0;
    box-shadow: 0 12px 36px rgba(15, 36, 96, 0.4);
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-link {
    display: block;
    padding: 13px;
    font-size: .9rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
  }

  .footer-body {
    gap: 32px;
    padding: 40px 24px 32px;
    text-align: center;
  }

  .footer-logo {
    width: 100%;
    justify-content: center;
  }

  .footer-logo-img {
    height: 120px;
  }

  .footer-sosmed {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-outer-h: 72px;
  }

  .nav-wrapper {
    padding: 6px 12px;
  }

  #navbar {
    border-radius: 12px;
    height: 60px;
  }

  .nav-logo-img {
    height: 38px;
  }

  .nav-logo-full {
    height: 32px;
  }

  .footer-logo-img {
    height: 100px;
  }
}

/* ===== BACK TO TOP ===== */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  left: auto;
  z-index: 99999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backToTop:hover {
  box-shadow: 0 8px 28px rgba(59, 130, 246, 0.7);
  transform: translateY(-3px);
}