/* Modern Dropdown Menu */
.hamburger-btn {
  cursor: pointer;
  z-index: 9999;
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(var(--bg-black-50-rgb), 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 2px solid transparent;
  padding: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.dropdown-menu {
  position: fixed; /* Ubah menjadi fixed agar tetap terlihat di semua section */
  top: 70px; /* Sesuaikan dengan posisi hamburger button */
  right: 20px;
  background-color: var(--bg-black-50);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  padding: 15px 0;
  width: 200px;
  transform: translateY(-20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999; /* Tingkatkan z-index agar selalu di atas konten lain */
  overflow: hidden;
  height: auto;
  max-height: 90vh;
  border: 1px solid rgba(var(--skin-color-rgb), 0.1);
}

.dropdown-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Hover effects for hamburger button */
.hamburger-btn:hover {
  transform: translateY(-3px);
  border: 2px solid var(--skin-color);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.hamburger-btn:active {
  transform: translateY(0) scale(0.95);
}

.dropdown-menu ul {
  padding: 0;
  margin: 0;
}

.dropdown-menu ul li {
  list-style: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.dropdown-menu.open ul li {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation for menu items */
.dropdown-menu.open ul li:nth-child(1) {
  transition-delay: 0.1s;
}

.dropdown-menu.open ul li:nth-child(2) {
  transition-delay: 0.15s;
}

.dropdown-menu.open ul li:nth-child(3) {
  transition-delay: 0.2s;
}

.dropdown-menu.open ul li:nth-child(4) {
  transition-delay: 0.25s;
}

.dropdown-menu.open ul li:nth-child(5) {
  transition-delay: 0.3s;
}

.dropdown-menu ul .link-item {
  display: block;
  text-decoration: none;
  font-size: 16px;
  color: var(--text-black-600);
  font-weight: 600;
  padding: 10px 20px;
  transition: all 0.4s ease;
  position: relative;
  text-transform: capitalize;
  text-align: right;
  border-bottom: 1px solid rgba(var(--skin-color-rgb), 0.1);
  overflow: hidden;
}

.link-item::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background-color: var(--skin-color);
  transition: all 0.4s ease;
}

.link-item:hover::before {
  width: 100%;
}

.dropdown-menu ul li a.active {
  color: var(--skin-color);
}

.dropdown-menu ul li a {
  display: block;
  padding: 12px 25px;
  color: var(--text-black-600);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  text-align: right;
}

.dropdown-menu ul li a:hover {
  color: var(--text-black-900);
  background-color: rgba(var(--skin-color-rgb), 0.1);
}

/* Highlight animation on hover */
.dropdown-menu ul li a::before {
  content: '';
  position: absolute;
  left: 15px;
  right: 15px;
  height: 2px;
  bottom: 6px;
  background: var(--skin-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: right center;
}

.dropdown-menu ul li a:hover::before {
  transform: scaleX(1);
  transform-origin: left center;
}

.dropdown-menu ul li a.active::before {
  transform: scaleX(1);
}

/* Copyright text in dropdown */
.dropdown-copyright {
  text-align: center;
  padding: 15px 0 5px;
  font-size: 12px;
  color: var(--text-black-600);
  border-top: 1px solid rgba(var(--skin-color-rgb), 0.1);
  margin-top: 10px;
}

/* Hamburger icon animation */
.hamburger-icon {
  width: 22px;
  height: 16px;
  cursor: pointer;
  position: relative;
  z-index: 1000;
  display: inline-block;
  transition: all 0.3s ease;
}

.hamburger-icon span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--skin-color);
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.hamburger-icon span:nth-child(1) {
  top: 2px;
}

.hamburger-icon span:nth-child(2) {
  top: 7px;
}

.hamburger-icon span:nth-child(3) {
  top: 12px;
}

/* Animation for hamburger icon when menu is open */
.hamburger-btn.active .hamburger-icon span:nth-child(1) {
  transform: rotate(45deg);
  top: 8px;
}

.hamburger-btn.active .hamburger-icon span:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active .hamburger-icon span:nth-child(3) {
  transform: rotate(-45deg);
  top: 8px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .dropdown-menu {
    width: 180px;
  }
}
