nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: baseline;
  align-items: baseline;
  gap: clamp(20px, 2vw, 30px);
  z-index: 1;
}

nav .box {
  width: 21vw;
  min-width: 200px;
  max-width: 320px;
}

nav .box .item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  color: black;
  font-family: var(--robotoMedium);
}

nav .box .item:active {
  color: var(--orange);
}

nav .box .item.current {
  font-family: var(--robotoMedium);
}

nav .box .item.current::before {
  background-color: hsl(190, 70%, 90%);
  opacity: 1;
}

nav .box .item.current + .item {
  border-top-color: transparent;
}

nav .box .item.current label {
  color: var(--blue);
  font-family: var(--robotoMedium);
}

/* List */
nav .box .list {
  position: relative;
  border-radius: 10px;
}

nav .box .list::before {
  content: "";
  opacity: 0;
  position: absolute;
  top: -1px;
  right: -15px;
  bottom: -1px;
  left: -15px;
  background-color: hsl(60, 1%, 98%);
  box-shadow: 0 2px 6px 0 var(--gray1);
  border-radius: 10px;
  transition: all 0.2s ease-in-out 0s;
}

nav .box .list.show::before {
  opacity: 1;
}

nav .box .list .item ~ .item {
  opacity: 0;
  height: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all .2s ease-in-out 0s;
}

nav .box .list.show .item ~ .item {
  opacity: 1;
  height: 100%;
  padding: 15px;
}

/* Arrow */
nav .box .list .material-icons {
  position: absolute;
  top: 4px;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: transparent;
  border: none;
  border-radius: 10px;
  font-size: 1.5em;
  cursor: pointer;
  user-select: none;
  transform: rotateX(360deg);
  transition: transform .5s ease-in-out 0s;
}

nav .box .list .material-icons:hover {
  background-color: hsla(0, 0%, 0%, .1);
}

nav .box .list.show .material-icons {
  animation: flip .5s;
  transform: rotateX(180deg);
}

@keyframes flip {

  from {
      transform: rotateX(0deg);
    }

  to {
      transform: rotateX(180deg);
      
    }
  
}

@media (max-width: 800px) {

  nav {
    overflow-y: auto;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    padding: 100px 25px 25px 25px;
    background-color: hsla(0, 0%, 0%, 0.2);
    overflow-y: auto;
  }

  nav .box {
    flex: 1;
  }

}
