.headerFade {
  opacity: 0;
  visibility: hidden;
  transition: 0.2s ease-in-out;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  height: fit-content;
  transition: 0.2s ease-in-out;
  z-index: 1000;

  nav {
    user-select: none;
    position: absolute;
    height: 70px;
    width: 100%;
    margin-top: 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    transition: 0.2s ease-in-out;
    background-color: $background-color;

    a {
      width: fit-content;
    }
  }

  .logo {
    margin: 10px;
    margin-left: 70px;
    width: 9rem;
    transition: 0.4s ease-in-out;
  }

  ul {
    list-style-type: none;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: right;
    position: relative;
    transition: 0.3s ease-in-out;
    margin-right: 60px;
    // background-color: blue;
  }

  li {
    user-select: none;
    margin-right: 40px;
    cursor: pointer;
    font-family: $title-font;
    font-size: 1.05rem;
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 3px;
    transition: 0.2s ease-in-out;
    // background-color: red;

    &:hover {
      color: $color-hover-nav;
    }
  }
  // able to change color of li + Down arrow in same time after hover
  li:hover * :not(.arrowContainer) {
    background-color: $color-hover-nav;
    color: $color-hover-nav;
  }

  .menuBtn {
    cursor: pointer;
    display: none;
    position: absolute;
    top: 6px;
    width: 25px;
    height: 25px;
    right: 40px;
    font-size: 1rem;
    overflow: hidden;
    transition: 0.2s ease-in-out;
  }

  .menuBtnBurger {
    width: 20px;
    height: 2px;
    background-color: $menu-burger-color;
    transition: 0.2s ease-in-out;

    &::before,
    &::after {
      content: "";
      position: absolute;
      width: 20px;
      height: 2px;
      background-color: $menu-burger-color;
      transition: all 0.2s ease-in-out;
    }
    &::before {
      transform: translateY(-6px);
    }
    &::after {
      transform: translateY(6px);
    }
  }

  //   BURGER ICON ANIMATION
  .menuBtn.open .menuBtnBurger {
    transform: translateX(-50px);
    background-color: transparent;
  }

  .menuBtn.open .menuBtnBurger::before {
    transform: rotate(45deg) translate(35px, -35px);
  }
  .menuBtn.open .menuBtnBurger::after {
    transform: rotate(-45deg) translate(35px, 35px);
  }

  //   REPONSIVE

  @media screen and (max-width: 1300px) {
    ul {
      margin-right: 40px;
    }

    li:nth-last-child(1) {
      margin-right: 0px;
    }

    .logo {
      margin-left: 20px;
    }
  }

  @media screen and (max-width: 900px) {
    nav {
      height: fit-content;
      flex-direction: column;
      align-items: unset;
      transition: 0.2s ease-in-out;
      background-color: $background-color;
    }

    a {
      width: fit-content;
    }

    .logo {
      height: 45px;
      margin: 10px;
      margin-left: 1.6rem;
      width: 9rem;
      transition: 0.4s ease-in-out;
    }

    .menuBtn {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    ul {
      position: relative;
      border-top: solid $nav-separation-color 1px;
      border-bottom: solid $nav-separation-color 1px;
      flex-direction: column;
      align-items: unset;
      background-color: $background-color;
      box-shadow: 2px 8px 8px 0px #00000077;

      &::before {
        content: "";
        position: absolute;
        left: -5%;
        width: 120%;
        height: 100%;
        background: linear-gradient(90deg, transparent 0%, #000 5%, #000 100%);
        animation: fadeShadow 0.3s linear forwards;
      }
    }

    li:nth-child(1) {
      border: none;
    }

    li {
      border-top: solid $nav-separation-color 1px;
      width: 100%;
      padding: 1.6rem 1.6rem;
      justify-content: left;
    }

    .menuBtn {
      top: 1.3rem;
    }
  }
}

@keyframes appear {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeShadow {
  0% {
    left: -5%;
  }

  100% {
    left: 120%;
  }
}
