/* ============================================
   REVIEWS — доверие и реальные отзывы
   ============================================ */

.reviews-section {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 0 calc(var(--header-height) + var(--space-2xl));
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(231, 240, 237, 0.96) 0%, #fbfbf7 34%, #ffffff 100%);
}

.reviews-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.reviews-city-bg {
  position: absolute;
  inset: 0 0 auto;
  height: 260px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(9, 34, 36, 0.26) 0%, rgba(242, 247, 244, 0.84) 72%, rgba(251, 251, 247, 1) 100%),
    url("../images/hero/nalchik-location.webp") center 42% / cover;
  opacity: 0.72;
  filter: saturate(0.88);
}

.reviews-city-bg::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 74px;
  width: min(340px, 86vw);
  height: 92px;
  transform: translateX(-50%);
  border-radius: 18px 18px 12px 12px;
  background:
    linear-gradient(90deg, transparent 0 9%, rgba(255,255,255,0.5) 9% 10%, transparent 10% 19%, rgba(255,255,255,0.42) 19% 20%, transparent 20% 29%, rgba(255,255,255,0.5) 29% 30%, transparent 30% 39%, rgba(255,255,255,0.42) 39% 40%, transparent 40% 49%, rgba(255,255,255,0.5) 49% 50%, transparent 50% 59%, rgba(255,255,255,0.42) 59% 60%, transparent 60% 69%, rgba(255,255,255,0.5) 69% 70%, transparent 70% 79%, rgba(255,255,255,0.42) 79% 80%, transparent 80% 89%, rgba(255,255,255,0.5) 89% 90%, transparent 90%),
    linear-gradient(180deg, rgba(255,255,255,0.88), rgba(218, 232, 229, 0.5));
  box-shadow: 0 26px 70px rgba(13, 60, 64, 0.24);
  opacity: 0.58;
}

