#testimonials {
  padding: 70px 0 54px;
  overflow: hidden;
  background: #f5f4f0;
  color: #171916;
}

.testimonials-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #d2d4cb;
}

.testimonials-label { margin: 0; color: #65685f; font: inherit; }

.testimonial-position {
  direction: ltr;
  margin: 0;
  color: #757970;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
  line-height: 1;
}

.testimonial-position span { color: #171916; font-weight: 700; }

.testimonial-slider {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

.testimonial-slider::-webkit-scrollbar { display: none; }
.testimonial-track { display: flex; width: 100%; }

.testimonial-slide {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  flex: 0 0 100%;
  gap: 30px;
  align-items: center;
  min-width: 0;
  padding: 44px 0 40px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.testimonial-portrait {
  display: block;
  width: 116px;
  height: 116px;
  object-fit: contain;
  object-position: center bottom;
}

.testimonial-copy,
.testimonial-copy blockquote { margin: 0; }

.testimonial-copy blockquote p {
  max-width: 760px;
  margin: 0;
  color: #171916;
  font-size: clamp(26px, 2.65vw, 38px);
  font-weight: 580;
  letter-spacing: -.038em;
  line-height: 1.2;
  text-wrap: pretty;
}

.testimonial-copy figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px 14px;
  margin-top: 20px;
  color: #565b50;
  font-size: 12px;
  line-height: 1.6;
}

.testimonial-copy figcaption strong { color: #262b24; font-size: 12px; font-weight: 700; }

.testimonial-watch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 18px;
  border: 1px solid #989c93;
  border-radius: 999px;
  background: transparent;
  color: #171916;
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.testimonial-watch:hover { border-color: #40473b; background: #e9e9e2; }
.testimonial-watch svg { flex: 0 0 auto; width: 17px; height: 17px; fill: currentColor; }

.testimonial-duration {
  margin-left: 2px;
  padding-left: 12px;
  border-left: 1px solid #aeb1a8;
  color: #5f645a;
  font-size: 11px;
  font-weight: 450;
  font-variant-numeric: tabular-nums;
}

.testimonial-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 25px;
  border-top: 1px solid #d2d4cb;
}

.testimonials-rating {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-height: 44px;
  color: #565c50;
  font-size: 12px;
  line-height: 1.5;
  text-decoration: none;
}

.testimonials-rating strong { color: #242a20; font-size: 15px; }
.testimonials-rating-stars { color: #826522; font-size: 13px; letter-spacing: 2px; }
.testimonials-rating svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.testimonials-rating:hover { color: #171916; text-decoration: underline; text-underline-offset: 4px; }
.testimonial-controls { display: flex; align-items: center; gap: 8px; }

.testimonial-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #aeb1a8;
  border-radius: 50%;
  background: transparent;
  color: #171916;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, opacity .2s ease;
}

.testimonial-arrow:hover:not(:disabled) { border-color: #454a42; background: #e8e7e1; }
.testimonial-arrow:disabled { cursor: default; opacity: .3; }
.testimonial-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.testimonial-arrow--next {
  width: auto;
  min-width: 138px;
  padding: 0 17px 0 20px;
  gap: 10px;
  border-color: #171916;
  border-radius: 999px;
  background: #171916;
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .035em;
  white-space: nowrap;
}

.testimonial-arrow--next:hover:not(:disabled) { border-color: #32362f; background: #32362f; }
.testimonial-arrow--next:disabled { border-color: #989c93; background: #989c93; color: #fff; }

[dir="rtl"] .testimonial-arrow svg { transform: scaleX(-1); }

.testimonial-dialog {
  width: min(430px, calc(100% - 24px));
  max-height: calc(100svh - 24px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  background: #090909;
  color: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .45);
}

.testimonial-dialog::backdrop { background: rgba(0, 0, 0, .84); backdrop-filter: blur(8px); }
.testimonial-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 18px; }
.testimonial-dialog-client { display: block; color: #aaa; font-size: 10px; letter-spacing: .12em; line-height: 1.4; text-transform: uppercase; }
.testimonial-dialog-title { margin: 5px 0 0; color: #fff; font-size: 15px; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }

.testimonial-dialog-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.testimonial-dialog-close:hover { background: rgba(255, 255, 255, .1); }
.testimonial-dialog-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.testimonial-dialog video { display: block; width: 100%; height: min(72svh, 720px); max-height: calc(100svh - 112px); background: #000; object-fit: contain; }
.testimonial-video-error { margin: 0; padding: 0 18px 18px; color: #ddd; font-size: 13px; }
.testimonial-video-error a { color: #fff; }
body:has(.testimonial-dialog[open]) { overflow: hidden; }

#testimonials :focus-visible,
.testimonial-dialog :focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }

@media (max-width: 1100px) {
  .testimonial-slide { grid-template-columns: 100px minmax(0, 1fr); gap: 22px 28px; }
  .testimonial-portrait { align-self: start; width: 100px; height: 100px; }
  .testimonial-watch { grid-column: 2; justify-self: start; }
}

@media (max-width: 700px) {
  #testimonials { padding: 54px 0 42px; }
  .testimonials-topline { padding-bottom: 16px; }
  .testimonial-slide { grid-template-columns: 64px minmax(0, 1fr); gap: 20px; padding: 31px 0 28px; }
  .testimonial-portrait { grid-row: 2; width: 64px; height: 64px; }
  .testimonial-copy { display: contents; }
  .testimonial-copy blockquote { grid-column: 1 / -1; }
  .testimonial-copy blockquote p { font-size: clamp(25px, 7.4vw, 32px); line-height: 1.24; }
  .testimonial-copy figcaption { display: block; grid-column: 2; grid-row: 2; align-self: center; margin: 0; }
  .testimonial-copy figcaption strong,
  .testimonial-copy figcaption span { display: block; }
  .testimonial-copy figcaption strong { margin-bottom: 3px; font-size: 13px; }
  .testimonial-copy figcaption span { max-width: 230px; }
  .testimonial-watch { grid-column: 1 / -1; width: 100%; margin-top: 2px; }
  .testimonial-footer { padding-top: 20px; }
  .testimonials-rating { gap: 7px; font-size: 11px; }
  .testimonials-rating-stars { letter-spacing: 1px; }
  .testimonial-arrow { width: 44px; height: 44px; }
  .testimonial-arrow--next { width: auto; min-width: 118px; padding-inline: 15px 13px; }
  .testimonial-dialog { width: calc(100% - 16px); }
  .testimonial-dialog-header { padding: 12px 14px; }
  .testimonial-dialog video { height: min(76svh, 720px); }
}

@media (max-width: 440px) {
  .testimonial-footer { align-items: flex-end; }
  .testimonials-rating { display: grid; grid-template-columns: auto 1fr; gap: 1px 7px; }
  .testimonials-rating > span:not(.testimonials-rating-stars) { grid-column: 1 / -1; }
  .testimonials-rating svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-slider { scroll-behavior: auto; }
  .testimonial-watch,
  .testimonial-arrow { transition: none; }
}
