 /*------------------------------------*\
  #IMAGE CAROUSEL BLOCK
 \*------------------------------------*/

.c-image-carousel {
  display: block;
  position: relative;
  width: 940px;
  height: auto;
  margin: auto auto 120px;
  max-height: 441px;

  @media all and (max-width: 70em) {
    width: 70%;
  }

  &.full-width {
    /* width: 150%;
       height: 550px;
       overflow: hidden;
       margin-left: -24%;
       margin-right: -24%;*/
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(0vw - 4.3%);
    margin-right: calc(0vw - 4.3%);

    .c-image-carousel .full-bleed .tns-controls {
      transform: translateY(0);
  
      button[data-controls="prev"] {
        margin-top: 15%;
      }
    }
    
  }

  .container {
    overflow: hidden;
  }

  h2 {
    text-align: center;
  }

  .c-section-home-hero {
    height: calc(100% - 2rem);
  }

  .tns-controls {
    button {
      &[data-controls="prev"] {
        left: -100px;
        margin-top: 20%;

        @media all and (max-width: 70em) {
          left: -50px;
          margin-top: 190px;
        }
      }

      &[data-controls="next"] {
        right: -100px;
        margin-top: 20%;

        @media all and (max-width: 70em) {
          right: -50px;
          margin-top: 190px;
        }
      }
    }
  }

  .tns-nav {
    margin-top: -100px;
  }
}

.c-image-carousel__item {
  position: relative;

  &.tns-item {
    cursor: grab;
  }
  
  @media all and (max-width: 60em) {
    .c-hero__img {
      height: 100%;
      max-height: 441px;
      margin: auto;
      width: auto;
      max-width: none;
    }
  }
}

.c-image-carousel--centered {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;

  &.c-image-carousel--gradient,
  &.c-image-carousel--no-background-image {
    .c-image-carousel__headline {
      margin-bottom: 0;
    }
  }

  h2 {
    margin-bottom: 0;
  }
}

.c-image-carousel__img {
  display: block;
  max-width: none;
  overflow: hidden;
  width: auto;
}

@supports (object-fit: cover) {
  .c-image-carousel__img {
    max-width: 100%;
    object-fit: cover;
    width: 100%;
  }
}

.c-image-carousel__body {
  bottom: 1rem;
  left: 1rem;
  max-width: 60%;
  padding: 8vh 0 8vh 8vw;
  position: absolute;
  right: 1rem;
  top: 1rem;

  @media all and (min-width: 35em) {
    display: flex;
    flex-direction: column;
    height: 100%;
    left: 0;
    margin-left: 12vw;
    max-width: 650px;
    padding: 0;
    position: absolute;
    top: 14vw;
    width: 50vw;
  }

  @media all and (min-width: 90em) {
    margin-left: 170px;
    top: 190px;
  }

  .c-btn {
    align-self: flex-start;
  }
}

.c-image-carousel__headline + * {
  margin-top: 1rem;
}

.c-image-carousel--home {
  background-color: var(--color-neutral-gray-53);

  .c-image-carousel__item {
    height: 464px;
    overflow: hidden;

    @media all and (min-width: 35em) {
      height: 630px;
    }

    @media all and (min-width: 1441px) {
      height: 850px;
    }
  }

  .c-image-carousel__headline {
    color: var(--color-neutral-white);
  }

  .c-image-carousel__body {
    @media all and (min-width: 1441px) {
      max-width: 680px;
    }
  }

  .c-image-carousel__img {
    @supports (display: grid) {
      height: 464px;

      @media all and (min-width: 35em) {
        height: 630px;
      }

      @media all and (min-width: 1441px) {
        height: 850px;
      }
    }
  }
}

