.sidebar {
  height: 100dvh;
  width: 0;
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  background-color: var(--background-secondary);
  overflow-x: hidden;
  transition: all .5s ease-out;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  box-shadow: 1px 0 3px rgba(0 0 0 / .15),
              3px 0 6px rgba(0 0 0 / .25);
}

.sidebar.active {
  width: 75%;
  overflow: visible;
}

.sidebar a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 25px;
  color: #818181;
  display: block;
  transition: all .3s ease-out;
}

.sidebar a:hover {
  color: #f1f1f1;
}

.sidebar .close-btn {
  position: absolute;
  top: 5%;
  right: -25%;
  font-size: 32px;
  background-color: var(--text-primary);
  color: var(--background-secondary);
  box-shadow: 1px 1px 3px rgba(0 0 0 / .15),
              3px 3px 6px rgba(0 0 0 / .25);
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar .header {
  width: 100%;
  padding: 6px 12px;
  font-size: 1.3rem;
  font-weight: bold;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

.sidebar ul {
  list-style-type: none;
}

.sidebar .main-items {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
}

.sidebar .main-items li {
  width: 100%;
}

.sidebar .main-items li a {
  text-decoration: none;
  display: block;
  width: 100%;
  padding: 8px;
  padding-left: 10px;
  border-radius: 24px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: bold;
  color: var(--text-primary);
  cursor: pointer;
  transition: all .4s ease-out;
}

.sidebar .main-items li a .logo {
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar .main-items li.active a {
  background-color: var(--primary);
  color: var(--background-primary);
}

.sidebar .main-items li:hover.active a {
  background-color: var(--primary-dark);
}

.sidebar .main-items li:hover:not(.active) a {
  background-color: var(--primary-light-2);
}

.sidebar .main-items li:hover a {
  box-shadow: 1px 1px 8px rgba(0 0 0 / .15);
}

.sidebar .divider {
  height: 2px;
  width: 60%;
  background-color: #a3a3a3;
  margin: 5px;
}

.sidebar .departments-list {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 6px 10px;
}

.sidebar .departments-list li {
  width: 100%;
}

.sidebar .departments-list li a {
  text-decoration: none;
  display: block;
  width: 100%;
  padding: 6px;
  padding-left: 10px;
  border-radius: 24px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all .4s ease-out;
}

.sidebar .departments-list li a .logo {
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar .departments-list li.active a {
  background-color: var(--primary);
  color: var(--background-primary);
}

.sidebar .departments-list li:hover.active a {
  background-color: var(--primary-dark);
}

.sidebar .departments-list li:hover:not(.active) a {
  background-color: var(--primary-light-2);
}

.sidebar .departments-list li:hover a {
  box-shadow: 1px 1px 8px rgba(0 0 0 / .15);
}

@media only screen and (min-width: 660px) {
  .sidebar.active {
    width: 45%;
  }

  .sidebar :is(.main-items, .divider) {
    display: none;
  }

  .sidebar .departments-list li a {
    font-size: 1.1rem;
  }

  .sidebar .departments-list li a .logo {
    width: 32px;
    height: 32px;
  }

  .sidebar .close-btn {
    top: 5px;
    right: 5%;
    color: var(--text-primary);
    background-color: transparent;
    box-shadow: none;
    transition: all .4s ease-out;
    padding: 10px 14px;
    font-size: 1.3rem;
  }

  .sidebar .close-btn:hover {
    box-shadow: 1px 1px 3px rgba(0 0 0 / .15);
    background-color: var(--background-primary);
    color: var(--vermillion);
  }
}

@media only screen and (min-width: 800px) {
  .sidebar.active {
    width: 35%;
  }
}

@media only screen and (min-width: 1024px) {
  .sidebar.active {
    width: 25%;
  }
}
