/* ==========================================================================
   Case Study Testimonial
   Scoped to .cs-testimonial. Values from Figma "Case study- New" (2650:4384).
   Colors are hardcoded because module.css does not process HubL:
     navy #273343 = theme primary, gold #FFCF53 = theme secondary,
     band #F5F5F5, media placeholder #D6D6D6.
   ========================================================================== */

/* --- Band: full-bleed out of the post body column ----------------------- */
.cs-testimonial {
  position: relative;
  box-sizing: border-box;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 60px 20px 64px;
  background-color: #F5F5F5;
  overflow-x: hidden;
}

.cs-testimonial__inner {
  max-width: 985px;
  margin: 0 auto;
}

/* --- Centered header ---------------------------------------------------- */
.cs-testimonial__header {
  margin: 0 0 32px;
  text-align: center;
}

.cs-testimonial__eyebrow {
  margin: 0 0 9px;
  font-family: Manrope, sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: normal;
  color: #273343;
  text-transform: uppercase;
}

.cs-testimonial__heading {
  margin: 0;
  font-family: Manrope, sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: normal;
  color: #273343;
  text-transform: capitalize;
}

/* --- Row: mobile first stacks media then text --------------------------- */
.cs-testimonial__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px 58px;
  align-items: center;
}

/* --- Media: 16:9 frame; iframe/video/img fill it ----------------------- */
.cs-testimonial__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  overflow: hidden;
  background-color: #D6D6D6;
}

/* Fallback for browsers without aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
  .cs-testimonial__media {
    height: 0;
    padding-bottom: 56.25%;
  }
}

.cs-testimonial__media iframe,
.cs-testimonial__media video,
.cs-testimonial__media img,
.cs-testimonial__media > div,
.cs-testimonial__media .hs-video-wrapper,
.cs-testimonial__media .hs-video-container,
.cs-testimonial__media .wistia_responsive_padding,
.cs-testimonial__media .wistia_embed {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
}

.cs-testimonial__media img {
  object-fit: cover;
  display: block;
}

/* --- Text column -------------------------------------------------------- */
.cs-testimonial__text {
  min-width: 0;
}

.cs-testimonial__rating {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin: 0 0 22px;
}

.cs-testimonial__stars {
  display: inline-flex;
  gap: 10px;
  line-height: 0;
}

.cs-testimonial__star {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: #FFCF53;
}

.cs-testimonial__rating-value {
  font-family: Inter, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 27px;
  color: #273343;
}

/* Quote: plain rich text, overriding parent/child blockquote styling */
.cs-testimonial__quote {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.cs-testimonial__quote p,
.cs-testimonial__quote li {
  margin: 0 0 13px;
  font-family: Inter, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 27px;
  color: #273343;
}

.cs-testimonial__quote > p:last-child {
  margin-bottom: 0;
}

.cs-testimonial__author {
  margin: 13px 0 0;
  font-family: Inter, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 27px;
  color: #273343;
}

/* No media: center the text column */
.cs-testimonial__row--no-media .cs-testimonial__text {
  max-width: 720px;
  margin: 0 auto;
}

/* --- Tablet and up: Figma desktop type sizes --------------------------- */
@media screen and (min-width: 768px) {
  .cs-testimonial {
    padding: 101px 20px;
  }

  .cs-testimonial__header {
    margin-bottom: 44px;
  }

  .cs-testimonial__eyebrow {
    font-size: 18px;
  }

  .cs-testimonial__heading {
    font-size: 33px;
  }

  .cs-testimonial__quote p,
  .cs-testimonial__quote li,
  .cs-testimonial__author {
    font-size: 20px;
  }
}

/* --- Desktop: media beside text ---------------------------------------- */
@media screen and (min-width: 992px) {
  .cs-testimonial__row {
    grid-template-columns: minmax(0, 1fr) 434px;
  }

  .cs-testimonial--flip .cs-testimonial__row {
    grid-template-columns: 434px minmax(0, 1fr);
  }

  .cs-testimonial--flip .cs-testimonial__media {
    order: 2;
  }

  .cs-testimonial--flip .cs-testimonial__text {
    order: 1;
  }
}
