.related-stories {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 65px auto;
  max-width: $projects-content-width;
  position: relative;

  &__container-title {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 64px 0 0;
    margin: 0 auto;
    align-items: center;

    h2 {
      color: $primary-color;
      margin: 0;
      text-align: center;

      @include sm {
        font-size: 2.6rem;
        line-height: 3rem;
      }
    }
  }

  &__divider {
    width: 1px;
    height: 0px;
    background-color: $gray-border;
    position: absolute;
    top: -63px;
    left: calc(50% - 1px);
  }

  &__viewport {
    overflow: hidden;
    width: 100%;
  }

  &__container {
    margin: 45px auto 0;
    position: relative;
    width: 100%;
    min-height: 430px;
    display: flex;
    transition: transform 300ms ease-out;
  }

  &__navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
  }

  &__prev {
    margin-right: 20px;
    transform: rotate(90deg);
    cursor: pointer;
    height: 12px;
    width: 12px;
  }

  &__next {
    margin-left: 14px;
    transform: rotate(-90deg);
    cursor: pointer;
    height: 12px;
    width: 12px;
  }

  &--disable {
    opacity: 0.5;
    cursor: default !important;
  }

  &__dot {
    width: 6px;
    height: 6px;
    border-radius: 100%;
    background-color: $gray-border;
    margin-right: 6px;
    cursor: pointer;
  }

  &--active {
    background-color: $primary-color;
  }

  &__slide {
    position: relative;
    width: 270px;
    min-width: 270px;
    height: 340px;
    overflow: hidden;
    margin: 0 20px;
    transform: translateY(20px);
    opacity: 1;
    transition: transform 300ms ease-out;

    &.related-stories__visible {
      transform: translateY(0px);
    }

    &:hover {
      @include sm-up {
        .related-stories__info-container {
          background-color: $white;
        }

        .related-stories__title {
          color: $primary-color;
        }

        .related-stories__type {
          color: $medium-color;
        }

        .related-stories__link-container {
          height: 20px;
        }
      }
    }
  }

  &__image-container {
    position: relative;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      pointer-events: none;
    }
  }

  &__image-mask {
    position: absolute;
    z-index: 1;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 50%;
    opacity: 0.9;
    background: linear-gradient(180deg, rgba(30,53,92,0) 0%, #002145 100%);
  }

  &__info-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    min-height: 145px;
    background-color: transparent;
    padding: 20px;
    z-index: 2;
    transition: all 0.2s ease-in;
  }

  &__title {
    color: $white;
    margin: 15px 0;
    overflow: hidden;
    max-height: 87px;
    transition: color 0.2s ease-in;
  }

  &__type {
    color: $white;
    font-size: 1.4rem;
    line-height: 2rem;
    font-weight: 700;
    letter-spacing: 0.1px;
    transition: color 0.2s ease-in;
  }

  &__link-container {
    position: relative;
    overflow: hidden;
    height: 0px;
    transition: height 0.2s ease-in;

    @include sm {
      height: 20px;
    }
  }

  &__link {
    color: $primary-color;
    font-size: 1.4rem;
    line-height: 2.3rem;
    font-weight: 700;
    margin: 0;
    position: absolute;
    height: 0px;

    @include sm {
      height: unset;
      position: unset;
      color: $white;
    }

    &::after {
      content: " ";
      width: 7px;
      height: 7px;
      display: inline-block;
      border-right: 2px solid $primary-color;
      border-top: 2px solid $primary-color;
      border-radius: 2px;
      transform: rotate(45deg);
      vertical-align: baseline;
      margin-left: 4px;

      @include sm {
        border-right: 2px solid $white;
        border-top: 2px solid $white;
      }
    }
  }
}
