/* HEADER -> NAVIGATION */

/* Mobile first */

:root {
  --bgHeader: #404548;
  --linkColorUnder: rgba(249, 206, 87, 1);
  --secondaryColor: #fff;
}

.header {
  background-color: var(--bgHeader);
  width: 100%;
  height: 100px;
  position: sticky;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 20px;
  filter: drop-shadow(rgba(255, 115, 0, 0.2) 0px 7px 29px);
  z-index: 10;
}

.header__burger svg {
  display: block;
  stroke: var(--secondaryColor);
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 1;
  cursor: pointer;
}

.header__logo img {
  max-height: 100px;
  z-index: 1;
}

.header__logo__cam.open {
  display: block;
  margin: 0 0 0 36px;
  z-index: 100;
  position: fixed;
  top: 100%;
  left: 30%;
  right: 0;
  max-height: 20vh;
  animation: logo 0.75s ease-in-out forwards;
}

@keyframes logo {
  0% {
    scale: 0;
  }
  100% {
    scale: 1;
  }
}

.header__nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100vh;
  background-color: var(--bgHeader);
  display: flex;
  align-items: first baseline;
  justify-content: center;
  display: none;
  z-index: 12;
}

.header__nav.open {
  display: flex;
  animation: transformMenu 300ms ease-in-out forwards;
}

@keyframes transformMenu {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: initial;
  }
}

.header__nav__menu {
  padding: 0;
  margin: 0;
  list-style: none;
  flex-direction: column;
  align-items: flex-start;
}

.header__nav__menu__link {
  margin: 125px 0 80px 0;
}

.header__nav__menu__link a {
  color: var(--secondaryColor);
  text-decoration: none;
  font-weight: 600;
  font-size: 25px;
  position: relative;
}

.header__nav__menu__link a::after {
  content: "";
  height: 2px;
  background-color: var(--secondaryColor);
  width: 0%;
  position: absolute;
  bottom: -5px;
  right: 0;
  transition: 0.2s all ease-in-out;
}

.header__nav__menu__link a:hover::after {
  width: 100%;
  left: 0;
}

.header__nav__menu__dropdown {
  display: none;
  position: fixed;
  background-color: var(--bgHeader);
  padding: 9px 16px 2px;
  margin: 0px -10px -5px;
  border-radius: 5px;
  z-index: 12;
  list-style: none;
  background: transparent;
}

.header__nav__menu__dropdown__link {
  display: block;
  margin: 5px 0 15px;
  color: var(--secondaryColor);
  text-decoration: none;
}

.header__nav__menu__dropdown__link:first-of-type,
.header__nav__menu__dropdown__link:last-of-type {
  display: grid;
  place-items: center;
}

.header__nav__menu__dropdown__link a {
  margin-left: 10px;
  font-size: 17px;
  font-weight: normal;
}

.header__nav__menu__link__films:hover .header__nav__menu__dropdown {
  display: block;
}

.header__nav__menu__link__films:hover ~ .header__nav__menu__link__login {
  transform: translateY(175px);
}

.header__nav__close {
  display: block;
  cursor: pointer;
}

.header__nav__close svg {
  stroke: var(--secondaryColor);
  width: 28px;
  height: 28px;
  position: absolute;
  top: 16px;
  right: 16px;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 5;
  cursor: pointer;
}

.overlay.open {
  display: block;
}

.active {
  border: 1px solid var(--linkColorUnder);
  border-radius: 4px;
  font-weight: bolder;
  padding: 5px;
  animation: border 0.5s ease-in-out;
}

.active::after {
  display: none;
}

@keyframes border {
  0% {
    border: 1px solid rgba(255, 255, 255, 0);
  }
  100% {
    border: 1px solid var(--linkColorUnder);
  }
}

@media screen and (max-width: 360px) {
  .header__logo__cam.open {
    display: block;
    margin: -20px 0 0 36px;
    z-index: 100;
    position: fixed;
    top: 100%;
    left: 30%;
    right: 0;
    max-height: 20vh;
    animation: logo 0.75s ease-in-out forwards;
  }
}

@media screen and (max-width: 390px) {
  .header__logo__text {
    display: none;
  }
}

/* DESKTOP */

@media screen and (min-width: 830px) {
  .header .header__nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header__nav {
    display: block;
    height: 100px;
    background-color: var(--bgHeader);
  }

  .header__burger {
    display: none;
  }

  .header__nav__close {
    display: none;
  }

  .header__logo img {
    max-height: 100px;
  }

  .header__nav__menu {
    display: flex;
    width: 100%;
    gap: 50px;
    justify-content: flex-end;
    align-items: center;
    flex-direction: row;
  }

  .header__nav__menu__link {
    margin: 0 20px 0 0;
  }

  .header__nav__menu__link a {
    position: relative;
    font-size: 20px;
  }

  .header__nav__menu__dropdown {
    display: none;
    position: fixed;
    width: 158px;
    background-color: var(--bgHeader);
    padding: 9px 16px 2px;
    margin: 0 -10px -5px;
    border-radius: 5px;
    z-index: 12;
  }

  .header__nav__menu__dropdown__link {
    display: block;
    margin: 10px 0 15px;
    color: var(--secondaryColor);
    text-decoration: none;
  }

  .header__nav__menu__dropdown__link:first-of-type,
  .header__nav__menu__dropdown__link:last-of-type {
    display: grid;
    place-items: center;
  }

  .header__nav__menu__dropdown__link a {
    margin-left: 10px;
    font-size: 15px;
    font-weight: normal;
  }

  .header__nav__menu__link__films:hover > .header__nav__menu__dropdown {
    animation: menuDropdown 0.7s ease-in-out;
  }

  @keyframes menuDropdown {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }

  .header__nav__menu__link__films:hover ~ .header__nav__menu__link__login {
    transform: translateX(0);
  }
}
