/* ============================================================
   TESTIMONIALS — horizontal pin scroll
   Section pins to top; track translates left as user scrolls.
   Quote → 6 cards → Quote
   Fully responsive
   ============================================================ */

.testimonials {
  position: relative;          /* nový stacking context */
  z-index: 2;                  /* kryje cokoli pod sebou */
  background-color: var(--color-bg);
  overflow: hidden;
  height: 100vh;
  height: 100svh;
}

.testimonials__track {
  display: flex;
  align-items: center;
  height: 100%;
  will-change: transform;
}

/* ============================================================
   QUOTES (bookend blocks — each 100vw wide)
   ============================================================ */

.testimonials__quote {
  flex-shrink: 0;
  width: 100vw;
  height: 620px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-inline: var(--page-padding);
}

.testimonials__quote--start {
  justify-content: flex-start;
  align-items: flex-end;
}

.testimonials__quote--start .testimonials__text,
.testimonials__quote--start .testimonials__author {
  max-width: 694px;
}

.testimonials__quote--end {
  justify-content: flex-end;
  align-items: flex-start;
}

.testimonials__quote--end .testimonials__text,
.testimonials__quote--end .testimonials__author {
  max-width: 694px;
}

.testimonials__text {
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: -1.44px;
  color: var(--color-fg);
  margin: 0;
}

.testimonials__author {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.testimonials__author-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background-color: var(--color-stroke);
}

.testimonials__author-name {
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--color-fg);
}

/* ============================================================
   TESTIMONIAL CARDS
   ============================================================ */

.tcard {
  flex-shrink: 0;
  width: 580px;
  height: 620px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 42px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  margin-right: 22px;
  position: relative;
}

.tcard__proof-img {
  position: absolute;
  object-fit: cover;
}

.tcard__proof-text {
  position: absolute;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 400;
  line-height: var(--leading-tight);
  color: var(--color-fg);
  display: block;
}

.tcard--wide   { width: 810px; }
.tcard--narrow { width: 340px; }

/* 83 px buffer between quote blocks and the first/last card */
.testimonials__track .tcard:first-of-type { margin-left: 83px; }
.testimonials__track .tcard:last-of-type  { margin-right: 83px; }

.tcard__header {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}

.tcard__avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background-color: var(--color-stroke);
}

.tcard__avatar-logo {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
}

.tcard__avatar-logo img {
  width: 28px;
  height: auto;
  object-fit: contain;
}

.tcard__avatar-logo--dark {
  background-color: #1d1d1f;
}

.tcard__avatar-logo--dark img {
  filter: invert(1);
}

.tcard__meta {
  flex: 1;
  min-width: 0;
}

.tcard__name {
  font-size: var(--text-body-l);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-body-l);
  color: var(--color-fg);
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tcard__role {
  font-size: var(--text-small);
  font-weight: 400;
  color: var(--color-muted-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.tcard__verified {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.tcard__stars {
  font-size: 13px;
  color: #f4a336;
  letter-spacing: 1px;
  flex-shrink: 0;
  margin-left: auto;
}

.tcard__stars--4 {
  color: var(--color-stroke);
}

.tcard__stars--4::before {
  content: '★★★★';
  color: #f4a336;
}

.tcard__stars--4::after {
  content: '★';
  color: var(--color-stroke);
}

.tcard__body {
  font-size: var(--text-h3);
  font-weight: 500;
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-h3);
  color: var(--color-fg);
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
}

.tcard__images {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  height: 193px;
}

.tcard__thumb {
  flex: 1;
  border-radius: 8px;
  object-fit: cover;
  background-color: var(--color-stroke);
  min-height: 193px;
}

.tcard__thumb--wide {
  aspect-ratio: 16 / 9;
  flex: none;
  width: calc(50% - 4px);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ---- Wide desktop (1280) — proportional scale ---- */
@media (max-width: 1279px) {
  .tcard {
    width: 500px;
    height: 540px;
    padding: 36px;
  }
  .tcard--wide   { width: 700px; }
  .tcard--narrow { width: 300px; }
  .testimonials__quote {
    height: 540px;
  }
  .testimonials__quote--start .testimonials__text,
  .testimonials__quote--end .testimonials__text {
    max-width: 600px;
  }
}

/* ---- Tablet landscape (1023) — smaller cards, scale text ---- */
@media (max-width: 1023px) {
  .tcard {
    width: 420px;
    height: 480px;
    padding: 28px;
    margin-right: 16px;
  }
  .tcard--wide   { width: 580px; }
  .tcard--narrow { width: 280px; }
  .testimonials__track .tcard:first-of-type { margin-left: 56px; }
  .testimonials__track .tcard:last-of-type  { margin-right: 56px; }
  .testimonials__quote {
    height: 480px;
  }
  .testimonials__text {
    font-size: 28px;
  }
  .tcard__body {
    font-size: 18px;
    -webkit-line-clamp: 7;
  }
  .tcard__images {
    height: 150px;
  }
  .tcard__thumb {
    min-height: 150px;
  }
}

/* ---- Mobile (767) — stack vertically, full width ---- */
@media (max-width: 767px) {
  .testimonials {
    height: auto;
    overflow: visible;
    padding: var(--space-16) 0;
  }
  .testimonials__track {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    gap: var(--space-4);
    padding-inline: var(--page-padding);
  }
  .testimonials__quote {
    width: 100%;
    height: auto;
    padding-inline: 0;
    align-items: flex-start !important;
    gap: 18px;
  }
  .testimonials__quote--start,
  .testimonials__quote--end {
    align-items: flex-start;
  }
  .testimonials__text {
    font-size: 24px;
    letter-spacing: -0.5px;
  }
  .tcard,
  .tcard--wide,
  .tcard--narrow {
    width: 100%;
    height: auto;
    min-height: 400px;
    margin: 0 !important;
    padding: var(--space-6);
  }
  .testimonials__track .tcard:first-of-type,
  .testimonials__track .tcard:last-of-type {
    margin: 0 !important;
  }
  .tcard__header {
    gap: 14px;
  }
  .tcard__avatar,
  .tcard__avatar-logo {
    width: 44px;
    height: 44px;
  }
  .tcard__name {
    font-size: 17px;
  }
  .tcard__body {
    font-size: 16px;
    -webkit-line-clamp: 10;          /* víc textu když není proof image */
  }
  .tcard__images {
    height: 140px;
  }
  .tcard__thumb {
    min-height: 140px;
  }
  /* proof screenshots are absolutely positioned for desktop canvas — hide on mobile */
  .tcard__proof-img,
  .tcard__proof-text {
    display: none;
  }
}

/* ---- Phone (480) ---- */
@media (max-width: 479px) {
  .testimonials {
    padding: 48px 0;
  }
  .testimonials__text {
    font-size: 21px;
  }
  .tcard,
  .tcard--wide,
  .tcard--narrow {
    min-height: 360px;
    padding: 22px;
  }
  .tcard__avatar,
  .tcard__avatar-logo {
    width: 40px;
    height: 40px;
  }
  .tcard__body {
    font-size: 15px;
    -webkit-line-clamp: 11;
  }
  .tcard__images {
    height: 120px;
  }
  .tcard__thumb {
    min-height: 120px;
  }
}
