@use '../../styles/colors';
@use '../../styles/breakpoints';

$nav-height: 4.5rem;

.nav {
  position: fixed;
  top: 0;

  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: $nav-height;
  padding: 8px 2rem;
  z-index: 10;
  transition: all 200ms ease-in-out;

  &.scrolled {
    padding-top: 10px;
    background-color: white;

    & > .backdrop {
      background-color: white;
    }
  }

  @media (min-width: breakpoints.$tablet) {
    padding: 8px 4.5rem;
  }
}

.logo {
  height: 100%;
  z-index: 10;

  & > img {
    height: 100%;
  }
}

.button {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 10;
  padding: 0;

  @media (min-width: breakpoints.$tablet) {
    display: none;
  }
}

.button > svg {
  width: 100%;
  height: 100%;
}

.backdrop {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 9;
  transition: 1s;

  &.show {
    background: white;
    transition: 0s;
  }

  @media (min-width: breakpoints.$tablet) {
    background: none !important;
  }
}

.links {
  display: none;
  justify-content: space-evenly;
  align-items: center;
  gap: 2rem;
  z-index: 10;

  @media (min-width: breakpoints.$tablet) {
    display: flex;
  }
}

.links a {
  color: colors.$text;

  h5:hover {
    text-decoration-line: underline;
  }
}

.mobileLinks {
  position: absolute;
  top: 0;
  left: 0;

  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: flex-end;

  background: rgba(0, 0, 0, 0.5);
  font-weight: 300;

  width: 100%;
  padding: calc($nav-height + 0.5rem) 2rem 0.5rem 0;

  z-index: 8;

  @media (min-width: breakpoints.$tablet) {
    visibility: hidden;
  }
}

.mobileLinks > a {
  color: white;
  font-weight: normal;
}
