/* ==========================================================================
   Страница «Отзывы» (otzivi.php, /lang/otzivi/). Всё завешено на .otz-page.
   Единый стиль с остальными новыми страницами: синий #0059cd, тёмно-синий, жёлтый акцент.
   ========================================================================== */

.otz-page {
  --ink: #0b1b3a;
  --navy: #0e2150;
  --line: rgba(11, 27, 58, 0.12);
  --blue: #0059cd;
  --blue-deep: #0a3fa0;
  --tint: #eaf2ff;
  --muted: #5d6b86;
  --yellow: #ffcf1f;
  --star: #ffb400;
  color: var(--ink);
  overflow-x: clip;
}

.otz-page * {
  box-sizing: border-box;
}

.otz-page a {
  text-decoration: none;
}

.otz-page :where(h1, h2, h3, p, figure, blockquote) {
  margin: 0;
}

.otz-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.otz-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Кнопки ---------- */

.otz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border: 2px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.otz-btn--primary {
  background: var(--blue);
  color: #fff;
}

.otz-btn--primary:hover {
  background: var(--blue-deep);
  color: #fff;
}

.otz-btn--ghost {
  border-color: var(--ink);
  background: #fff;
  color: var(--ink);
}

.otz-btn--ghost:hover {
  background: var(--ink);
  color: #fff;
}

.otz-btn--yellow {
  background: var(--yellow);
  color: var(--ink);
}

.otz-btn--yellow:hover {
  background: #fff;
  color: var(--ink);
}

.otz-btn--light {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.otz-btn--light:hover {
  background: #fff;
  color: var(--navy);
}

/* ---------- Звёзды ---------- */

.otz-stars {
  display: inline-flex;
  gap: 3px;
}

.otz-stars svg {
  width: 20px;
  height: 20px;
  fill: var(--star);
}

.otz-stars svg.is-off {
  fill: #d7deeb;
}

/* ---------- Шапка страницы ---------- */

.otz-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 520px 320px at 100% 0%, rgba(76, 196, 255, 0.28), transparent 70%),
    radial-gradient(ellipse 420px 260px at 0% 100%, rgba(0, 89, 205, 0.1), transparent 70%),
    linear-gradient(120deg, #fff 0%, #eef4ff 100%);
}

.otz-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 48px;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 72px;
}

.otz-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.otz-crumbs a {
  color: var(--muted);
}

.otz-crumbs a:hover {
  color: var(--blue);
}

.otz-crumbs [aria-current] {
  color: var(--ink);
}

.otz-hero__title {
  max-width: 720px;
  color: var(--ink);
  font-size: clamp(34px, 4.6vw, 62px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.otz-hero__lead {
  max-width: 600px;
  margin-top: 22px !important;
  color: #34425b;
  font-size: 18px;
  line-height: 1.65;
}

.otz-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.otz-rating {
  padding: 30px 28px 24px;
  border: 1px solid rgba(0, 89, 205, 0.12);
  border-radius: 24px;
  background: #fff;
  text-align: center;
  box-shadow: 0 30px 50px -34px rgba(0, 53, 125, 0.55);
}

.otz-rating__score {
  color: var(--ink);
  font-size: 84px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.otz-rating .otz-stars {
  margin-top: 10px;
}

.otz-rating .otz-stars svg {
  width: 26px;
  height: 26px;
}

.otz-rating__src {
  margin-top: 12px !important;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.otz-rating__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.otz-rating__facts li {
  padding: 14px 8px;
  border-radius: 14px;
  background: var(--tint);
}

.otz-rating__facts b {
  display: block;
  color: var(--blue);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}

.otz-rating__facts span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.otz-rating__date {
  margin-top: 14px !important;
  color: #98a2b3;
  font-size: 12px;
}

/* ---------- Список ---------- */

.otz-list {
  margin-top: 72px;
}

.otz-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.otz-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.otz-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--tint);
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.otz-tab span {
  padding: 1px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 800;
}

.otz-tab:hover {
  background: #d7e6ff;
}

.otz-tab.is-active {
  background: var(--navy);
  color: #fff;
}

.otz-tab.is-active span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.otz-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 420px;
}

.otz-search svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  transform: translateY(-50%);
  pointer-events: none;
}

.otz-search input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 46px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: box-shadow 0.2s;
}

.otz-search input:focus {
  box-shadow: 0 0 0 2px var(--blue);
}

.otz-count {
  margin-bottom: 14px !important;
  color: var(--muted);
  font-size: 14px;
}

.otz-count[hidden],
.otz-empty[hidden],
.otz-loadmore[hidden],
.otz-more[hidden] {
  display: none;
}

/* масонри на колонках: карточки разной высоты ложатся без дыр */
.otz-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.otz-card {
  display: flex;
  flex-direction: column;
  padding: 24px 24px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  transition: box-shadow 0.3s, border-color 0.3s;
}

.otz-card:hover {
  border-color: rgba(0, 89, 205, 0.3);
  box-shadow: 0 24px 40px -28px rgba(0, 53, 125, 0.5);
}

.otz-card.is-hidden {
  display: none;
}

