.sgt-testimonials,
.sgt-testimonials * {
  box-sizing: border-box;
}

.sgt-testimonials {
  --sgt-primary: #38485b;
  --sgt-secondary: #90a1af;
  --sgt-tertiary: #60c5dd;
  --sgt-cta: #dd6068;
  --sgt-muted: #526377;
  --sgt-white: #ffffff;
  font-family: "Barlow", Arial, sans-serif;
  width: 100%;
}

.sgt-heading {
  color: var(--sgt-primary);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 auto 42px;
  max-width: 900px;
  text-align: center;
}

.sgt-heading::after {
  background: var(--sgt-tertiary);
  border-radius: 999px;
  content: "";
  display: block;
  height: 4px;
  margin: 18px auto 0;
  width: 72px;
}

.sgt-heading--dark {
  color: var(--sgt-white);
}

/* Scrolling homepage layout */
.sgt-testimonials--scroll {
  overflow: hidden;
}

.sgt-marquee {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.sgt-marquee::before,
.sgt-marquee::after {
  content: "";
  height: 100%;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 86px;
  z-index: 2;
}

.sgt-marquee::before {
  background: linear-gradient(90deg, rgba(56, 72, 91, 0.92), rgba(56, 72, 91, 0));
  left: 0;
}

.sgt-marquee::after {
  background: linear-gradient(270deg, rgba(56, 72, 91, 0.92), rgba(56, 72, 91, 0));
  right: 0;
}

.sgt-track {
  display: flex;
  width: max-content;
}

.sgt-set {
  align-items: stretch;
  display: flex;
  flex: 0 0 auto;
  gap: 22px;
  padding-right: 22px;
}

.sgt-card {
  margin: 0;
}

.sgt-card--scroll {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(18, 29, 40, 0.18);
  flex: 0 0 390px;
  padding: 26px;
}

.sgt-person {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.sgt-headshot {
  background: #eef3f5;
  border: 3px solid rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  display: block;
  flex: 0 0 auto;
  height: 62px;
  object-fit: cover;
  width: 62px;
}

.sgt-headshot--fallback {
  align-items: center;
  color: var(--sgt-primary);
  display: inline-flex;
  font-size: 18px;
  font-weight: 800;
  justify-content: center;
}

.sgt-person-copy {
  min-width: 0;
}

.sgt-name,
.sgt-role {
  display: block;
}

.sgt-card--scroll .sgt-name {
  color: var(--sgt-white);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.sgt-card--scroll .sgt-role {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.4;
  margin-top: 4px;
}

.sgt-quote {
  border: 0;
  margin: 0;
  padding: 0;
}

.sgt-quote p {
  margin: 0 0 12px;
}

.sgt-quote p:last-child {
  margin-bottom: 0;
}

.sgt-card--scroll .sgt-quote {
  color: rgba(255, 255, 255, 0.94);
  font-size: 16px;
  font-style: italic;
  line-height: 1.62;
}

@media (prefers-reduced-motion: no-preference) {
  .sgt-marquee:not(.sgt-marquee--static) .sgt-track {
    animation: sgtReviewsLeftToRight var(--sgt-speed, 68s) linear infinite;
  }

  .sgt-marquee:hover .sgt-track,
  .sgt-marquee:focus-within .sgt-track {
    animation-play-state: paused;
  }
}

@keyframes sgtReviewsLeftToRight {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

.sgt-marquee--static .sgt-track,
.sgt-marquee--static .sgt-set {
  width: 100%;
}

.sgt-marquee--static .sgt-card {
  margin: 0 auto;
}

/* Reviews-page gallery */
.sgt-testimonials--gallery {
  color: var(--sgt-primary);
  margin: 0 auto;
  max-width: 1240px;
  padding: 24px;
}

.sgt-gallery {
  align-items: stretch;
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sgt-card--gallery {
  background: var(--sgt-white);
  border: 1px solid rgba(56, 72, 91, 0.13);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(56, 72, 91, 0.09);
  min-width: 0;
  overflow: hidden;
  padding: 32px;
  position: relative;
}

.sgt-card--gallery::before {
  background: linear-gradient(90deg, var(--sgt-tertiary), var(--sgt-cta));
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

.sgt-card--gallery .sgt-headshot {
  border-color: #ffffff;
  box-shadow: 0 5px 18px rgba(56, 72, 91, 0.16);
  height: 88px;
  width: 88px;
}

.sgt-card--gallery .sgt-name {
  color: var(--sgt-primary);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
}

.sgt-card--gallery .sgt-role {
  color: var(--sgt-muted);
  font-size: 15px;
  line-height: 1.45;
  margin-top: 5px;
}

.sgt-card--gallery .sgt-quote {
  color: var(--sgt-muted);
  font-size: 17px;
  line-height: 1.7;
  padding-top: 4px;
}

.sgt-card--gallery .sgt-quote::before {
  color: rgba(96, 197, 221, 0.42);
  content: "“";
  display: block;
  font-family: Georgia, serif;
  font-size: 58px;
  font-style: normal;
  font-weight: 700;
  height: 34px;
  line-height: 1;
  margin-bottom: 8px;
}

.sgt-empty {
  background: #fff8e5;
  border-left: 4px solid #dba617;
  margin: 20px 0;
  padding: 14px 18px;
}

@media (max-width: 900px) {
  .sgt-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .sgt-marquee::before,
  .sgt-marquee::after {
    display: none;
  }

  .sgt-track {
    display: block;
    transform: none !important;
    width: 100%;
  }

  .sgt-set {
    display: grid;
    gap: 16px;
    padding: 0;
    width: 100%;
  }

  .sgt-set--duplicate {
    display: none;
  }

  .sgt-card--scroll {
    flex: none;
    width: 100%;
  }

  .sgt-testimonials--gallery {
    padding: 12px;
  }

  .sgt-card--gallery {
    padding: 26px 22px;
  }

  .sgt-card--gallery .sgt-headshot {
    height: 76px;
    width: 76px;
  }
}
