$sm-width: 450px;
$xs-width: 300px;

.timeline {
  width: 100%;
  min-height: 700px;
  margin: 100px 0 50px;
  overflow: hidden;
  position: relative;

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

  &__title {
    color: $white;
    font-weight: 500;
    font-size: 26px;
    line-height: 32px;
    margin: 0;

    &.timeline--desktop {
      position: absolute;
      z-index: 2;
      top: 70px;
    }

    &.timeline--mobile {
      display: none;
      margin: 0 0 5px;
      font-weight: 700;
    }

    @include sm {
      font-size: 21px;
      line-height: 29px;

      &.timeline--mobile {
        display: block;
      }

      &.timeline--desktop {
        display: none;
      }
    }
  }

  &__box {
    background-color: $primary-color;
    width: 100%;
    margin: 50px 0 0;
    padding-bottom: 50px;

    @include sm {
      height: auto;
      padding-bottom: 0px;
      margin: 0;
    }
  }

  &__wrapper {
    padding: 0 $gutter;

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

  &__container {
    width: 100%;
    max-width: $max-width;
    margin: 0 auto;
    padding: 0 0 10px;
    position: relative;

    @include sm {
      padding: 32px 0 0;
      width: $sm-width;
      display: flex;
      justify-content: space-between;
    }

    @include xs {
      width: $xs-width;
    }

    &.timeline--mobile {
      display: none;

      @include sm {
        display: flex;
        z-index: 1;
      }
    }
  }

  &__content {
    width: 100%;
    position: relative;
    display: flex;

    @include sm {
      overflow: unset;
    }
  }

  &__item {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
    transition: 0.4s all;

    @include sm {
      flex-direction: column;
      min-height: auto;
    }

    .animate {
      &__fadeInRight {
        transform: translateX(250%);
        opacity: 0;
        transition: 0.4s all 0.2s;
      }
      &__fadeInLeft {
        transform: translateX(-250%);
        opacity: 0;
        transition: 0.4s all 0.3s;
      }
    }
  }

  &__container-image {
    position: relative;
    top: 60px;
    margin: 0 auto;
    overflow: hidden;

    @include sm {
      padding: 0 $gutter;
    }

    &.timeline--mobile {
      display: none;

      @include sm {
        display: block;
      }
    }
  }

  &__image {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;

    img {
      display: block;
    }
  }

  &__image-overlay {
    background-color: rgba($color: $primary-color, $alpha: 0.7);
    width: 100%;
    height: 60px;
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 2;
  }

  &--current-mobile {
    position: relative;
    pointer-events: all;
    opacity: 1;
  }

  &--current {
    position: relative;
    pointer-events: all;
    width: 100%;
    min-height: 500px;
    opacity: 1;

    @include sm {
      position: relative;
      min-height: 320px;
    }

    .animate {
      &__fadeInRight {
        transform: translateX(0%);
        opacity: 1;
      }
      &__fadeInLeft {
        transform: translateX(0%);
        opacity: 1;
      }
    }
  }

  &__right {
    width: 800px;
    height: 465px;
    padding: 120px 0 0 90px;
    margin: 0;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    background-color: rgba($primary-color, 0.7);

    @include sm {
      margin: 0;
      width: 100%;
      background-color: unset;

      padding: 0;
      right: unset;
      position: relative;
      height: auto;
      top: unset;
    }

    h2 {
      color: $white;
      font-weight: 700;
      margin: 0 0 45px;

      @include sm {
        font-size: 2.6rem;
        line-height: 3.2rem;
        margin: 0 0 16px;
      }
    }

    a {
      color: $white;
      text-decoration: underline;
    }

    .timeline__text {
      color: $white;
      font-size: 16px;
      max-width: 440px;

      @include sm {
        padding-bottom: 30px;
      }
    }

    p {
      margin: 0 0 35px;

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

  &__left {
    width: 800px;
    height: 500px;
    position: absolute;
    top: -60px;
    left: 0;
    z-index: 0;

    @include sm {
      display: none;
      // width: $sm-width;
      // height: 300px;
      // top: -520px;
      // left: 0;
      // position: absolute;
    }

    @include xs {
      width: $xs-width;
      height: 200px;

      left: -120px;
    }

    @media screen and (max-width: 450px) {
      left: -60px;
    }

    @media screen and (max-width: 375px) {
      left: -40px;
    }

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

  &__navigation-mobile {
    display: none;
    position: relative;
    width: 70px;
    justify-content: space-between;
    align-items: center;

    @include sm {
      display: flex;
    }
  }

  &__prev {
    // position: absolute;
    width: 15px;
    height: 15px;
    // top: 50%;
    // left: 10px;
    transform: rotate(90deg);
  }

  &__next {
    // position: absolute;
    width: 15px;
    height: 15px;
    // top: 50%;
    // right: 10px;
    transform: rotate(-90deg);
  }

  &--disable {
    opacity: 0.5;
  }

  &__play-button {
    position: absolute;
    top: 125px;
    right: 736px;
    display: block;
    z-index: 2;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: url("../assets/img/svg/ico_play.svg") no-repeat center center $white;
    background-size: 38px 38px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 250ms ease-out;

    .js-is-video & {
      opacity: 1;
      pointer-events: all;
    }

    @include sm {
      display: none;
    }

    &.timeline__play-button-mobile {
      display: none;
      right: auto;
      left: 47px;
      top: auto;
      bottom: 24px;
      width: 72px;
      height: 72px;
      background-size: 22px 22px;

      @include sm {
        display: block;
      }
    }
  }
}
