/*Header Nav 2024 ------------------------------------------------------------------------------------------*/
.navbar {
  display: flex;
  width: 100%;
  background-color: transparent;
  height: auto;
  position: relative;
  z-index: 1;
  padding: 25px;
  justify-content: space-between;
  align-items: center;
  justify-items: center;
  justify-self: center;
  overflow: visible;
  box-shadow: none;
}

.navbar .container {
  flex-wrap: wrap;
  display: flex;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  justify-items: center;
  justify-self: center;
  align-items: center;
  justify-content: space-between;
  overflow: visible;
  position: relative;
}

.primary-navigation {
  display: flex;
  justify-items: center;
  justify-self: center;
  z-index: 9998;
}

.navbar .nav-list {
  list-style: none;
  display: flex;
  align-items: center;
}

.nav-list li .sub-menu {
  padding: 1rem;
}

.menu-item.donate-top-btn {
  background-color: #ea5213;
  color: #ffff;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 5px 7px;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.25);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.25);
}

@media (max-width: 1130px) {
  .navbar .nav-list {
    gap: 0.75rem;
  }
}

/* Styles for desktop */
@media (min-width: 58em) {
  .nav-list li .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin: 0;
    padding: 1rem;
    list-style-type: none;
    background: white;
    width: 100%;
    border-radius: 0.5rem;
    z-index: 999; /* Ensure high z-index */
    transition: all 1s ease;
    width: 12em;
    height: auto;
    margin-left: -130px;
    padding-bottom: 10px;
  }

  .nav-list li:hover > .sub-menu {
    display: block;
  }

  .mobile-nav-toggle {
    display: none;
  }
}

.nav-list a {
  color: white;
}

.nav-list li {
  position: relative; /* Ensure the sub-menu is positioned relative to its parent li */
}

.nav-list li:hover > .sub-menu {
  display: block;
}

.navbar .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  height: auto;
  margin: 0 auto;
  overflow: visible;
  margin-top: 30px;
}

.navbar .nav-list {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.nav-list a {
  position: relative;
  text-decoration: none;
}

.nav-list a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  height: 0.1em;
  width: 60%;
  background-color: #084d93;
  opacity: 0;
  transition: opacity 300ms, transform 500ms;
}

.nav-list a:hover::after,
.nav-list a:focus::after {
  opacity: 1;
  transform: translate3d(0, 0.2em, 0);
}

.nav-list a {
  color: white;
}

.menu-item.menu li a {
  color: white;
}

.nav-list li .sub-menu a {
  color: black;
  text-decoration: none;
  padding: 0px;
  letter-spacing: 0.039em;
}

.nav-list > li > a:hover {
  text-decoration: none;
  filter: brightness(70%); /* Adjust the brightness value as needed */
  color: white;
}

.nav-list li:hover > .sub-menu {
  display: block;
  transition: all 1s ease;
}

.home-logo #logo {
  max-height: 100px;
  max-width: 200px;
  margin: 0px 10px 5px 0;
}

.nav-list li {
  font-size: 1.2rem;
}

.menu-2024-redesign-container {
  display: flex;
  width: 100%;
  max-width: 900px;
  font-family: var(--font-heading);
  margin: 0;
  padding: 0;
}

.menu-2024-redesign-container a {
  display: flex;
  font-size: 1rem;
  flex-direction: column;
  justify-content: center;
  min-height: 45px;
  font-weight: 400;
  padding: 0 15px;
  text-decoration: none;
  overflow: visible;
}

.menu-2024-redesign-container li {
  min-height: 45px;
  line-height: 45px;
}

.menu-2024-redesign-container > li > a {
  min-height: var(--header-height);
  color: white !important;
}

.nav-list .sub-menu li a {
  width: 95%;
  max-width: 420px;
}

.menu-2024-redesign-container > li > a > span:before {
  position: absolute;
  content: "";
  height: 1px;
  width: 0%;
  left: 0;
  bottom: -3px;
  background-color: rgba(255, 255, 255, 0.8);
  transition: 0.2s all ease-in;
}

.menu-2024-redesign-container > li > a:hover > span:before {
  width: calc(100% - 16px);
}

