/*
 * Testimonials slider - second homepage layout for the "Testimonials"
 * section (see vm_render_testimonials_slider() in inc/template-helpers.php
 * and testimonials-slider.js). Scoped to .vm-ts only, so it can sit next
 * to .testimonials/.testimonial-card (the grid layout in style.css)
 * without colliding.
 *
 * Two fields exist only here (on the `testimonial` CPT): "rating" (stars
 * next to the service label, .vm-ts__stars/.vm-ts__star) and "link" +
 * "link_label" (the "View more" line under the quote, .vm-ts__more) - both
 * optional, both collapse to nothing/an empty placeholder when unset.
 *
 * Colors/fonts pull the same tokens as the rest of the site (--red,
 * --font-display, --font-body, --light-grey, --container-width, all
 * defined in style.css) rather than a separate palette/typeface, so this
 * looks like the same site regardless of which layout is active.
 */

.vm-ts,
.vm-ts * {
  box-sizing: border-box;
}

.vm-ts {
  --vm-ts-accent: var(--red, #8D0101);
  --vm-ts-gap: 24px;
  --vm-ts-max: var(--container-width, 1200px);
  width: 100%;
  margin: 0;
  padding: clamp(56px, 7vw, 96px) clamp(20px, 5vw, 80px);
  background: var(--light-grey, #f5f5f5);
  color: var(--text, #1a1a1a);
  font-family: var(--font-body, Arial, Helvetica, sans-serif);
  line-height: 1.5;
}

.vm-ts h2,
.vm-ts h3,
.vm-ts p,
.vm-ts blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-family: var(--font-display, sans-serif);
}

.vm-ts footer {
  margin: 0;
}

.vm-ts button {
  font: inherit;
}

.vm-ts__inner {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.5vw, 40px);
  max-width: var(--vm-ts-max);
  margin: 0 auto;
}

.vm-ts__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.vm-ts__intro {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 260px;
  flex: 1;
}

.vm-ts__eyebrow {
  margin: 0;
  font-family: var(--font-display, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--vm-ts-accent);
}

.vm-ts__title {
  margin: 0;
  max-width: 600px;
  font-family: var(--font-display, sans-serif);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--black, #111111);
  text-wrap: pretty;
}

.vm-ts__nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.vm-ts__arrow {
  width: 50px;
  height: 50px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--vm-ts-accent);
  background: var(--vm-ts-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.vm-ts__arrow:hover,
.vm-ts__arrow:focus-visible {
  background: var(--black, #111111);
  border-color: var(--black, #111111);
  color: #fff;
  outline: none;
}

.vm-ts__arrow:disabled {
  border-color: #e0e0e4;
  background: #f0f0f2;
  color: #b9b9c0;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.7;
}

.vm-ts__viewport {
  width: 100%;
  overflow: hidden;
  padding: 8px 0;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
  outline: none;
}

.vm-ts__viewport:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--vm-ts-accent) 35%, transparent);
  border-radius: 12px;
}

.vm-ts.is-dragging .vm-ts__viewport {
  cursor: grabbing;
}

.vm-ts__track {
  display: flex;
  gap: var(--vm-ts-gap);
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: transform 0.5s cubic-bezier(0.22, 0.8, 0.2, 1);
}

.vm-ts.is-dragging .vm-ts__track {
  transition: none;
}

.vm-ts__card {
  flex: none;
  width: 100%;
  min-height: 320px;
  padding: 28px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: background 0.35s, color 0.35s, box-shadow 0.35s;
  color: var(--black, #111111);
}

.vm-ts__card.is-active {
  background: var(--vm-ts-accent);
  color: #fff;
}

.vm-ts__card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: none;
}

.vm-ts__service {
    margin: 0;
    font-size: 12px;
    font-weight: 600 !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9a9aa2;
    font-family: 'Nuckle regular' !important;
}

.vm-ts__card.is-active .vm-ts__service {
  color: rgba(255, 255, 255, 0.72);
}

/* Empty (no rating set) collapses to zero width via the star glyphs simply
   not being there - no fixed size reserved, so a card without a rating
   doesn't leave an odd gap next to the service label. */
.vm-ts__stars {
  display: inline-flex;
  gap: 1px;
  font-size: 13px;
  line-height: 1;
  flex: none;
  color: var(--vm-ts-accent);
}

.vm-ts__star.is-off {
  color: #d7d7dc;
}

.vm-ts__card.is-active .vm-ts__stars {
  color: #fff;
}

.vm-ts__card.is-active .vm-ts__star.is-off {
  color: rgba(255, 255, 255, 0.38);
}

/* Fixed height regardless of whether this card is "featured" (has a
   multiplier/heading) - a plain card next to a featured one stays the
   same height instead of stretching to match it, with an empty block
   here rather than a gap over the quote. */
.vm-ts__stat {
  height: 76px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: none;
}

.vm-ts__multiplier {
  font-family: var(--font-display, sans-serif);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--vm-ts-accent);
}

