.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
}

.site-header.scrolled {
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 15px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.logo img {
  height: 50px;
  width: auto;
  transition: height 0.3s ease;
}

.site-header.scrolled .logo img {
  height: 40px;
}

.hamburger-menu {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
  z-index: 100;
}

.hamburger-homepage {
  color: #ffffff;
}

.hamburger-other-pages {
  background: linear-gradient(135deg, #eecf87, #bfa173);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.hamburger-other-pages:hover {
  background: #000;
  background: linear-gradient(135deg, #eecf87, #bfa173);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.site-header.scrolled .hamburger-homepage {
  background: linear-gradient(135deg, #eecf87, #bfa173);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.site-header.scrolled .hamburger-other-pages {
  background: linear-gradient(135deg, #eecf87, #bfa173);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.reserve-btn {
  position: relative;
  padding: 10px 20px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  border-radius: 50px;
  border: none;
}

/* Mobile responsive styles */
@media screen and (max-width: 768px) {
  .reserve-btn {
    font-size: 12px;
    padding: 10px 15px;
  }
}

.reserve-homepage {
  background: transparent;
  color: #fff;
  border: 2px solid #ffffff;
}

.reserve-homepage:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #000000;
}

.reserve-other-pages {
  background: transparent;
  color: #bfa173;
}

.reserve-other-pages::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(to bottom, #bfa173, #eecf87);
  border-radius: inherit;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask-composite: xor;
}

.reserve-other-pages:hover {
  background: linear-gradient(to bottom, #bfa173, #eecf87);
  color: #fff;
}

.site-header.scrolled .reserve-homepage {
  background: transparent;
  color: #bfa173;
  border: none; 
}

.site-header.scrolled .reserve-homepage::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(to bottom, #bfa173, #eecf87);
  border-radius: inherit;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask-composite: xor;
}

.site-header.scrolled .reserve-homepage:hover {
  background: linear-gradient(to bottom, #bfa173, #eecf87);
  border-radius: 50px;
  color: #fff;
  border: none;
}

.site-header.scrolled .reserve-other-pages {
  background: transparent;
  color: #bfa173;
}

.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-nav.active {
  visibility: visible;
  opacity: 1;
}

.nav-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.nav-sidebar {
  position: absolute;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100%;
  background: linear-gradient(to bottom, #fff 40%, #eecf87 100%);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
}

.main-nav.active .nav-sidebar {
  transform: translateX(320px);
}

.nav-logo {
  padding: 40px 30px 30px;
  border-bottom: 1px solid rgba(191, 161, 115, 0.2);
}

.nav-logo img {
  height: 70px;
  width: auto;
}

.nav-menu-wrapper {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

/* Navigation Menu */
.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu li {
  margin: 0;
  border-bottom: 1px solid rgba(191, 161, 115, 0.1);
}

.nav-menu li:last-child {
  border-bottom: none;
}

.nav-menu li a {
  color: #000;
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 30px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-menu li a:hover {
  background: rgba(191, 161, 115, 0.1);
  color: #bfa173;
}

/* Dropdown Arrow */
.nav-menu li.menu-item-has-children > a::after {
  content: "\e649"; /* Tabler icon chevron-down */
  font-family: "tabler-icons";
  font-size: 16px;
  color: #bfa173;
  transition: transform 0.3s ease;
}

.nav-menu li.menu-item-has-children.active > a::after {
  transform: rotate(180deg);
}

/* Reserve Button in Sidebar */
.nav-reserve {
  padding: 20px;
  border-top: 1px solid rgba(191, 161, 115, 0.2);
}

.nav-reserve-btn {
  display: block;
  width: 50%;
  background: transparent;
  border: 2px solid #000;
  color: #000;
  padding: 15px 20px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  text-align: center;
  border-radius: 9999px;
}

.nav-reserve-btn:hover {
  background: #000;
  color: #fff;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .nav-sidebar {
    width: 280px;
    left: -280px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .main-nav.active .nav-sidebar {
    transform: translateX(280px);
  }

  .nav-logo {
    padding: 30px 20px 20px;
  }

  .nav-menu li a {
    padding: 16px 20px;
    font-size: 14px;
  }

  .nav-menu-wrapper {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 140px); /* Account for logo and reserve button */
  }

  .nav-reserve {
    padding: 15px 20px;
    flex-shrink: 0; /* Prevent shrinking */
    margin-top: auto; /* Push to bottom if space allows */
  }
  
  .nav-reserve-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 13px;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Tablet Responsive */
@media (min-width: 481px) and (max-width: 768px) {
  .nav-sidebar {
    width: 350px;
    left: -350px;
  }

  .main-nav.active .nav-sidebar {
    transform: translateX(350px);
  }
}

/* Desktop Styles */
@media (min-width: 769px) {
  .header-container {
    padding: 0 40px;
  }

  .hamburger-menu {
    font-size: 32px;
  }

  .reserve-btn {
    padding: 12px 24px;
    font-size: 13px;
  }

  .logo img {
    height: 70px;
  }

  .site-header.scrolled .logo img {
    height: 60px;
  }
}

/* Large Desktop */
@media (min-width: 1200px) {
  .header-container {
    padding: 0 60px;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
.hamburger-menu:focus,
.reserve-btn:focus,
.nav-close:focus,
.nav-menu a:focus {
  outline: 2px solid #bfa173;
  outline-offset: 2px;
}

/* ENHANCED DROPDOWN TOGGLE STYLES WITH SCROLL - FIXED */
.menu-item-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  position: relative !important;
}

.nav-menu li.menu-item-has-children > a.has-dropdown-button {
  flex: 1 !important;
  padding-right: 15px !important; /* Normal padding, tidak perlu extra space */
  position: relative !important;
}

.dropdown-toggle {
  background: none !important;
  border: none !important;
  color: #000 !important;
  font-size: 16px !important;
  cursor: pointer !important;
  padding: 10px !important;
  border-radius: 3px !important;
  transition: all 0.3s ease !important;
  z-index: 10 !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 40px !important;
  height: 40px !important;
}

.dropdown-toggle:hover {
  background: rgba(191, 161, 115, 0.1) !important;
  color: #000 !important;
}

.dropdown-toggle:focus {
  outline: 2px solid #bfa173 !important;
  outline-offset: 2px !important;
}

/* Hide the CSS-generated arrow when using separate button */
.nav-menu li.menu-item-has-children > a.has-dropdown-button::after {
  display: none !important;
}

/* Rotate dropdown button when active */
.nav-menu li.menu-item-has-children.active .dropdown-toggle i {
  transform: rotate(180deg) !important;
  transition: transform 0.3s ease !important;
}

/* SUBMENU STYLES WITH SCROLL - ENHANCED */
.submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: rgba(191, 161, 115, 0.05);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  border-left: 3px solid transparent;
}

.nav-menu li.active .submenu {
  max-height: 250px; /* Set reasonable max height for scroll */
  border-left-color: #bfa173;
  padding: 5px 0;
  overflow-y: auto; /* Enable vertical scroll */
  overflow-x: hidden; /* Hide horizontal scroll */
}

/* Custom Scrollbar for Submenu */
.nav-menu li.active .submenu::-webkit-scrollbar {
  width: 4px;
}

.nav-menu li.active .submenu::-webkit-scrollbar-track {
  background: rgba(191, 161, 115, 0.1);
  border-radius: 2px;
}

.nav-menu li.active .submenu::-webkit-scrollbar-thumb {
  background: #bfa173;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.nav-menu li.active .submenu::-webkit-scrollbar-thumb:hover {
  background: #a68c5f;
}

/* Firefox Scrollbar */
.nav-menu li.active .submenu {
  scrollbar-width: thin;
  scrollbar-color: #bfa173 rgba(191, 161, 115, 0.1);
}

.submenu li {
  border-bottom: none;
  margin: 0;
}

.submenu li a {
  padding: 12px 30px 12px 50px;
  font-size: 16px;
  color: #000;
  display: block;
  position: relative;
  transition: all 0.3s ease;
}

.submenu li a:hover {
  color: #997c50;
  background: rgba(191, 161, 115, 0.1);
  padding-left: 55px; /* Slight indent on hover */
}

.submenu li a::before {
  position: absolute;
  left: 35px;
  color: #997c50;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.submenu li a:hover::before {
  opacity: 1;
}

/* Enhanced Focus States */
.menu-item-wrapper a:focus,
.dropdown-toggle:focus {
  outline: 2px solid #997c50 !important;
  outline-offset: 2px !important;
  border-radius: 3px !important;
}

/* Mobile responsive adjustments with scroll */
@media (max-width: 480px) {
  .dropdown-toggle {
    font-size: 14px !important;
    min-width: 35px !important;
    height: 35px !important;
    padding: 8px !important;
  }

  .nav-menu li.menu-item-has-children > a.has-dropdown-button {
    padding-right: 10px !important;
    font-size: 15px !important;
  }

  .submenu li a {
    padding: 10px 20px 10px 35px;
    font-size: 14px;
  }

  .submenu li a:hover {
    padding-left: 40px;
  }

  .submenu li a::before {
    left: 25px;
  }

  /* Adjust scroll height for mobile */
  .nav-menu li.active .submenu {
    max-height: 200px; /* Smaller max height for mobile */
  }

  /* Larger scrollbar for mobile */
  .nav-menu li.active .submenu::-webkit-scrollbar {
    width: 6px;
  }
}

/* Tablet responsive adjustments */
@media (min-width: 481px) and (max-width: 768px) {
  .dropdown-toggle {
    font-size: 15px !important;
    min-width: 38px !important;
    height: 38px !important;
  }

  .nav-menu li.menu-item-has-children > a.has-dropdown-button {
    font-size: 16px !important;
  }

  /* Medium scroll height for tablet */
  .nav-menu li.active .submenu {
    max-height: 220px;
  }
}

/* Animation for smooth dropdown appearance with scroll */
@keyframes dropdownSlide {
  from {
    max-height: 0;
    padding: 0;
  }
  to {
    max-height: 250px; /* Match the scroll max-height */
    padding: 5px 0;
  }
}

.nav-menu li.active .submenu {
  animation: dropdownSlide 0.3s ease-out;
}

/* Scroll indicator shadows for better UX */
.nav-menu li.active .submenu {
  position: relative;
}

.nav-menu li.active .submenu::before {
  content: "";
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(to bottom, rgba(191, 161, 115, 0.1), transparent);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-menu li.active .submenu::after {
  content: "";
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(to top, rgba(191, 161, 115, 0.1), transparent);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Show scroll indicators when scrollable */
.nav-menu li.active .submenu[data-scrollable="true"]::before,
.nav-menu li.active .submenu[data-scrollable="true"]::after {
  opacity: 1;
}

/* Improved accessibility for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dropdown-toggle i,
  .submenu,
  .submenu li a,
  .nav-menu li.active .submenu {
    transition: none !important;
    animation: none !important;
  }
}

/* Enhanced contrast for better visibility */
@media (prefers-contrast: high) {
  .dropdown-toggle {
    border: 1px solid #bfa173 !important;
  }

  .submenu {
    border: 1px solid #bfa173 !important;
    background: #fff !important;
  }

  .submenu li a {
    color: #000 !important;
  }

  .submenu li a:hover {
    background: #bfa173 !important;
    color: #fff !important;
  }
}

/* LANGUAGE SWITCHER STYLES */
.nav-language-switcher {
  border-top: 1px solid rgba(191, 161, 115, 0.2);
  border-bottom: 1px solid rgba(191, 161, 115, 0.2);
}

.nav-lang-button {
  width: 100%;
  background: none;
  border: none;
  color: #000;
  font-size: 16px;
  font-weight: 400;
  display: flex;
  align-items: center;
  padding: 18px 30px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: left;
}

.nav-lang-button:hover {
  background: rgba(191, 161, 115, 0.1);
  color: #bfa173;
}

.nav-lang-button:focus {
  outline: 2px solid #bfa173;
  outline-offset: 2px;
}

.nav-lang-button i:first-child {
  margin-right: 12px;
  font-size: 18px;
  color: #bfa173;
}

.nav-lang-button span {
  flex: 1;
}

.nav-lang-arrow {
  font-size: 16px;
  color: #bfa173;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.nav-lang-button[aria-expanded="true"] .nav-lang-arrow {
  transform: rotate(180deg);
}

.nav-lang-dropdown {
  background: rgba(191, 161, 115, 0.05);
  border-left: 3px solid #bfa173;
  margin-top: 5px;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.nav-lang-dropdown.hidden {
  max-height: 0;
  padding: 0;
}

.nav-lang-dropdown:not(.hidden) {
  max-height: 100px;
  padding: 5px 0;
}

.nav-lang-option {
  display: flex;
  align-items: center;
  padding: 12px 30px 12px 50px;
  color: #000;
  text-decoration: none;
  font-size: 16px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-lang-option:hover {
  background: rgba(191, 161, 115, 0.1);
  color: #997c50;
  padding-left: 55px;
}

.nav-lang-option i {
  margin-right: 12px;
  font-size: 16px;
  color: #997c50;
}

.nav-lang-option:focus {
  outline: 2px solid #997c50;
  outline-offset: 2px;
}

/* Mobile responsive adjustments for language switcher */
@media (max-width: 480px) {
  .nav-lang-button {
    padding: 16px 20px;
    font-size: 15px;
  }

  .nav-lang-button i:first-child {
    margin-right: 10px;
    font-size: 16px;
  }

  .nav-lang-option {
    padding: 10px 20px 10px 35px;
    font-size: 14px;
  }

  .nav-lang-option:hover {
    padding-left: 40px;
  }

  .nav-lang-option i {
    margin-right: 10px;
    font-size: 14px;
  }
}

/* Tablet responsive adjustments for language switcher */
@media (min-width: 481px) and (max-width: 768px) {
  .nav-language-switcher {
    margin: 18px 0;
    padding: 18px 0;
  }

  .nav-lang-button {
    font-size: 16px;
  }
}

/* Animation for language dropdown */
@keyframes langDropdownSlide {
  from {
    max-height: 0;
    padding: 0;
  }
  to {
    max-height: 100px;
    padding: 5px 0;
  }
}

.nav-lang-dropdown:not(.hidden) {
  animation: langDropdownSlide 0.3s ease-out;
}

/* Accessibility improvements for language switcher */
@media (prefers-reduced-motion: reduce) {
  .nav-lang-arrow,
  .nav-lang-dropdown,
  .nav-lang-option {
    transition: none !important;
    animation: none !important;
  }
}

@media (prefers-contrast: high) {
  .nav-lang-button {
    border: 1px solid #bfa173;
  }

  .nav-lang-dropdown {
    border: 1px solid #bfa173;
    background: #fff;
  }

  .nav-lang-option {
    color: #000;
  }

  .nav-lang-option:hover {
    background: #bfa173;
    color: #fff;
  }
}
