/*
* slider
*
----------------
* DEPENDENCIES:
----------------
* variable.css
*/

:root {
  --slider-animation-distance: 100px;
  --slider-title-transition: all .5s .1s;
  --slider-text-transition: all .5s .2s;
  --slider-image-transition: all .5s .3s;
  --slide-height: 350px;
  --slide-image-container-height: 450px;
  --slide-height-mobile: 75vh;
  --slide-max-height-mobile: 450px;
}

.slider .slides {
  height: var(--slide-height-mobile);
  max-height: var(--slide-max-height-mobile);
  position: relative;
}

.slider .slide {
  height: 100%;
  left: 0;
  opacity: 0;
  position: absolute;
  transition: opacity .3s;
  width: 100%;
}

.slider .slide.active {
  opacity: 1;
  z-index: 2;
}

.slider .text-half {
  width: 100%;
}

.slides .slide .full-height {
  max-height: 75%;
}

.slider .slide .title {
  font-family: "Source Sans Pro", "Open Sans", sans-serif;
  font-size: 25px;
  font-weight: 300;
  left: var(--slider-animation-distance);
  line-height: normal;
  margin-top: 10px;
  opacity: 0;
  padding: 16px 50px 16px 16px;
  position: relative;
  text-align: left;
  transition: var(--slider-title-transition);
}

.slider .slide.active .title {
  left: 0;
  opacity: 1;
}

.slider .slide .text-half .text {
  font-size: 14px;
  left: var(--slider-animation-distance);
  line-height: 1.7;
  margin-top: 20px;
  opacity: 0;
  padding: 16px;
  position: relative;
  text-align: left;
  transition: var(--slider-text-transition);
}

.slider .slide.slide.active .text-half .text {
  left: 0;
  opacity: 1;
}

.slider .slide .image-half {
  align-items: center;
  display: flex;
  justify-content: center;
  order: -1;
  position: relative;
  width: 100%;
}

.image-half.image-only {
  margin-top: 34px;
}

.image-half.image-only img {
  max-width: auto;
}

.slider .slide .image-half::before {
  background-color: var(--upload-background);
  border-radius: 50%;
  content: "";
  height: 80%;
  left: -5%;
  position: absolute;
  top: 10%;
  transition: transform 1s;
  width: 110%;
  z-index: -1;
}

.slider .slide:nth-child(2).active .image-half::before {
  transform: rotate(-15deg);
}

.slider .slide:nth-child(3).active .image-half::before {
  transform: rotate(15deg);
}

.slider .slide .image-half img {
  left: var(--slider-animation-distance);
  max-width: 60%;
  opacity: 0;
  position: relative;
  transition: var(--slider-image-transition);
}

.slider .slide.active .image-half img {
  left: 0;
  opacity: 1;
}

.controls {
  margin-top: 0;
}

.controls .row {
  justify-content: center;
}

.controls .dot {
  background-color: var(--dot-color);
  border-radius: 50%;
  cursor: pointer;
  height: 12px;
  margin: 0 8px;
  transition: all .3s cubic-bezier(.175, .885, .32, 1.275);
  width: 12px;
}

.controls .dot.active {
  background-color: var(--wizard-step-color);
  border: 2px solid var(--dot-color);
  transform: scale(1.3);
}

.controls .btn {
  background-color: var(--color-first);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  display: block;
  margin: 22px auto 0;
  min-width: 140px;
  padding: 11px;
}

.controls .btn:hover {
  opacity: .85;
}

.controls .btn.close-control {
  display: none;
}

/* var(--page-size-m) = 665px - vars not usable in queries */
@media (min-width: 665px) {
  .slider .slides {
    height: var(--slide-height);
    max-height: auto;
  }

  .slider .text-half {
    width: 60%;
  }

  .slider .slide .title {
    padding: 16px;
  }

  .slides .slide .full-height {
    max-height: auto;
  }

  .slider .slide .text-half .title {
    font-size: 32px;
  }

  .slider .slide .text-half .text {
    font-size: 18px;
    line-height: 1.6;
  }

  .slider .slide .image-half {
    align-items: center;
    display: flex;
    height: var(--slide-image-container-height);
    justify-content: center;
    order: 0;
    position: relative;
    width: 40%;
  }

  .image-half.image-only {
    margin-top: 0;
  }

  .slider .slide .image-half::before {
    background-color: var(--upload-background);
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    content: "";
    height: 130%;
    left: 0;
    position: absolute;
    top: -15%;
    width: 100%;
    z-index: -1;
  }

  .slider .slide:nth-child(2).active .image-half::before,
  .slider .slide:nth-child(3).active .image-half::before {
    transform: none;
  }

  .slider .slide .image-half img {
    left: var(--slider-animation-distance);
    max-width: 100%;
    opacity: 0;
    position: relative;
    transition: var(--slider-image-transition);
  }
}
