/*------------------------------------*\
  $SLIDER
\*------------------------------------*/

$slider-background-color: #f6f6f6;
$slider-arrows-background-color: #ededed;
$slider-caption-background-color: rgba(#fff, 0.9);

.block--media {
  width: 100%;
  padding: 0 !important;

  position: relative;

  .caption {
    width: 700px;
    max-width: 90%;
    height: 100%;
    text-align: center;
    margin: 0 auto;

    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    @include mq(mq600) {
      max-width: 95%;
    }

    &__title {
      font: {
        family: $heading-font;
        size: font-size(21);
        weight: 400;
      }
      line-height: 1.3;
      margin: {
        bottom: 0;
      }

      @include mq(mq600) {
        font: {
          size: font-size(33);
        }
        margin: {
          bottom: 30px;
        }
      }

      @include mq(mq960) {
        font: {
          size: font-size(44);
        }
      }

      &,
      a {
        color: #fff;
        text-decoration: none;
      }
    }

    .btn {
      margin: 0 auto;
      display: none;

      @include mq(mq600) {
        display: inline-block;
      }
    }
  }

  picture {
    @include mq(mq960) {
      height: 590px;
      width: 2000px;
      max-width: 100%;
    }
  }

  img {
    margin: 0; 
    width: 100%;

    @include mq(mq960) {
      min-width: 2000px;
      max-width: 2000px;
      width: 2000px;


      @include horizontally-align;
    }
  }
}


/**
 * Flickity specific
 */
.flickity-enabled {
  position: relative;

  &:focus {
    outline: none;
  }
}

.flickity-viewport {
  overflow-x: hidden;
  position: relative;
  height: 100%;
}

.flickity-slider {
  position: absolute;
  width: 100%;
  height: 100%;
}

/* draggable */
.flickity-enabled.is-draggable {
  user-select: none;
}

.flickity-enabled.is-draggable .flickity-viewport {
  cursor: move;
  cursor: grab;
}

.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down {
  cursor: grabbing;
}

/* previous/next buttons */
.flickity-prev-next-button {
  display: none;
  position: absolute;
  top: 50%;
  width: 45px;
  height: 45px;
  background: {
    color: $slider-arrows-background-color;
    repeat: no-repeat;
    position: center center;
    size: 9px 15px;
  }
  border: 0;
  cursor: pointer;
  transform: translateY(-50%);

  @include mq(mq960) {
    display: inherit;
  }

  svg {
    width: 16px;
    height: 16px;
  }

  &[disabled] {
    opacity: 0.5;
  }

  &.previous {
    left: -15px;
  }

  &.next {
    right: -15px;
  }
}

.flickity-rtl .flickity-prev-next-button.previous {
  left: auto;
  right: -15px;
}

.flickity-rtl .flickity-prev-next-button.next {
  right: auto;
  left: -15px;
}
