.reviews-page {
  padding: 260px 0 100px;
  background: #fff;
}

.reviews-head {
  margin-bottom: 40px;
}

.reviews-title {
  font-family: var(--font-main);
  font-size: 42px;
  font-weight: 700;
  color: #172833;
}

.reviews-subtitle {
  color: #555;
  max-width: 520px;
  line-height: 1.6;
}

/* PINTEREST GRID */
.reviews-masonry {
  column-count: 3;
  column-gap: 20px;
}

.review-item {
  break-inside: avoid;
  margin-bottom: 20px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: transform .25s ease;
}

.review-item:hover {
  transform: translateY(-4px);
}

/* PHOTO */
.review-item.photo img {
  width: 100%;
  display: block;
  border-radius: 14px;
}



/* TEXT REVIEW */
.review-item.text .text-inner {
  padding: 22px;
}

.text-inner h3 {
  font-family: var(--font-main);
  font-size: 18px;
  margin: 8px 0 10px;
  color: #172833;
}

.text-inner p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 12px;
}

.text-inner .stars {
  color: #FFD466;
  font-size: 15px;
}

.text-inner .tag {
  font-size: 13px;
  background: #f3f4f6;
  padding: 4px 10px;
  border-radius: 999px;
  color: #172833;
}

/* MODAL */
.review-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 1000;
}

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

.review-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
}

.review-modal-dialog {
  position: relative;
  max-width: 900px;
  max-height: 85vh;
  overflow: hidden;
}

.review-modal-dialog img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.review-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
}

/* MOBILE */
@media (max-width: 768px) {
  .reviews-masonry {
    column-count: 1;
  }
}







.review-item.photo img {
  width: 100%;
  height: auto;        /* фиксируем правильную пропорцию */
  display: block;
  border-radius: 14px;
  object-fit: contain; /* избегаем увеличения картинки */
}


/* высокие */
.review-item.photo.tall img {
  height: 480px;
}

/* широкие (если потом появятся) */
.review-item.photo.wide img {
  height: 260px;
}


/* УЗКИЕ ВЫСОКИЕ ОТЗЫВЫ */
.review-item.tall-narrow {
  width: 100%;
  max-width: 360px;      /* ширина узкой плитки */
  margin: 0 auto 20px;   /* центрирование */
}

.review-item.tall-narrow img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  object-fit: cover;
}







/* УЗКИЕ ПЛАШКИ — ПОКАЗЫВАТЬ КАРТИНКУ ЦЕЛИКОМ, НЕ РАСТЯГИВАТЬ */
.review-item.photo.narrow img {
  width: 100%;
  height: auto;          /* !== tall */
  object-fit: contain;   /* показывает фото полностью */
  border-radius: 14px;
}

/* Чтобы узкая карточка сама была узкая */
.review-item.narrow {
  max-width: 360px;       /* или меньше/больше — регулируем! */
  margin: 0 auto 20px;   
}

.review-item.photo.tall img {
  height: auto !important;
}


