.reviews-gallery {
  padding-top: 88px;
  padding-bottom: 96px;
}

.reviews-gallery__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 410px);
  gap: 40px;
  align-items: end;
}

.reviews-gallery__eyebrow {
  margin: 0 0 18px;
  color: var(--green-main, #064b3f);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .22em;
  line-height: 1.2;
  text-transform: uppercase;
}

.reviews-gallery__title {
  max-width: 860px;
  margin: 0;
  color: var(--green-main, #064b3f);
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(48px, 4vw, 68px);
  font-weight: 400;
  letter-spacing: -.05em;
  line-height: .98;
}

.reviews-gallery__description {
  margin: 18px 0 0;
  color: var(--text-muted, #78858d);
  font-size: 18px;
  line-height: 1.45;
}

.reviews-gallery__rating {
  display: grid;
  min-height: 104px;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 22px;
  background: #ffe3e5;
  box-shadow: inset 0 0 0 1px rgba(239, 48, 77, .04);
  color: inherit;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}

.reviews-gallery__rating:hover {
  background: #ffe8e9;
  transform: translateY(-1px);
}

.reviews-gallery__rating-value {
  color: var(--green-main, #064b3f);
  font-family: var(--font, Arial, sans-serif);
  font-size: 66px;
  font-weight: 400;
  letter-spacing: -.08em;
  line-height: .8;
  text-align: center;
}

.reviews-gallery__rating-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.reviews-gallery__rating-copy small {
  color: #5f6e73;
  font-size: 14px;
  line-height: 1.25;
}

.reviews-gallery__stars,
.review-card__stars {
  display: inline-flex;
  gap: 3px;
  color: #eda817;
}

.reviews-gallery__stars .icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.2;
}

.reviews-gallery__link {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  color: #173e33;
  text-decoration: none;
}

.reviews-gallery__link .icon,
.reviews-gallery__mobile-cta .icon {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
  transition: transform 180ms ease;
}

.reviews-gallery__rating:hover .reviews-gallery__link .icon,
.reviews-gallery__mobile-cta:hover .icon {
  transform: translateX(3px);
}

.reviews-gallery__grid {
  display: grid;
  min-height: 710px;
  grid-template-columns: 1.2fr .9fr .9fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.review-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #eee8e3;
  isolation: isolate;
}

.review-card--primary {
  grid-row: 1 / span 2;
}

.review-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.review-card:hover .review-card__image {
  transform: scale(1.02);
}

.review-card__overlay {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 52%;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 24px 22px;
  color: #fff;
  background: linear-gradient(to top, rgba(20, 20, 20, .76), rgba(20, 20, 20, .18) 70%, transparent);
}

.review-card__stars {
  gap: 2px;
}

.review-card__stars .icon {
  width: 21px;
  height: 21px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.2;
}

.review-card__text {
  max-width: 490px;
  margin: 8px 0 16px;
  color: #fffaf4;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(20px, 1.6vw, 29px);
  line-height: 1.08;
}

.review-card:not(.review-card--primary) .review-card__overlay {
  min-height: 76%;
  padding: 24px 20px 18px;
  background: linear-gradient(to top, rgba(20, 20, 20, .82), rgba(20, 20, 20, .38) 72%, transparent);
}

.review-card:not(.review-card--primary) .review-card__text {
  font-size: clamp(17px, 1.25vw, 22px);
  line-height: 1.06;
}

.review-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.review-card__author {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 16px;
  white-space: nowrap;
}

.review-card__avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #173e33;
  background: rgba(255, 255, 255, .95);
  font-size: 18px;
}

.review-card__badge,
.review-card__photo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  color: #173e33;
  background: rgba(245, 255, 248, .94);
  font-size: 13px;
  line-height: 1.1;
  white-space: nowrap;
}

.review-card__badge .icon,
.review-card__photo-badge .icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.review-card__badge--coral,
.review-card__photo-badge--coral {
  color: #a12d3e;
  background: rgba(255, 247, 246, .95);
}

.review-card__badge--green {
  color: #28584c;
}

.review-card__photo-badge {
  position: absolute;
  z-index: 1;
  bottom: 18px;
  left: 18px;
}

.reviews-gallery__mobile-cta {
  display: none;
}

@media (min-width: 768px) {
  .review-card--sunny {
    grid-column: 3;
    grid-row: 1;
  }

  .review-card--alina {
    grid-column: 2;
    grid-row: 1;
  }
}

.reviews-gallery__rating:focus-visible,
.reviews-gallery__mobile-cta:focus-visible {
  outline: 3px solid rgba(239, 48, 77, .28);
  outline-offset: 4px;
}

@media (max-width: 1179px) and (min-width: 768px) {
  .reviews-gallery__header {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
    gap: 24px;
  }

  .reviews-gallery__rating {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    padding: 18px;
  }

  .reviews-gallery__link {
    grid-column: 2;
  }

  .reviews-gallery__grid {
    min-height: 700px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-card--primary {
    grid-row: 1 / span 2;
  }

  .review-card__text {
    font-size: 21px;
  }
}

@media (max-width: 767px) {
  .reviews-gallery {
    padding-top: 48px;
    padding-bottom: 56px;
  }

  .reviews-gallery__header {
    display: block;
  }

  .reviews-gallery__eyebrow {
    margin-bottom: 13px;
    font-size: 11px;
    letter-spacing: .2em;
  }

  .reviews-gallery__title {
    max-width: 390px;
    font-size: clamp(36px, 10vw, 42px);
    line-height: .98;
  }

  .reviews-gallery__description {
    margin-top: 14px;
    font-size: 16px;
    line-height: 1.42;
  }

  .reviews-gallery__rating {
    min-height: 66px;
    grid-template-columns: 66px minmax(0, 1fr) 24px;
    gap: 10px;
    margin-top: 22px;
    padding: 10px 14px;
    border-radius: 18px;
  }

  .reviews-gallery__rating-value {
    font-size: 48px;
  }

  .reviews-gallery__rating-copy {
    gap: 4px;
  }

  .reviews-gallery__stars .icon {
    width: 17px;
    height: 17px;
  }

  .reviews-gallery__rating-copy small {
    font-size: 12px;
  }

  .reviews-gallery__link {
    grid-column: auto;
    justify-self: center;
  }

  .reviews-gallery__grid {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
  }

  .review-card,
  .review-card--primary {
    aspect-ratio: 1.35 / 1;
    min-height: 0;
  }

  .review-card__overlay {
    min-height: 65%;
    padding: 22px 16px 14px;
  }

  .review-card__stars .icon {
    width: 18px;
    height: 18px;
  }

  .review-card__text {
    margin: 6px 0 10px;
    font-size: clamp(18px, 5vw, 22px);
    line-height: 1.08;
  }

  .review-card:not(.review-card--primary) .review-card__overlay {
    min-height: 72%;
    padding: 20px 14px 13px;
  }

  .review-card:not(.review-card--primary) .review-card__text {
    font-size: clamp(16px, 4.5vw, 20px);
    line-height: 1.06;
  }

  .review-card__meta {
    gap: 8px;
  }

  .review-card__author {
    gap: 8px;
    font-size: 14px;
  }

  .review-card__avatar {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .review-card__badge,
  .review-card__photo-badge {
    gap: 5px;
    padding: 8px 10px;
    font-size: 11px;
  }

  .review-card__badge .icon,
  .review-card__photo-badge .icon {
    width: 17px;
    height: 17px;
  }

  .review-card__photo-badge {
    right: 14px;
    bottom: 14px;
    left: auto;
  }

  .reviews-gallery__mobile-cta {
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding: 0 20px 0 24px;
    border: 0;
    border-radius: 20px;
    color: #173e33;
    background: #fff0f1;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
  }
}

@media (max-width: 359px) {
  .reviews-gallery__rating {
    grid-template-columns: 58px minmax(0, 1fr) 22px;
    gap: 7px;
    padding-inline: 12px;
  }

  .reviews-gallery__rating-value {
    font-size: 42px;
  }

  .reviews-gallery__stars {
    gap: 1px;
  }

  .reviews-gallery__stars .icon {
    width: 15px;
    height: 15px;
  }

  .review-card__overlay {
    padding-inline: 12px;
  }

  .review-card__text {
    font-size: 17px;
  }

  .review-card__badge,
  .review-card__photo-badge {
    padding-inline: 8px;
    font-size: 10px;
  }
}
