.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
}

body {
  min-height: max(884px, 100dvh);
}

.nav-item {
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.4s ease;
}

.nav-item::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background: #006633;
  transition: 0.3s;
}

/* HEADER SCROLL */
#mainHeader {
  transition: transform 0.3s ease;
}

#mainHeader.header-hidden {
  transform: translateY(-100%);
}

#heroSection {
  transition: margin-top 0.3s ease;
}

#heroSection.hero-top {
  margin-top: 0;
}

#heroSection .hero-title,
#heroSection .hero-item {
  will-change: transform, opacity;
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

#heroSection .hero-title {
  display: inline-block;
  white-space: nowrap;
  animation: aduanTitleSlideLoop 8s ease-in-out infinite;
}

/* Sama dengan judul hero Administrasi Persuratan:
   masuk dari kanan, diam, lalu keluar ke kiri. */
@keyframes aduanTitleSlideLoop {
  0% {
    opacity: 0;
    transform: translateX(120%);
  }
  15% {
    opacity: 1;
    transform: translateX(0);
  }
  55% {
    opacity: 1;
    transform: translateX(0);
  }
  75%,
  100% {
    opacity: 0;
    transform: translateX(-180%);
  }
}

#heroSection .hero-background {
  transform: scale(1.06);
  animation: aduanHeroZoom 7s ease-out forwards;
  will-change: transform;
}

@keyframes aduanHeroZoom {
  to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  #heroSection .hero-title,
  #heroSection .hero-item {
    transition: none;
  }

  #heroSection .hero-title {
    animation: none;
    opacity: 1 !important;
    transform: none !important;
  }

  #heroSection .hero-background {
    animation: none;
    transform: none;
  }
}

.nav-item:hover::after {
  width: 100%;
}

/* HEADER SCROLL */
#mainHeader {
  transition: transform 0.3s ease;
}

#mainHeader.header-hidden {
  transform: translateY(-100%);
}

#heroSection {
  transition: margin-top 0.3s ease;
}

#heroSection.hero-top {
  margin-top: 0;
}

/* ==========================
          SCROLL TO TOP
    ========================== */

#scrollTopBtn {
  transform: translateY(20px);
}

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

#scrollTopBtn:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

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