/* ================= REVIEWS SECTION ================= */
.reviews {
  padding: clamp(48px, 8vw, 96px) 0;
}

.reviews-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.reviews-head-text {
  max-width: 720px;
}

.reviews-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(116, 212, 20, .08);
  border: 1px solid rgba(116, 212, 20, .25);
  color: #74D414;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.reviews-count .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #74D414;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* Carousel viewport */
.reviews-carousel {
  position: relative;
  margin-inline: -16px;
}

.reviews-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 16px 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.reviews-track::-webkit-scrollbar { display: none; }

.review-card {
  flex: 0 0 auto;
  width: 260px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  text-decoration: none;
  color: #0B0F0C;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
  position: relative;
}

.review-card:hover,
.review-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  border-color: rgba(116, 212, 20, .5);
  outline: none;
}

.review-card::after {
  content: 'Смотреть скан →';
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  color: #74D414;
  opacity: 0;
  transition: opacity .25s ease;
  white-space: nowrap;
}

.review-card:hover::after,
.review-card:focus-visible::after {
  opacity: 1;
}

.review-logo {
  height: 92px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.review-logo img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.review-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: #0B0F0C;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px 18px;
}

/* Arrows */
.reviews-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.reviews-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .04);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.reviews-arrow:hover:not(:disabled) {
  background: rgba(116, 212, 20, .1);
  border-color: rgba(116, 212, 20, .5);
  color: #74D414;
}

.reviews-arrow:active:not(:disabled) {
  transform: scale(.95);
}

.reviews-arrow:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.reviews-foot {
  margin-top: 20px;
  color: rgba(255, 255, 255, .55);
  font-size: 14px;
}

.reviews-foot a {
  color: #74D414;
  text-decoration: none;
  border-bottom: 1px dashed rgba(116, 212, 20, .4);
}

.reviews-foot a:hover { border-bottom-style: solid; }

/* ================= MODAL ================= */
.review-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(11, 15, 12, .88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  opacity: 0;
  transition: opacity .2s ease;
}

.review-modal.open {
  display: flex;
  opacity: 1;
}

.review-modal-dialog {
  position: relative;
  max-width: min(900px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.review-modal-img {
  display: block;
  flex: 0 0 auto;
  align-self: center;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  background: #fff;
  cursor: zoom-in;
}

@supports (height: 100dvh) {
  .review-modal-img { max-height: calc(100dvh - 150px); }
}

/* Клик по скану — просмотр в оригинальном масштабе со скроллом */
.review-modal-img.is-zoomed {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.review-modal-caption {
  flex: 0 0 auto;
  max-width: 100%;
  color: rgba(255, 255, 255, .9);
  font-size: 15px;
  text-align: center;
  padding: 0 8px;
}

.review-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}

.review-modal-close:hover {
  background: rgba(255, 255, 255, .22);
}

/* Responsive */
@media (max-width: 640px) {
  .review-card {
    width: 220px;
    padding: 20px 16px;
  }
  .review-logo { height: 76px; }
  .review-name { font-size: 12px; min-height: 48px; }
  .reviews-arrow { width: 40px; height: 40px; }
  .review-modal-close {
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, .6);
  }

  .review-modal { padding: 16px 12px; }
  .review-modal-img { max-height: calc(100vh - 120px); }

  @supports (height: 100dvh) {
    .review-modal-img { max-height: calc(100dvh - 120px); }
  }

  .review-modal-caption { font-size: 13px; line-height: 1.4; }
}
