/* ============================================================
   СТРАНИЦА ОТЗЫВОВ (/otzyvy/) — локальные стили
   Современная: мягкие тени, glass, hover-эффекты
   ============================================================ */

/* ----- Hero (компактный) ----- */
.hero--compact {
  padding: 24px 16px 8px;
}
.hero--compact .hero-inner {
  min-height: auto;
  padding: 0;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(245,184,0,.18) 0%, transparent 55%),
    linear-gradient(135deg, #1a1d24 0%, #221c0a 100%);
  border: 1px solid var(--border);
}
.hero--compact .hero-text {
  max-width: 720px;
  padding: 40px 32px;
}
.hero--compact .hero-text h1 {
  font-size: 32px;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.hero--compact .hero-text p {
  font-size: 16px;
  color: #c9cdd3;
  margin-bottom: 20px;
  max-width: 560px;
}
.hero--compact .hero-btn {
  margin-top: 4px;
}
@media (min-width: 768px) {
  .hero--compact { padding: 32px 32px 8px; }
  .hero--compact .hero-text { padding: 48px 40px; }
  .hero--compact .hero-text h1 { font-size: 42px; }
  .hero--compact .hero-text p { font-size: 17px; }
}

/* ----- Якорь формы: отступ от sticky-шапки ----- */
@media (max-width: 767px) {
  #leaveReview { scroll-margin-top: 80px; }
}

/* ----- Сетка тайлов ----- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 8px;
}

/* ----- Тайл отзыва ----- */
.review-tile {
  position: relative;
  background: linear-gradient(180deg, var(--card) 0%, #171a21 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition:
    transform .35s cubic-bezier(.2,.8,.2,1),
    border-color .35s ease,
    box-shadow .35s ease;
  will-change: transform;
}
.review-tile::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(245,184,0,0) 0%, rgba(245,184,0,.55) 50%, rgba(245,184,0,0) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.review-tile:hover {
  transform: translateY(-6px);
  border-color: rgba(245,184,0,.35);
  box-shadow:
    0 24px 60px rgba(0,0,0,.55),
    0 0 0 1px rgba(245,184,0,.08) inset;
}
.review-tile:hover::before {
  opacity: 1;
}

.review-tile img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  background: var(--card-2);
  transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .35s ease;
}
.review-tile:hover img {
  transform: scale(1.06);
  filter: saturate(1.1);
}

.review-tile-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.review-tile-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.review-tile-head strong {
  font-size: 16px;
  color: var(--text);
  letter-spacing: -.01em;
}

/* ----- Бейдж источника (glass) ----- */
.review-source {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--muted);
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.review-source--yandex { background: rgba(252,63,29,.14); border-color: rgba(252,63,29,.35); color: #fc3f1d; }
.review-source--2gis   { background: rgba(31,185,84,.14); border-color: rgba(31,185,84,.35); color: #1fb954; }
.review-source--google { background: rgba(66,133,244,.14); border-color: rgba(66,133,244,.35); color: #4285f4; }
.review-source--other  { background: rgba(139,92,246,.14); border-color: rgba(139,92,246,.35); color: #8b5cf6; }

/* ----- Звёзды ----- */
.review-stars {
  color: var(--accent);
  letter-spacing: 2px;
  font-size: 15px;
  line-height: 1;
  text-shadow: 0 0 12px rgba(245,184,0,.35);
}

/* ----- Текст отзыва ----- */
.review-tile-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ----- Ссылка на оригинал ----- */
.review-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  margin-top: auto;
  padding-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .2s ease, color .2s ease;
}
.review-link:hover { gap: 10px; }
.review-link::after { content: "→"; transition: transform .2s ease; }

/* ----- Форма отзыва ----- */
#reviewForm::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 80% at 100% 0%, rgba(245,184,0,.08) 0%, transparent 60%);
  pointer-events: none;
}
#reviewForm .form-row {
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  #reviewForm .form-row { grid-template-columns: 1fr 1fr; }
}

/* Плавный фокус полей */
#reviewForm .field {
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
#reviewForm .field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ----- Плейсхолдер, если отзывов нет ----- */
#reviewsEmpty {
  text-align: center;
  padding: 32px 0;
  font-size: 15px;
  color: var(--muted);
}

/* ----- Анимация появления ----- */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.review-tile {
  animation: revealUp .5s cubic-bezier(.2,.8,.2,1) both;
}
.review-tile:nth-child(1) { animation-delay: .02s; }
.review-tile:nth-child(2) { animation-delay: .06s; }
.review-tile:nth-child(3) { animation-delay: .10s; }
.review-tile:nth-child(4) { animation-delay: .14s; }
.review-tile:nth-child(5) { animation-delay: .18s; }
.review-tile:nth-child(6) { animation-delay: .22s; }

/* ----- Мобильная адаптация ----- */
@media (max-width: 560px) {
  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .review-tile img { height: 200px; }
  .review-tile-body { padding: 16px; }
  .hero--compact .hero-text { padding: 28px 20px; }
  .hero--compact .hero-text h1 { font-size: 28px; }
  .hero--compact .hero-text p { font-size: 15px; }
}

/* ----- prefers-reduced-motion ----- */
@media (prefers-reduced-motion: reduce) {
  .review-tile,
  .review-tile img,
  .review-link,
  .hero--compact .hero-btn {
    transition: none;
    animation: none;
  }
  .review-tile:hover { transform: none; }
  .review-tile:hover img { transform: none; }
}