:root {
  --testimonial-navy: #0c2b5c;
  --testimonial-ink: #061224;
  --testimonial-blue: #1189d5;
  --testimonial-gold: #dca11c;
  --testimonial-surface: #ffffff;
  --testimonial-muted: #64748b;
  --testimonial-line: #d9e5f2;
  --testimonial-ease: cubic-bezier(.23, 1, .32, 1);
}

.cgs-testimonials-preview {
  position: relative;
  padding: 76px 0 82px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(220,161,28,.09) 0, transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, #eef6fd 100%);
}

.cgs-testimonials-preview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--testimonial-gold) 0 32%, #70c8b3 32% 64%, var(--testimonial-blue) 64% 100%);
}

.cgs-testimonials-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.cgs-testimonials-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--testimonial-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cgs-testimonials-heading h2,
.cgs-testimonials-intro h2,
.cgs-testimonial-group-heading h2 {
  color: var(--testimonial-navy);
  font-weight: 800;
  letter-spacing: 0;
}

.cgs-testimonials-heading h2 {
  margin: 0 0 8px;
  font-size: 34px;
}

.cgs-testimonials-heading p,
.cgs-testimonials-intro p,
.cgs-testimonial-group-heading p {
  color: var(--testimonial-muted);
  line-height: 1.7;
}

.cgs-testimonials-heading p {
  max-width: 690px;
  margin: 0;
}

.cgs-testimonials-all-link {
  flex: 0 0 auto;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 1px solid rgba(12,43,92,.2);
  border-radius: 8px;
  background: #fff;
  color: var(--testimonial-navy);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(12,43,92,.07);
  transition: transform 160ms var(--testimonial-ease), border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.cgs-testimonials-all-link:hover {
  color: var(--testimonial-blue);
  border-color: rgba(17,137,213,.45);
  box-shadow: 0 12px 30px rgba(12,43,92,.12);
  transform: translateY(-2px);
}

.cgs-testimonials-all-link:active,
.cgs-testimonial-tab:active,
.cgs-testimonial-jump a:active {
  transform: scale(.97);
}

.cgs-testimonial-tabs {
  width: max-content;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  gap: 4px;
  padding: 4px;
  margin: 0 auto 62px;
  border: 1px solid rgba(12,43,92,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 28px rgba(12,43,92,.08);
}

.cgs-testimonial-tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--testimonial-muted);
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms var(--testimonial-ease), background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.cgs-testimonial-tab.is-active {
  background: var(--testimonial-navy);
  color: #fff;
  box-shadow: 0 8px 18px rgba(12,43,92,.18);
}

.cgs-testimonial-tab:focus-visible,
.cgs-testimonials-all-link:focus-visible,
.cgs-testimonial-jump a:focus-visible {
  outline: 3px solid rgba(17,137,213,.28);
  outline-offset: 3px;
}

.cgs-testimonial-panel[hidden] {
  display: none;
}

.cgs-testimonial-panel.is-active {
  animation: testimonialPanelIn 240ms var(--testimonial-ease) both;
}

@keyframes testimonialPanelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.cgs-testimonial-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.cgs-testimonial-card {
  position: relative;
  overflow: visible;
  border: 1px solid var(--testimonial-line);
  border-radius: 8px;
  background: var(--testimonial-surface);
  box-shadow: 0 16px 38px rgba(12,43,92,.09);
  transition: transform 220ms var(--testimonial-ease), box-shadow 220ms ease, border-color 220ms ease;
}

.cgs-testimonial-card:hover {
  transform: translateY(-4px);
  border-color: rgba(17,137,213,.34);
  box-shadow: 0 22px 46px rgba(12,43,92,.14);
}

.cgs-testimonial-card-preview {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 58px 28px 26px;
  text-align: center;
}

.cgs-testimonial-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--testimonial-navy), var(--testimonial-blue));
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  border: 3px solid #fff;
  box-shadow: 0 8px 20px rgba(12,43,92,.2);
}

.cgs-testimonial-avatar-raised {
  position: absolute;
  top: -40px;
  left: 50%;
  width: 82px;
  height: 82px;
  transform: translateX(-50%);
  border-width: 5px;
  font-size: 20px;
}

.cgs-testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cgs-testimonial-person h3 {
  color: var(--testimonial-navy);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0;
  margin: 0 0 3px;
  overflow-wrap: anywhere;
}

