.home-reviews {
  --review-card-gap: 24px;
  --review-card-width: clamp(380px, 28vw, 440px);
  position: relative;
  overflow: hidden;
  padding: 86px 0 72px;
  background:
    radial-gradient(circle at 50% -30%, rgba(55, 113, 194, .3), transparent 47%),
    #071a3d;
  color: #fff;
}

.home-reviews::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(136, 176, 229, .13) 1px, transparent 1px);
  background-size: 22px 22px;
  content: "";
  pointer-events: none;
}

.home-reviews__shell {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.home-reviews__header {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto 42px;
  text-align: center;
}

.home-reviews__kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0 0 10px;
  padding: 7px 16px;
  border: 1px solid rgba(187, 211, 244, .48);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #dbe9ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1;
  text-transform: uppercase;
}

.home-reviews__header h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(32px, 2.7vw, 44px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.home-reviews__header > p:last-child {
  max-width: 650px;
  margin: 11px auto 0;
  color: #b8c8df;
  font-size: 15px;
  line-height: 1.6;
}

.home-reviews__summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  color: #b8c8df;
  font-size: 14px;
  font-weight: 500;
}

.home-reviews__summary-stars {
  display: inline-flex;
  gap: 2px;
  color: #f5c94f;
  --star-size: 18px;
  --star-empty: rgba(255, 255, 255, .2);
}

