.sub-navigation {
  width: 100%;

  * {
    -webkit-tap-highlight-color: transparent;
  }

  &__wrapper {
    width: 100%;
    background-color: $gray-10;
    border-bottom: 1px solid $gray-bluish;
    border-top: 1px solid $gray-bluish;
    padding: 40px $gutter;
    transition: all 0.2s ease-in-out;

    @include sm {
      padding: 40px 0 0;
    }

    .js-sticky-links & {
      background-color: $white;
      position: fixed;
      top: $header-height;
      z-index: calc(#{$z-header} - 1);
      padding: 16px $gutter;

      @include md {
        top: calc(#{$header-height-mobile} - 1px);
      }

      @include sm {
        padding: 16px 0 0;
      }
    }
  }

  &__container {
    width: 100%;
    max-width: $projects-detail-width;
    margin: 0 auto;
  }

  &__links-container {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    @include sm {
      flex-direction: column;
    }
  }

  &__button-title-mobile {
    display: none;
    border: 0;
    background: none;
    padding: 0 calc(#{$gutter-mobile * 2}) 24px;
    font-weight: 700;
    font-size: 1.8rem;
    line-height: 2.2rem;
    letter-spacing: 0.02rem;
    color: $medium-color;
    margin: 0;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid $gray-bluish;
    cursor: pointer;
    transition: all 0.2s ease-in-out;

    @include sm {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .js-close-links-mobile & {
      padding: 0 calc(#{$gutter-mobile * 2}) 40px;
    }

    .js-sticky-links & {
      padding: 0 calc(#{$gutter-mobile * 2}) 16px;
    }
  }

  &__button-title-mobile-icon {
    position: relative;
    width: 14px;
    height: 14px;
  }

  &__button-title-mobile-arrow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: all 0.2s ease-in-out;

    .js-close-links-mobile & {
      opacity: 1;
    }

    svg {
      display: block;
      width: 100%;
      height: 100%;
      transform: rotate(90deg);

      path,
      g {
        stroke: $medium-color;
      }
    }
  }

  &__button-title-mobile-close {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: all 0.2s ease-in-out;

    .js-close-links-mobile & {
      opacity: 0;
    }

    svg {
      display: block;
      width: 100%;
      height: 100%;

      path,
      g {
        fill: $primary-color;
      }
    }
  }

  &__container-link-groups {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: all 0.2s ease-in-out;

    @include sm {
      overflow: hidden;
      flex-direction: column;
    }

    &.sub-navigation--no-button {
      align-items: center;
      justify-content: center;
    }
  }

  &__link-groups {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    column-gap: 16px;
    margin-top: 13px;
    transition: all 0.2s ease-in-out;

    @include sm {
      width: 100%;
      flex-direction: column;
      margin-top: 0;
      padding: 0 $gutter-mobile;
    }

    .sub-navigation--no-width & {
      column-gap: 40px;
    }

    .sub-navigation--no-button &, .sub-navigation--no-width-no-center & {
      margin-top: 0;
    }
  }

  &__link-group {
    width: 165px;

    @include sm {
      width: 100%;
      border-bottom: 1px solid $gray-bluish;

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

    .sub-navigation--no-width & {
      width: auto;

      @include sm {
        width: 100%;
      }
    }
  }

  &__link-group-title {
    border: 0;
    background: none;
    padding: 0;
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 2.5rem;
    letter-spacing: 0.02rem;
    color: $medium-color;
    margin: 0 0 8px;
    cursor: pointer;

    @include sm {
      font-size: 1.8rem;
      line-height: 2.2rem;
      padding: 24px 16px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
    }

    * {
      pointer-events: none;
    }

    .js-close-links & {
      margin: 0px;

      @include sm {
        margin: 0 0 8px;
      }
    }

    svg {
      display: inline-block;
      width: 14px;
      height: 14px;
      transform: rotate(-90deg);
      margin-left: 16px;
      opacity: 0;
      transition: all 0.2s ease-in-out;

      @include sm {
        opacity: 1;
      }

      path,
      g {
        stroke: $medium-color;
      }
    }

    .js-sticky-links & svg {
      opacity: 1;
    }

    .js-close-links & svg {
      transform: rotate(90deg);
    }

    &.js-open-links svg {
      transform: rotate(-90deg);
    }
  }

  &__link-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
  }

  &__link-item {
    font-weight: 400;
    font-size: 1.6rem;
    line-height: 2.5rem;
    letter-spacing: -0.01rem;
    color: $primary-color;
    margin-bottom: 8px;

    @include sm {
      font-size: 1.8rem;
      padding: 4px 16px;
    }
  }

  &__cta {
    @include sm {
      padding: 24px $gutter-mobile;
      width: 100%;

      a {
        width: 100%;
      }
    }
  }
}
