/*
 * .testimonial-card — client logo, quote mark, quote, name and role
 * (template-parts/cards/testimonial-card.php).
 * Figma: D 337:9630 (689 × 380) / M 337:10082 (335 wide).
 *
 * The card fills its slide; the quote grows so names line up at the bottom.
 */

.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: var(--nv-flow-gap);
  height: 100%;
  border-radius: clamp(0.625rem, 0.4028rem + 0.9479vw, 1.25rem);
  padding: clamp(1.25rem, 0.8056rem + 1.8957vw, 2.5rem) clamp(1.25rem, 0.8056rem + 1.8957vw, 2.5rem) clamp(1.25rem, 0.5836rem + 2.8436vw, 3.125rem);
  background: linear-gradient(180deg, rgba(204, 219, 232, 0.3) 0%, rgba(246, 247, 249, 0.5) 100%), var(--nv-white);
}

/* .testimonial-card__top — logo left, quote mark right */
.testimonial-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
}

/* .testimonial-card__logo — 162 × 60 white tile */
.testimonial-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10.125rem;
  height: 3.75rem;
  border: 1px solid rgba(168, 217, 95, 0.5);
  border-radius: 0.5rem;
  padding: 0.625rem;
  background-color: var(--nv-white);

  & img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

/* .testimonial-card__mark — 60 → 69 px wide, pushed right even without a logo */
.testimonial-card__mark {
  flex-shrink: 0;
  width: clamp(3.75rem, 3.5500rem + 0.8531vw, 4.3125rem);
  height: auto;
  margin-top: 0.75rem;
  margin-left: auto;

  /* @media (width >= 64.0625em) .testimonial-card__mark */
  @media (width >= 64.0625em) {
    margin-top: 0;
  }
}

/* .testimonial-card__quote — 20 px on phones, 18 px on desktop (Figma) */
.testimonial-card__quote {
  flex-grow: 1;
  color: var(--nv-navy);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;

  & > * + * {
    margin-top: 1.25rem;
  }

  & strong,
  & b {
    font-weight: 700;
  }

  & a {
    text-decoration: underline;
  }

  /* @media (width >= 64.0625em) .testimonial-card__quote */
  @media (width >= 64.0625em) {
    font-size: 1.125rem;
  }
}

/* .testimonial-card__author */
.testimonial-card__author {
  line-height: 1.2;
  letter-spacing: -0.03em;
}

/* .testimonial-card__name */
.testimonial-card__name {
  color: var(--nv-green);
  font-weight: 700;
  font-size: clamp(1.4375rem, 1.2375rem + 0.8531vw, 2rem);
}

/* .testimonial-card__role */
.testimonial-card__role {
  color: rgba(19, 33, 50, 0.6);
  font-size: clamp(1.125rem, 1.0139rem + 0.4740vw, 1.4375rem);
}

/* .testimonial-card:not(.testimonial-card--wide) — slider card: Figma trims the quote and the author
   to cap / baseline (quote cap 40 → 50 px under the logo, name cap 40 → 50 px under the quote's baseline) */
.testimonial-card:not(.testimonial-card--wide) {
  & .testimonial-card__quote {
    margin-top: -0.24em;
    margin-bottom: -0.26em;
  }

  & .testimonial-card__name {
    margin-top: -0.24em;
  }

  & .testimonial-card__role {
    margin-bottom: -0.26em;
  }
}

/* .testimonial-card--wide — one card across the post text (block acf/testimonial), Figma 337:12666 / M 337:12223 */
.testimonial-card--wide {
  height: auto;
}

/* .testimonial-card--wide .testimonial-card__quote — 20 → 23 px at every width */
.testimonial-card--wide .testimonial-card__quote {
  font-size: clamp(1.25rem, 1.1833rem + 0.2844vw, 1.4375rem);
}

/* .testimonial-card--wide .testimonial-card__quote > * + * — an empty line between paragraphs, as in Figma */
.testimonial-card--wide .testimonial-card__quote > * + * {
  margin-top: 1.2em;
}

/* .testimonial-card--wide .testimonial-card__quote > :first-child — cap top 40 → 50 px under the logo */
.testimonial-card--wide .testimonial-card__quote > :first-child {
  margin-top: -0.24em;
}

/* .testimonial-card--wide .testimonial-card__author — Figma trims the text boxes: 12 px closer to the quote */
.testimonial-card--wide .testimonial-card__author {
  margin-top: -0.75rem;
}

/* .testimonial-card--wide .testimonial-card__role — baseline at the padding edge */
.testimonial-card--wide .testimonial-card__role {
  margin-bottom: -0.25em;
}
