/* Make the menu item flex so <a> and <button> stay on the same line */
li.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative; /* Needed for absolute positioning of dropdown */
  /* width: 100%; */
}

/* Style the dropdown link (left side) */
li.menu-item > a {
  flex-grow: 1; /* Makes the link take up all available space on the left */
  text-decoration: none;
  padding: 10px 15px;
  color: #fff; /* Adjust color as needed */
  font-weight: bold;
}

/* Style the dropdown button (right side) */
li.menu-item .mobile-toggler {
  background: none;
  border: none;
  font-size: 16px;
  color: #fff; /* Adjust color */
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-toggler {
  transition: transform 0.3s ease-in-out;
}

.mobile-toggler.rotated {
  transform: rotate(180deg);
}

button.mobile-toggler.d-block.d-lg-none {
  rotate: 90deg;
}

/* Dropdown menu styles */
li.menu-item .dropdown-menu {
  position: absolute !important;
  top: 90%;
  left: 0;
  width: 100%;
  display: none;
  background-color: #212529;
  border-radius: 0 0 5px 5px;
  padding: 10px 0;
  z-index: 99999 !important;
  filter: drop-shadow(2px 4px 6px black);
}

/* Show dropdown when button is clicked */
li.menu-item .dropdown-menu.show {
  display: block;
}

/* Responsive fix for mobile */
@media (max-width: 992px) {
  li.menu-item {
    flex-direction: row; /* Keep items in the same line */
    align-items: center;
  }

  li.menu-item .mobile-toggler {
    flex-shrink: 0; /* Prevents button from shrinking */
  }
}

li.menu-item-has-children:hover > ul.dropdown-menu {
  display: block;
}

ul.dropdown-menu {
  background-color: #222529;
  border: none;
  border-top-right-radius: 0;
  border-top-left-radius: 0;
  border-top: 1px solid #9b9d9e;
  z-index: 99999999 !important;
}

ul.dropdown-menu a {
  color: #9b9d9e;
}

ul.dropdown-menu a:hover {
  background: transparent !important;
  color: #c8c8c9;
}

li.dropdown span.mobile-toggler {
  display: inline-flex;
}

li.dropdown span.mobile-toggler {
  display: none;
}

.menu-wrap > li > a {
  margin-left: 10px;
  margin-right: 10px;
  font-size: 16px;
}
.menu-wrap > li > a:hover {
  font-size: 16px;
}

.menu-item-has-children {
  margin-right: 16px;
}

button.fa.fa-chevron-right {
  background: none;
  color: #9b9d9e;
  rotate: 90deg;
}

.menu-wrap > li.dropdown > a:before {
  content: "\f107";
  font-family: FontAwesome;
  position: absolute;
  align-self: center;
  right: 0;
  display: flex;
  align-items: center;
  background: inherit;
  transition: transform 0.3s ease-in-out; /* Smooth rotation */
}

.menu-wrap > li.dropdown:hover > a:before {
  transform: rotate(180deg);
}

.AJDWP_avatar,
.AJDWP_avatar_sm {
  display: block;
  text-align: center;
  color: #c8c8c9;
  padding: 0 1rem;
}

.AJDWP_avatar_sm {
  display: none;
}

div.AJDWP_avatar a > img,
div.AJDWP_avatar_sm a > img {
  width: 50px;
  height: 50px;
  border-radius: 50px;
}

img.custom-logo {
  height: 70px;
  width: 70px;
  padding: 3px;
  border-radius: 100px;
  border: 1px solid #9b9d9e;
  /* filter: invert(100%); */
  transition: transform 0.3s ease-in-out;
}

img.custom-logo:hover {
  transform: rotate(360deg);
}

li.current-menu-item > a,
li.menu-item:hover > a {
  text-shadow: 0 0 7px #c8c8c9, 0 0 10px #c8c8c9, 0 0 21px #c8c8c9, 0 0 42px #9b9d9e, 0 0 82px #9b9d9e, 0 0 92px #9b9d9e, 0 0 102px #9b9d9e, 0 0 151px #9b9d9e;
  color: #e9e9e9 !important;
}

/* 
___________________________________________________________________________________
___________________________________________________________________________________

                            Max-Width 992px
___________________________________________________________________________________
___________________________________________________________________________________ 

*/

@media (max-width: 992px) {
  .menu-wrap > li.dropdown > a:before {
    display: none;
  }
  .menu-wrap > li > a {
    align-self: center;
  }

  .menu-item-has-children {
    margin-right: 0;
  }

  .menu-wrap > li.dropdown > a:before {
    display: none;
  }

  li.dropdown span.mobile-toggler {
    display: flex;
    justify-content: end;
    margin-bottom: 10px;
    margin-top: -30px;
  }

  form.d-flex {
    margin-top: 20px;
  }

  li.menu-item-has-children:hover > ul.dropdown-menu {
    display: none;
  }

  .AJDWP_avatar {
    display: none;
  }

  .AJDWP_avatar_sm {
    display: block;
    width: 15%;
    padding: 0;
  }

  .navbar-collapse {
    border-top: 1px solid #9b9d9e;
    padding-top: 10px;
    margin-top: 15px;
  }
}

/* 
___________________________________________________________________________________
___________________________________________________________________________________

                                SEARCH FORM AND MODAL
___________________________________________________________________________________
___________________________________________________________________________________ 

*/

@media (min-width: 992px) {
  .AJDWP_search_form {
    display: none;
  }
}

@media (max-width: 992px) {
  .AJDWP_search_modal {
    display: none;
  }
}
