/* Testimonials block — statements slider. Figma 273-6356. Exact desktop values; responsive below. */
.sun-ts {
  background: var(--sun-border);                 /* #efefef */
  padding: clamp(48px, 6vw, 80px) 0;
  overflow-x: clip;                              /* 100vw bleed incl. scrollbar width — clip the excess */
}
.sun-ts__inner {
  box-sizing: border-box;
  /* Standard 1280 container; the track breaks out to the viewport's right
     edge below so the next card still peeks. */
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
  display: flex;
  gap: 40px;
  align-items: stretch;
}

/* Left aside — heading + subhead + prev/next arrows */
.sun-ts__aside {
  flex: 0 0 296px;
  max-width: 296px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sun-ts__heading {
  margin: 0;
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.16px;
  color: var(--sun-secondary);                   /* #132140 */
}
.sun-ts__subhead {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--sun-bluegrey);                    /* #4f5563 */
}
.sun-ts__nav {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;                              /* push arrows to the bottom of the aside */
  padding-top: 16px;
}
.sun-ts__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: var(--sun-base);                    /* #ffffff */
  border: 1px solid var(--sun-border);           /* #efefef */
  border-radius: 4px;
  color: var(--sun-secondary);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, opacity .18s ease;
}
.sun-ts__arrow:hover { background: #dcdee2; }     /* PRIMARY/Darkblue/Light :hover */
.sun-ts__arrow:focus-visible { outline: 2px solid var(--sun-primary); outline-offset: 2px; }
.sun-ts__arrow[disabled] { opacity: .4; cursor: default; }
.sun-ts__arrow--prev .sun-ts__arrow-icon { transform: rotate(180deg); }
.sun-ts .sun-ts__arrow-icon { width: 32px; height: 32px; }

/* Slider track — CSS scroll-snap, no Swiper. Next card peeks on the right. */
.sun-ts__track {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 40px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                          /* Firefox */
  padding-bottom: 24px;
  /* Full-bleed right: extend the scrollport to the viewport edge (100% =
     the 1280 container) so the next card peeks past the container. */
  margin-right: calc(-1 * (100vw - 100%) / 2);
  padding-right: max(24px, calc((100vw - 100%) / 2));
}
.sun-ts__track::-webkit-scrollbar { display: none; }   /* WebKit */

/* Card */
.sun-ts__card {
  flex: 0 0 auto;
  width: min(785px, 88%);                         /* next card peeks */
  box-sizing: border-box;
  min-height: 480px;                             /* grows with long quotes/KPIs instead of overflowing; the track stretches all cards to the tallest */
  padding: 40px;
  background: var(--sun-base);                    /* #ffffff */
  border-radius: 24px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Top row — avatar + name/role, company logo on the right */
.sun-ts__top {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.sun-ts__person {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 20px;
  align-items: center;
}
.sun-ts__avatar {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
}
.sun-ts__avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sun-ts__avatar-img--placeholder {
  background: linear-gradient(135deg, var(--sun-muted), var(--sun-border));
}
.sun-ts__id {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.sun-ts__name {
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: var(--sun-secondary);                   /* #132140 */
}
.sun-ts__role {
  font-size: 14px;
  line-height: 20px;
  color: var(--sun-bluegrey);                    /* #4f5563 */
}
/* Logo box = the KPI column (same 160px width, right edge), so the logo sits
   centred above the figures. 64px high: wordmarks stay width-bound, compact /
   stacked logos get height to grow into — small files are scaled UP to fill the
   box (object-fit: contain), not left at their pixel size. */
.sun-ts__logo {
  flex: 0 0 auto;
  width: 160px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sun-ts__logo-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center center;                /* SVG/raster logos often report 1×1 intrinsic size */
}

/* Bottom row — quote + KPIs */
.sun-ts__bottom {
  display: flex;
  gap: 40px;
  align-items: flex-end;
}
/* Reference with a case page (inc/References.php): „Zum Case" = quiet text button
   (bluegrey, no underline, arrow nudges right on hover), under the quote in the
   left column; the KPIs stay beside it. */
.sun-ts__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.sun-ts__case-link {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--sun-bluegrey);                    /* #4f5563 */
  text-decoration: none;
  transition: color .15s ease;
}
.sun-ts__case-link:hover { color: var(--sun-secondary); }
.sun-ts .sun-ts__case-icon { width: 18px; height: 18px; transition: transform .2s ease; }
.sun-ts__case-link:hover .sun-ts__case-icon { transform: translateX(4px); }
.sun-ts__case-link:focus-visible { outline: 2px solid var(--sun-accent); outline-offset: 2px; border-radius: 2px; }
.sun-ts__quote {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.16px;
}
.sun-ts__quote-muted { color: var(--sun-bluegrey); }   /* #4f5563 lead */
.sun-ts__quote-emph  { color: var(--sun-secondary); }  /* #132140 emphasis */

.sun-ts__kpis {
  flex: 0 0 auto;
  width: 160px;
  min-width: min-content;                        /* a long word widens the column instead of spilling */
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sun-ts__kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sun-ts__kpi-value {
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: 48px;
  line-height: 56px;
  letter-spacing: -0.48px;
  color: var(--sun-primary);                     /* #ff710a */
}
.sun-ts__kpi-label {
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
  color: var(--sun-bluegrey);                    /* #4f5563 */
  overflow-wrap: break-word;                     /* long German words wrap (hyphenated) instead of spilling */
  hyphens: auto;
  hyphenate-limit-chars: 9 4 4;                  /* only longer words, min. 4 letters each side */
  -webkit-hyphens: auto;
}
.sun-ts__kpi-divider {
  position: relative;
  display: block;
  height: 1px;
  width: 100%;
  background: var(--sun-border);                 /* #efefef */
}
/* Round end-dots on both line ends (Figma 369-2797; same idiom as the footer rules). */
.sun-ts__kpi-divider::before,
.sun-ts__kpi-divider::after {
  content: "";
  position: absolute;
  top: 50%; left: 0;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--sun-muted);                  /* #b6bac4 */
  transform: translate(-50%, -50%);
}
.sun-ts__kpi-divider::after { left: 100%; }

/* Responsive — aside stacks above the slider; cards shrink but keep peeking */
@media (max-width: 1024px) {
  .sun-ts__inner {
    flex-direction: column;
    gap: 32px;
    width: 100%;                                   /* gutter comes from padding here */
    padding-inline: clamp(16px, 4vw, 40px);
  }
  .sun-ts__aside { flex: none; max-width: 640px; }
  .sun-ts__nav { margin-top: 8px; }
  .sun-ts__track {
    margin-inline: calc(-1 * clamp(16px, 4vw, 40px));
    padding-inline: clamp(16px, 4vw, 40px);
    /* Snap rests cards at the visual gutter — snap ignores padding, uses scroll-padding. */
    scroll-padding-inline: clamp(16px, 4vw, 40px);
  }
  .sun-ts__card { width: min(785px, 86%); }
}
@media (max-width: 700px) {
  .sun-ts__card { height: auto; gap: 32px; padding: 24px; }
  .sun-ts__top { flex-direction: column; gap: 16px; }
  .sun-ts__logo { justify-content: flex-start; height: 48px; }
  .sun-ts__logo-img { object-position: left center; }
  .sun-ts__bottom { flex-direction: column; align-items: stretch; gap: 24px; }
  .sun-ts__quote { font-size: 24px; line-height: 32px; }
  .sun-ts__kpis { flex: none; width: 100%; min-width: 0; flex-direction: row; gap: 24px; align-items: flex-start; }
  .sun-ts__kpi { flex: 1 1 0; min-width: 0; }   /* columns may shrink below their longest word */
  .sun-ts__kpi-value { font-size: 36px; line-height: 44px; }
  .sun-ts__kpi-label { font-size: 16px; line-height: 22px; }
  .sun-ts__kpi-divider { width: 1px; height: auto; align-self: stretch; }
  .sun-ts__kpi-divider::before { top: 0; left: 50%; }
  .sun-ts__kpi-divider::after { top: 100%; left: 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .sun-ts__arrow,
  .sun-ts .sun-ts__case-icon { transition: none; }
}

/* Static pair (Einsatzbereich pages): two cards side by side, no slider.
   The track loses its scrollport + bleed and becomes a centered 2-col grid. */
.sun-ts--static .sun-ts__inner { display: block; }
.sun-ts--static .sun-ts__track {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
  overflow: visible;
  scroll-snap-type: none;
  padding: 0;
}
.sun-ts--static .sun-ts__card { width: auto; scroll-snap-align: none; }
@media (max-width: 860px) {
  .sun-ts--static .sun-ts__track { grid-template-columns: 1fr; }
}
