.testimonial-block {
  position: relative;
  overflow: hidden;
  background: #151316;
  color: #FFFFFF;
  padding: 128px 0;

  .testimonial-block-wrapper {
    position: relative;
    z-index: 2;
  }

  /* Title */
  .testimonial-title {
    /* text-align: center; */
    margin-bottom: 6.4rem;
    font-weight: 700;

    @media screen and (max-width: 990px) {
      margin-bottom: 4.8rem;
      font-size: 3.2rem;
    }

    @media screen and (max-width: 600px) {
      margin-bottom: 3.2rem;
      font-size: 2.4rem;
    }
  }

  /* Navigation */
  .testimonial-nav {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-bottom: 4.8rem;

    @media screen and (max-width: 600px) {
      justify-content: center;
      margin-bottom: 3.2rem;
    }
  }

  .testimonial-nav-btn {
    appearance: none;
    background: rgba(255, 255, 255, 1);
    border: none;
    color: #000000;
    width: 33.33px;
    height: 33.33px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;

    &:hover{
      background: var(--rc-grad-brand-blue-180);
      color: #FFFFFF;
    }

    &:disabled {
      background: rgba(255, 255, 255, 0.25);
      color: #FFFFFF;
      cursor: not-allowed;
    }

    &:active {
      /* background: rgba(255, 80, 1, 0.3); */
    }

    svg {
      width: 13.33px;
      height: auto;
    }
  }

  /* Splide Slider */
  .testimonial-splide {
    .splide__track {
      overflow: visible;
    }

    .splide__list {
      align-items: stretch;
    }

    .splide__slide {
      display: flex;
      align-items: center;

      @media screen and (min-width: 990px) {

        &:has(.testimonial-layout-text-only) {
          max-width: 450px;
        }

        &:nth-child(even):has(.testimonial-layout-image-left),
        &:nth-child(even):has(.testimonial-layout-image-right) {
          margin-left: -16%;
        }

        &:nth-child(odd) .testimonial-slide {
          align-items: flex-start;
          margin-bottom: 58%;
        }

        &:nth-child(even) .testimonial-slide {
          align-items: flex-end;
          margin-top: 58%;
        }
      }
    }
  }

  /* Testimonial Slides */
  .testimonial-slide {
    display: grid;
    gap: 1.6rem;
    /* min-height: 475px; */
    

    @media screen and (max-width: 990px) {
      /* gap: 4.8rem; */
      min-height: auto;
    }

    @media screen and (max-width: 600px) {
      /* gap: 3.2rem; */
    }

    &.single-testimonial {
      max-width: 680px;
      margin: 64px auto 0;
      padding: 64px 0;

      &:has(.testimonial-image) .testimonial-quote {
        font-size: 2.4rem;
        line-height: 1.3;
      }

      &.testimonial-layout-image-left {
        grid-template-columns: 240px 1fr;

        @media screen and (max-width: 990px) {
          grid-template-columns: 1fr;
        }
      }

      &.testimonial-layout-image-right {
        grid-template-columns: 1fr 240px;

        @media screen and (max-width: 990px) {
          grid-template-columns: 1fr;

          .testimonial-image {
            order: -1;
          }
        }
      }
    }

    /* Layout variations */
    &.testimonial-layout-image-left {
      grid-template-columns: 300px 300px;

      @media screen and (max-width: 990px) {
        grid-template-columns: 1fr;
      }
    }

    &.testimonial-layout-image-right {
      grid-template-columns: 300px 300px;

      @media screen and (max-width: 990px) {
        grid-template-columns: 1fr;

        .testimonial-image {
          order: -1;
        }
      }
    }

    &.testimonial-layout-text-only {
      grid-template-columns: 1fr;
      /* text-align: center; */
      max-width: 450px;
      margin: 0 auto;
    }

    &:has(.testimonial-image) .testimonial-quote {
      font-size: 1.4rem;
      line-height: 1.3;
    }
  }

  /* Image */
  .testimonial-image {
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;

      @media screen and (max-width: 990px) {
        height: 300px;
        max-width: 400px;
        margin: 0 auto;
        display: block;
      }

      @media screen and (max-width: 600px) {
        height: 250px;
        max-width: 100%;
      }
    }
  }

  .testimonial-placeholder-image {
    width: 100%;
    height: 400px;
    background: #EAEAEB;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;

    @media screen and (max-width: 990px) {
      height: 300px;
      max-width: 400px;
      margin: 0 auto;
    }

    @media screen and (max-width: 600px) {
      height: 250px;
      max-width: 300px;
    }

    svg {
      opacity: 0.5;
    }
  }

  /* Content */
  .testimonial-content {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
  }

  .testimonial-quote {
    font-size: 2.4rem;
    line-height: 1.333;
    font-weight: 400;
    margin: 0;
    position: relative;
    padding-bottom: 16px;
    border-bottom: 1px solid #312D34;

    @media screen and (max-width: 990px) {
      font-size: 2rem;
    }

    @media screen and (max-width: 600px) {
      font-size: 1.4rem;
    }

  }

  .testimonial-author {
    .testimonial-name {
      font-size: 1.4rem;
      line-height: 1.1;
      font-weight: 700;
    }

    .testimonial-position {
      font-size: 1.4rem;
      font-weight: 400;
      color: #A09EA2;
    }
  }

  /* Responsive adjustments */
  @media screen and (max-width: 600px) {
    padding: 82px 0;
  }
}

ul.splide__pagination.splide__pagination--ltr {
  display: none;
}


@media screen and (max-width: 600px) {
  .splide.testimonial-splide {
    display: flex;
    flex-direction: column;
  }

  .splide__arrows.testimonial-nav.splide__arrows--ltr {
    order: 3;
    justify-content: space-between;
  }

  button.splide__pagination__page {
    background: transparent;
    width: 12px;
    border: 1px solid white;
    height: 12px;/* border: none; */
    appearance: none;
  }

  ul.splide__pagination.splide__pagination--ltr {
    margin-bottom: -24px;
    z-index: 2;
    gap: 8px;
    display: flex;
    margin-top: 24px;
  }

  button.splide__pagination__page.is-active {
      background: white;
  }
}