.custom-slideshow {
  padding-top: var(--section-padding-top, 0);
  padding-bottom: var(--section-padding-bottom, 0);

  @media (max-width: 767.98px) {
    padding-top: var(--section-padding-top-mobile, var(--section-padding-top, 0));
    padding-bottom: var(--section-padding-bottom-mobile, var(--section-padding-bottom, 0));
  }

  .container-full {
    padding: 0;
  }

  .custom-slideshow__slides .swiper-wrapper {
    height: auto;
  }

  .custom-slideshow__slides .swiper-button-prev,
  .custom-slideshow__slides .swiper-button-next,
  .custom-slideshow__slides .swiper-pagination {
    padding: 0;
    width: fit-content;
    bottom: 2.4rem;
    transform: translateY(50%);
  }

  @media (min-width: 768px) {
    .custom-slideshow__slides .swiper-button-prev,
    .custom-slideshow__slides .swiper-button-next,
    .custom-slideshow__slides .swiper-pagination {
      top: auto;
      bottom: 4.8rem;
    }
  }

  .custom-slideshow__slides.custom-slideshow__slides--controls {
    --cts-offest-left: 4.8rem;
  }

  .custom-slideshow__slides.custom-slideshow__slides--pagination-dots:not(.custom-slideshow__slides--no-page) {
    --pagination-width: calc(var(--number-slides) * 2rem);
  }

  .custom-slideshow__slides.custom-slideshow__slides--pagination-counter:not(.custom-slideshow__slides--no-page) {
    --pagination-width: 2.5rem;
  }

  .custom-slideshow__slides--controls .swiper-button-prev,
  .custom-slideshow__slides--controls .swiper-button-next,
  .custom-slideshow__slides--controls .swiper-pagination {
    background-color: var(--pagination-background);
    border-color: var(--pagination-background);
    padding: 0;
  }

  .custom-slideshow__slides--controls.f-pagination-bg--dark .swiper-button-prev,
  .custom-slideshow__slides--controls.f-pagination-bg--dark .swiper-button-next,
  .custom-slideshow__slides--controls.f-pagination-bg--dark .swiper-pagination {
    color: #fff;
  }

  .custom-slideshow__slides--controls.f-pagination-bg--dark .swiper-pagination-bullet {
    background-color: #fff;
    opacity: 0.3;
  }

  .custom-slideshow__slides--controls.f-pagination-bg--dark .swiper-pagination-bullet:hover,
  .custom-slideshow__slides--controls.f-pagination-bg--dark .swiper-pagination-bullet-active {
    background-color: #fff;
    opacity: 1;
  }

  .custom-slideshow__slides--controls.f-pagination-bg--light .swiper-pagination-bullet {
    background-color: #000;
    opacity: 0.3;
  }

  .custom-slideshow__slides--controls.f-pagination-bg--light .swiper-pagination-bullet:hover,
  .custom-slideshow__slides--controls.f-pagination-bg--light .swiper-pagination-bullet-active {
    background-color: #000;
    opacity: 1;
  }

  .custom-slideshow__slides--controls.f-pagination-bg--none .swiper-button-prev,
  .custom-slideshow__slides--controls.f-pagination-bg--none .swiper-button-next {
    color: var(--color-brand-blue, #002169);
  }

  .custom-slideshow__slides--controls.f-pagination-bg--none .swiper-pagination-bullet {
    background-color: var(--color-brand-blue, #002169);
    opacity: 0.25;
  }

  .custom-slideshow__slides--controls.f-pagination-bg--none .swiper-pagination-bullet-active {
    opacity: 1;
  }

  .custom-slideshow__wrapper {
    position: relative;
    display: block;

    @media screen and (min-width: 1200px) {
      overflow-x: visible;
    }
  }

  .custom-slideshow__wrapper--rounded .swiper-slide {
    border-radius: var(--custom-slideshow-radius, 0);
    overflow: hidden;
  }

  .custom-slideshow__wrapper--small {
    --slide-height: 28rem;
  }

  .custom-slideshow__wrapper--medium {
    --slide-height: 34rem;
  }

  .custom-slideshow__wrapper--large {
    --slide-height: 42rem;
  }

  .custom-slideshow__wrapper--adapt {
    --slide-height: 100%;
  }

  @media (min-width: 768px) {
    .custom-slideshow__wrapper--small {
      --slide-height: 42rem;
    }
    .custom-slideshow__wrapper--medium {
      --slide-height: 56rem;
    }
    .custom-slideshow__wrapper--large {
      --slide-height: 63.6rem;
    }
  }

  .custom-slideshow__slides {
    padding-bottom: 0;

    @media screen and (min-width: 1200px) {
      overflow: visible;
    }
  }

  .custom-slideshow__slides:not(.custom-slideshow__wrapper--adapt) {
    height: var(--slide-height);
    max-height: calc(100vh - var(--f-header-height) - 2rem);
    min-height: fit-content;
  }

  @media screen and (max-width: 767.98px) {
    .custom-slideshow__slides[data-auto-height="true"] {
      height: auto;
      max-height: none;
    }
  }

  .custom-slideshow__slides:not(.swiper-initialized) .swiper-slide:not(:first-child) {
    display: none;
  }

  .custom-slideshow__slide {
    width: 100%;
    height: 100%;
    min-height: var(--slide-height);
    position: relative;
  }

  .custom-slideshow__slide--full {
    display: flex;
    align-items: stretch;
    height: auto;
  }

  .custom-slideshow__slide--full .custom-slideshow__image-wrap--full {
    position: absolute;
    inset: 0;
    overflow: hidden;
  }

  .custom-slideshow__slide--full .custom-slideshow__image-wrap--full .custom-slideshow__image,
  .custom-slideshow__slide--full .custom-slideshow__image-wrap--full .custom-slideshow__image--desktop,
  .custom-slideshow__slide--full .custom-slideshow__image-wrap--full .custom-slideshow__image--mobile {
    position: absolute;
    inset: 0;
  }

  .custom-slideshow__slide--full .custom-slideshow__image-wrap--full .bg-image img {
    object-fit: cover;
  }

  .custom-slideshow__slide--full .custom-slideshow__overlay {
    position: absolute;
    inset: 0;
  }

  .custom-slideshow__slide--full.custom-slideshow__slide--aspect-ratio {
    @media screen and (max-width: 767.98px) {
      min-height: 0;
      height: auto;
      align-self: flex-start;
      width: 100%;
    }
  }

  .custom-slideshow__slide--full.custom-slideshow__slide--aspect-ratio .custom-slideshow__image-wrap--full {
    @media screen and (max-width: 767.98px) {
      position: relative;
      inset: auto;
      width: 100%;
      aspect-ratio: var(--slide-image-aspect-ratio);
    }
  }

  .custom-slideshow__slide--split.custom-slideshow__slide--image-aspect-adapt .custom-slideshow__image--part {
    @media screen and (max-width: 767.98px) {
      aspect-ratio: 1.1 / 1;
    }
  }

  .custom-slideshow__slide--split.custom-slideshow__slide--aspect-ratio .custom-slideshow__image--part {
    @media screen and (max-width: 767.98px) {
      aspect-ratio: var(--slide-image-aspect-ratio);
    }
  }

  .custom-slideshow__slide--full .custom-slideshow__content-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    display: flex;
    padding: 2.4rem 1.6rem 4.4rem;
    pointer-events: none;
    box-sizing: border-box;

    @media screen and (min-width: 768px) {
      padding: 4.8rem;
    }
  }

  .custom-slideshow__slide--full .custom-slideshow__content-wrapper .custom-slideshow__content {
    pointer-events: auto;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;

    @media screen and (min-width: 768px) {
      max-width: 50%;
    }
  }

  .custom-slideshow__content-wrapper--left-top {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .custom-slideshow__content-wrapper--center-top {
    align-items: flex-start;
    justify-content: center;
  }

  .custom-slideshow__content-wrapper--right-top {
    align-items: flex-start;
    justify-content: flex-end;
  }

  .custom-slideshow__content-wrapper--left-middle {
    align-items: center;
    justify-content: flex-start;
  }

  .custom-slideshow__content-wrapper--center {
    align-items: center;
    justify-content: center;
  }

  .custom-slideshow__content-wrapper--right-middle {
    align-items: center;
    justify-content: flex-end;
  }

  .custom-slideshow__content-wrapper--left-bottom {
    align-items: flex-end;
    justify-content: flex-start;
  }

  .custom-slideshow__content-wrapper--center-bottom {
    align-items: flex-end;
    justify-content: center;
  }

  .custom-slideshow__content-wrapper--right-bottom {
    align-items: flex-end;
    justify-content: flex-end;
  }

  @media screen and (max-width: 767px) {
    .custom-slideshow__content-wrapper--mobile-top {
      align-items: flex-start;
      justify-content: center;
    }

    .custom-slideshow__content-wrapper--mobile-middle {
      align-items: center;
      justify-content: center;
    }

    .custom-slideshow__content-wrapper--mobile-bottom {
      align-items: flex-end;
      justify-content: center;
    }
  }

  .custom-slideshow__content--left {
    text-align: left;
  }

  .custom-slideshow__content--center {
    text-align: center;
  }

  .custom-slideshow__content--right {
    text-align: right;
  }

  .custom-slideshow__content--left .custom-slideshow__btn-group {
    justify-content: flex-start;
  }

  .custom-slideshow__content--center .custom-slideshow__btn-group {
    justify-content: center;
  }

  .custom-slideshow__content--right .custom-slideshow__btn-group {
    justify-content: flex-end;
  }

  .custom-slideshow__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: clamp(2.4rem, 3vw, 4rem);
  }

  .custom-slideshow__tag {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    font-size: 1.4rem;
    border-radius: 6.4rem;
    font-weight: 600;
  }

  .custom-slideshow__subheading {
    color: var(--custom-slideshow-desc-color, currentColor);
    margin-bottom: 0.8rem;
  }

  .custom-slideshow__heading {
    margin-bottom: clamp(0.4rem, 2vw, 1.2rem);
  }

  .custom-slideshow__heading.h0{
    font-size: clamp(calc(3.2rem * var(--font-heading-mobile-scale)),  3.2vw, calc(4.2rem * var(--font-heading-scale)));
    line-height: 1.2;
  }

  .custom-slideshow__description {
    --font-body-size: 1.6rem;
    color: var(--custom-slideshow-desc-color, currentColor);
    margin-bottom: 1.6rem;
  }

  .custom-slideshow__description h1,
  .custom-slideshow__description h2,
  .custom-slideshow__description h3,
  .custom-slideshow__description h4,
  .custom-slideshow__description h5,
  .custom-slideshow__description h6 {
    color: inherit;
  }

  .custom-slideshow__description h1 {
    font-weight: 600;
    font-size: 26px;
    line-height: 1.4;
    letter-spacing: 0;

    @media screen and (min-width: 768px) {
      font-size: 42px;
      line-height: 1.2;
    }
  }

  .custom-slideshow__description p {
    margin: 0;
  }

  .custom-slideshow__btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: clamp(2.4rem, 3vw, 4rem);

    &.custom-slideshow__btn-group--grid {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    @media screen and (min-width: 768px) {
      &.custom-slideshow__btn-group--grid {
        flex-direction: row;
        max-width: 510px;
        gap: 16px;
        flex-wrap: wrap;
      }
    }

    @media screen and (min-width: 1050px){
      &.custom-slideshow__btn-group--grid .btn {
        width: calc(50% - 8px);
        min-width: calc(50% - 8px);
      }
    }

    .btn{
      min-width: 27.1rem;
      font-size: 1.4rem;
      font-weight: 600;
      line-height: 1.2;
      letter-spacing: 1px;

      @media screen and (min-width: 1200px) {
        min-width: 30.8rem;
      }
    }
  }

  .custom-slideshow__btn-group .btn--underline {
    color: currentColor;
  }

  /* Split layout */
  .custom-slideshow__slide--split {
    .custom-slideshow__inner {
      display: flex;
      width: 100%;
      height: 100%;
      min-height: var(--slide-height);
    }

    .custom-slideshow__image--part {
      width: 100%;
      position: relative;
      flex: 1 1 50%;;
      min-height: 20rem;
      overflow: hidden;
      background-color: var(--background-color);
    }

    .custom-slideshow__image-inner {
      position: absolute;
      inset: 0;
    }

    .custom-slideshow__image-inner.bg-image img {
      object-fit: cover;
      width: 100%;
      height: 100%;
    }

    .custom-slideshow__overlay {
      position: absolute;
      inset: 0;
    }

    .custom-slideshow__content-panel {
      flex: 1 1 50%;
      display: flex;
      padding: 2.4rem 1.6rem 5.7rem;

      @media screen and (min-width: 768px) {
        padding: 4.8rem;
      }
    }

    .custom-slideshow__content-panel--left-top {
      align-items: flex-start;
      justify-content: flex-start;
    }

    .custom-slideshow__content-panel--center-top {
      align-items: flex-start;
      justify-content: center;
    }

    .custom-slideshow__content-panel--right-top {
      align-items: flex-start;
      justify-content: flex-end;
    }

    .custom-slideshow__content-panel--left-middle {
      align-items: center;
      justify-content: flex-start;
    }

    .custom-slideshow__content-panel--center {
      align-items: center;
      justify-content: center;
    }

    .custom-slideshow__content-panel--right-middle {
      align-items: center;
      justify-content: flex-end;
    }

    .custom-slideshow__content-panel--left-bottom {
      align-items: flex-end;
      justify-content: flex-start;
    }

    .custom-slideshow__content-panel--center-bottom {
      align-items: flex-end;
      justify-content: center;
    }

    .custom-slideshow__content-panel--right-bottom {
      align-items: flex-end;
      justify-content: flex-end;
    }

    .custom-slideshow__content {
      width: auto;
      max-width: 48rem;
      box-sizing: border-box;
    }

    .custom-slideshow__content--width-full {
      width: 100%;
      max-width: 100%;
    }
  }

  @media (max-width: 767.98px) {
    .custom-slideshow__slide--split.custom-slideshow__slide--mobile-image-top .custom-slideshow__inner {
      flex-direction: column;
    }
    .custom-slideshow__slide--split.custom-slideshow__slide--mobile-image-bottom .custom-slideshow__inner {
      flex-direction: column-reverse;
    }
  }

  @media (min-width: 768px) {
    .custom-slideshow__slide--split.custom-slideshow__slide--desktop-image-left .custom-slideshow__inner {
      flex-direction: row;
    }
    .custom-slideshow__slide--split.custom-slideshow__slide--desktop-image-right .custom-slideshow__inner {
      flex-direction: row-reverse;
    }
  }

  .custom-slideshow__slide:not(.swiper-slide-active) .bg-image__animation {
    animation: none;
    transform: scale(1);
  }

  .custom-slideshow__slide.swiper-slide-active .bg-image__animation {
    animation: custom-slideshow-zoom-fade 8s ease-out forwards;
    transform-origin: center center;
  }

  .custom-slideshow__slides {
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .custom-slideshow__slides.swiper-initialized {
    opacity: 1;
  }

  .custom-slideshow__btn-group .btn.btn--secondary {
    background-color: transparent;
  }

  .custom-slideshow__image-inner.bg-image img.custom-slideshow__image--contain {
    object-fit: contain;
  }

  @media (max-width: 767.98px) {
    .custom-slideshow__content--mobile-left {
      text-align: left;
    }
    .custom-slideshow__content--mobile-left .custom-slideshow__btn-group {
      justify-content: flex-start;
    }
    .custom-slideshow__content--mobile-center {
      text-align: center;
    }
    .custom-slideshow__content--mobile-center .custom-slideshow__btn-group {
      justify-content: center;
    }
    .custom-slideshow__content--mobile-right {
      text-align: right;
    }
    .custom-slideshow__content--mobile-right .custom-slideshow__btn-group {
      justify-content: flex-end;
    }
  }

  .custom-slideshow__page-counter {
    position: absolute;
    bottom: 2.4rem;
    z-index: 2;
    pointer-events: none;
  }
  @media (min-width: 768px) {
    .custom-slideshow__page-counter {
      bottom: 4.8rem;
    }
  }

  .custom-slideshow__slides--controls-left .swiper-pagination,
  .custom-slideshow__slides--controls-left .custom-slideshow__page-counter {
    left: 1.6rem;
  }

  @media (min-width: 640px) {
    .custom-slideshow__slides--controls-left .swiper-button-prev {
      left: var(--cts-offest-left, 0);
    }
    .custom-slideshow__slides--controls-left .swiper-button-next {
      left: calc(var(--button-size, 0px) + var(--pagination-width, 0px) + var(--cts-offest-left, 0px));
    }

    .custom-slideshow__slides--controls-left .swiper-pagination,
    .custom-slideshow__slides--controls-left .custom-slideshow__page-counter {
      left: 4.8rem;
    }

    .custom-slideshow__slides--controls-right .swiper-button-next {
      right: var(--cts-offest-left, 0px);
    }
    .custom-slideshow__slides--controls-right .swiper-button-prev {
      right: calc(var(--button-size, 0px) + var(--pagination-width, 0px) + var(--cts-offest-left, 0px));
    }
    .custom-slideshow__slides--controls-right .swiper-pagination,
    .custom-slideshow__slides--controls-right .custom-slideshow__page-counter {
      right: calc(var(--button-size, 0px) + var(--cts-offest-left, 0px));
    }
  }
}

@keyframes custom-slideshow-zoom-fade {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.08);
  }
}