.menu-2024-redesign-container
  > li.menu-item-has-children
  > a
  > .menu-title::after {
  display: inline-block;
  content: "\f107";
  font-weight: 100;
  margin-left: 10px;
}

.menu-2024-redesign-container
  > li.menu-item-has-children.active
  > a
  > .menu-title::after,
.menu-2024-redesign-container
  > li.menu-item-has-children:hover
  > a
  > .menu-title::after {
  transform: rotate(180deg);
}

.menu-2024-redesign-container a:hover {
  filter: brightness(70%);
}

#mobile-branding {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/*--------------------------------- mobile nav media queries styles ------------------------------*/
@media (max-width: 71em) {
  .primary-navigation {
    display: none;
  }

  #mobile-branding {
    display: block !important;
    min-width: 80px !important;
    width: 25%;
  }

  .primary-navigation {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 500px;
    max-width: 100%;
    overflow-y: scroll;
    background-color: #ffffff;
    padding: 16% 15%;
    transform: translateX(100%);
    transition: transform 350ms ease-out;
  }

  .primary-navigation[data-visible] {
    transform: translateX(0%);
  }

  .navbar .menu.is-active {
    opacity: 1;
    visibility: visible;
  }

  .navbar .nav-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.8rem;
    padding: 1rem 0rem 0rem 2rem;
  }

  .navbar .nav-list a::after {
    display: none;
  }

  #main-menu {
    display: grid;
    gap: 2.5rem;
    padding-top: calc(1.375rem + 2.5vw);
    text-align: left;
  }

  .nav-list a {
    color: black;
    text-decoration: none;
  }

  .primary-navigation[data-visible] {
    display: block;
  }

  .mobile-nav-toggle .icon-close {
    display: none;
  }

  .nav-list {
    display: grid;
    gap: 3rem;
    padding-top: calc(1.375rem + 2.5vw);
    text-align: left;
  }

  .menu-2024-redesign-container .nav-list a {
    font-size: 1.5rem;
  }

  /* Hide the submenu by default */
  .menu-2024-redesign-container .nav-list .sub-menu {
    display: none;
    list-style: none;
    width: 100%;
    padding: 0;
    margin-right: auto;
    margin-left: auto;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    text-align: left;
    line-height: 15px;
  }

  .navbar .nav-list .sub-menu li {
    gap: 1rem;
  }

  .menu-2024-redesign-container .nav-list .sub-menu a {
    font-size: 0.85rem;
    text-align: left;
    line-height: 15px;
  }

  .menu-item-has-children.open .sub-menu {
    display: block;
    max-height: 500px; /* Arbitrary large value for smooth transition */
    opacity: 1;
  }

  .menu-item-has-children > a::after {
    content: "+"; /* Icon for indicating dropdown */
    display: inline-block;
    margin-left: 8px;
  }

  .menu-item-has-children.open > a::after {
    content: "-"; /* Icon for indicating dropdown open */
  }

  /* Submenu link styling */
  .sub-menu li a {
    color: inherit; /* Default color */
    text-decoration: none;
  }

  .sub-menu li a:hover {
    color: lightgrey; /* Change color on hover */
  }

  .menu-item-has-children.open > a::after {
    content: "-"; /* Open state symbol */
  }

  /* Style for the parent menu item with children */
  .menu-item-has-children > a::after {
    content: "+"; /* Unicode for down arrow */
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.3s ease;
  }
  /*Nav toggle*/

  .mobile-nav-toggle {
    display: block;
    z-index: 10000;
    position: absolute;
    top: 55px;
    right: 0px;
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 0.5em;
    transition: color 0.3s ease;
  }

  .mobile-nav-toggle img {
    width: 24px; /* Adjust the size as needed */
    height: 24px; /* Adjust the size as needed */
    display: none; /* Initially hide both icons */
  }

  .mobile-nav-toggle .icon-hamburger {
    display: inline; /* Show the hamburger icon initially */
  }

  .mobile-nav-toggle.is-active .icon-hamburger {
    display: none; /* Hide the hamburger icon when active */
  }

  .mobile-nav-toggle.is-active .icon-close {
    display: inline; /* Show the close icon when active */
    position: fixed;
  }
}
