html {
  scroll-behavior: smooth;
}

.header--desktop {
  display: flex;
  width: 100%;
  min-width: 350px;
  height: 60px;
  justify-content: space-between;
  align-items: center;
  padding: 10px 30px 0 30px;
  box-sizing: border-box;
  z-index: 4;
}

.header--desktop.active {
  position: fixed;
  z-index: 9999;
}

.header_logo img {
  padding-top: 5px;
  height: 50px;
}

.menu-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-icon .bar {
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 4px 0;
}

.header__nav ul {
  list-style: none;
}

.nav_links {
  display: flex;
  height: 50px;
  text-align: center;
  align-items: center;
  gap: 20px;
}

.nav_links_link a {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  color: white;
  text-decoration: none;
  font-size: x-large;
  padding-bottom: 2px;
}

/* Underline animation on hover */
.nav_links_link > a::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 8.5px;
  width: 0;
  height: 2px;
  background-color: white;
  transition: width 0.3s ease;
}

.nav_links_link a:hover::before {
  width: 100%;
}

.dropdown {
  position: relative;
  z-index: 4;
}

.dropdown_list {
  display: none;
  position: absolute;
  top: 100%;
  right: -100px;
  background-color: #fff;
  padding: 5px 0;
  min-width: 320px;
  border-radius: 8px;
  font-family: Arial, sans-serif;
}

.dropdown_list_item {
  margin: 0;
  list-style-type: none;
}

.dropdown_list_item a {
  color: #000;
  padding: 8px 15px;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: 500;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.dropdown_list_item a:hover {
  background-color: #e0e0e0;
  color: #000;
}

.nav_links_link a,
.dropdown_list_item a {
  transition:
    color 0.3s ease,
    background-color 0.3s ease;
}

.dropdown:hover .dropdown_list {
  display: block;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile__menu {
  display: none;
}

@media (max-width: 768px) {
  .menu-icon {
    display: flex;
  }

  .nav_links {
    display: none;
  }

  .mobile__menu.active {
    display: flex;
    background-color: #094149;
    position: fixed;
    z-index: 9998;
    opacity: 1;
    animation: fadeIn 0.5s ease;
  }

  .mobile__menu__links {
    list-style: none;
    gap: 25px;
    padding-top: 40%;
    align-items: center;
    text-align: center;
    width: 100vw;
    height: 100vh;
    opacity: 1;
    transition: opacity 0.5s ease;
  }

  .mobile__menu__links,
  .links__services--ul {
    display: flex;
    flex-direction: column;
  }

  .links__services--ul {
    padding-top: 15px;
    gap: 15px;
  }

  .mobile__menu__links.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
  }

  .main__link a {
    text-decoration: none;
    color: white;
    font-size: larger;
  }

  #links__servicesOpener a {
    text-decoration: none;
    color: white;
    font-size: larger;
  }

  .secondary__link a {
    text-decoration: none;
    font-size: larger;
  }

  /* Initially hide the dropdown */
  .mobile__menu__links > li > ul {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition:
      max-height 0.5s ease,
      opacity 0.5s ease;
  }

  /* When the active class is applied, show the dropdown with animation */
  .mobile__menu__links > li > ul.active {
    max-height: 500px;
    opacity: 1;
  }

  /* Fade-out animation for closing */
  .mobile__menu__links > li > ul.fade-out {
    max-height: 0;
    opacity: 0;
    transition:
      max-height 0.5s ease,
      opacity 0.5s ease;
  }
}

/* Fade-in animation for showing the mobile menu */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
