// hide gallery arrows when placed in the header
.header-region-content {
  .paragraph-gallery {

    .carousel {
      margin: 0;

      @include media-breakpoint-up(lg) {
        margin: 0;
      }

      .carousel-inner {
        .carousel-item img {
          opacity: .5;
        }
      }
    }

    .cta-group-wrapper {
      @include media-breakpoint-down(lg) {
        .text {
          font-size: 16px;
          line-height: 18px;
        }
      }
    }
  }

  .cta-group-wrapper {
    & > .container {
      @include media-breakpoint-down(lg) {
        margin-top: 40px !important;
      }

      @include media-breakpoint-only(lg) {
        margin-top: 130px !important;
      }
    }
  }
}

.paragraph-gallery {
  position: relative;
  overflow: hidden;

  @include media-breakpoint-up(lg) {
    max-height: 700px;
  }

  .carousel {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    overflow: initial;

    @include media-breakpoint-up(lg) {
      position: relative;
    }

    div {
      height: 100%;
    }

    .carousel-inner > .carousel-item {
      background: $gray-900;

      article {
        height: 100%;
        display: flex;
        justify-content: center;

        .media--blazy {
          padding-bottom: 0!important;
        }

        img, a img {
          height: 100%;
          position: relative;
          left: 0!important;
          width: 100%;
          object-fit: cover;

          @include media-breakpoint-up(lg) {
            height: auto;
            width: 100%;
          }
        }
      }

      .field-media-image {
        @include media-breakpoint-up(lg) {
          width: 100%;
        }
      }
    }

    .carousel-control-prev,
    .carousel-control-next {
      background-color: $pink;
      height: 50px;
      opacity: 1;
      width: 50px;
      z-index: 1;
      text-align: center;
      top: 50%;
      margin-top: -25px;
      z-index: 1;

      @include media-breakpoint-up(lg) {
        text-shadow:none;
        width: 80px;
        height: 100px;
        margin-top: -50px;
      }
    }

    .carousel-control-prev {
      border-radius: 0 8px 8px 0;
    }

    .carousel-control-next {
      border-radius: 8px 0 0 8px;
    }

    .carousel-indicators {
      position: static;
      left: initial;
      width: initial;
      margin-left: initial;

      // thumbnails
      &.list-inline {
        white-space: nowrap;
        overflow-x: auto;
      }

      > li {
        width: initial;
        height: initial;
        text-indent: initial;

        &.active img {
          opacity: 0.7;
        }
      }
    }

    .carousel-control {
      background-color: $emerald;
      font-size: 40px;

      &.carousel-control-next {
        border-radius: 5px 0 0 5px;
      }
      &.carousel-control-prev {
        border-radius: 0 5px 5px 0;
      }

      &:hover,
      &:focus {
        outline: 5px auto Highlight;
        outline: 5px auto -webkit-focus-ring-color;
      }
    }

    .media {
      height: 100%;
      display: flex;
      justify-content: center;

      .media__element {
        left: auto;
      }
    }
  }

  .cta-group-wrapper {
    background: $cyan;
    min-height: 350px;

    @include media-breakpoint-up(lg) {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      background: transparent;
      z-index: 0;
    }

    h1 {
      @include media-breakpoint-down(sm) {
        font-size: 2rem;
      }
      @include cachet(700);
    }

    .text {
      font-size: 20px;
      line-height: 25px;
      font-family: Verdana, sans-serif;
      @include media-breakpoint-up(lg) {
        margin-bottom: 40px !important;
      }
    }

    a.btn {
      @include cachet(700);
      padding: 12px 36px;
      border-width: 4px;
      border-radius: 10px;
      min-width: 150px;

      &:hover {
        text-shadow: none;
      }
    }

    .field-item,
    a.btn {
      @include text-shadow();
    }

  }

  .item__caption__wrapper {
    position: relative;
  }

  .item__caption {
    background-color: rgba(255, 255, 255, 0.8);
    position: absolute;
    right: 15px;
    bottom: 15px;
    color: $purple;
    font-size: 14px;
    font-style: italic;
    font-stretch: normal;
    line-height: 1.43;
    max-width: 260px;
    padding: 10px;
  }
}

.paragraph-gallery-indicators {

  &.not-content-field {
    display: none!important;
  }

  .carousel-indicators {
    margin: auto;
    padding: 0;
    flex-wrap: wrap;
    position: relative;
    display: none;

    @include media-breakpoint-up(lg) {
      display: flex;
    }

    li {
      width: 130px;
      opacity: 0.6;
      height: auto;
      text-indent: 0;

      &.active {
        opacity: 1;
      }

      img {
        width: 100%;
        height: 100%;
        opacity: 1!important;
      }
    }
  }
}