.cgs-testimonial-person p {
  color: var(--testimonial-muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.cgs-testimonial-person-centered {
  min-height: 52px;
}

.cgs-testimonial-quote-mark {
  position: absolute;
  right: 18px;
  top: 10px;
  color: rgba(17,137,213,.1);
  font-family: Georgia, serif;
  font-size: 72px;
  line-height: 1;
  pointer-events: none;
}

.cgs-testimonial-card blockquote {
  position: relative;
  z-index: 1;
  color: #40516a;
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: 0;
  margin: 12px 0 18px;
  overflow-wrap: anywhere;
}

.cgs-testimonial-card-preview blockquote {
  display: flex;
  align-items: center;
  flex: 1;
  border-top: 1px solid #e7eef6;
  padding-top: 16px;
}

.cgs-testimonial-stars {
  display: flex;
  justify-content: center;
  gap: 4px;
  color: var(--testimonial-gold);
  font-size: 15px;
}

.cgs-testimonials-directory {
  padding: 70px 0 90px;
  background: #f6f9fd;
}

.cgs-testimonials-intro {
  max-width: 820px;
  margin: 0 auto 68px;
  text-align: center;
}

.cgs-testimonials-intro h2 {
  margin: 0 0 12px;
  font-size: 36px;
}

.cgs-testimonials-intro > p {
  margin: 0 auto;
  max-width: 700px;
}

.cgs-testimonial-jump {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.cgs-testimonial-jump a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--testimonial-navy);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: transform 140ms var(--testimonial-ease), background-color 180ms ease;
}

.cgs-testimonial-jump a:last-child {
  background: #fff;
  color: var(--testimonial-navy);
  border: 1px solid var(--testimonial-line);
}

.cgs-testimonial-group {
  scroll-margin-top: 160px;
}

.cgs-testimonial-group + .cgs-testimonial-group {
  margin-top: 86px;
  padding-top: 78px;
  border-top: 1px solid var(--testimonial-line);
}

.cgs-testimonial-group-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 30px;
}

.cgs-testimonial-group-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--testimonial-navy);
  color: #fff;
  font-size: 24px;
  box-shadow: 0 10px 24px rgba(12,43,92,.18);
}

.cgs-testimonial-group-parent .cgs-testimonial-group-icon {
  background: var(--testimonial-blue);
}

.cgs-testimonial-group-heading span {
  display: block;
  margin-bottom: 3px;
  color: var(--testimonial-gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.cgs-testimonial-group-heading h2 {
  margin: 0 0 3px;
  font-size: 28px;
}

.cgs-testimonial-group-heading p {
  margin: 0;
}

.cgs-testimonial-wall {
  columns: 3 290px;
  column-gap: 22px;
}

.cgs-testimonial-card-wall {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 22px;
  padding: 28px;
}

.cgs-testimonial-card-wall:nth-child(3n + 2) {
  background: #fdfefe;
}

.cgs-testimonial-card-wall blockquote {
  margin-top: 0;
  font-size: 15px;
}

.cgs-testimonial-card-wall .cgs-testimonial-stars {
  justify-content: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid #e7eef6;
}

.cgs-testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 991.98px) {
  .cgs-testimonial-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cgs-testimonial-preview-grid .cgs-testimonial-card:last-child { grid-column: 1 / -1; width: min(100%, 520px); justify-self: center; }
  .cgs-testimonial-wall { columns: 2 260px; }
}

@media (max-width: 767.98px) {
  .cgs-testimonials-preview { padding: 58px 0 64px; }
  .cgs-testimonials-heading { align-items: flex-start; flex-direction: column; margin-bottom: 24px; }
  .cgs-testimonials-heading h2, .cgs-testimonials-intro h2 { font-size: 28px; }
  .cgs-testimonials-all-link { width: 100%; }
  .cgs-testimonial-tabs { width: 100%; margin-bottom: 56px; }
  .cgs-testimonial-preview-grid { grid-template-columns: 1fr; gap: 58px; }
  .cgs-testimonial-preview-grid .cgs-testimonial-card:last-child { grid-column: auto; width: 100%; }
  .cgs-testimonial-card-preview { min-height: 280px; padding-left: 22px; padding-right: 22px; }
  .cgs-testimonials-directory { padding: 54px 0 70px; }
  .cgs-testimonials-intro { margin-bottom: 52px; }
  .cgs-testimonial-group-heading { align-items: flex-start; }
  .cgs-testimonial-group-heading h2 { font-size: 23px; }
  .cgs-testimonial-wall { columns: 1; }
  .cgs-testimonial-card-wall { padding: 24px; }
}

@media (max-width: 380px) {
  .cgs-testimonial-tab { padding: 0 10px; font-size: 13px; }
  .cgs-testimonial-jump a { width: 100%; }
  .cgs-testimonial-group-heading { gap: 12px; }
  .cgs-testimonial-group-icon { width: 48px; height: 48px; flex-basis: 48px; font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .cgs-testimonial-panel.is-active { animation: none; }
  .cgs-testimonial-card,
  .cgs-testimonial-tab,
  .cgs-testimonials-all-link,
  .cgs-testimonial-jump a { transition: none; }
}
