.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;
}
.nav-item:hover::after {
  width: 100%;
}

#judulBerita {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  text-align: center !important;
  white-space: nowrap;
  perspective: 1000px;
}

.letter {
  display: inline-block;
  transform-style: preserve-3d;
  backface-visibility: visible;
}

.hero-title {
  --hero-slide-in: clamp(2rem, 8vw, 6rem);
  --hero-slide-out: clamp(-6rem, -8vw, -2rem);
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-wrap: balance;
  animation: slideLoop 8s ease-in-out infinite;
}

/* Masuk → Diam 3 detik → Keluar → Ulang */
@keyframes slideLoop {
  /* Mulai di luar kanan */
  0% {
    opacity: 0;
    transform: translate3d(var(--hero-slide-in), 0, 0);
  }

  /* Masuk */
  15% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  /* Diam sekitar 3 detik */
  55% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  /* Keluar ke kiri */
  75% {
    opacity: 0;
    transform: translate3d(var(--hero-slide-out), 0, 0);
  }

  /* Tetap di luar kiri sebelum reset */
  100% {
    opacity: 0;
    transform: translate3d(var(--hero-slide-out), 0, 0);
  }
}

@media (max-width: 640px) {
  .hero-title {
    width: 100%;
    font-size: clamp(1.65rem, 8vw, 2.25rem);
  }
}

.text-justify {
  text-align: justify;
}

/* ==========================
          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);
}

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

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

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

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

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


/* Animasi flip */
@keyframes flipLetter {
  0% {
    transform: rotateY(0deg);
  }

  50% {
    transform: rotateY(180deg);
  }

  100% {
    transform: rotateY(360deg);
  }
}

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

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

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

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

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

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

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


/* Animasi flip */
@keyframes flipLetter {
  0% {
    transform: rotateY(0deg);
  }

  50% {
    transform: rotateY(180deg);
  }

  100% {
    transform: rotateY(360deg);
  }
}