.reviews-container {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.reviews-header {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.reviews-back,
.reviews-catalog-link {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #143f43;
  box-shadow: 0 14px 30px rgba(12, 56, 59, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.reviews-back svg {
  width: 21px;
  height: 21px;
}

.reviews-catalog-link {
  padding: 0 14px;
  font-size: 12px;
  font-weight: 900;
}

.reviews-header span,
.reviews-section-title span {
  color: rgba(18, 49, 51, 0.58);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reviews-header h2 {
  margin: 4px 0 0;
  color: #101414;
  font-size: 24px;
  line-height: 0.98;
  font-weight: 950;
}

.reviews-score-card {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.93), rgba(235, 245, 243, 0.82)),
    linear-gradient(135deg, rgba(17, 121, 129, 0.12), rgba(215, 177, 123, 0.12));
  border: 1px solid rgba(16, 82, 87, 0.08);
  box-shadow: 0 22px 48px rgba(16, 68, 72, 0.16);
  overflow: hidden;
  position: relative;
}

.reviews-score-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 20%, rgba(255,255,255,0.56) 42%, transparent 58% 100%);
  transform: translateX(-115%);
  animation: reviewSweep 7s ease-in-out infinite;
}

.reviews-score-main {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
}

.reviews-score-main strong {
  color: #0d565c;
  font-size: 52px;
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: 0;
}

.reviews-stars,
.review-stars,
.review-feature-stars {
  color: #ff8b2a;
  letter-spacing: 0.04em;
  text-shadow: 0 5px 16px rgba(255, 139, 42, 0.22);
}

.reviews-stars {
  display: block;
  font-size: 18px;
  line-height: 1;
  margin-bottom: 6px;
}

.reviews-score-main p {
  margin: 0;
  color: rgba(14, 33, 35, 0.68);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 800;
}

.reviews-score-meta {
  position: relative;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 16px;
  padding-bottom: 1px;
  scrollbar-width: none;
}

.reviews-score-meta::-webkit-scrollbar {
  display: none;
}

.reviews-score-meta span,
.review-tags span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(14, 33, 35, 0.7);
  border: 1px solid rgba(16, 82, 87, 0.07);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.reviews-featured {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  margin: 0 -16px 22px;
  padding: 2px 16px 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

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

.review-feature-card {
  flex: 0 0 min(328px, 84vw);
  scroll-snap-align: start;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(8, 36, 39, 0.94);
  color: #fff;
  box-shadow: 0 25px 55px rgba(8, 42, 45, 0.26);
  transform-style: preserve-3d;
  animation: reviewCardIn 0.48s ease both, reviewFloat 5.6s ease-in-out infinite;
  animation-delay: var(--review-delay), calc(var(--review-delay) + 0.8s);
}

.review-feature-top {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
}

.review-avatar {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f7d86, #d7b17b);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 12px 24px rgba(8, 42, 45, 0.16);
}

.review-feature-top strong,
.review-card-head strong {
  display: block;
  color: inherit;
  font-size: 14px;
  line-height: 1.05;
  font-weight: 950;
}

.review-feature-top span:not(.review-feature-stars),
.review-card-head span:not(.review-stars) {
  display: block;
  margin-top: 3px;
  color: rgba(255,255,255,0.62);
  font-size: 10px;
  line-height: 1.1;
  font-weight: 800;
}

.review-feature-stars {
  font-size: 13px;
  white-space: nowrap;
}

.review-feature-card img {
  width: 100%;
  aspect-ratio: 3.35 / 1;
  display: block;
  object-fit: cover;
}

.review-feature-body {
  padding: 12px 14px 16px;
}

.review-tags {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-bottom: 10px;
  scrollbar-width: none;
}

.review-tags::-webkit-scrollbar {
  display: none;
}

.review-feature-body .review-tags span {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.86);
  border-color: rgba(255,255,255,0.09);
}

.review-feature-body p {
  margin: 0;
  color: rgba(255,255,255,0.86);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.reviews-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.reviews-section-title h3 {
  margin: 0;
  color: #101414;
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
}

.reviews-list {
  display: grid;
  gap: 14px;
}

.review-card {
  padding: 14px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(16, 82, 87, 0.08);
  box-shadow: 0 18px 40px rgba(16, 68, 72, 0.12);
  animation: reviewCardIn 0.42s ease both;
  animation-delay: var(--review-delay);
}

.review-card-head {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.review-person strong {
  color: #182021;
}

.review-person span {
  color: rgba(20, 35, 37, 0.46) !important;
}

.review-stars {
  font-size: 14px;
  white-space: nowrap;
}

.review-media {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #e6ecea;
}

.review-media img {
  width: 100%;
  aspect-ratio: 3.42 / 1;
  display: block;
  object-fit: cover;
}

.review-video-pill {
  position: absolute;
  left: 10px;
  bottom: 9px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(6, 29, 31, 0.66);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.review-card .review-tags {
  margin: 11px 0 9px;
}

.review-card p {
  margin: 8px 0 0;
  color: #252b2c;
  font-size: 13px;
  line-height: 1.38;
  font-weight: 650;
}

.review-card p b {
  color: rgba(21, 31, 33, 0.48);
  font-weight: 950;
}

.location-card .home-review-pill {
  position: absolute;
  left: 14px;
  top: 14px;
  right: auto;
  bottom: auto;
  z-index: 3;
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.location-card .home-review-pill span {
  color: #f7d16c;
}

.location-card-building {
  position: absolute;
  left: 50%;
  top: 23px;
  z-index: 1;
  width: min(250px, 72%);
  height: 64px;
  transform: translateX(-50%);
  border-radius: 14px 14px 8px 8px;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255,255,255,0.54) 8% 10%, transparent 10% 18%, rgba(255,255,255,0.44) 18% 20%, transparent 20% 28%, rgba(255,255,255,0.54) 28% 30%, transparent 30% 38%, rgba(255,255,255,0.44) 38% 40%, transparent 40% 48%, rgba(255,255,255,0.54) 48% 50%, transparent 50% 58%, rgba(255,255,255,0.44) 58% 60%, transparent 60% 68%, rgba(255,255,255,0.54) 68% 70%, transparent 70% 78%, rgba(255,255,255,0.44) 78% 80%, transparent 80% 88%, rgba(255,255,255,0.54) 88% 90%, transparent 90%),
    linear-gradient(180deg, rgba(255,255,255,0.78), rgba(206, 224, 219, 0.34));
  box-shadow: 0 18px 42px rgba(0,0,0,0.24);
  opacity: 0.68;
}

.catalog-review-teaser {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin: -2px 0 16px;
  padding: 13px 14px;
  border-radius: 22px;
  background: linear-gradient(135deg, #0f4f55, #092e33);
  color: #fff;
  box-shadow: 0 18px 38px rgba(11, 59, 64, 0.2);
}

.catalog-review-teaser::after {
  content: '★★★★★';
  position: absolute;
  right: 12px;
  top: -8px;
  color: rgba(255, 139, 42, 0.2);
  font-size: 45px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.catalog-review-teaser strong,
.catalog-review-teaser span {
  display: block;
  position: relative;
  z-index: 1;
}

.catalog-review-teaser strong {
  font-size: 14px;
  line-height: 1.1;
  font-weight: 950;
}

.catalog-review-teaser span {
  margin-top: 4px;
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  font-weight: 800;
}

.catalog-review-teaser button {
  position: relative;
  z-index: 1;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

@keyframes reviewCardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes reviewFloat {
  0%, 100% { transform: translateY(0) rotateX(0deg); }
  50% { transform: translateY(-5px) rotateX(1.4deg); }
}

@keyframes reviewSweep {
  0%, 52% { transform: translateX(-115%); }
  68%, 100% { transform: translateX(115%); }
}

@media (max-width: 380px) {
  .review-stars,
  .review-feature-stars {
    font-size: 12px;
  }

  .reviews-header h2 {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .review-feature-card,
  .review-card,
  .reviews-score-card::before {
    animation: none;
  }
}