.home-reviews__score {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.home-reviews__google {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff;
  margin-right: 4px;
}
.home-reviews__google img {
  display: block;
  width: 74px;
  height: 24px;
}

.home-reviews__viewport {
  width: min(100%, calc((var(--review-card-width) * 3) + (var(--review-card-gap) * 2)));
  margin-inline: auto;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 16px 0 30px;
  outline: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.home-reviews.is-ready .home-reviews__viewport {
  overflow-x: hidden;
  scroll-snap-type: none;
}

.home-reviews__viewport::-webkit-scrollbar { display: none; }

.home-reviews__viewport:focus-visible {
  border-radius: 24px;
  box-shadow: inset 0 0 0 3px rgba(114, 166, 235, .7);
}

.home-reviews__track {
  display: flex;
  align-items: stretch;
  gap: var(--review-card-gap);
  width: max-content;
}

.home-review-card {
  box-sizing: border-box;
  display: flex;
  flex: 0 0 var(--review-card-width);
  height: 276px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid rgba(221, 231, 244, .92);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 52px rgba(0, 8, 28, .24);
  opacity: .5;
  scroll-snap-align: center;
  transform: scale(.97);
  transform-origin: center;
  cursor: default;
  outline: 0;
  transition: opacity .32s ease, transform .32s ease, box-shadow .32s ease;
}

.home-review-card.is-active {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 28px 70px rgba(0, 8, 28, .38);
}

.home-review-card.is-active {
  cursor: pointer;
}

.home-review-card.is-active:hover,
.home-review-card.is-active:focus-visible {
  z-index: 2;
  opacity: 1;
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 32px 76px rgba(0, 8, 28, .42);
}

.home-review-card.is-active:active { transform: scale(1.015) translateY(-2px); }

.home-review-card.is-active:focus-visible { box-shadow: 0 0 0 4px rgba(100, 157, 235, .72), 0 32px 76px rgba(0, 8, 28, .42); }

.home-review-card__top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-review-card__avatar {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: rgba(66, 120, 213, .1);
  color: #285fc4;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .04em;
}

.home-review-card__icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-review-card__identity { min-width: 0; }

.home-review-card h3 {
  overflow: hidden;
  margin: 0 0 7px;
  color: #13284c;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-review-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  font-size: 11px;
}

.home-review-card__stars {
  display: inline-flex;
  gap: 1px;
  color: #f5c94f;
}

.home-review-star {
  display: block;
  width: var(--star-size, 15px);
  height: var(--star-size, 15px);
  flex: 0 0 auto;
}

.home-review-star__base { fill: var(--star-empty, #dfe5ee); }

.home-review-star__fill { fill: currentColor; }

.home-review-star.is-empty .home-review-star__fill { display: none; }

.home-review-star.is-half .home-review-star__fill { clip-path: inset(0 50% 0 0); }

.home-review-card__verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #285fc4;
  font-weight: 600;
}

.home-review-card__verified-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.home-review-card__comment {
  margin: 18px 0 0;
  color: rgba(19, 40, 76, .68);
  font-size: 15px;
  line-height: 1.6;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.home-review-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.home-review-card__date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(45, 58, 84, .74);
  font-size: 13px;
  font-weight: 500;
}

.home-review-card__date i { font-size: 15px; }

.home-review-card__more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  margin: -6px -6px -6px 0;
  padding: 0 8px;
  border-radius: 10px;
  color: #2459a8;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}

.home-review-card__more i {
  font-size: 15px;
  transition: transform .2s ease;
}

.home-review-card.is-active:hover .home-review-card__more,
.home-review-card.is-active:focus-visible .home-review-card__more {
  background: rgba(63, 125, 228, .09);
  color: #174b9c;
}

.home-review-card.is-active:hover .home-review-card__more i,
.home-review-card.is-active:focus-visible .home-review-card__more i { transform: translateX(3px); }

.home-reviews__controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.home-reviews__control {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(194, 214, 240, .35);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  place-items: center;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.home-reviews__control:hover,
.home-reviews__control:focus-visible {
  border-color: rgba(255, 255, 255, .8);
  background: #fff;
  color: #0d2a59;
  outline: 0;
  transform: translateY(-2px);
}

.home-reviews__control:disabled {
  opacity: .35;
  cursor: default;
  transform: none;
}

.home-reviews__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.home-review-dialog[hidden] { display: none; }

.home-review-dialog {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  overflow-y: auto;
  padding: 24px;
  place-items: center;
  background: rgba(2, 12, 34, .78);
  opacity: 0;
  transition: opacity .18s ease;
}

.home-review-dialog.is-open { opacity: 1; }

.home-review-dialog__panel {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 54px 22px 22px;
  border: 1px solid rgba(213, 226, 244, .9);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 36px 100px rgba(0, 7, 25, .55);
  transform: translateY(14px) scale(.96);
  transition: transform .18s ease;
}

.home-review-dialog.is-open .home-review-dialog__panel { transform: translateY(0) scale(1); }

.home-review-dialog__close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #dbe5f2;
  border-radius: 50%;
  background: #f4f7fb;
  color: #102b57;
  cursor: pointer;
  place-items: center;
}

.home-review-dialog__close:hover,
.home-review-dialog__close:focus-visible {
  border-color: #102b57;
  outline: 0;
  transform: scale(1.06);
}

.home-review-card--dialog {
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 8px;
  border: 0;
  box-shadow: none;
  opacity: 1;
  cursor: default;
  transform: none;
}

.home-review-card--dialog:hover { box-shadow: none; transform: none; }

.home-review-card--dialog .home-review-card__comment {
  display: block;
  overflow: visible;
  font-size: 16px;
  line-height: 1.7;
  -webkit-line-clamp: unset;
}

.home-review-card--dialog .home-review-card__more { display: none; }

html.has-review-dialog { overflow: hidden; }

@media (min-width: 681px) and (max-width: 1220px) {
  .home-reviews__viewport { width: var(--review-card-width); }
}

@media (max-width: 680px) {
  .home-reviews {
    --review-card-gap: 16px;
    --review-card-width: min(330px, calc(100vw - 48px));
    padding: 64px 0 56px;
  }

  .home-reviews__header {
    width: calc(100% - 24px);
    margin-bottom: 28px;
  }
  .home-reviews__kicker {
    min-height: 32px;
    margin-bottom: 10px;
    padding: 7px 14px;
    letter-spacing: .12em;
  }
  .home-reviews__header h2 {
    margin-bottom: 11px;
    font-size: clamp(28px, 7.2vw, 32px);
    line-height: 1.08;
  }
  .home-reviews__header > p:last-child {
    font-size: 15px;
    line-height: 1.6;
  }
  .home-reviews__viewport { width: 100%; }
  .home-reviews.is-ready .home-reviews__viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .home-reviews__track {
    padding-inline: 24px;
  }
  .home-review-card {
    scroll-snap-align: start;
  }
  .home-review-card {
    height: 244px;
    padding: 20px;
    border-radius: 20px;
  }
  .home-reviews__summary {
    gap: 8px;
    margin-top: 16px;
    font-size: 13px;
  }
  .home-reviews__summary-count::before { margin-right: 8px; }
  .home-reviews__summary-stars { --star-size: 16px; }
  .home-review-card__avatar {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }
  .home-review-card h3 { font-size: 16px; }
  .home-review-card__comment {
    margin: 16px 0 0;
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 4;
  }
  .home-review-dialog { padding: 12px; }
  .home-review-dialog__panel {
    max-height: calc(100dvh - 24px);
    padding: 50px 14px 14px;
    border-radius: 22px;
  }
  .home-review-card--dialog {
    height: auto;
    padding: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-review-card,
  .home-review-card__more,
  .home-reviews__control,
  .home-review-dialog,
  .home-review-dialog__panel { transition: none; }

  .home-reviews__viewport { scroll-behavior: auto; }
}

/* Match the homepage guide introduction typography in the client reviews section. */
.home-reviews__kicker {
  font-size: 11px;
}

.home-reviews__header h2 {
  font-size: 42px;
}

.home-reviews__header > p:last-child {
  font-size: 18px;
}

@media (max-width: 1200px) {
  .home-reviews__header h2 {
    font-size: 32px;
  }

  .home-reviews__header > p:last-child {
    font-size: 16px;
  }
}

@media (max-width: 720px) {
  .home-reviews__kicker {
    font-size: 10px;
  }

  .home-reviews__header h2 {
    font-size: 26px;
  }

  .home-reviews__header > p:last-child {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .home-reviews__header h2 {
    font-size: 23px;
  }

  .home-reviews__header > p:last-child {
    font-size: 13px;
  }
}