.otz-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.otz-card__who {
  min-width: 0;
}

.otz-card__name {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.otz-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
}

.otz-badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 800;
}

.otz-badge--ya {
  background: #ffe9e6;
  color: #c8321d;
}

.otz-card__stars {
  margin-top: 14px;
}

.otz-card__stars .otz-stars svg {
  width: 18px;
  height: 18px;
}

.otz-card__body {
  margin-top: 14px;
}

.otz-text p {
  margin: 0 0 10px;
  color: #34425b;
  font-size: 15.5px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.otz-text p:last-child {
  margin-bottom: 0;
}

/* стихи: строки отдельно, плотнее */
.otz-text--verse p {
  margin-bottom: 2px;
  font-style: italic;
}

/* аватары */

.otz-avatar {
  display: block;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

span.otz-avatar {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.otz-avatar--i0 { background: linear-gradient(135deg, #0059cd, #4cc4ff); }
.otz-avatar--i1 { background: linear-gradient(135deg, #0aa597, #5fe0c8); }
.otz-avatar--i2 { background: linear-gradient(135deg, #7a3cf0, #b58cff); }
.otz-avatar--i3 { background: linear-gradient(135deg, #e5484d, #ff9a8b); }
.otz-avatar--i4 { background: linear-gradient(135deg, #f08a00, #ffd166); }
.otz-avatar--i5 { background: linear-gradient(135deg, #0e2150, #3c5fa8); }

.otz-card__body {
  flex: 1 1 auto;
  padding-bottom: 14px;
}

.otz-more {
  align-self: flex-start;
  margin-top: 12px;
  padding: 6px 0;
  border: 0;
  border-bottom: 2px solid var(--blue);
  background: none;
  color: var(--blue);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
}

.otz-more:hover {
  color: var(--blue-deep);
  border-color: var(--blue-deep);
}

.otz-card__src {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  width: 100%;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: color 0.2s;
}

.otz-card__src:hover {
  color: var(--blue);
}

.otz-card__src svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Сворачиваем длинные отзывы только когда работает JS: без него текст виден целиком (и поисковикам, и людям) */
.js .otz-card[data-long="1"] .otz-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  overflow: hidden;
}

.otz-empty {
  padding: 40px 20px;
  border: 1px dashed rgba(0, 89, 205, 0.3);
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
  font-size: 16px;
  text-align: center;
}

.otz-loadmore {
  margin-top: 8px;
  text-align: center;
}

/* ---------- Призыв ---------- */

.otz-cta-wrap {
  margin-top: 56px;
  margin-bottom: 72px;
}

.otz-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 40px;
  align-items: center;
  justify-content: space-between;
  padding: 40px 44px;
  border-radius: 24px;
  background:
    radial-gradient(ellipse 360px 200px at 100% 0%, rgba(76, 196, 255, 0.4), transparent 70%),
    linear-gradient(120deg, var(--blue-deep), var(--blue));
  color: #fff;
}

.otz-cta__title {
  color: #fff;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.otz-cta__text {
  max-width: 520px;
  margin-top: 10px !important;
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
  line-height: 1.6;
}

.otz-cta__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
  .otz-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {

  .otz-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-bottom: 64px;
  }

  .otz-rating {
    max-width: 420px;
  }
}

@media (max-width: 700px) {
  .otz-wrap {
    padding: 0 18px;
  }

  .otz-grid {
    grid-template-columns: minmax(0, 1fr);
  }


  .otz-list {
    margin-top: 56px;
  }

  .otz-search {
    max-width: none;
  }

  .otz-hero__cta .otz-btn,
  .otz-cta__btns .otz-btn {
    width: 100%;
  }

  .otz-cta {
    padding: 30px 24px;
  }

  .otz-rating__score {
    font-size: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .otz-btn,
  .otz-tab,
  .otz-card,
  .otz-card__src {
    transition: none;
  }
}

/* ---------- Окно с полным отзывом ---------- */

html.otz-lock {
  overflow: hidden;
}

.otz-modal {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.otz-modal[hidden] {
  display: none;
}

.otz-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 21, 58, 0.62);
  backdrop-filter: blur(6px);
  animation: otz-fade 0.25s ease both;
}

.otz-modal__panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 36px 40px 32px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 40px 90px -30px rgba(0, 12, 40, 0.7);
  animation: otz-rise 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes otz-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes otz-rise {
  from { opacity: 0; transform: translateY(22px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.otz-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--tint);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.otz-modal__close:hover {
  background: var(--navy);
  color: #fff;
}

.otz-modal__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.otz-modal__body .otz-card__head {
  margin-right: 44px;
}

.otz-modal__body .otz-text p {
  font-size: 16.5px;
  line-height: 1.75;
}

.otz-modal__body .otz-card__src {
  margin-top: 22px;
}

@media (max-width: 700px) {
  .otz-modal {
    padding: 0;
    align-items: flex-end;
  }

  .otz-modal__panel {
    max-width: none;
    max-height: 92vh;
    padding: 30px 20px 24px;
    border-radius: 22px 22px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .otz-modal__backdrop,
  .otz-modal__panel {
    animation: none;
  }
}
