/*
  navigation.css
  Header navigation, hamburger menu, and mobile menu panel.
  Footer nav is also here since it shares the nav link system.
*/


/* ─── Mobile menu panel ──────────────────────────────────────────────────── */

.menu {

  @media screen and (max-width: 1023px) {
    padding-top: 50px;
  }

  &.sm-md {
    background-size: cover;
    background-position: left;
    background-repeat: no-repeat;
    position: fixed;
    top: 200px;
    left: -100vw;
    width: 100vw;
    height: calc(100vh - 200px);
    background-color: var(--jade);
    transition: left 125ms ease;
    z-index: 900;

    @media screen and (min-width: 1024px) {
      display: none;
    }

    &.menu-open {
      left: 0;
    }
  }

  &.lg-only {
    display: none;

    @media screen and (min-width: 1024px) {
      display: flex;
    }
  }
}


/* ─── Hamburger toggle button ────────────────────────────────────────────── */

.navigation__toggle--hamburger {
  cursor: pointer;
  width: 44px;
  height: 34px;
  margin: 0;
  padding: 0;
  transform: rotate(0deg);
  border: 0;
  background-color: transparent;
  z-index: 100;

  &[aria-expanded='true'] .hamburger__bar {

    &:nth-child(1) {
      top: 18px;
      width: 0%;
      left: 50%;
    }

    &:nth-child(2) {
      transform: rotate(45deg);
    }

    &:nth-child(3) {
      transform: rotate(-45deg);
    }

    &:nth-child(4) {
      top: 18px;
      width: 0%;
      left: 50%;
    }
  }

  @media screen and (min-width: 1024px) {
    display: none;
  }
}

.navigation__toggle__text {
  font-size: 0;
}

.hamburger__bar {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: white;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: 125ms ease-in-out;

  &:nth-child(1) {
    top: 0px;
  }

  &:nth-child(2),
  &:nth-child(3) {
    top: 12px;
  }

  &:nth-child(4) {
    top: 24px;
  }
}


/* ─── Nav wrap and list base ─────────────────────────────────────────────── */

.header-nav-wrap {
  display: flex;
}

.header-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Mobile menu nav */
.menu.sm-md .header-nav-wrap--site {
  display: flex;
  align-items: center;
  justify-content: center;

  & .header-nav--site {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;

    @media screen and (max-width: 1023px) {
      flex-direction: column;
      align-items: center;
    }
  }
}

/* Desktop menu nav */
.menu.lg-only .header-nav-wrap--site {
  display: flex;

  & .header-nav--site {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;

    @media screen and (max-width: 1023px) {
      flex-direction: row;
      align-items: center;
    }
  }
}


/* ─── Nav items ──────────────────────────────────────────────────────────── */

.header-nav__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  text-transform: uppercase;

  @media screen and (max-width: 1023px) {
    width: 100%;
  }

  @media screen and (min-width: 1024px) {
    padding: 0 10px;

    &:first-of-type {
      padding-left: 0;
    }

    &:last-of-type {
      padding-right: 0;
    }
  }

  &:last-of-type {
    @media screen and (max-width: 1023px) {
      padding-top: 25px;
    }
  }
}


/* ─── Nav links ──────────────────────────────────────────────────────────── */

.nav-link {
  padding: 20px 10px;

  @media screen and (max-width: 1023px) {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    height: 44px;
  }
}

.nav-link--primary {
  padding: 0;
  color: var(--super-faded-gold);
  font-size: 22px;
  font-weight: 400;
  text-transform: uppercase;
  text-decoration: none;

  @media screen and (max-width: 1023px) {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    height: 44px;
  }

  @media screen and (min-width: 1024px) {
    font-size: 18px;
  }

  &:hover {
    color: var(--gold);
    background-color: var(--jade);
    transition: all 125ms ease-in-out;
  }
}

.nav-link--secondary {
  @media screen and (min-width: 1024px) {
    padding: 0 10px;
  }
}

.header-nav__item .register-button {
  width: 240px;
  height: 44px;
  font-size: 16px;

  @media screen and (max-width: 1023px) {
    margin-top: 20px;
  }
}


/* ─── Footer nav links ───────────────────────────────────────────────────── */

.footer-nav--site .nav-link--primary {
  font-size: 16px;
}

.footer-nav,
.footer-nav--site,
.footer-nav--legal {
  margin: 0;
  padding: 0;
  list-style-type: none;
  display: flex;
}

.footer-nav--site {
  flex-direction: column;
  align-items: start;
  gap: 2px;
}

.footer-nav-wrap,
.footer-nav-wrap--site,
.footer-nav-wrap--legal {
  display: flex;
}

.footer-nav-wrap--site {
  flex-direction: column;

  @media screen and (max-width: 767px) {
    padding-top: 25px;
  }

  & .footer-nav__item {
    @media screen and (max-width: 600px) {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
    }
  }

  & > p {
    text-align: left;
  }
}

.footer-nav-wrap--legal {
  align-items: center;
  justify-content: center;
  padding-top: 30px;
}

.footer-nav--legal {
  flex-wrap: wrap;
  justify-content: center;

  @media screen and (max-width: 600px) {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  @media screen and (min-width: 601px) and (max-width: 1023px) {
    flex-direction: row;
    justify-content: center;
  }

  & .footer-nav__item {
    text-align: center;

    @media screen and (min-width: 601px) and (max-width: 1023px) {
      width: unset;
      padding: 0 10px;
    }
  }

  & .footer-nav__item:first-of-type,
  & .footer-nav__item:nth-of-type(2) {
    width: 100%;
    text-align: center;
  }

  & a {
    color: white;
    text-transform: capitalize;

    @media screen and (max-width: 1023px) {
      font-size: 12px;
    }
  }
}