.vm-ts__card.is-active .vm-ts__multiplier {
  color: #fff;
}

.vm-ts__heading {
  margin: 0;
  font-family: 'Nuckle regular' !important;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--black, #111111);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-wrap: pretty;
}

.vm-ts__card.is-active .vm-ts__heading {
  color: #fff;
}

/* flex:1 (not "none") so the quote absorbs whatever extra height the
   track's default flex stretch gives this card to match the tallest card
   in the row - that's what keeps cards level instead of a fixed line
   clamp, which cut testimonials off after 4 lines regardless of their
   real length. */
.vm-ts__quote {
  margin: 0;
  flex: 1;
}

.vm-ts__quote p {
  margin: 0;
  font-family: var(--wix-font-nuckle-regular, 'Nuckle Regular', sans-serif);
  font-size: 14.5px;
  line-height: 1.6;
  color: #33333a;
  text-wrap: pretty;
}

.vm-ts__card.is-active .vm-ts__quote p {
  color: #fff;
}

/* The non-link placeholder span (rendered when a testimonial has no link)
   keeps this same min-height so cards without a "view more" line still
   align with ones that have it. */
.vm-ts__more {
    display: inline-block;
    min-height: 1.2em;
    font-size: 12.5px;
    letter-spacing: 0.04em;
    text-decoration: none;
    flex: none;
    color: var(--vm-ts-accent);
    transition: opacity 0.2s;
    font-family: 'Nuckle regular' !important;
    font-weight: 600;
}

a.vm-ts__more:hover,
a.vm-ts__more:focus-visible {
  opacity: 0.7;
  color: var(--vm-ts-accent);
  outline: none;
}

.vm-ts__card.is-active .vm-ts__more {
  color: #fff;
}

.vm-ts__person {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.vm-ts__avatar,
.vm-ts__photo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
}

.vm-ts__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, sans-serif);
  font-weight: 700;
  font-size: 11px;
  background: #f3f3f5;
  color: #4a4a52;
}

.vm-ts__card.is-active .vm-ts__avatar {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.vm-ts__photo {
  width: 38px;
  height: 38px;
  object-fit: cover;
  background: #e8e8eb;
}

.vm-ts__who {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
}

.vm-ts__name {
    font-size: 13.5px;
    color: var(--black, #111111);
    font-weight: 600 !important;
    font-family: 'Nuckle regular' !important;
}

.vm-ts__card.is-active .vm-ts__name {
  color: #fff;
}

.vm-ts__role {
  font-size: 11.5px;
  line-height: 1.35;
  color: #7a7a82;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.vm-ts__card.is-active .vm-ts__role {
  color: rgba(255, 255, 255, 0.8);
}

/* Generic verified checkmark - deliberately not the Google logomark the
   grid layout (.t-google in style.css) still uses, so this component
   carries no third-party branding of its own. */
.vm-ts__verified {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex: none;
  background: #fff;
  color: var(--vm-ts-accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}

.vm-ts__card.is-active .vm-ts__verified {
  background: rgba(255, 255, 255, 0.92);
}

.vm-ts__footer {
  display: flex;
  align-items: center;
  gap: 24px;
}

.vm-ts__progress {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: #dfdfe3;
  overflow: hidden;
}

.vm-ts__progress-bar {
  display: block;
  height: 3px;
  width: 0;
  border-radius: 999px;
  background: var(--vm-ts-accent);
  transition: width 0.5s cubic-bezier(0.22, 0.8, 0.2, 1);
}

.vm-ts__counter {
  margin: 0;
  font-family: var(--font-display, sans-serif);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #9a9aa2;
  flex: none;
}

.vm-ts .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .vm-ts {
    padding: 48px 16px 56px;
  }

  .vm-ts__header {
    align-items: flex-start;
  }
}
