@import url('vars.css');

.nav {
  background-color: #465573;
  font-size: 1.2rem;
  position: fixed;
  width: 100%;
  z-index: 9999;
  margin-top: -90px;
}

.nav__container {

  width: min(90%, 1200px);
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  height: 80px;

  --icon-toggle-menu: url('../img/menu-open.svg');
  --transform-menu-show: translate(-100%);
}

.nav__container:has(.nav__input:checked) {
  --icon-toggle-menu: url('../img/menu-close.svg');
  --transform-menu-show: translate(0);
}

.nav__menu-list {
  transform: var(--transform-menu-show);
  position: fixed;
  z-index: 1;
  inset: 0;

  display: grid;
  place-content: center;
  gap: 2rem;
  text-align: center;

  padding: 1.5rem 5%;
  background-color: #465573;
  list-style: none;

  transition: .5s transform;
}

.nav__logo {
  height: 60px;
  width: auto;
}

.nav__figure,
.nav__toggle {
  position: relative;
  z-index: 10;
}

.nav__toggle {
  width: 20px;
  height: 20px;
  background-image: var(--icon-toggle-menu);
  background-size: cover;
  cursor: pointer;

  transition: background-image .5s;
}

.nav__menu-link {
  color: #fff;
  text-decoration: none;
}

.nav__input {
  display: none;
}

@media (width >=768px) {

  .nav__container{
    --transform-menu-show: translate(0);
  }

  .nav__toggle {
    display: none;
  }

  .nav__menu-list{
    position: static;
    --transform-menu-show: translate(0);
    place-content: unset;
    grid-auto-flow: column;
    padding: 0;

    transition: unset;
  }
}