.c-image-carousel .full-bleed {
  .tns-nav {
    transform: translateY(-75px);

    @media all and (min-width: 47em) {
      transform: translateY(-85px);
    }

    button::after {
      border-color: var(--color-neutral-white);
    }

    .tns-nav-active::after {
      background-color: var(--color-neutral-white);
    }

    button:focus-visible {
      outline: -webkit-focus-ring-color auto 1px;
    }
  }

  .tns-controls {
    /*transform: translateY(250px); */
    z-index: 1;
    position: relative;

    button {
      margin-top: 23%;

      @media all and (min-width: 47em) {
        /*transform: translateY(300px);*/
        margin-top: 15%;
      }

      @media all and (min-width: 90em) {
        /*transform: translateY(250px);*/
        margin-top: 15%;
      }
    }

    button {
      border: 0;
      background: transparent;
      color: transparent;

      &[data-controls="prev"] {
        /*margin-top: auto;*/
        left: 30px;
        position: absolute;
        z-index: 1;
        width: 47px;
        height: 47px;
        transition: 0.2s;

        &::before {
          content: '';
          color: var(--color-neutral-white);
          border: 1px solid transparent !important;
          border-radius: 30px;
          background: rgba(255,255,255, 0);
          font-size: 25px;
          padding: 16px 33px 20px;
          -webkit-filter: drop-shadow( 0px 0px 3px rgba(0, 0, 0, .6));
          filter: drop-shadow( 0px 0px 3px rgba(0, 0, 0, .6));
        }

        &:hover {
          &::before {
            color: var(--color-image-carousel-btn-hover);
          }
        }

        @media all and (min-width: 47em) {
          left: 3.5vw;
        }
      }

      &[data-controls="next"] {
        /*margin-top: auto;*/
        right: 30px;
        position: absolute;
        z-index: 1;
        width: 47px;
        height: 47px;

        &::before {
          content: '';
          color: var(--color-neutral-white);
          border: 1px solid transparent !important;
          border-radius: 30px;
          font-size: 25px;
          padding: 16px 33px 20px;
          -webkit-filter: drop-shadow( 0px 0px 3px rgba(0, 0, 0, .6));
          filter: drop-shadow( 0px 0px 3px rgba(0, 0, 0, .6));
        }

        &:hover {
          &::before {
            color: var(--color-image-carousel-btn-hover);
          }
        }

        @media all and (min-width: 47em) {
          right: calc(3.5vw);
        }
      }

      &:focus-visible {
        outline: -webkit-focus-ring-color auto 1px;
      }
    }
  }
}

.c-image-carousel--inside {
  .c-image-carousel__body {
    bottom: 0;
    color: var(--color-neutral-white);
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    left: 0;
    margin: 0;
    max-width: 70vw;
    padding: 0 8vw;
    position: absolute;
    right: 0;
    top: 0;
    &.full-width {
      max-width: 100%;
    }
  }

  .c-image-carousel__headline {
    margin: 0;
  }

  .c-image-carousel__description {
    font-size: 1.4rem;
  }
}

.c-image-carousel--inside:not(.c-image-carousel--inside--has-form) {
  .c-image-carousel__body {
    width: 100%;
  }
}

 /*------------------------------------*\
     #HERO VARIATIONS
 \*------------------------------------*/

/* HERO W/ NO BACKGROUND IMAGE*/
.c-image-carousel--no-background-image {
  padding: 1rem 0;

  @media all and (min-width: 47em) {
    padding: 3rem 0;
  }

  &.c-image-carousel--inside .c-image-carousel__body {
    width: var(--l-max-width-xs);
    max-width: 92%;
  }

  .c-image-carousel__body {
    left: auto;
    line-height: 1.2;
    margin-left: auto;
    margin-right: auto;
    max-width: var(--mobile-gutter);
    padding-left: 1rem;
    padding-right: 1rem;
    position: relative;
    right: auto;
    text-align: center;
    top: auto;

    @media all and (min-width: 47em) {
      padding-left: 2rem;
      padding-right: 2rem;
    }

    @media all and (min-width: 60em) {
      padding-left: 0;
      padding-right: 0;
      width: 90%;
    }
  }

  .c-image-carousel__headline {
    font-size: var(--font-size-xl);
    font-weight: normal;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 0;
    text-shadow: none;
  }

  .c-image-carousel__description {
    color: var(--color-body-text);
    font-size: 1.2rem;
    margin-bottom: 0;
    margin-top: 1rem;
    text-align: left;

    *:last-child {
      margin-bottom: 0;
    }
  }
}

