header {
  font-size: 1.8rem;

  ul {
    margin: 0;
    padding: 0;
    list-style: none;

    li {
      margin: 0;
      padding: 0;
    }
  }

  a {
    text-decoration: none;

    &:hover,
    &:focus {
      text-decoration: underline;
    }
  }
}

#menu__main {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  margin-block: 35px;

  .logo {
    display: inline-block;
    width: min-content;
    width: 153px;
    height: 80px;
  }

  img {
    position: relative;
    z-index: 50;
    width: auto;
  }

  nav {
    position: absolute;
    top: -20px;
    right: 0;
    z-index: 50;
  }

  ul {
    display: flex;
    list-style: none;

    li:first-child {
      position: relative;
      margin: 0;
      padding: 0;

      &:after {
        display: inline-block;
        position: relative;
        top: 1px;
        right: 0;
        margin-inline: 0.8rem;
        background-color: var(--primary);
        width: 2px;
        height: 16px;
        content: "";
      }
    }

    .active {
      font-weight: bold;
    }
  }

  a {
    text-decoration: none;

    &:hover,
    &:focus {
      text-decoration: underline;
    }
  }

  button {
    position: absolute;
    border: 2px solid transparent;
    border-radius: var(--br-small);
    background: none;
    padding: 0.6rem;
    width: 48px;
    height: 48px;

    &:hover,
    &:focus {
      border: 2px solid var(--primary);
      background: none;
    }
  }
}

#menu__mini {
  position: relative;
  height: 160px;

  nav {
    position: absolute;
    right: 210px;
    bottom: 4rem;
    z-index: 50;
    width: max-content;
  }

  ul {
    display: flex;
    gap: 3.2rem;
    list-style: none;
  }
}

#menu__full {
  position: relative;
  z-index: 20;
  background-color: var(--primary-light);
  padding: 160px 24px 0 24px;
  width: 100%;

  ul {
    display: block;
    text-align: center;

    ul {
      margin-top: 0.8rem;
    }
  }

  li {
    margin-bottom: 3rem;
    font-weight: bold;
    font-size: 3rem;

    li {
      margin-bottom: 0;
      font-weight: normal;
      font-size: 1.6rem;
    }
  }

  .extra {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2.4rem 8rem;
    margin: 8rem auto 0;
    width: max-content;
    max-width: 100%;

    li {
      font-size: 1.8rem;
    }
  }
}

/* Toggle Buttons */
#toggle__searchform {
  position: absolute;
  right: 80px;
  bottom: -10px;
  padding: 0.8rem;
}

#toggle__menu {
  position: absolute;
  right: 0;
  bottom: -10px;

  span {
    position: absolute;
    top: 16px;
    left: 8px;
    transform-origin: center;
    transition: transform linear 0.2s, top linear 0.2s;
    background-color: var(--primary);
    width: 28px;
    height: 2px;
  }
  .line2 {
    top: 26px;
  }

  &[aria-expanded="true"] {
    .line1 {
      top: 23px;
      transform: rotate(45deg);
    }
    .line2 {
      top: 23px;
      transform: rotate(-45deg);
      transition-delay: 0.2s;
    }
  }
}

/* Responsiveness */
@media (max-width: 700px) {
  #toggle__searchform {
    right: 60px;
  }

  #menu__mini {
    nav {
      right: 140px;
    }
  }
}

@media (max-width: 560px) {
  #menu__mini nav {
   display: none;
  }
}

@media (max-width: 400px) {
  #menu__full {
    padding-bottom: 2.4rem;
  }
  #menu__full .extra {
   display: block;
   margin-top: 4rem;

   li {
     margin-bottom: 0;
   }
  }
}
