/* ======================================================
   2. HEADER BASE
   3. LOGO
   4. HAMBURGER
   5. DESKTOP NAV
   6. MOBILE & TABLET
   7. PHONE SCALE
   8. DESKTOP RESET
   9. ACTIVE STATE
====================================================== */
/* ======================================================
   2. HEADER BASE
====================================================== */
header.site-header {
  position: fixed !important;
  top: 40px;
  left: 0;
  width: 100%;
  height: 120px;
  z-index: 1000002;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
  transition:
    background-color 0.4s ease,
    box-shadow 0.4s ease,
    height 0.4s ease;
  will-change: transform;
  transform: translateZ(0);
}

header.site-header.scrolled {
  height: 90px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.header-container {
  width: 100%;
  height: 100%;
  padding-inline: 270px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ======================================================
   3. LOGO
====================================================== */
.logo {
  flex-shrink: 0;
}

.logo img {
  height: 50px;
  width: auto;
  transition: height 0.4s ease;
}

/* ======================================================
   4. HAMBURGER (DESKTOP HIDDEN)
====================================================== */
.mobile-nav-toggle {
  display: none;
  background: transparent !important; /* Menghilangkan latar belakang */
  border: none;
  cursor: pointer;
  align-items: center;
  gap: 14px;
  padding: 10px;
  z-index: 1000003;
  -webkit-tap-highlight-color: transparent; /* Hilangkan highlight abu/biru bawaan HP */
  outline: none !important;
  box-shadow: none !important;
}

.mobile-nav-toggle:focus,
.mobile-nav-toggle:active,
.mobile-nav-toggle:focus-visible {
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.mobile-nav-toggle:active .line,
.mobile-nav-toggle.active .line {
  background-color: #000000 !important;
}

.menu-text {
  font-size: var(--fs-);
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--navy, #0f172a);
  transition: color 0.3s ease;
}

.hamburger-box {
  width: 42px;
  height: 20px;
  position: relative;
  /* background: transparent;  Pastikan box di dalam juga transparan */
}

.hamburger-box .line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--navy, #0f172a); /* Warna garis default */
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s ease;
}

.mobile-nav-toggle:active .line {
  background-color: #000000 !important;
}

.line-1 {
  top: 0;
}

.line-2 {
  bottom: 0;
}
/* ======================================================
   5. DESKTOP NAV (Horizontal)
====================================================== */
.main-navigation ul {
  display: flex;
  gap: 45px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  position: relative;
  color: var(--navy, #0f172a);
  text-decoration: none;
  font-size: var(--fs-nav);
  font-weight: 700;
  text-transform: uppercase;
  padding-bottom: 4px; /* space untuk underline */
  transition: color 0.3s ease;
}

.main-navigation a:hover {
  color: var(--p-green, #22682a); /* warna baru saat hover */
}

.main-navigation a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--p-green, #22682a);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.main-navigation a:hover::after {
  width: 100%;
  left: 0;
  transform: scaleX(1);
}

.main-navigation ul li.current-menu-item a::after {
  transform: scaleX(1);
}

@media (max-width: 1100px) {
  header.site-header {
    top: 40px !important; /* Informasi banner*/
    /*top: 0;*/
    height: 80px;
    background: #ffffff !important; /* Latar Putih sesuai gambar */
    border-bottom: 1px solid #f2f2f2;
    box-shadow: none;
  }

  .header-container {
    padding: 0 24px;
  }
  .logo img {
    height: 40px;
  }
  .mobile-nav-toggle {
    display: flex;
  }
  .menu-text {
    display: none;
  } /* Hanya icon X yang muncul saat aktif */

  .main-navigation {
    position: fixed;
    top: 40px !important; /*Informasi banner*/
    /*top: 0;*/
    inset: 0;
    width: 100%;
    height: 100dvh;
    visibility: hidden;
    pointer-events: none;
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    background: #ffffff; /* Latar Putih */
    transition: visibility 0.4s;
  }

  .main-navigation.active {
    visibility: visible;
    pointer-events: all;
  }

  .nav-overlay-bg {
    position: absolute;
    inset: 0;
    background: #ffffff;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
  }

  .main-navigation.active .nav-overlay-bg {
    transform: translateY(0);
  }

  .nav-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    align-items: center;
    padding: 0 40px;
    opacity: 0;
    transition: opacity 0.4s ease 0.3s;
  }

  .main-navigation.active .nav-content {
    opacity: 1;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 32px;
    text-align: center;
    grid-row: 2;
  }

  .main-navigation a {
    font-size: 32px;
    font-weight: 500;
    color: #333333;
    text-transform: capitalize;
    letter-spacing: 0px;
  }

  /* Hilangkan ornamen desktop di mobile */
  .nav-number,
  .main-navigation a::after {
    display: none !important;
  }

  /* Socials di bawah */
  .nav-footer {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;
  }

  .nav-socials {
    display: flex;
    justify-content: center;
    gap: 30px;
  }

  .nav-socials a {
    font-size: 13px;
    color: #999999;
    text-transform: capitalize;
  }

  /* Animasi Hamburger ke X Hitam */
  .mobile-nav-toggle.active .line {
    background: #333333 !important;
  }
  .mobile-nav-toggle.active .line-1 {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
  }
  .mobile-nav-toggle.active .line-2 {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
    width: 100%;
  }
}

/* ======================================================
   7. PHONE SCALE
====================================================== */
@media (max-width: 480px) {
  :root {
    --header-h: 75px;
  }

  .logo img {
    height: 40px;
  }

  .menu-text {
    display: none;
  }

  .hamburger-box {
    width: 35px;
  }

  .main-navigation a {
    font-size: 32px;
    -webkit-tap-highlight-color: transparent;
  }

  .main-navigation a:active,
  .main-navigation a:focus,
  .main-navigation a:focus-visible {
    color: inherit;
    outline: none;
  }
}

/* ======================================================
   8. DESKTOP RESET
====================================================== */
@media (min-width: 1101px) {
  .main-navigation {
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    visibility: visible !important;
    pointer-events: all !important;
    display: block !important;
  }

  .nav-overlay-bg,
  .nav-footer,
  .nav-number {
    display: none !important;
  }

  .nav-content {
    opacity: 1 !important;
    transform: none !important;
  }
  .mobile-nav-toggle.active .line-1 {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    background: #fff;
  }

  .mobile-nav-toggle.active .line-2 {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
    background: #fff;
  }
}

@media (min-width: 1101px) {
  .main-navigation ul li.current-menu-item > a::after,
  .main-navigation ul li.current-menu-ancestor > a::after,
  .main-navigation ul li.current_page_parent > a::after,
  .main-navigation ul li.current_page_ancestor > a::after {
    transform: scaleX(1);
  }

  .main-navigation ul li.current-menu-item > a,
  .main-navigation ul li.current-menu-ancestor > a,
  .main-navigation ul li.current_page_parent > a,
  .main-navigation ul li.current_page_ancestor > a {
    color: var(--p-green, #22682a);
  }
}

/* Mobile Active State */
@media (max-width: 1100px) {
  .main-navigation ul li[class*="current-"] > a,
  .main-navigation ul li.current_page_parent > a {
    color: var(--p-green, #22682a) !important;
    font-weight: 800;
  }
}
