/* common */
nav {
  position: fixed;
  right: 0;
  top: 0;

  display: flex;
  align-items: center;

  height: 100%;

  z-index: var(--menu-zindex);
  overflow: hidden;
}
nav > ul {
  display: flex;
  flex-direction: column;
  align-items: flex-end;

  margin: 0;

  list-style-type: none;
}

.nav-item-container {
  position: relative;
  width: fit-content;

  padding: 1.3rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%;
  height: 3rem;

  padding: 2rem;
  padding-right: 0.5rem;

  font-size: 2rem;

  text-decoration: none;
}

.nav-item-text {
  margin-left: auto;
  padding-right: 1rem;
}

.nav-item-icon {
  width: 5rem;
  height: 5rem;
  border-radius: var(--icon-radius);

  margin-right: 3rem;
  padding: 1rem 0;

  background-color: var(--col6);
  color: black;
}

/* animation */
.nav-item:hover::after {
  width: 100%;
}

.nav-item::after {
  content: "";

  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0%;
  height: 100%;

  border-radius: var(--btn-radius);

  background-color: var(--col6);

  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: -1; /* Place behind the text/icon */
}

/* mobile */
nav {
  display: none;
}

nav.active {
  display: flex;
  background-color: var(--col1);
}

/* desktop */
@media screen and (min-width: 1280px) {
  nav {
    display: flex;
  }
}
