/* IM S5 Testimonial split (`im-s5-testimonial-band` / `.s5-testimonial-split`). Loaded via root-widgets.css. */

  /* Testimonial split — left RTE + right quote slider */
  .s5-testimonial-split .s5-brand-section__inner {
    max-width: 1120px;
  }
  
  .s5-testimonial-split__grid {
    display: grid;
    gap: 40px;
  
    @media (min-width: 768px) {
      &:has(> .s5-testimonial-split__copy):has(> .s5-testimonial-split__slider-wrap) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
        column-gap: 5%;
        row-gap: 48px;
      }
    }
  }
  
  .s5-testimonial-split__copy {
    text-align: left;
    max-width: 440px;
    width: 100%;
    box-sizing: border-box;
  
    @media (min-width: 1024px) {
      padding-left: 40px;
    }
  }
  
  .s5-testimonial-split__copy-inner {
    max-width: 100%;
  
    h1,
    h3 {
      margin: 0 0 16px;
      font-size: clamp(1.5rem, 4vw, 2.125rem);
      font-weight: 400;
      line-height: 1.2;
      color: var(--s5-text-primary);
    }
  
    h2 {
      margin: 0 0 16px;
      font-size: clamp(1.25rem, 4vw, 1.75rem);
      font-weight: 400;
      line-height: 1.2;
      color: var(--s5-text-primary);
  
      @media (min-width: 768px) {
        font-size: 44px;
      }
    }
  
    h1 strong,
    h2 strong,
    h3 strong {
      font-weight: 700;
    }
  
    p {
      margin: 0;
      font-size: 22px;
      line-height: 1.55;
      color: var(--s5-text-secondary);
    }
  
    p + p {
      margin-top: 12px;
    }
  }
  
  .s5-testimonial-split__slider-wrap {
    width: 100%;
    min-width: 0;
  }
  
  .s5-testimonial-split__card {
    position: relative;
    background-color: var(--s5-surface-primary);
    border-radius: 12px;
    border: 1px solid var(--s5-color-gray-200);
    box-shadow:
      0 2px 4px 0 rgb(0 0 0 / 0.07),
      0 4px 8px 0 rgb(0 0 0 / 0.08),
      0 8px 16px 0 rgb(0 0 0 / 0.09),
      0 16px 32px 0 rgb(0 0 0 / 0.1);
    padding: 28px 24px 40px;
    box-sizing: border-box;
  
    @media (min-width: 768px) {
      padding: 32px 32px 48px;
    }
  
    /* Multi-slide: nav pill sits half below the card; less bottom padding + Swiper autoHeight avoids extra white gap */
    &.s5-testimonial-split__card--multi {
      padding-bottom: 22px;
  
      @media (min-width: 768px) {
        padding-bottom: 26px;
      }
    }
  }
  
  .s5-testimonial-split__swiper {
    position: relative;
    overflow: hidden;
  }
  
  /*
   * Must not override Swiper's .swiper-autoheight .swiper-wrapper { align-items: flex-start } —
   * a higher-specificity "stretch" rule was forcing all slides to the tallest height (huge gap under short quotes).
   */
  .s5-testimonial-split__swiper.swiper .swiper-wrapper {
    align-items: flex-start;
  }
  
  .s5-testimonial-split__swiper.swiper .swiper-slide {
    height: auto;
    align-self: flex-start;
  }
  
  /* Elementor editor / preview: nav must sit above widget overlays so buttons stay clickable */
  .elementor-editor-active .s5-testimonial-split__nav,
  .elementor-editor-preview .s5-testimonial-split__nav {
    z-index: 100002;
  }
  
  .s5-testimonial-split__nav-btn.swiper-button-disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
  }
  
  .s5-testimonial-split__quote {
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    font-style: normal;
    text-shadow: none;
    box-shadow: none;
    filter: none;
  }
  
  .s5-testimonial-split__quote p {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.55;
    font-weight: 500;
    color: var(--s5-text-primary);
    text-shadow: none;
    box-shadow: none;
    filter: none;
  }
  
  .s5-testimonial-split__quote p:last-child {
    margin-bottom: 0;
  }
  
  .s5-testimonial-split__footer {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
  }
  
  .s5-testimonial-split__logo {
    flex: 0 0 auto;
    width: 88px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    overflow: hidden;
    /* A real logo sits directly on the card — no plate behind it and no outline around it. Both the
       muted background and the dashed border were on this base rule, so every company logo was drawn
       inside them; they belong to the placeholder below. */
  }
  
  .s5-testimonial-split__logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
  }
  
  /* Only when there is no logo to show — the plate and outline mark the empty slot for editors. */
  .s5-testimonial-split__logo--placeholder {
    background-color: var(--s5-surface-muted);
    border: 1px dashed var(--s5-color-gray-300);
  }
  
  .s5-testimonial-split__logo-ph {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--s5-text-muted);
  }
  
  .s5-testimonial-split__meta {
    flex: 1 1 12rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
  }
  
  .s5-testimonial-split__job {
    margin: 0;
    font-style: normal;
    font-weight: 700;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: var(--s5-text-primary);
  }
  
  .s5-testimonial-split__company {
    display: block;
    font-size: 0.8125rem;
    line-height: 1.35;
    font-weight: 700;
    color: var(--s5-text-primary);
  }
  
  .s5-testimonial-split__nav {
    /* Swiper nav buttons use color: var(--swiper-navigation-color); inherited --swiper-theme-color from dark sections can wash out SVG icons on the yellow pill */
    --swiper-navigation-color: var(--s5-color-ink);
    --swiper-theme-color: var(--s5-color-ink);
  
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 2;
    transform: translate(-50%, 50%);
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-radius: 999px;
    background-color: var(--s5-color-yellow);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  
    /*
     * Swiper adds .swiper-button-prev/next and global CSS positions them at the
     * slide edges (absolute, left/right). Our controls live in this pill — reset
     * so arrows stay visible beside the counter.
     */
    & .swiper-button-prev,
    & .swiper-button-next {
      position: static;
      inset: auto;
      top: auto;
      left: auto;
      right: auto;
      margin-top: 0;
      width: auto;
      min-width: 2rem;
      height: auto;
      min-height: 2rem;
      z-index: auto;
      color: var(--s5-color-ink);
    }
  
    /* Swiper injects ::after with swiper-icons font — often invisible; we use inline SVG instead */
    & .swiper-button-prev::after,
    & .swiper-button-next::after {
      display: none !important;
      content: none !important;
    }
  }
  
  .s5-testimonial-split__nav-icon {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
  
  .s5-testimonial-split__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 4px;
    min-width: 2rem;
    min-height: 2rem;
    border: 0;
    background: transparent;
    color: var(--s5-color-ink);
    cursor: pointer;
    line-height: 1;
    font-size: 0.875rem;
  
    &:hover {
      opacity: 0.75;
    }
  
    &:focus-visible {
      outline: 2px solid var(--s5-focus-ring);
      outline-offset: 2px;
    }
  }
  
  .s5-testimonial-split__count {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--s5-color-ink);
    white-space: nowrap;
    min-width: 3.5rem;
    text-align: center;
  }
