/* ============================================================
   REVIEWS — reviews/index.html. Matches Figma nodes 2361:1493
   "reviews-page" (desktop) and 2363:1490 "reviews-mobile" (mobile).
   Desktop values are fluid clamp(min, vw, max) derived from the
   1920px frame (vw% = px/19.2); the max-width:767px block re-states
   every value as a flat px pulled straight off the 390px mobile
   frame. Same architecture as certificates.css — see that file's
   header comment: the hero's own measured margin-top offset (not
   var(--header-h)) is kept deliberately, since Figma's spacing
   includes a gap beyond bare header clearance.
   ============================================================ */

/* NOT display:flex — flex-column made every direct child .wrap section a flex
   item, and .wrap's margin:0 auto triggers flexbox's auto-margin cross-axis
   sizing (shrink-to-fit by max-content instead of stretch), which blew each
   section out to its content's natural width and overflowed mobile viewports.
   Plain block flow stacks the sections identically since none of them ever
   used flex/gap/align-items from this rule. */
.rv-main { display: block; }

/* ── HERO ── */
.rv-hero.wrap {
  display: flex; gap: clamp(32px, 4.17vw, 80px); align-items: flex-start;
  margin-top: clamp(80px, 5.21vw, 100px) !important;
  padding-top: clamp(48px, 4.17vw, 80px) !important;
  padding-bottom: clamp(48px, 4.17vw, 80px) !important;
}
.rv-hero__left { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: clamp(24px, 2.08vw, 40px); }
.rv-hero__title { font-size: clamp(34px, 3.33vw, 64px); font-weight: 400; color: var(--c-text); letter-spacing: -0.04em; line-height: 1; margin: 0; font-style: normal; }

