.navbar {
  background-color: #333;
  font-family: "Roboto Condensed", sans-serif;
  padding-left: 5%;
  padding-right: 5%;
  display: flex;
  flex-direction: row;
}

/* Links inside the navbar */
.navbar a {
  float: left;
  font-size: 1.1em;
  color: white;
  text-align: center;
  padding: 1em;
  text-decoration: none;
}

/* The dropdown container */
.dropdown {
  float: left;
}

.sub-dropdown {
  position: relative;
}

/* Dropdown button */
.dropdown .dropbtn {
  font-size: 1.1em;
  font-family: "Roboto Condensed", sans-serif;
  border: none;
  outline: none;
  color: white;
  padding: 1em;
  background-color: inherit;
  margin: 0; /* Important for vertical align on mobile phones */
}

.sub-dropdown .dropbtn {
  font-size: 1.1em;
  font-family: "Roboto Condensed", sans-serif;
  border: none;
  outline: none;
  color: white;
  padding: 12px 16px;
  background-color: inherit;
  margin: 0; /* Important for vertical align on mobile phones */

  cursor:pointer;
}

.navbar a:hover:not(.active),
.dropdown:hover > .dropbtn {
  color: #333;
  background-color: white;
  transition: 0.2s ease-in-out;
  font-weight: 600;
}

.sub-dropdown:hover .dropbtn {
  color: #333;
  background-color: white;
  transition: 0.2s ease-in-out;
  font-weight: 600;
}

/* Add animation for dropdown content */
@keyframes dropdownAnimation {
  from {
    opacity: 0.5;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply animation to dropdown content */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #333;
  min-width: max-content;
  box-shadow: 0px 8px 16px 0px #333;
  z-index: 1;
  animation: dropdownAnimation 0.3s ease-out;
}

.sub-dropdown-content {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  background-color: #333;
  min-width: max-content;
  box-shadow: 0px 8px 16px 0px #333;
  /* z-index: 1; */
  z-index: 100;
  animation: dropdownAnimation 0.3s ease-out;
}

.sub-dropdown-content.open-left {
  left: auto;
  right: 100%;
}

.sub-dropdown-content.open-adjusted {
  position: relative;
  left: 0;
  top: 100%;
  display: none;
  width: 100%;
  background-color: #333;
  z-index: 100;
}

.sub-dropdown-content.open-adjusted.open {
  display: block;
}

/* Links inside the dropdown */
.dropdown-content a {
  float: none;
  font-size: 1.1em;
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.sub-dropdown-content a {
  float: none;
  font-size: 1.1em;
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

/* Show the dropdown menu on hover with animation */
.dropdown:hover .dropdown-content {
  display: block;
}

.sub-dropdown:hover .sub-dropdown-content:not(.open-adjusted)  {
  display: block;
}

.active {
  background-color: #008099;
  color: white;
  font-weight: 600;
}

.submenu-arrow {
  display: inline-block;
  margin-left: 0.5em;
  font-size: 0.8em;
  color: inherit;
  transition: transform 0.3s ease;
}

.dropbtn.has-adjusted .submenu-arrow::after {
  content: "▼";
}

.dropbtn.has-adjusted.submenu-open .submenu-arrow::after {
  content: "▲";
}
