.header_wrapper {
  background: #4E3E21;
  color: #fff;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  position: relative; /* allow absolute positioning inside */
}

/* Hamburger button */
.hamburger {
  background: none;
  border: none;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  display: block; /* show on mobile */
}

/* Collapsed menu (hidden by default) */
.menu_section {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #4E3E21;
  overflow: visible;
  z-index: 999;

  max-height: 0;
  transition: max-height 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

/* Expanded menu */
.menu_section.active {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Animate children one by one */
.menu_section.active .main_menu li,
.menu_section.active .other_icons li {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.menu_section .main_menu li,
.menu_section .other_icons li {
  opacity: 0;
  transform: translateY(-8px);
}

/* Staggered animation */
.menu_section.active .main_menu li:nth-child(1) { transition-delay: 0.05s; }
.menu_section.active .main_menu li:nth-child(2) { transition-delay: 0.1s; }
.menu_section.active .main_menu li:nth-child(3) { transition-delay: 0.15s; }
.menu_section.active .main_menu li:nth-child(4) { transition-delay: 0.2s; }
.menu_section.active .other_icons li:nth-child(1) { transition-delay: 0.25s; }
.menu_section.active .other_icons li:nth-child(2) { transition-delay: 0.3s; }
.menu_section.active .other_icons li:nth-child(3) { transition-delay: 0.35s; }

/* Reset lists */
.main_menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.other_icons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.main_menu li a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}

.main_menu li a.active {
  color: #FB0;
}

/* Account dropdown */
.account-dropdown {
  position: relative;
}

.account-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  min-width: 140px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  z-index: 2000;
  padding: 8px 0;
    list-style: none;
}

.account-dropdown.active .dropdown-menu {
  display: block;
}

/* Desktop layout */
@media (min-width: 768px) {
  .hamburger {
    display: none; /* hide hamburger on desktop */
  }

  .menu_section {
    position: static;
    background: transparent;
    display: flex !important;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 40px;
    margin-top: 0;
    max-height: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .main_menu {
    flex-direction: row;
    gap: 30px;
  }

  .other_icons {
    flex-direction: row;
    gap: 7px;
    position: relative;
  }

  /* Disable animations on desktop */
  .menu_section .main_menu li,
  .menu_section .other_icons li {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