/*GRADIENT HERO*/
.c-image-carousel--gradient {
  align-items: center;
  display: flex;
  min-height: 300px;
  padding: 1rem;
  position: relative;

  &::after {
    @media all and (min-width: 47em) {
      bottom: 10%;
      content: "";
      left: 50%;
      opacity: 0.2;
      position: absolute;
      right: 2rem;
      top: 10%;
    }
  }

  &.c-image-carousel--gradient-clinician {
    &::after {
      @media all and (min-width: 47em) {
        
      }
    }
  }

  &.c-image-carousel--blog::after {
    content: none;
  }

  @media all and (min-width: 60em) {
    padding: 3rem 1rem;
  }

  *:last-child {
    margin-bottom: 0;
  }

  &.c-image-carousel--inside .c-image-carousel__body {
    bottom: auto;
    left: auto;
    position: relative;
    right: auto;
    top: auto;
  }

  .c-image-carousel__headline {
    text-shadow: none;
  }

  .c-image-carousel__description {
    max-width: 540px;
  }
}

/* LIGHT HERO*/
.c-image-carousel--light {
  color: var(--color-neutral-gray-70);

  .c-image-carousel__headline {
    color: var(--color-neutral-gray-70);
  }
}

/*DARK HERO*/
.c-image-carousel--dark {
  background-color: var(--color-neutral-gray-70);
  color: var(--color-neutral-white);

  .c-image-carousel__body {
    color: var(--color-neutral-white);
  }

  .c-image-carousel__headline {
    color: var(--color-neutral-white);
    padding: 0;
  }

  .c-image-carousel__description {
    font-weight: 400;
    margin: 0;
    max-width: 580px;
  }

  .c-btn {
    margin-top: 10px;
  }
}

/* LARGE HERO */
.c-image-carousel--large {
  .c-image-carousel__img {
    height: 460px;

    @media all and (min-width: 47em) {
      height: 638px;
    }
  }
}

/* SMALL HERO */
.c-image-carousel--small {
  .c-image-carousel__img {
    height: 340px;
  }

  .c-image-carousel__headline {
    @media all and (min-width: 1441px) {
      font-size: 44px;
    }
  }

  .c-image-carousel__body {
    max-width: none;
  }
}

.single-events .c-hero--no-background-image .c-hero__description {
  text-align: center;
}

/* IE11 hacks */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .c-image-carousel--inside {
    overflow: hidden;
  }

  .c-image-carousel--small .c-image-carousel__img,
  .c-image-carousel--large .c-image-carousel__img {
    height: auto;
    max-width: none;
    min-height: 100%;
    min-width: 100%;
    width: auto;
  }

  .c-image-carousel__item.c-image-carousel--small,
  .c-image-carousel--inner .tns-slider {
    height: 340px;
  }

  .c-image-carousel__item.c-image-carousel--large {
    height: 460px;

    @media all and (min-width: 47em) {
      height: 43vw;
    }
  }

  .c-image-carousel__img {
    height: auto;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
  }

  .c-image-carousel--carousel,
  .c-image-carousel--home {
    &.c-hero--small {
      height: 340px;
      overflow: hidden;

      .c-image-carousel__img {
        height: auto;
      }

      .c-image-carousel__body {
        height: 340px;
      }
    }

    .c-image-carousel__img {
      left: auto;
      position: relative;
      top: auto;
      transform: none;
      width: auto;

      @media all and (min-width: 90em) {
        width: 1920px;
      }
    }
  }
}

.image-carousel--blog {
  display: flex;
  justify-content: center;
}

.c-image-carousel--blog {

  @media all and (min-width: 47em) {
  }

  img {
    width: 486px;
  }

  .c-image-carousel__headline {
    font-size: 18px;
    font-weight: 400;
    margin-top: 14px;
    text-transform: uppercase;

    @media all and (min-width: 35em) {
      font-size: 24px;
    }

    @media all and (min-width: 35em) {
      font-size: 30px;
    }
  }
}
