.image-with-text-slideshow--slide {
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
}

@media only screen and (min-width: 768px) {
  .image-with-text-slideshow--slide {
    flex-direction: row;
  }
}

.image-with-text-slideshow--slide-image {
  width: 100%;
  position: relative;
}

.image-with-text-slideshow--slide-image .image-with-text-slideshow--arrows {
  display: flex;
}

@media only screen and (min-width: 768px) {
  .image-with-text-slideshow--slide-image {
    width: 73.5%;
  }
}

.image-with-text-slideshow--slide-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--color-accent);
}

.image-with-text-slideshow--slide-media.desktop-height-auto svg,
.image-with-text-slideshow--slide-media.desktop-height-auto img {
  position: static;
}

.image-with-text-slideshow--slide-media svg,
.image-with-text-slideshow--slide-media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-with-text-slideshow--slide-media svg {
  fill: var(--bg-body, #fff);
  opacity: 0.5;
}

.image-with-text-slideshow--slide-content {
  position: relative;
  padding: 20px;
}

@media only screen and (min-width: 768px) {
  .image-with-text-slideshow--slide-content-inner {
    position: absolute;
    top: 50%;
    left: 0;
    margin: 50px;
    z-index: 20;
    transform: translateY(-50%);
    width: calc(100% + 150px);
  }
}

@media only screen and (min-width: 768px) {
  .image-with-text-slideshow--slide-content {
    width: 26.5%;
  }
}

@media only screen and (min-width: 768px) {
  .image-with-text-slideshow.image_first .image-with-text-slideshow--slide {
    flex-direction: row-reverse;
  }
}

@media only screen and (min-width: 768px) {
  .image-with-text-slideshow.image_first .image-with-text-slideshow--slide-content-inner {
    left: auto;
    right: 0;
    text-align: right;
  }
}

.image-with-text-slideshow--heading {
  margin-bottom: 10px;
}

.image-with-text-slideshow--description {
  margin-bottom: 30px;
}

.image-with-text-slideshow--description p {
  margin: 0;
}

.image-with-text-slideshow--arrows {
  position: absolute;
  flex-direction: row;
  bottom: 0;
  left: 0;
  grid-gap: 1px;
  display: none;
}

@media only screen and (min-width: 768px) {
  .image-with-text-slideshow--arrows {
    flex-direction: column;
  }
}

.image-with-text-slideshow--arrows .flickity-nav {
  position: static;
  margin: 0;
  border: 0;
  opacity: 1;
  display: flex;
  background-color: var(--color-accent);
}

.image-with-text-slideshow--arrows .flickity-nav svg path {
  stroke: var(--bg-body);
}

@media only screen and (min-width: 1068px) {
  .image-with-text-slideshow--arrows .flickity-nav {
    width: 64px;
    height: 64px;
  }
}

/*NEW STYLES*/
.image-with-text-slideshow--v2 {
  &.layout--full {
    .image-with-text-slideshow--slide {
      display: grid;
      place-items: center;

      .image-with-text-slideshow--slide-content {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        z-index: 2;
        position: relative;
        width: 100%;
        background-color: transparent;
        color: #fff;
        padding-left: 3.8rem;
        padding-right: 3.8rem;

        .image-with-text-slideshow--heading {
          color: inherit;
        }

        .image-with-text-slideshow--v2-slide-content-inner {
          text-align: center;

          .button-container {
            justify-content: center;
          }

          .image-with-text-slideshow--arrows {
            display: none;
          }
        }
      }

      .image-with-text-slideshow--slide-image {
        grid-column: 1 / 2;
        grid-row: 1 / 2;

        .image-with-text-slideshow--arrows {
          display: flex;
        }
      }
    }
  }

  .image-with-text-slideshow:not([data-initiated="true"]) {
    > div:first-of-type {
      display: flex;
    }

    > .carousel__slide {
      display: none;
    }
  }

  .image-with-text-slideshow--slide-image {
    display: grid;
    place-items: center;
  }

  .image-with-text-slideshow--slide {
    &.is-selected {
      &:first-of-type {
        .image-with-text-slideshow--arrows {
          .flickity-prev {
            opacity: .5;
            cursor: default;
          }
        }
      }

      &:last-of-type {
        .image-with-text-slideshow--arrows {
          .flickity-next {
            opacity: .5;
            cursor: default;
          }
        }
      }
    }
  }

  .image-with-text--image-desktop {
    display: none;
  }

  .image-with-text-slideshow--slide-media {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .image-with-text-slideshow--arrows {
    &.text-slide {
      display: none;
    }

    &.media-slide {
      position: relative;
      grid-column: 1 / 2;
      grid-row: 1 / 2;
      width: 100%;
      justify-content: space-between;
      flex-direction: row;

      .flickity-nav {
        background-color: #fff;
      }
    }

    .flickity-nav {
      svg {
        height: 1rem;
        width: .8rem;

        path {
          stroke: var(--color-primary-2);
        }
      }
    }
  }

  .image-with-text-slideshow--heading {
    line-height: 1.25;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    font-weight: 400;

    span {
      font-size: 1.625rem;
    }
  }

  .image-with-text-slideshow--description {
    margin-bottom: 1.5rem;
  }

  .image-with-text-slideshow--arrows.text-slide {
    left: 2rem;
  }

  .button-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .75rem
  }

  .image-with-text-slideshow--slide-content {
    container: content / inline-size;
    background: var(--color-bg, var(--bg-body));
    padding: 1.75rem 1.5rem 2.5rem;
    text-align: center;
  }
}


@media only screen and (min-width: 768px) {
  .image-with-text-slideshow--v2 {
    .image-with-text-slideshow--arrows {
      &.media-slide {
        display: none;
      }

      &.text-slide {
        display: flex;
        gap: 1rem;
        flex-direction: row;
        bottom: 2rem;

        .flickity-nav {
          background: transparent;
          width: 1.5rem;
          height: 1.5rem;
        }
      }
    }

    .button-container {
      justify-content: flex-start;
    }

    .image-with-text-slideshow--heading {
      font-size: 2rem;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      overflow: hidden;
      -webkit-line-clamp: 3;
      line-clamp: 3;

      span {
        font-size: 1.9375rem;
      }
    }

    .image-with-text-slideshow--description {
      display: -webkit-box;
      -webkit-box-orient: vertical;
      overflow: hidden;
      -webkit-line-clamp: 7;
      line-clamp: 7;
    }

    .image-with-text-slideshow--slide-content {
      padding: 0;
      width: 24rem;
      display: flex;
      align-items: center;
    }

    .image-with-text-slideshow--v2-slide-content-inner {
      width: 100%;
      padding: 0 2rem;
      text-align: left;

      @container (min-width: 500px) {
        padding: 0 5rem;

        .image-with-text-slideshow--arrows.text-slide {
          left: 5rem;
        }
      }
    }

    .image-with-text-slideshow--slide-image {
      width: 100%;
      flex: 1;
    }

    .image-with-text--image-desktop {
      display: block;
    }

    .image-with-text--image-mobile {
      display: none;
    }
  }
}


@media only screen and (min-width: 1024px) {
  .image-with-text-slideshow--v2 {
    .image-with-text-slideshow--slide-content {
      width: 32rem;
    }
  }
}

@media only screen and (max-width: 767px) {
  .image-with-text-slideshow--v2.text_first_mobile {
    .image-with-text-slideshow--slide {
      flex-direction: column;
    }
  }
}