/* =========================
   Reviews
========================= */

.reviews-section {
  background: #f6fbf8;
}

.reviews-section h2 {
  text-align: center;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
}

.review-carousel {
  width: 100%;
  min-width: 0;
  padding: 24px 22px;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
}

.review-badge {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  background: transparent;
  box-shadow: none;
}

.review-badge img {
  display: block;
  width: auto;
  height: 30px;
  max-width: 120px;
  object-fit: contain;
}

.review-badge img[alt="Yandex"],
.review-badge img[alt="Google"] {
  height: 28px;
}

.review-badge img[alt="2ГИС"] {
  height: 32px;
  max-width: 125px;
}

.review-box {
  position: relative;
  height: 285px;
  min-height: 285px;
  max-height: 285px;
  padding: 18px;
  overflow: hidden;
  border-radius: 18px;
  background: #f8fafc;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.035);
}

.review-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 22px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #666666;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.review-prev {
  left: 8px;
}

.review-next {
  right: 8px;
}

.review-slides {
  height: 100%;
  min-height: 0;
}

.review-slide {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 0 28px;
  overflow: hidden;
  text-align: center;
}

.review-slide.is-active {
  display: flex;
}

.review-stars {
  margin-bottom: 8px;
  color: #f5b301;
  font-size: 18px;
  letter-spacing: 1px;
}

.review-text {
  width: 100%;
  min-height: 0;
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.review-text,
.review-text p {
  font-style: italic;
}

.review-text p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #555555;
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
}

.review-more {
  flex-shrink: 0;
  margin: 8px 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1c5fd4;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.review-more:hover {
  text-decoration: underline;
}

.review-meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  color: #555555;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
}

.review-meta strong {
  display: inline;
  margin: 0;
  font-size: 15px;
  font-weight: 400;
}

.review-date {
  display: inline;
  margin: 0;
  color: #555555;
  font-size: 14px;
  font-weight: 400;
}

.review-date::before {
  content: "·";
  margin-right: 8px;
}

.review-dots {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
  overflow: hidden;
}

.review-dots button {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d0d0d0;
}

.review-dots button.is-active {
  width: 18px;
  background: #111111;
}

.review-link {
  display: block;
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.review-modal-open {
  overflow: hidden;
}

.review-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.review-modal.is-open {
  display: flex;
}

.review-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.review-modal__window {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: 80vh;
  padding: 30px;
  overflow-y: auto;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.review-modal__close {
  position: absolute;
  top: 14px;
  right: 18px;
  border: 0;
  background: transparent;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.review-modal__stars {
  margin-bottom: 14px;
  color: #f5b301;
  font-size: 20px;
  letter-spacing: 1px;
}

.review-modal__text,
.review-modal__text p {
  font-size: 16px;
  line-height: 1.65;
  font-style: italic;
}

.review-modal__meta {
  margin-top: 18px;
  color: #555555;
  font-size: 14px;
}

@media (max-width: 980px) {
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .review-box {
    height: 270px;
    min-height: 270px;
    max-height: 270px;
  }
}

@media (max-width: 640px) {
  .review-modal__window {
    padding: 24px 20px;
    border-radius: 18px;
  }
}
