.subnav {
  display: none;
  padding: 1rem 2rem;
  width: 60rem;
  max-height: 60vh;
  overflow: hidden;

  font-size: 1.5rem;
  line-height: 1.15;

  background: $white;
  border: 1px solid #F2F2F2;
  box-shadow: 0 4px 5px rgba(172, 172, 172, 0.15);
  border-radius: 0 0 5px 5px;

  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;

  @include media-breakpoint-up(lg) {
    .nav__item:hover & {
      display: block;
    }
  }


  @include media-breakpoint-down(lg) {
    width: 100%;
    max-height: none;
    padding: 0;
    margin-top: 1rem;

    box-shadow: none;
    border: none;
    background: transparent;

    position: relative;
    top: 0;

    &.show {
      display: block;
    }
  }
}

.menu-container{
  /* width */
  &::-webkit-scrollbar {
    width: 4px;
  }

  /* Track */
  &::-webkit-scrollbar-track {
    background: #F6F6F6;
  }

  /* Handle */
  &::-webkit-scrollbar-thumb {
    background: $primary;
    border-radius: 2px;
    cursor: pointer;
  }

  /* Handle on hover */
  &::-webkit-scrollbar-thumb:hover {
    background: $primary;
  }
}

.subnav__wrapper {
  width: 50%;
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-right: 2.5rem;
  height: calc(60vh - 6rem);
  overflow-y: auto;
  overflow-x: hidden;

  /* width */
  &::-webkit-scrollbar {
    width: 4px;
  }

  /* Track */
  &::-webkit-scrollbar-track {
    background: #F6F6F6;
  }

  /* Handle */
  &::-webkit-scrollbar-thumb {
    background: $primary;
    border-radius: 2px;
    cursor: pointer;
  }

  /* Handle on hover */
  &::-webkit-scrollbar-thumb:hover {
    background: $primary;
  }

  @include media-breakpoint-down(lg) {
    width: auto;
    height: auto;
    margin-left: 1rem;
    padding-left: 2rem;
    padding-right: 0;

    border-left: 1px solid #F2F2F2;
  }
}

.subnav__list {
  list-style: none;
}

.subnav__item {
  margin-bottom: 2rem;

  &:last-child {
    margin-bottom: 0;
  }

  @include media-breakpoint-down(lg) {
    position: relative;

    .nav__subnav-toggle {
      top: 0;
      right: -.5rem;
    }
  }

  &--title {
    @include media-breakpoint-down(lg) {
      display: none;
    }
  }
}

.subnav__link {
  text-decoration: none;
  color: $dark;

  &:hover {
    color: $primary;
    text-decoration: underline;
  }

  @include media-breakpoint-down(lg) {
    color: $white;
  }
}

.subnav__title {
  font-weight: 500;
  color: $dark;
}

.subnav__inside {
  display: none;
  width: 50%;
  padding: 1rem 2rem;

  top: 0;
  right: 0;
  position: absolute;

  .subnav__wrapper {
    width: 100%;
  }

  &.show {
    display: block;
  }

  @include media-breakpoint-down(lg) {
    width: 100%;
    padding: 1.5rem 0 0 0;

    position: relative;
    top: 0;
  }
}