/*---------------------- NAVIGATION PANEL ----------------------*/
/*--- STICKY NAVBAR ---*/
/*
1. Works when the user scrolls downwards in the page
*/
.navbar--sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 111;
  background-color: var(--color-white);
  box-shadow: 0 2rem 4rem rgba(23, 62, 98, 0.15);
  animation: slideInBottom 0.4s ease-in;
}

@keyframes slideInBottom {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(0);
  }
}

/*--- NAVIGATION PANEL CONTAINING THE LOGO, MENU AND REQUEST CALLBACK BUTTON ---*/
.navbar__panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8rem;
}

@media only screen and (max-width: 100em) {
  .navbar__panel {
    gap: 4rem;
  }
}

@media only screen and (max-width: 80em) {
  .navbar__panel {
    gap: 3rem;
  }
}

@media only screen and (max-width: 56.25em) {
  .navbar__panel {
    padding: 2rem 0;
  }
}

.navbar__panel--right {
  display: flex;
  justify-content: flex-end;
  gap: 4rem;
}

/*--- COMPANY LOGO ---*/
.logo {
  flex: 0 0 26rem;
}

@media only screen and (max-width: 100em) {
  .logo {
    flex: 0 0 18rem;
  }
}

.logo__img {
  display: inline-block;
  width: 100%;
}

/*--- NAVIGATION MENU ---*/
.navmenu {
  display: flex;
  align-items: center;
  flex: 1;
}

.navmenu__item {
  position: relative;
}

.navmenu__link:link,
.navmenu__link:visited {
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-text);
  display: inline-block;
  padding: 4rem 3rem;
  transition: all 0.3s;
}

.navbar--sticky .navmenu__link {
  padding: 3rem;
}

@media only screen and (max-width: 80em) {
  .navmenu__link:link,
  .navmenu__link:visited {
    padding: 4rem 2rem;
  }
}

.navmenu__link:hover,
.navmenu__link:focus {
  color: var(--color-primary);
}

/*
1. Horizontal underline for the main navigation link 
*/
.navmenu__link::before {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  background-color: var(--background-primary);
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateY(-3px);
  transition: all 0.3s;
}

/*
2. When hover on the list item, scale the 
underline to 100% to create the border effect
*/
.navmenu__item:hover > .navmenu__link::before {
  width: 100%;
}

.navmenu__item:has(.dropdown-menu) > .navmenu__link::after {
  content: "";
  display: block;
  width: 2rem;
  height: 2rem;
  background-image: url("../../assets/icons/expand_more.png");
  background-repeat: no-repeat;
  background-size: cover;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(-5px, -50%);
}

/*--- DROPDOWN MENU - NESTED MENU ---*/
/*
1. Absolutely positioned the dropdown menu panel 
right below the respective main navigation menu
*/
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateY(5rem);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  min-width: 25rem;
  background-color: var(--background-grey-light);
  box-shadow: 0 1rem 3.5rem rgba(0, 0, 0, 0.07);
  transition:
    opacity 0.5s,
    visibility 0.5s,
    transform 0.8s;
}

.dropdown-menu__item:not(:last-child) > .dropdown-menu__link {
  border-bottom: 1px solid var(--border-grey-light);
}

/*
2. Designed the links within the dropdown menu 
based on the different states
*/
.dropdown-menu__link:link,
.dropdown-menu__link:visited {
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-transform: capitalize;
  text-decoration: none;
  color: var(--color-text);
  display: block;
  padding: 1.6rem 2.4rem;
  background-color: transparent;
  transition: all 0.3s ease-in-out;
}

.dropdown-menu__link:hover,
.dropdown-menu__link:focus {
  color: var(--color-white);
  background-color: var(--color-primary);
}

/*
3. Slide the dropdown menu when hover on the main menu item
*/
.navmenu__item:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/*---------------------- NAVIGATION PANEL ----------------------*/