.rv-yandex-card { background: rgba(237,237,237,0.2); border: 1px solid rgba(48,54,46,0.1); border-radius: 20px; padding: clamp(20px, 1.67vw, 32px); display: flex; flex-direction: column; gap: clamp(12px, 1.04vw, 20px); }
.rv-yandex-card__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rv-yandex-card__rating { display: flex; flex-direction: column; gap: 8px; }
.rv-yandex-card__title { font-size: clamp(20px, 1.35vw, 26px); font-weight: 600; color: var(--c-text); letter-spacing: -0.04em; margin: 0; }
.rv-yandex-card__score { display: flex; align-items: center; gap: 10px; font-size: clamp(20px, 1.25vw, 24px); }
.rv-stars { color: #d4a017; font-weight: 600; }
.rv-yandex-card__score span:last-child { font-weight: 500; color: var(--c-text); letter-spacing: -0.04em; }
.rv-yandex-card__logo { width: clamp(48px, 3.33vw, 64px); height: clamp(48px, 3.33vw, 64px); border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.rv-yandex-card__sub { font-size: clamp(14px, 0.78vw, 15px); font-weight: 400; color: var(--c-muted); letter-spacing: -0.04em; margin: 0; }

.rv-subratings { display: flex; gap: clamp(16px, 1.25vw, 24px); }
.rv-subrating { flex: 1 1 0; min-width: 0; background: rgba(237,237,237,0.14); border: 1px solid rgba(48,54,46,0.08); border-radius: 16px; padding: clamp(16px, 1.25vw, 24px); display: flex; align-items: center; gap: clamp(10px, 0.83vw, 16px); text-decoration: none; transition: border-color 0.2s, background 0.2s; }
@media (hover: hover) and (pointer: fine) {
  .rv-subrating:hover { border-color: rgba(141,165,133,0.3); background: rgba(141,165,133,0.08); }
}
.rv-subrating__logo { width: clamp(32px, 2.22vw, 40px); height: clamp(32px, 2.22vw, 40px); border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.rv-subrating__text { display: flex; flex-direction: column; gap: clamp(4px, 0.3vw, 6px); min-width: 0; }
.rv-subrating__row { font-size: clamp(16px, 1.04vw, 20px); font-weight: 400; color: var(--c-text); letter-spacing: -0.04em; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.rv-subrating__row .rv-stars { font-size: 0.7em; }
.rv-subrating__label { font-size: clamp(14px, 0.78vw, 15px); font-weight: 400; color: rgba(48,54,46,0.4); letter-spacing: -0.04em; }

.rv-hero__right { flex: 1 1 0; min-width: 0; background: rgba(141,165,133,0.04); border-radius: 24px; padding: clamp(24px, 2.5vw, 48px); display: flex; flex-direction: column; gap: clamp(18px, 1.67vw, 32px); }
.rv-hero__right-title { font-size: clamp(28px, 2.5vw, 48px); font-weight: 400; color: var(--c-text); line-height: 1.2; margin: 0; font-style: normal; }
.rv-hero__right-lead { font-size: clamp(15px, 0.94vw, 18px); font-weight: 300; color: var(--c-muted); line-height: 1.6; margin: 0; }
.rv-steps { display: flex; flex-direction: column; gap: clamp(12px, 1.04vw, 20px); }
.rv-step { display: flex; align-items: center; gap: clamp(10px, 0.83vw, 16px); }
.rv-step__badge { flex-shrink: 0; width: clamp(28px, 1.875vw, 36px); height: clamp(28px, 1.875vw, 36px); border-radius: 50%; background: var(--c-accent); color: #fff; font-size: clamp(13px, 0.83vw, 16px); font-weight: 600; display: flex; align-items: center; justify-content: center; }
.rv-step p { flex: 1 1 0; min-width: 0; font-size: clamp(15px, 0.94vw, 18px); font-weight: 300; color: var(--c-text); line-height: 1.6; margin: 0; }
.rv-hero__divider { height: 1px; background: rgba(48,54,46,0.12); width: 100%; }
.rv-hero__complaint { font-size: clamp(14px, 0.78vw, 15px); font-weight: 400; color: var(--c-muted); letter-spacing: -0.04em; line-height: 1.4; margin: 0; }
.rv-hero__actions { display: flex; flex-wrap: wrap; gap: clamp(10px, 0.83vw, 16px); align-items: stretch; }

/* color:#fff needs !important: base.css's global a{color:inherit} would
   otherwise still win the cascade since .rv-btn is an <a> for three of
   its four uses on this page. */
.rv-btn { display: inline-flex; align-items: center; justify-content: center; gap: clamp(8px, 0.7vw, 23px); flex: 1 1 auto; min-width: max-content; background: var(--c-accent); color: #fff !important; text-decoration: none; border: none; border-radius: 12px; padding: clamp(14px, 0.94vw, 18px) clamp(16px, 1.6vw, 50px); font-family: var(--f); font-size: clamp(15px, 1.25vw, 24px); letter-spacing: -0.04em; cursor: pointer; transition: background 0.2s, transform 0.16s ease-out; }
.rv-btn svg { width: clamp(22px, 1.93vw, 37px); height: clamp(22px, 1.93vw, 37px); flex-shrink: 0; }
@media (hover: hover) and (pointer: fine) {
  .rv-btn:hover { background: #6A7C64; }
}
.rv-btn:active { transform: scale(0.97); }
.rv-btn--secondary svg { display: none; }

/* ── REVIEWS GRID ── */
.rv-grid-sec.wrap { padding-top: clamp(48px, 4.17vw, 80px) !important; padding-bottom: clamp(56px, 5.2vw, 100px) !important; display: flex; flex-direction: column; gap: clamp(28px, 2.5vw, 48px); }
.rv-grid-sec__heading { font-size: clamp(28px, 2.5vw, 48px); font-weight: 400; color: var(--c-text); line-height: 1.2; margin: 0; font-style: normal; }
.rv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 1.25vw, 24px); }
.rv-card { display: flex; flex-direction: column; gap: clamp(10px, 0.83vw, 16px); background: #fff; border: 1px solid rgba(48,54,46,0.1); border-radius: 16px; padding: clamp(20px, 1.67vw, 32px); text-decoration: none; min-height: clamp(260px, 16.5vw, 317px); transition: border-color 0.25s, box-shadow 0.25s, transform 0.3s cubic-bezier(0.22,1,0.36,1); }
@media (hover: hover) and (pointer: fine) {
  .rv-card:hover { border-color: rgba(141,165,133,0.3); box-shadow: 0 16px 40px rgba(48,54,46,0.08); transform: translateY(-4px); }
}
.rv-card__stars { color: #d4a017; font-weight: 600; font-size: clamp(17px, 1.04vw, 20px); margin: 0; }
.rv-card__text { flex: 1 1 0; font-size: clamp(15px, 0.94vw, 18px); font-weight: 300; color: var(--c-muted); line-height: 1.6; margin: 0; }
.rv-card__author { display: flex; flex-direction: column; gap: 4px; }
.rv-card__name { font-size: clamp(18px, 1.15vw, 22px); font-weight: 600; color: var(--c-text); letter-spacing: -0.04em; margin: 0; }
.rv-card__service { font-size: clamp(14px, 0.78vw, 15px); font-weight: 400; color: rgba(48,54,46,0.5); letter-spacing: -0.04em; margin: 0; }
.rv-card__date { font-size: clamp(14px, 0.78vw, 15px); font-weight: 400; color: rgba(48,54,46,0.3); letter-spacing: -0.04em; margin: 0; }

.rv-mobile-list, .rv-card--full { display: none; }

/* ── FEEDBACK ── */
.rv-feedback.wrap {
  display: flex; gap: clamp(32px, 4.17vw, 80px);
  background: rgba(237,237,237,0.2);
  border-top: 1px solid rgba(48,54,46,0.06); border-bottom: 1px solid rgba(48,54,46,0.06);
  padding-top: clamp(56px, 5.2vw, 100px) !important; padding-bottom: clamp(56px, 5.2vw, 100px) !important;
  max-width: none; margin-top: 0 !important;
}
.rv-feedback__left { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: clamp(24px, 2.08vw, 40px); }
.rv-feedback__intro { display: flex; flex-direction: column; gap: clamp(12px, 1.04vw, 20px); }
.rv-feedback__heading { font-size: clamp(28px, 2.5vw, 48px); font-weight: 400; color: var(--c-text); line-height: 1.2; margin: 0; font-style: normal; }
.rv-feedback__lead { font-size: clamp(15px, 0.94vw, 18px); font-weight: 300; color: var(--c-muted); line-height: 1.6; margin: 0; }
.rv-founder { display: flex; align-items: center; gap: clamp(12px, 1.04vw, 20px); }
.rv-founder__avatar { width: clamp(56px, 4.17vw, 80px); height: clamp(56px, 4.17vw, 80px); border-radius: 50%; object-fit: cover; object-position: center 20%; flex-shrink: 0; }
.rv-founder__name { font-size: clamp(18px, 1.15vw, 22px); font-weight: 600; color: var(--c-text); letter-spacing: -0.04em; margin: 0; }
.rv-founder__role { font-size: clamp(14px, 0.78vw, 15px); font-weight: 400; color: rgba(48,54,46,0.5); letter-spacing: -0.04em; margin: 4px 0 0; }

.rv-form { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: clamp(18px, 1.67vw, 32px); }
.rv-field { display: flex; flex-direction: column; gap: 8px; }
.rv-field label { font-size: clamp(14px, 0.83vw, 16px); font-weight: 500; color: var(--c-text); letter-spacing: -0.04em; }
.rv-field input { border: none; border-bottom: 1px solid rgba(48,54,46,0.2); background: transparent; padding: clamp(12px, 0.83vw, 16px) 0; font-family: var(--f); font-size: clamp(16px, 1.04vw, 18px); font-weight: 300; color: var(--c-text); letter-spacing: -0.02em; outline: none; transition: border-color 0.2s; }
.rv-field input::placeholder { color: rgba(48,54,46,0.3); }
.rv-field input:focus { border-bottom-color: var(--c-accent); }
.rv-btn--submit { align-self: flex-start; flex: none; }

/* ── CTA ── */
.rv-cta.wrap { display: flex; flex-direction: column; align-items: center; gap: clamp(24px, 2.08vw, 40px); text-align: center; padding-top: clamp(72px, 6.25vw, 120px) !important; padding-bottom: clamp(72px, 6.25vw, 120px) !important; margin-top: 0 !important; }
.rv-cta__heading { font-size: clamp(28px, 2.5vw, 48px); font-weight: 400; color: var(--c-text); line-height: 1.2; margin: 0; font-style: normal; }
.rv-cta__actions { display: flex; align-items: center; gap: clamp(18px, 1.67vw, 32px); flex-wrap: wrap; justify-content: center; }
.rv-cta .rv-btn { flex: none; }
.rv-cta__phone { font-size: clamp(18px, 1.25vw, 24px); font-weight: 500; color: var(--c-text); text-decoration: none; letter-spacing: -0.04em; transition: opacity 0.2s; }
.rv-cta__phone:hover { opacity: 0.75; }

/* ── CONTACT + MAP ── */
.rv-contact-map.wrap { display: flex; flex-direction: column; gap: clamp(14px, 1.25vw, 24px); padding-top: 0 !important; padding-bottom: clamp(56px, 5.2vw, 100px) !important; margin-top: 0 !important; }
.rv-contact-map .contacts-bar { display: flex; gap: clamp(22px, 1.98vw, 38px); align-items: center; padding-bottom: clamp(14px, 1.25vw, 24px); border-bottom: none; flex-wrap: wrap; }
.rv-contact-map .contacts-bar p, .rv-contact-map .contacts-bar a { margin: 0; font-size: clamp(15px, 0.94vw, 18px); font-weight: 400; color: var(--c-text); text-decoration: none; letter-spacing: -0.02em; }
.rv-contact-map .contacts-bar a:hover { opacity: 0.7; }
.rv-map { display: block; height: clamp(280px, 28.2vw, 541px); border-radius: 16px; overflow: hidden; position: relative; }
.rv-map iframe { width: 100%; height: 100%; border: none; display: block; }

/* ── MOBILE (≤767px) — Figma node 2363:1490, exact 390px frame values ── */
@media (max-width: 767px) {
  /* flat 20px gutter, matching every other mobile-adapted page on the
     site — the desktop --gutter clamp still resolves to ~36.5px at
     390px width, which is a different (wider) inset than what the
     Figma mobile frame actually uses. */
  .rv-hero.wrap, .rv-grid-sec.wrap, .rv-feedback.wrap, .rv-cta.wrap, .rv-contact-map.wrap {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .rv-hero.wrap { flex-direction: column; gap: 0; margin-top: 80px !important; padding-top: 32px !important; padding-bottom: 0 !important; }
  .rv-hero__left { gap: 24px; }
  .rv-hero__title { font-size: 28px; letter-spacing: -0.04em; }
  .rv-yandex-card { border-radius: 20px; padding: 24px; gap: 16px; }
  .rv-yandex-card__title { font-size: 22px; }
  .rv-yandex-card__score { font-size: 20px; gap: 8px; }
  .rv-yandex-card__score span:last-child { font-size: 24px; }
  .rv-yandex-card__logo { width: 56px; height: 56px; }
  .rv-subratings { gap: 12px; }
  .rv-subrating { border-radius: 16px; padding: 16px; gap: 8px; }
  .rv-subrating__logo { width: 28px; height: 28px; }
  .rv-subrating__text { gap: 4px; }
  .rv-subrating__row { font-size: 16px; }
  .rv-subrating__label { font-size: 12px; }

  .rv-hero__right { background: rgba(141,165,133,0.04); border-radius: 24px; padding: 24px; gap: 24px; margin-top: 24px; }
  .rv-hero__right-title { font-size: 28px; letter-spacing: -0.04em; }
  .rv-hero__right-lead { font-size: 15px; letter-spacing: -0.04em; }
  .rv-steps { gap: 16px; }
  .rv-step { gap: 16px; }
  .rv-step__badge { width: 32px; height: 32px; font-size: 15px; }
  .rv-step p { font-size: 15px; letter-spacing: -0.04em; line-height: 1.4; }
  .rv-hero__complaint { font-size: 15px; }
  .rv-hero__actions { flex-direction: column; }
  .rv-btn { padding: 14px 24px; font-size: 15px; letter-spacing: 0.5px; border-radius: 8px; gap: 8px; }
  .rv-btn svg { width: 20px; height: 20px; }
  .rv-hero__actions .rv-btn--secondary { display: none; }

  .rv-grid-sec.wrap { padding-top: 48px !important; padding-bottom: 32px !important; gap: 28px; }
  .rv-grid-sec__heading { font-size: 28px; }
  .rv-grid { display: none; }
  .rv-mobile-list { display: flex; flex-direction: column; gap: 16px; }
  .rv-card--full { display: flex; border-radius: 16px; border: 1px solid rgba(48,54,46,0.08); box-shadow: 0 4px 8px rgba(51,36,29,0.02); padding: 20px; gap: 16px; min-height: 0; }
  .rv-card--full .rv-card__stars { font-size: 18px; font-weight: 300; letter-spacing: 4px; }
  .rv-card--full .rv-card__text { font-size: 15px; font-weight: 400; letter-spacing: -0.04em; line-height: 1.4; }
  .rv-card--full .rv-card__name { font-size: 22px; }
  .rv-card--full .rv-card__service { font-weight: 500; letter-spacing: 0.5px; }
  .rv-card--full .rv-card__date { font-size: 12px; }

  .rv-row-list { display: flex; flex-direction: column; gap: 12px; max-height: 123px; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1); }
  .rv-row-list.is-expanded { max-height: 2000px; }
  .rv-row { display: block; background: #fff; border: 1px solid rgba(48,54,46,0.08); border-radius: 16px; padding: 16px; text-decoration: none; }
  .rv-row__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .rv-row__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .rv-row__left .rv-card__stars { font-size: 18px; font-weight: 300; letter-spacing: 4px; }
  .rv-row__name { font-size: 22px; font-weight: 600; color: var(--c-text); letter-spacing: -0.04em; }
  .rv-row__chevron { flex-shrink: 0; color: var(--c-text); transition: transform 0.25s; }
  .rv-row.is-expanded .rv-row__chevron { transform: rotate(180deg); }
  .rv-row__text { margin: 10px 0 0; font-size: 15px; color: var(--c-muted); letter-spacing: -0.04em; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rv-row.is-expanded .rv-row__text { white-space: normal; overflow: visible; text-overflow: clip; }
  .rv-row__bottom { display: flex; justify-content: space-between; margin-top: 10px; font-size: 15px; }
  .rv-row__bottom span:first-child { font-weight: 500; color: rgba(48,54,46,0.5); letter-spacing: 0.5px; }
  .rv-row__bottom span:last-child { color: rgba(48,54,46,0.3); letter-spacing: -0.04em; }

  .rv-show-all { all: unset; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding-top: 16px; cursor: pointer; color: var(--c-accent); font-size: 15px; font-weight: 500; letter-spacing: 0.5px; font-family: var(--f); }
  .rv-show-all svg { transition: transform 0.25s; }
  .rv-show-all.is-expanded svg { transform: rotate(180deg); }

  .rv-feedback.wrap { flex-direction: column; padding: 48px 20px !important; gap: 36px; }
  .rv-feedback__left { gap: 0; text-align: center; align-items: center; }
  .rv-feedback__intro { gap: 20px; align-items: center; }
  .rv-feedback__heading { font-size: 28px; letter-spacing: -0.04em; }
  .rv-feedback__lead { font-size: 15px; letter-spacing: -0.04em; }
  .rv-founder { margin-top: 24px; align-self: flex-start; }
  .rv-founder__avatar { width: 64px; height: 64px; }
  .rv-form { gap: 24px; }
  .rv-btn--submit { width: 100%; padding: 14px 24px; font-size: 15px; border-radius: 8px; }
  .rv-btn--submit svg { display: none; }

  .rv-cta.wrap { padding: 48px 20px !important; gap: 24px; }
  .rv-cta__heading { font-size: 28px; letter-spacing: -0.04em; }
  .rv-cta__actions { flex-direction: column; width: 100%; gap: 16px; }
  .rv-cta .rv-btn { width: 100%; padding: 14px 32px; font-size: 15px; border-radius: 8px; }
  .rv-cta .rv-btn svg { display: none; }
  .rv-cta__phone { font-size: 24px; }

  .rv-contact-map.wrap { padding-top: 16px !important; padding-bottom: 48px !important; gap: 20px; }
  .rv-contact-map .contacts-bar { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 0; border-top: 1px solid rgba(51,36,29,0.1); border-bottom: 1px solid rgba(51,36,29,0.1); }
  .rv-contact-map .contacts-bar p, .rv-contact-map .contacts-bar a { font-size: 14px; }
  .rv-map { height: 220px; border-radius: 12px; }

  footer.site-footer { display: none !important; }
}
@media (min-width: 768px) {
  .rv-row-list { max-height: none !important; }
  .rv-show-all { display: none !important; }
}
