/* ============================================================
   ЦКИ Недвижимость — оформление
   Палитра снята с centrki.ru: графитовый фон + шампанское золото.
   Все цвета собраны в одном месте ниже — меняйте здесь.
   ============================================================ */

:root {
  --bg:          #0E0E0F;
  --bg-alt:      #121214;
  /* Единый тёплый графит для всех информационных карточек. Он светлее
     фона страницы и не выглядит как ещё один чёрный прямоугольник. */
  --card:        #201F1D;
  --card-hi:     #292622;
  --line:        rgba(239, 206, 140, .14);
  --line-soft:   rgba(255, 255, 255, .07);

  --gold:        #EFCE8C;
  --gold-bright: #F6DCA9;
  --gold-deep:   #66490F;

  --text:        #FFFFFF;
  --muted:       #A0A0A6;
  /* Самый тихий текст всё равно должен читаться на карточках.
     #8C8C92 даёт контраст 4.5:1 даже на --card-hi. */
  --muted-dim:   #8C8C92;

  --ok:          #62C584;
  --err:         #F95D51;

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 20px;

  --wrap: 1240px;
  --head: 88px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

/* Атрибут hidden должен побеждать любой display из наших правил */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head) + 16px);
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

/* Порядок секций главной приходит из редакционной админки. */
main.editable-home { display: flex; flex-direction: column; }
main.editable-home > [hidden] { display: none !important; }
main.editable-home > [data-home-section="hero"] { order: 0; }
main.editable-home > [data-home-section="catalog"] { order: 5; }
main.editable-home > [data-home-section="mortgage"] { order: 10; }
main.editable-home > [data-home-section="construction"] { order: 20; }
main.editable-home > [data-home-section="secured"] { order: 30; }
main.editable-home > [data-home-section="insurance"] { order: 40; }
main.editable-home > [data-home-section="accreditation"] { order: 50; }
main.editable-home > [data-home-section="about"] { order: 60; }
main.editable-home > [data-home-section="journey"] { order: 70; }
main.editable-home > [data-home-section="cases"] { order: 80; }
main.editable-home > [data-home-section="reviews"] { order: 90; }
main.editable-home > [data-home-section="lead"] { order: 100; }
main.editable-home > [data-home-section="contacts"] { order: 110; }
.home-custom__inner { max-width: 900px; }
.home-custom__inner .section__lead { white-space: normal; margin-bottom: 24px; }

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- типографика ---------- */

.eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .85;
}

.section__title {
  margin: 0;
  font-size: clamp(42px, 5.6vw, 72px);
  line-height: 1.08;
  font-weight: 300;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.section__lead {
  margin: 18px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 18px;
}

.section__subtitle {
  margin: 14px 0 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.15;
  font-weight: 300;
  color: var(--gold);
  text-transform: uppercase;
}

.section__title--sub { font-size: clamp(30px, 3.8vw, 46px); }

.fineprint { margin: 12px 0 0; font-size: 13px; color: var(--muted-dim); text-align: center; }

/* ---------- переход в переписку ----------
   Разметку этих блоков подставляет app.js в контейнеры
   с атрибутом data-chat. Оформление — здесь.                */

.chat__note {
  margin: 0 0 10px;
  font-size: 13.5px; line-height: 1.5; color: var(--muted-dim);
}
.chat__links { display: flex; flex-wrap: wrap; gap: 10px; }
/* обещание скорости ответа под кнопками мессенджеров */
.chat__speed { margin: 10px 0 0; font-size: 12.5px; color: var(--gold); opacity: .8; }

.chat__pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 17px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; color: var(--gold); white-space: nowrap;
  transition: border-color .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.chat__pill svg { width: 15px; height: 15px; flex: none; }
.chat__pill:hover {
  border-color: var(--gold);
  background: rgba(239, 206, 140, .07);
  color: var(--gold-bright);
}

/* первый экран: отделяем от формы быстрого поиска */
.hero__chat { margin-top: 22px; }

/* блок «Заявка»: отбиваем от кнопок сверху тонкой линией */
.cta__form .chat { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.cta__form .chat__links { justify-content: center; }
.cta__form .chat__note, .cta__form .chat__speed { text-align: center; }

/* окно заявки: то же самое под формой */
.modal__chat { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.modal__chat .chat__links { justify-content: center; }
.modal__chat .chat__note, .modal__chat .chat__speed { text-align: center; }

/* страницы кейсов */
.case__cta .chat { margin-top: 20px; }
.case__cta .chat__links { justify-content: center; }
.case__cta .chat__note, .case__cta .chat__speed { text-align: center; }
.opt { color: var(--muted-dim); font-weight: 400; }

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

.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease),
              border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #1A1408;
  font-weight: 600;
}
.btn--gold:hover { box-shadow: 0 8px 30px rgba(239, 206, 140, .22); }

.btn--ghost {
  border-color: var(--line);
  color: var(--gold);
}
.btn--ghost:hover { border-color: var(--gold); background: rgba(239, 206, 140, .07); }

.btn--sm  { padding: 10px 18px; font-size: 14px; }
.btn--lg  { padding: 17px 32px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }

.link-btn {
  border: 0; background: none; padding: 0;
  color: var(--gold); font-size: 14px; cursor: pointer;
  border-bottom: 1px dashed rgba(239, 206, 140, .4);
}
.link-btn:hover { color: var(--gold-bright); }

/* ============================================================
   ШАПКА
   ============================================================ */

.header {
  position: sticky; top: 0; z-index: 60;
  /* iOS Safari: пока панель браузера сворачивается, над шапкой
     появляется щель и в ней рвано просвечивает контент.
     Продлеваем фон шапки вверх — щель всегда закрыта. */
  background: rgba(14, 14, 15, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.header::before {
  content: ''; position: absolute;
  left: 0; right: 0; bottom: 100%; height: 160px;
  background: #0E0E0F;
}
.header.is-stuck { border-bottom-color: var(--line-soft); background: rgba(14, 14, 15, .95); }

/* Шапка остаётся целиком видимой при прокрутке. Раньше она уезжала
   вверх и в переходном кадре логотип с меню выглядели срезанными. */
/* Панель меню лежит внутри шапки, и с ней две беды сразу:

   1. Размытие фона (backdrop-filter) делает шапку точкой отсчёта для
      всего, что внутри неё позиционировано fixed. Из-за этого панель
      получала высоту шапки — 76px вместо всего экрана, и вместо меню
      была видна одна полоска с логотипом.
   2. У шапки свой слой (z-index: 60), поэтому затемнение со слоем 80,
      висящее на body, накрывало панель сверху.

   Пока меню открыто: снимаем размытие (панель снова считает от окна)
   и поднимаем шапку над затемнением. */
.header.menu-open {
  z-index: 100;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: #0E0E0F;          /* без размытия нужен плотный фон */
}

.header__inner {
  height: var(--head);
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Шапка шире контентных блоков: длинная фирменная подпись и пункты
   меню получают достаточно воздуха на больших экранах. */
.header .wrap { max-width: 1560px; }

.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--gold); flex: none; }
/* знак широкий (примерно 4:1), поэтому задаём высоту, ширину считает браузер */
.logo__mark { width: auto; height: 26px; flex: none; }
.logo__text {
  display: flex; flex-direction: column; line-height: 1;
  font-size: 19px; font-weight: 600; letter-spacing: .16em; color: var(--gold);
}
.logo__sub {
  font-size: 8.3px; font-weight: 400; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-top: 5px;
  white-space: nowrap;
}

/* В шапке название бренда держим одной строкой с меню. В подвале
   фирменная двухстрочная композиция остаётся без изменений. */
.header .logo__text {
  flex-direction: row;
  align-items: center;
  gap: 9px;
  line-height: 1.2;
}
.header .logo__sub { margin-top: 0; font-size: 8px; letter-spacing: .12em; }

.nav {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 16px;
  margin-left: auto;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  font-size: 16px; font-weight: 500; line-height: 1.2;
  color: #FFFFFF; position: relative; padding: 8px 0;
  /* пункт не должен разрываться на два слова: «О компании» в тесной
     шапке ломалось пополам и строка меню становилась двойной */
  white-space: nowrap;
  transition: color .22s var(--ease), text-shadow .22s var(--ease);
}
.nav a::after {
  content: ''; position: absolute; left: 50%; right: 50%; bottom: 1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-bright) 18%, var(--gold) 82%, transparent);
  box-shadow: 0 0 10px rgba(239, 206, 140, .55);
  transition: left .3s var(--ease), right .3s var(--ease), opacity .2s var(--ease);
  opacity: 0;
}
.nav a:hover,
.nav a:focus-visible {
  color: var(--gold-bright);
  text-shadow: 0 0 14px rgba(239, 206, 140, .32);
}
.nav a:hover::after,
.nav a:focus-visible::after { left: 0; right: 0; opacity: 1; }

.nav__dropdown { position: relative; display: flex; align-items: center; min-height: 42px; }
.nav__dropdown-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px; padding: 8px 0;
  border: 0; background: none; color: var(--text);
  font-size: 16px; font-weight: 500; line-height: 1.2; cursor: pointer;
}
.nav__dropdown-toggle span { color: var(--gold); transition: transform .2s var(--ease); }
.nav__dropdown-menu {
  position: absolute; top: calc(100% - 2px); left: 50%; z-index: 4;
  width: 282px; padding: 10px;
  background: rgba(24, 24, 25, .98); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.nav__dropdown-menu a { min-height: 0; padding: 11px 12px; border-radius: 8px; font-size: 14.5px; }
.nav__dropdown-menu a::after { display: none; }
.nav__dropdown-menu a:hover { background: rgba(239, 206, 140, .08); }
.nav__dropdown:hover .nav__dropdown-menu,
.nav__dropdown:focus-within .nav__dropdown-menu {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.nav__dropdown.is-picked .nav__dropdown-menu {
  opacity: 0 !important; visibility: hidden !important;
  transform: translate(-50%, 8px) !important; pointer-events: none;
}
.nav__dropdown:hover .nav__dropdown-toggle span,
.nav__dropdown:focus-within .nav__dropdown-toggle span { transform: rotate(180deg); }

.header__actions { display: flex; align-items: center; gap: 14px; }
.header__phone { font-size: 15px; color: var(--text); white-space: nowrap; }
.header__phone:hover { color: var(--gold); }

.burger { display: none; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; padding: 9px 8px; }
.burger span { display: block; height: 1.5px; background: var(--gold); margin: 4px 0; transition: transform .3s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ============================================================
   ГЕРОЙ
   ============================================================ */

.hero { position: relative; overflow: hidden; padding: clamp(70px, 10vw, 120px) 0 clamp(60px, 8vw, 96px); }

.hero__glow {
  position: absolute; inset: -30% -10% auto -20%; height: 620px;
  background: radial-gradient(48% 52% at 22% 42%, rgba(239, 206, 140, .13), transparent 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 380px);
  column-gap: clamp(26px, 2.8vw, 44px);
  align-items: start;
}

.hero__copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 760px;
}

.hero__title {
  margin: 0;
  max-width: 100%;
  font-size: clamp(48px, 4.6vw, 74px);
  line-height: 1.02;
  font-weight: 300;
  letter-spacing: -.018em;
  text-transform: uppercase;
}
.hero__title span {
  background: linear-gradient(100deg, var(--gold-bright), var(--gold) 45%, var(--gold-deep) 130%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__title > span,
.hero__title .w--plain,
.hero__title .w--plain > i,
.hero__title .w--plain > i > span {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: normal;
}

/* На ноутбуках обе смысловые строки сохраняют предсказуемую форму:
   первая строка — объект, вторая — главное обещание. Размер второй
   чуть спокойнее, чтобы она никогда не заходила в колонку 3D-сцены. */
@media (min-width: 901px) {
  .hero__title > span:not(.w),
  .hero__title > .w--plain {
    font-size: .74em;
    white-space: normal;
  }
}

.hero__lead { margin: 26px 0 0; max-width: 56ch; color: var(--muted); font-size: clamp(16px, 1.6vw, 18px); }

.hero__cta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}
.hero__cta .btn { min-height: 54px; padding-inline: 26px; }
.hero__cta-note { margin: 0; max-width: 30ch; color: var(--muted); font-size: 13.5px; }

/* ---------- путь клиента: скролл-сценарий ---------- */
.journey { position: relative; overflow: clip; background: var(--bg-alt); }
.journey::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(45% 42% at 18% 28%, rgba(239,206,140,.09), transparent 72%);
  pointer-events: none;
}
.journey__layout { position: relative; display: grid; grid-template-columns: minmax(280px,.85fr) minmax(420px,1.15fr); gap: clamp(54px,8vw,120px); }
.journey__intro { position: sticky; top: calc(var(--head) + 42px); align-self: start; }
.journey__intro .section__lead { margin-top: 22px; }
.journey__track { position: relative; padding-left: 44px; }
.journey__track::before, .journey__progress {
  content: ''; position: absolute; left: 13px; top: 28px; width: 1px;
}
.journey__track::before { bottom: 28px; background: var(--line); }
.journey__progress {
  height: 0; max-height: calc(100% - 56px);
  background: linear-gradient(var(--gold-bright), var(--gold));
  box-shadow: 0 0 18px rgba(239,206,140,.4);
  transition: height .65s var(--ease);
}
.journey__step {
  position: relative; display: grid; grid-template-columns: 46px 1fr; gap: 22px;
  min-height: 145px; padding: 22px 24px; margin-bottom: 18px;
  border: 1px solid transparent; border-radius: var(--r-lg);
  opacity: .38; transform: translateX(10px);
  transition: opacity .45s var(--ease), transform .45s var(--ease),
              border-color .45s var(--ease), background .45s var(--ease);
}
.journey__step::before {
  content: ''; position: absolute; left: -38px; top: 31px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--bg-alt); border: 1px solid var(--muted-dim);
  transition: background .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.journey__step > span { color: var(--muted-dim); font-size: 12px; letter-spacing: .18em; }
.journey__step h3 { margin: 0 0 7px; font-size: clamp(19px,2vw,25px); font-weight: 400; }
.journey__step p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.journey__step.is-done { opacity: .68; transform: none; }
.journey__step.is-active {
  opacity: 1; transform: none; border-color: rgba(239,206,140,.22);
  background: linear-gradient(120deg, rgba(239,206,140,.08), rgba(239,206,140,.015));
}
.journey__step.is-active::before, .journey__step.is-done::before {
  background: var(--gold); border-color: var(--gold); box-shadow: 0 0 16px rgba(239,206,140,.55);
}
.journey__step.is-active > span, .journey__step.is-active h3 { color: var(--gold-bright); }

@media (max-width: 860px) {
  .journey__layout { grid-template-columns: 1fr; gap: 34px; }
  .journey__intro { position: static; }
  .journey__step { min-height: 128px; }
}
@media (max-width: 640px) {
  .journey__track { padding-left: 28px; }
  .journey__track::before, .journey__progress { left: 7px; }
  .journey__step { grid-template-columns: 34px 1fr; gap: 12px; padding: 18px 16px; }
  .journey__step::before { left: -25px; }
}

/* быстрый поиск */
/* цифры теперь выше формы — отступ сверху чуть меньше, чтобы блок
   действия не отрывался от них */
.quick {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr auto;
  gap: 14px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  max-width: 900px;
}
.quick__field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.quick__field label { min-height: 18px; font-size: 11.5px; line-height: 18px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-dim); }
.quick__field select,
.quick__field input {
  display: block; width: 100%; height: 40px; margin: 0;
  background: transparent; border: 0; border-bottom: 1px solid var(--line-soft);
  padding: 7px 0; font-size: 16px; line-height: 24px; outline: none; border-radius: 0;
  transition: border-color .2s var(--ease);
}
.quick__field select:focus, .quick__field input:focus { border-bottom-color: var(--gold); }
.quick__submit { align-self: end; }

.hero__stats {
  list-style: none; margin: 46px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  grid-column: 1 / -1;
  /* во всю ширину контейнера: цифры — главный аргумент на первом
     экране, зажимать их в 900 px незачем */
}
.hero__stats li { display: flex; flex-direction: column; gap: 4px; padding-left: 18px; border-left: 1px solid var(--line); }
.hero__stats b { font-size: clamp(24px, 2.6vw, 32px); font-weight: 300; color: var(--gold); letter-spacing: .01em; }
.hero__stats span { font-size: 13px; color: var(--muted-dim); }

.hero__inner > .quick,
.hero__inner > .hero__chat { grid-column: 1 / -1; }

/* Планшет и небольшой ноутбук: сохраняем две независимые колонки,
   но уменьшаем заголовок и сцену. Текст физически не может попасть
   под 3D-модель даже при изменённом масштабе браузера. */
@media (max-width: 1100px) and (min-width: 901px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) clamp(280px, 30vw, 320px);
    column-gap: clamp(22px, 2.6vw, 32px);
  }
  .hero__title { font-size: clamp(46px, 5.2vw, 58px); }
  .hero__lead { font-size: 16px; }
  .hero__cta { align-items: flex-start; flex-direction: column; }
  .hero__cta-note { max-width: 38ch; }
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__copy { grid-row: 2; max-width: 760px; }
  .hero__inner > .hc { grid-row: 1; }
  .hero__stats { grid-row: 3; }
  .hero__inner > .quick { grid-row: 4; }
  .hero__inner > .hero__chat { grid-row: 5; }
  .hero__title { font-size: clamp(44px, 7.4vw, 64px); }
}

/* ============================================================
   СЕКЦИИ
   ============================================================ */

.section { padding: clamp(64px, 8vw, 108px) 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line-soft); }
.section__head { margin-bottom: 48px; }

/* ============================================================
   КАТАЛОГ: сетка «фильтры + результаты»
   ============================================================ */

.catalog { display: grid; grid-template-columns: 286px 1fr; gap: 34px; align-items: start; }

/* ---------- фильтры ---------- */

.filters {
  position: sticky; top: calc(var(--head) + 20px);
  /* Тёплый антрацит: отделяет рабочую панель от чёрного фона,
     сохраняя спокойную премиальную палитру сайта. */
  background:
    radial-gradient(circle at 12% 0%, rgba(239, 206, 140, .075), transparent 38%),
    linear-gradient(145deg, #24211D 0%, #1D1C1B 48%, #18181A 100%);
  border: 1px solid rgba(239, 206, 140, .22);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .035),
    0 20px 50px rgba(0, 0, 0, .2);

  /* Фильтр выше экрана, а липкий блок прижат к верху. Собственная
     прокрутка гарантирует доступ ко всем полям на небольшом дисплее. */
  max-height: calc(100vh - var(--head) - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;   /* дойдя до конца, не тянем за собой страницу */
  scrollbar-width: thin;
  scrollbar-color: rgba(239, 206, 140, .35) transparent;
}
.filters::-webkit-scrollbar { width: 6px; }
.filters::-webkit-scrollbar-thumb { background: rgba(239, 206, 140, .3); border-radius: 3px; }
.filters::-webkit-scrollbar-thumb:hover { background: rgba(239, 206, 140, .5); }
.filters::-webkit-scrollbar-track { background: transparent; }
.filters__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.filters__head h3 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.filters__head-actions { display: flex; align-items: center; gap: 14px; }
.filters__close {
  display: none; width: 42px; height: 42px; padding: 0;
  place-items: center; border: 1px solid var(--line); border-radius: 50%;
  background: rgba(239, 206, 140, .06); color: var(--gold);
  font-size: 28px; font-weight: 300; line-height: 1; cursor: pointer;
}
.filters-veil { display: none; }
.filters__apply { display: none; margin-top: 20px; width: 100%; }
.filters__toggle { display: none; }

.f-group { margin-bottom: 22px; }
.f-group:last-of-type { margin-bottom: 0; }

.f-label {
  display: block; margin-bottom: 9px;
  font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-dim);
}
.f-label--row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.f-label--row output { font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--gold); font-variant-numeric: tabular-nums; text-align: right; }

.f-control {
  width: 100%;
  background-color: rgba(10, 10, 11, .7);
  border: 1px solid rgba(255, 255, 255, .085);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-size: 16px;
  outline: none;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.f-control:focus { border-color: var(--gold); background: var(--card-hi); }
select.f-control {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A0A0A6' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 11px;
  padding-right: 34px; cursor: pointer;
}
textarea.f-control { resize: vertical; min-height: 84px; }

.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* чипы «комнат» */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 8px 13px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .085); background: rgba(10, 10, 11, .68);
  font-size: 14px; color: var(--muted); cursor: pointer;
  transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--gold); color: var(--text); }
.chip.is-on { background: rgba(239, 206, 140, .13); border-color: var(--gold); color: var(--gold); }

/* чекбоксы */
.check { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 11px; cursor: pointer; font-size: 14.5px; color: var(--muted); }
.check:last-child { margin-bottom: 0; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 2px 0 0; border: 1px solid rgba(255, 255, 255, .085); border-radius: 5px; background: rgba(10, 10, 11, .68); cursor: pointer; transition: all .2s var(--ease); }
.check input:checked { background: var(--gold); border-color: var(--gold); }
.check input:checked::after { content: '✓'; display: block; text-align: center; line-height: 16px; font-size: 12px; font-weight: 700; color: #1A1408; }
.check:hover span { color: var(--text); }
.check--legal { margin: 18px 0 22px; font-size: 13px; line-height: 1.5; color: var(--muted-dim); }
.check--legal a { color: var(--gold); border-bottom: 1px solid rgba(239, 206, 140, .35); }
.check--legal a:hover { border-bottom-color: var(--gold); }

/* ---------- панель результатов ---------- */

.results__bar { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.results__count { margin: 0; color: var(--muted); font-size: 14.5px; }
.results__count b { color: var(--text); font-weight: 500; }
.results__sort { margin-left: auto; display: flex; align-items: center; gap: 11px; }
.results__sort label { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-dim); white-space: nowrap; }
.results__sort .f-control { width: auto; padding: 9px 34px 9px 13px; font-size: 14px; }

.dot { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #1A1408; font-size: 12px; font-weight: 700; }

/* ---------- сетка карточек ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 22px; }

.catalog-more { margin-top: 34px; display: flex; justify-content: center; }
.catalog-pagination {
  margin-top: 34px; min-height: 112px; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  border: 1px solid rgba(239, 206, 140, .24); border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(239, 206, 140, .09), rgba(255, 255, 255, .025));
  color: var(--muted); font-size: 15px;
}
.catalog-pagination__copy { display: grid; gap: 5px; }
.catalog-pagination__copy small { color: var(--gold); font-size: 11px; letter-spacing: .17em; text-transform: uppercase; }
.catalog-pagination__copy b { color: var(--text); font-size: 20px; font-weight: 500; }
.catalog-pagination__actions { display: flex; align-items: center; gap: 10px; }
.catalog-page-btn {
  min-height: 46px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--gold); cursor: pointer;
}
.catalog-page-btn--next { min-width: 190px; border-color: rgba(255, 239, 202, .68); background: linear-gradient(135deg, #fff0c5, #dfb56d); color: #20160a; font-weight: 650; }
.catalog-page-btn--next:hover:not(:disabled) { background: linear-gradient(135deg, #fff6d9, #e9c37e); }
.catalog-page-btn:hover:not(:disabled) { border-color: var(--gold); background: rgba(239, 206, 140, .07); }
.catalog-page-btn:disabled { opacity: .35; cursor: default; }
.catalog-complete { width: 100%; display: flex; align-items: center; justify-content: center; gap: 14px; text-align: left; }
.catalog-complete > span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(239, 206, 140, .4); border-radius: 50%; color: var(--gold); }
.catalog-complete div { display: grid; gap: 3px; }
.catalog-complete b { color: var(--text); font-size: 17px; font-weight: 500; }
.catalog-complete small { color: var(--muted); font-size: 13px; }

.card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { border-color: var(--line); transform: translateY(-3px); box-shadow: 0 18px 44px rgba(0, 0, 0, .45); }

/* фото / заглушка */
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--card-hi); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .55s var(--ease); }
.card__img { position: absolute; inset: 0; }
.card__img--primary { opacity: 1; transform: scale(1); }
.card__img--hover { opacity: 0; transform: scale(1.018); }
@media (hover: hover) and (pointer: fine) {
  /* Первые две секунды человек спокойно рассматривает исходное фото.
     Затем начинается мягкая смена; при уходе курсора возврат мгновенный. */
  .card:hover .card__img--primary { opacity: 0; transform: scale(1.055); transition-delay: 0s, 2s; }
  .card:hover .card__img--hover { opacity: 1; transform: scale(1.055); transition-delay: 0s, 2s; }
  .card:hover .card__media.is-manual .card__img--primary { opacity: 1; transform: scale(1.045); }
  .card__media.is-manual .card__img--hover { display: none; }
}

.card__ph { position: absolute; inset: 0; display: grid; place-items: center; background:
  radial-gradient(70% 90% at 50% 8%, rgba(239, 206, 140, .1), transparent 62%), var(--card-hi); }
.card__ph svg { width: 88px; height: 88px; color: rgba(239, 206, 140, .3); }
.card__ph span { position: absolute; bottom: 14px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-dim); }

.card__tags { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 5px 11px; border-radius: 999px; font-size: 11.5px; letter-spacing: .04em;
  background: rgba(14, 14, 15, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line); color: var(--gold);
}
.tag--hit { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #1A1408; border-color: transparent; font-weight: 600; }

/* тело карточки */
.card__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }

.card__object-id {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Цена и «от … ₽/мес» в узкой карточке встают в две строки, а в
   широкой в одну. Резервируем две — иначе название и всё под ним
   съезжает относительно соседей в ряду. */
.card__price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-height: 74px; }
.card__price b { font-size: 25px; font-weight: 400; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.card__permonth { font-size: 13.5px; color: var(--gold); font-variant-numeric: tabular-nums; }

/* Две строки под название: в трёхколоночной раскладке одни
   помещаются в строку, другие в две, и весь низ карточки съезжал. */
.card__title { margin: 12px 0 5px; min-height: 2.64em; font-size: 17px; font-weight: 500; line-height: 1.32; }
/* то же самое с адресом: длинные переносятся на вторую строку */
.card__addr { margin: 0; min-height: 3.2em; font-size: 13.5px; color: var(--muted-dim); }

.card__facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.card__facts li { padding: 5px 11px; border: 1px solid var(--line-soft); border-radius: 999px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.card__feats { margin: 14px 0 20px; padding: 0; list-style: none; font-size: 13.5px; color: var(--muted-dim); }
.card__feats li { position: relative; padding-left: 15px; margin-bottom: 4px; }
.card__feats li::before { content: ''; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); opacity: .55; }

/* Кнопки прижаты к низу: тогда они на одной линии во всех
   карточках ряда, сколько бы особенностей ни было у объекта. */
.card__open { display: block; color: inherit; }
/* обёртка-ссылка обязана держать высоту рамки, иначе фото
   рисуется по своей пропорции и под ним остаётся чёрный провал */
.card__media .card__open { height: 100%; }
.card__title .card__open:hover { color: var(--gold); }
.card__more { display: inline-block; margin-top: 10px; font-size: 13.5px; color: var(--gold);
  transition: transform .2s var(--ease); }
.card__more:hover { color: var(--gold-bright); }

.card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.card__actions .btn { padding: 12px 10px; font-size: 14px; }

/* ---------- калькулятор внутри карточки ---------- */

.calc { display: none; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.calc.is-open { display: block; animation: slideIn .28s var(--ease); }

@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.calc__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.calc__head h4 { margin: 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 500; }

.calc .f-group { margin-bottom: 16px; }

/* ползунок */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; display: block; }
.range::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: var(--line-soft); }
.range::-moz-range-track { height: 3px; border-radius: 3px; background: var(--line-soft); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 17px; height: 17px; margin-top: -7px;
  border-radius: 50%; background: var(--gold); border: 0;
  box-shadow: 0 0 0 4px rgba(239, 206, 140, .16); transition: box-shadow .2s var(--ease);
}
.range::-moz-range-thumb { width: 17px; height: 17px; border-radius: 50%; background: var(--gold); border: 0; box-shadow: 0 0 0 4px rgba(239, 206, 140, .16); }
.range:hover::-webkit-slider-thumb { box-shadow: 0 0 0 7px rgba(239, 206, 140, .2); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 7px rgba(239, 206, 140, .3); }

/* результат расчёта */
.calc__result { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.calc__pay { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--line-soft); }
.calc__pay span { font-size: 13px; color: var(--muted-dim); }
.calc__pay b { font-size: 23px; font-weight: 400; color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc__rows { margin: 13px 0 0; padding: 0; list-style: none; font-size: 13.5px; }
.calc__rows li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: var(--muted-dim); }
.calc__rows li b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.calc__note { margin: 12px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted-dim); }
.calc__warn { color: var(--err); }

/* ---------- пустой результат ---------- */

.empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--line); border-radius: var(--r-lg); }
.empty__title { margin: 0 0 10px; font-size: 21px; font-weight: 400; }
.empty__text { margin: 0 auto 26px; max-width: 46ch; color: var(--muted); font-size: 15px; }
.empty__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   ИПОТЕКА
   ============================================================ */

/* Карточки шире прежнего: при узких колонках ряд заполнялся не до
   конца и справа зияли пустые места. Теперь на широком экране ровно
   три в ряд, на планшете две, на телефоне одна — при шести программах
   ряды всегда полные. */
.programs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 44px; }
/* Колонка с прижатой к низу подвалкой: описания у программ разной
   длины, и без этого линия над «Взнос от…» вставала в каждой
   карточке на своей высоте. */
.program { display: flex; flex-direction: column; padding: 22px 20px; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r); transition: border-color .25s var(--ease), transform .25s var(--ease); }
.program:hover { border-color: var(--gold); transform: translateY(-3px); }
.program__rate { font-size: 40px; font-weight: 300; color: var(--gold); line-height: 1; letter-spacing: .01em; }
.program__rate small { font-size: 20px; }
.program h3 { margin: 15px 0 7px; font-size: 19px; font-weight: 500; }
.program p { margin: 0; font-size: 15px; color: var(--muted); }
/* где действует программа — важнее описания, поэтому выделяем */
.program__region { margin: 0 0 7px !important; color: var(--gold) !important; font-size: 14px !important; line-height: 1.45; }
.program__down { margin-top: auto; padding-top: 15px; border-top: 1px solid var(--line-soft); font-size: 14.5px; color: var(--muted); }
/* отступ сверху даём описанию, иначе при короткой заметке линия
   прилипает к тексту вплотную */
.program p:last-of-type { margin-bottom: 13px; }

.calc-big { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.calc-big__form { padding: 34px; }
.calc-big__title { margin: 0 0 32px; font-weight: 300; letter-spacing: .01em; }
.calc-big__out { padding: 34px; background: linear-gradient(160deg, rgba(239, 206, 140, .07), transparent 60%), var(--bg); border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }

.big-pay { margin-bottom: 24px; }
.big-pay span { display: block; font-size: 13.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-dim); margin-bottom: 10px; }
.big-pay b { font-size: clamp(40px, 5vw, 56px); font-weight: 300; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }

.big-rows { margin: 0 0 24px; padding: 0; list-style: none; }
.big-rows li { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: 16px; color: var(--muted); }
.big-rows li b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ============================================================
   НОВЫЕ НАПРАВЛЕНИЯ
   ============================================================ */

.service-feature {
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 20%, rgba(239, 206, 140, .11), transparent 30%),
    linear-gradient(145deg, #111113, #0e0e0f 62%);
  border-block: 1px solid var(--line-soft);
}
.service-feature__layout,
.service-detail__layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 72px; align-items: center; }
.service-feature__intro .section__lead { margin-bottom: 30px; }
.service-materials { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.service-materials span {
  min-height: 112px; display: flex; align-items: flex-end;
  padding: 22px; border: 1px solid var(--line);
  border-radius: var(--r-lg); background: rgba(32, 31, 29, .76);
  color: var(--text); font-size: 18px; line-height: 1.3;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.service-materials span:hover { transform: translateY(-3px); border-color: var(--gold); background: var(--card-hi); }

.service-detail__layout { align-items: start; }
.service-detail__body .section__lead { margin-top: 0; }
.service-list { margin: 30px 0; padding: 0; list-style: none; }
.service-list li {
  position: relative; padding: 17px 0 17px 38px;
  border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 17px;
}
.service-list li::before { content: '→'; position: absolute; left: 0; color: var(--gold); }

.accreditation__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
.accreditation__steps article {
  min-height: 250px; padding: 26px; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
}
.accreditation__steps span { color: var(--gold); font-size: 14px; letter-spacing: .18em; }
.accreditation__steps h3 { margin: auto 0 12px; font-size: 21px; font-weight: 400; }
.accreditation__steps p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

.catalog-hero { padding: clamp(58px, 7vw, 90px) 0 30px; }
.catalog-hero .section__lead { max-width: 70ch; }

/* ============================================================
   СТРАХОВАНИЕ
   ============================================================ */

.insurance-section {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 92% 12%, rgba(239, 206, 140, .09), transparent 28%),
    linear-gradient(145deg, #111113 0%, #0e0e0f 58%);
}
.insurance-section::before {
  content: ''; position: absolute; right: -180px; top: -220px;
  width: 520px; height: 520px; border: 1px solid var(--line);
  border-radius: 50%; pointer-events: none;
}
.insurance-head { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: end; }
.insurance-head .section__lead { margin: 0 0 4px; }

.insurance-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.insurance-card {
  grid-column: span 2;
  min-height: 285px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  padding: 26px;
  background: rgba(32, 31, 29, .9);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.insurance-card:nth-child(n+4) { grid-column: span 3; }
.insurance-card::after {
  content: ''; position: absolute; right: -55px; top: -55px;
  width: 150px; height: 150px; border-radius: 50%;
  border: 1px solid rgba(239, 206, 140, .08);
  transition: transform .4s var(--ease), border-color .3s var(--ease);
}
.insurance-card:hover { transform: translateY(-4px); border-color: rgba(239, 206, 140, .38); background: var(--card-hi); }
.insurance-card:hover::after { transform: scale(1.12); border-color: rgba(239, 206, 140, .18); }
.insurance-card__icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  margin-bottom: 34px; border: 1px solid var(--line); border-radius: 50%;
  color: var(--gold); background: rgba(239, 206, 140, .04);
}
.insurance-card__icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.insurance-card__num { position: absolute; top: 28px; right: 26px; font-size: 11px; letter-spacing: .18em; color: var(--muted-dim); }
.insurance-card h3 { margin: 0 0 8px; font-size: 20px; font-weight: 400; }
.insurance-card p { margin: 0 0 24px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.insurance-card__link {
  width: fit-content; margin-top: auto; padding: 0 0 4px;
  border: 0; border-bottom: 1px solid rgba(239, 206, 140, .3); background: none;
  color: var(--gold); font-size: 13.5px; cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.insurance-card__link span { display: inline-block; margin-left: 5px; transition: transform .2s var(--ease); }
.insurance-card__link:hover { color: var(--gold-bright); border-color: var(--gold); }
.insurance-card__link:hover span { transform: translateX(4px); }

.insurance-card--special {
  background: linear-gradient(135deg, rgba(239, 206, 140, .15), rgba(32, 31, 29, .94) 58%);
  border-color: rgba(239, 206, 140, .25);
}
.insurance-card__badge {
  position: absolute; top: 25px; right: 58px;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(239, 206, 140, .1); color: var(--gold);
  font-size: 9.5px; line-height: 1.3; letter-spacing: .1em; text-transform: uppercase;
}
.insurance-card--special .insurance-card__num { display: none; }

.insurance-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  margin-top: 22px; padding: 24px 26px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: rgba(32, 31, 29, .72);
}
.insurance-cta div { display: flex; flex-direction: column; gap: 3px; }
.insurance-cta b { font-size: 16px; font-weight: 500; }
.insurance-cta span { color: var(--muted); font-size: 14px; }

/* ============================================================
   ПРЕИМУЩЕСТВА / ОТЗЫВЫ / CTA / КОНТАКТЫ
   ============================================================ */

.advantages { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.adv { padding: 30px 26px; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r); transition: border-color .25s var(--ease); }
.adv:hover { border-color: var(--line); }
.adv__num { font-size: 12px; letter-spacing: .2em; color: var(--gold); opacity: .7; }
.adv h3 { margin: 16px 0 10px; font-size: 18px; font-weight: 500; }
.adv p { margin: 0; font-size: 14.5px; color: var(--muted); }

.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
/* Та же беда, что и с программами: отзывы разной длины, и линия над
   именем вставала в каждой карточке на своей высоте. Прижимаем
   подпись к низу. */
.review { margin: 0; display: flex; flex-direction: column; padding: 30px 26px; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r); position: relative; }
.review::before { content: '"'; position: absolute; top: 8px; right: 22px; font-size: 66px; line-height: 1; color: var(--gold); opacity: .16; font-family: Georgia, serif; }
.review blockquote { margin: 0 0 20px; font-size: 15px; color: var(--muted); line-height: 1.65; }
.review figcaption { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 3px; }
.review figcaption b { font-weight: 500; font-size: 15px; }
.review figcaption span { font-size: 13px; color: var(--muted-dim); }
.review__photo { width: 58px; height: 58px; margin-bottom: 18px; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); }

.cta__inner { display: grid; grid-template-columns: 1.35fr 1fr; gap: 54px; align-items: center; }
.cta__list { margin: 26px 0 0; padding: 0; list-style: none; }
.cta__list li { position: relative; padding-left: 26px; margin-bottom: 12px; color: var(--muted); font-size: 15.5px; }
.cta__list li::before { content: '✓'; position: absolute; left: 0; top: -1px; color: var(--gold); font-size: 14px; }
/* Кнопка «Позвонить …»: номер нельзя рвать на две строки.
   На телефоне чуть мельче шрифт, чтобы номер помещался целиком. */
#ctaPhone { white-space: nowrap; }
@media (max-width: 640px) {
  #ctaPhone { font-size: 14.5px; padding-left: 12px; padding-right: 12px; }
}

.cta__form { display: flex; flex-direction: column; gap: 12px; padding: 32px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }

/* Команда занимает широкую левую часть, способы связи собраны справа
   компактной сеткой 2×2. Так блок не растягивается на всю высоту экрана. */
.contacts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(390px, .85fr);
  gap: 22px; align-items: stretch;
}
.contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1180px) { .contacts-layout { grid-template-columns: 1fr; } }
@media (max-width: 560px)  { .contacts { grid-template-columns: 1fr; } }

.contact {
  display: flex; flex-direction: column;
  min-height: 0; padding: 22px 20px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.contact:hover { border-color: var(--line); background: var(--card-hi); }

.contact span {
  display: block; margin-bottom: 14px;
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-dim);
}
.contact__value {
  margin: 0; font-size: 18px; line-height: 1.4; color: var(--text);
  transition: color .2s var(--ease);
}
a.contact__value:hover { color: var(--gold); }

/* пояснение внизу — так все плашки одинаковой высоты выглядят
   наполненными, а не полупустыми */
.contact__note {
  /* прижато к низу: в плашке «Написать» кнопки выше текстовой строки,
     и без этого её пояснение опускалось ниже соседних */
  margin: 12px 0 0; margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px; line-height: 1.5; color: var(--muted-dim);
}
/* без отступа: иначе кнопки стоят на 2px ниже текстовых значений в соседях */
.contact .chat__links { margin-top: 0; }
.contact .chat__pill { padding: 8px 14px; font-size: 13.5px; }

.specialists {
  position: relative;
  display: grid; grid-template-columns: 1fr;
  overflow: hidden;
  padding: 10px clamp(28px, 3vw, 42px);
  border: 1px solid rgba(239, 206, 140, .2); border-radius: 28px;
  background:
    radial-gradient(circle at 0 0, rgba(239, 206, 140, .11), transparent 34%),
    linear-gradient(135deg, rgba(37, 34, 30, .94), rgba(25, 24, 23, .98));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 22px 70px rgba(0, 0, 0, .18);
}
.specialist {
  min-height: 0; padding: 24px 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto; align-items: center; column-gap: 28px;
  border: 0; border-radius: 0; background: transparent;
  transition: opacity .25s var(--ease);
}
.specialist:not(:last-child) { border-bottom: 1px solid var(--line-soft); }
.specialist:hover { opacity: .88; }
.specialist__role {
  grid-column: 1; grid-row: 1;
  font-size: 11.5px; line-height: 1.55; letter-spacing: .13em;
  text-transform: uppercase; color: var(--gold); opacity: .9;
}
.specialist h3 { grid-column: 1; grid-row: 2; margin: 7px 0 0; font-size: clamp(19px, 1.25vw, 23px); line-height: 1.24; font-weight: 350; }
.specialist a {
  grid-column: 2; grid-row: 1 / 3;
  width: fit-content; margin: 0; padding: 9px 16px;
  border: 1px solid rgba(239, 206, 140, .3); border-radius: 999px;
  background: rgba(239, 206, 140, .045);
  color: var(--gold-bright); font-size: 17px; line-height: 1.25; white-space: nowrap;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.specialist--role-only .specialist__role {
  grid-row: 1 / 3; max-width: none; font-size: clamp(19px, 1.25vw, 23px); line-height: 1.25;
  letter-spacing: 0; text-transform: none; color: var(--text);
}
.specialist a:hover { border-color: rgba(246, 220, 169, .75); background: rgba(239, 206, 140, .11); color: #fff4d7; }

/* ============================================================
   ПОДВАЛ
   ============================================================ */

.footer { border-top: 1px solid var(--line-soft); padding: 56px 0 26px; background: var(--bg); }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 44px; }
.footer__brandmark {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 16px;
  margin-bottom: 0;
}
.footer__brandmark .logo__mark { height: 38px; }
.footer__brandmark .logo__text {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  line-height: 1.2;
}
.footer__brandmark .logo__sub {
  margin-top: 0;
  font-size: 10px;
}
.footer__brand p { margin: 16px 0 0; font-size: 16px; color: var(--muted); max-width: 34ch; }
.footer__nav { display: flex; flex-direction: column; gap: 9px; }
.footer h4 { margin: 0 0 16px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.footer__nav a { font-size: 16px; color: var(--muted); }
.footer__nav a:hover { color: var(--gold); }
.footer__legal p { margin: 0; font-size: 15px; color: var(--muted-dim); line-height: 1.65; }
.footer__bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 16px; font-size: 15px; color: var(--muted-dim); }
.footer__bottom a:hover { color: var(--gold); }

/* На широком экране верхняя строка всех трёх колонок единая:
   название бренда, «Разделы» и «Важно» центрируются в одинаковой
   строке высотой с логотип. */
@media (min-width: 1081px) {
  .footer__inner { align-items: start; }
  .footer__nav > h4,
  .footer__legal > h4 {
    display: flex;
    align-items: center;
    min-height: 38px;
  }
  .footer__nav > h4 { margin-bottom: 7px; }
}

/* ============================================================
   КЕЙСЫ — плитки на главной
   ============================================================ */

/* 230px, а не 270: на странице кейса колонка уже (752px), и при
   270 три карточки вставали как 2 + 1 с дырой справа. Теперь
   помещаются в ряд и там, и на главной, где их четыре. */
/* ссылка «все материалы» под секцией — по центру, с воздухом */
.section__more { margin-top: 32px; display: flex; justify-content: center; }

.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }

.case-card {
  display: flex; flex-direction: column;
  padding: 26px 24px 22px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.case-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 18px 44px rgba(0, 0, 0, .4); }

/* Две строки под подпись: «Военно-семейная ипотека» в узкой карточке
   переносится, и без запаса всё содержимое ниже съезжало. */
.case-card__tag { display: block; min-height: 3.2em; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-dim); }
.case-card__num {
  margin-top: 14px;
  font-size: clamp(28px, 3vw, 34px); font-weight: 300; line-height: 1;
  color: var(--gold); letter-spacing: .01em; font-variant-numeric: tabular-nums;
}
/* Две строки под заголовок: у части кейсов он в одну строку, и без
   этого описание под ним начиналось в карточках на разной высоте. */
.case-card h3 { margin: 16px 0 10px; min-height: 2.7em; font-size: 17px; font-weight: 500; line-height: 1.35; }
.case-card p { margin: 0 0 20px; font-size: 14px; color: var(--muted); line-height: 1.6; flex: 1; }
.case-card__more { font-size: 14px; color: var(--gold); transition: transform .2s var(--ease); }
.case-card:hover .case-card__more { color: var(--gold-bright); }

/* ============================================================
   КЕЙС — отдельная страница
   ============================================================ */

.case-page { padding: clamp(32px, 4vw, 48px) 0 clamp(64px, 8vw, 100px); }
.case { max-width: 800px; }

.crumbs { margin: 0 0 30px; font-size: 13.5px; color: var(--muted-dim); display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--gold); }
.crumbs span { opacity: .5; }

.case__title {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.14;
  font-weight: 300;
  letter-spacing: .01em;
}
.case__lead { margin: 20px 0 0; font-size: clamp(16px, 1.7vw, 18px); color: var(--muted); line-height: 1.65; }

/* карточка результата вверху */
.case__result {
  margin: 34px 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.case__result div { padding: 20px 18px; background: linear-gradient(160deg, rgba(239, 206, 140, .07), transparent 70%), var(--card); }
/* Подпись занимает две строки даже если слово короткое: иначе
   в плитке с длинной подписью («От подачи до денег») цифра
   опускается ниже соседних и ряд разъезжается. */
.case__result span { display: block; min-height: 3.2em; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-dim); margin-bottom: 9px; }
.case__result b { font-size: clamp(20px, 2.4vw, 25px); font-weight: 300; color: var(--gold); line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Число с единицей держится на неразрывных пробелах прямо в тексте
   («152 500 ₽/мес» не разорвётся). Полный запрет переноса здесь не
   нужен: длинные словесные значения («семьям с 2+ детьми») должны
   переноситься на вторую строку, а не обрезаться краем плитки. */
.nb { white-space: nowrap; }

.case__block { margin-top: 42px; }
.case__block h2 {
  margin: 0 0 16px;
  font-size: clamp(19px, 2.2vw, 24px); font-weight: 400; letter-spacing: .01em; color: var(--gold);
}
.case__block p { margin: 0 0 14px; font-size: 16px; color: var(--muted); line-height: 1.75; }
.case__block p:last-child { margin-bottom: 0; }
.case__block b { color: var(--text); font-weight: 500; }
.case__block a { color: var(--gold); border-bottom: 1px solid rgba(239, 206, 140, .3); }
.case__block a:hover { border-bottom-color: var(--gold); }

/* нумерованные шаги «что мы сделали» */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative; counter-increment: step;
  padding: 0 0 22px 52px; margin: 0;
  font-size: 16px; color: var(--muted); line-height: 1.7;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 1px;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  font-size: 12.5px; color: var(--gold); background: var(--card);
}
.steps li::after {
  content: ''; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 1px;
  background: var(--line);
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps b { display: block; color: var(--text); font-weight: 500; margin-bottom: 4px; }

/* хронология */
.timeline { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 18px 26px; font-size: 15.5px; color: var(--muted); }
.timeline li::before { content: ''; position: absolute; left: -4.5px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.timeline li:last-child { padding-bottom: 0; }
.timeline b { color: var(--text); font-weight: 500; }

/* условия сделки */
.terms { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.terms li { padding: 15px 17px; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-sm); font-size: 15px; }
.terms li span { display: block; font-size: 12px; color: var(--muted-dim); margin-bottom: 5px; }

.case__quote {
  margin: 34px 0 0; padding: 22px 26px;
  border-left: 2px solid var(--gold);
  background: rgba(239, 206, 140, .05);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 17px; line-height: 1.6; color: var(--text);
}

.case__note { margin-top: 40px; padding: 18px 20px; border: 1px dashed var(--line); border-radius: var(--r-sm); font-size: 13.5px; color: var(--muted-dim); line-height: 1.6; }

/* медиа и действия, которые редактор вставляет в статьи из админки */
.article-cover, .article-image { margin: 34px 0; }
.article-cover img, .article-image img { width: 100%; max-height: 620px; object-fit: cover; border-radius: var(--r-lg); }
.article-image figcaption { margin-top: 8px; color: var(--muted-dim); font-size: 13px; }
.article-embed { position: relative; width: 100%; margin: 34px 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.article-embed iframe { display: block; width: 100%; max-width: 100%; border: 0; background: #fff; }
.article-action { margin: 30px 0 !important; }
.article-warning { padding: 14px 16px; border: 1px solid rgba(249,93,81,.35); border-radius: var(--r-sm); color: #ffaaa3 !important; }
.case__block blockquote { margin: 28px 0; padding: 18px 22px; border-left: 2px solid var(--gold); background: var(--card); color: var(--text); }
.case__block hr { margin: 36px 0; border: 0; border-top: 1px solid var(--line); }

/* блок «обсудить свою ситуацию» */
.case__cta { margin-top: 48px; padding: 34px 30px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); text-align: center; }
.case__cta h2 { margin: 0 0 10px; font-size: clamp(21px, 2.6vw, 27px); font-weight: 400; }
.case__cta p { margin: 0 auto 24px; max-width: 50ch; color: var(--muted); font-size: 15.5px; }
.case__cta .btn { min-width: 240px; }

/* другие кейсы */
.case__next { margin-top: 56px; }
.case__next h2 { margin: 0 0 20px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 500; }

/* ---------- объекты внутри статей ---------- */

.article-properties {
  margin-top: 56px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}
.article-properties__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.article-properties__head h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.12;
  font-weight: 300;
  text-transform: uppercase;
}
.article-properties__head a { flex: none; color: var(--gold); font-size: 14px; }
.article-properties__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.article-property {
  min-width: 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.article-property:hover { transform: translateY(-3px); border-color: rgba(239, 206, 140, .38); }
.article-property__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-alt);
}
.article-property__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.article-property:hover .article-property__photo img { transform: scale(1.025); }
.article-property__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--gold); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.article-property__badge {
  position: absolute; top: 10px; left: 10px;
  padding: 5px 9px; border-radius: 999px;
  color: var(--gold-bright); background: rgba(14, 14, 15, .78);
  border: 1px solid rgba(239, 206, 140, .22);
  font-size: 10.5px; line-height: 1.2;
}
.article-property__body { padding: 18px; }
.article-property__place { margin: 0 0 5px; color: var(--muted-dim); font-size: 12.5px; }
.article-property h3 { margin: 0; min-height: 2.7em; font-size: 16px; line-height: 1.35; font-weight: 500; }
.article-property__price { margin: 15px 0 0; color: var(--gold); font-size: 20px; font-variant-numeric: tabular-nums; }
.article-property__more { display: inline-block; margin-top: 14px; color: var(--gold); font-size: 13.5px; }
.article-properties__empty { margin: 0; color: var(--muted); }
/* отдельная сетка для кейсов внизу страницы больше не нужна:
   базовая (230px) сама даёт три карточки в ряд и здесь, и на главной.
   Но карточки тут уже, и заголовки занимают до трёх строк — резервируем
   их, иначе описание в соседних карточках начинается на разной высоте. */
.case__next .case-card h3 { min-height: 4.05em; }

@media (max-width: 640px) {
  .case__cta { padding: 26px 20px; }
  .case__cta .btn { min-width: 0; width: 100%; }
}

/* ============================================================
   ПРАВОВЫЕ СТРАНИЦЫ (политика конфиденциальности)
   ============================================================ */

.legal-page { padding: clamp(48px, 6vw, 80px) 0 clamp(64px, 8vw, 100px); }
.legal { max-width: 800px; }

.legal__title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  font-weight: 300;
  letter-spacing: .01em;
}
.legal__meta { margin: 16px 0 0; font-size: 14px; color: var(--muted-dim); }

/* напоминание заполнить реквизиты — удаляется перед публикацией */
.legal__warn {
  margin: 32px 0 0;
  padding: 18px 20px;
  border: 1px solid rgba(249, 93, 81, .4);
  border-left-width: 3px;
  border-radius: var(--r-sm);
  background: rgba(249, 93, 81, .06);
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}
.legal__warn b { color: var(--err); display: block; margin-bottom: 6px; }
.legal__warn code { font-size: 13px; color: var(--gold); background: rgba(239, 206, 140, .08); padding: 2px 6px; border-radius: 4px; }

/* содержание */
.legal__toc {
  margin: 36px 0 0;
  padding: 24px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.legal__toc h2 { margin: 0 0 14px; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.legal__toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 34px; }
.legal__toc li { margin-bottom: 7px; color: var(--muted-dim); font-size: 14.5px; break-inside: avoid; }
.legal__toc a { color: var(--muted); }
.legal__toc a:hover { color: var(--gold); }

.legal__block { margin-top: 44px; scroll-margin-top: calc(var(--head) + 20px); }
.legal__block h2 {
  margin: 0 0 16px;
  font-size: clamp(19px, 2.2vw, 23px);
  font-weight: 400;
  letter-spacing: .01em;
  color: var(--gold);
}
.legal__block p { margin: 0 0 14px; color: var(--muted); font-size: 15.5px; line-height: 1.72; }
.legal__block p:last-child { margin-bottom: 0; }
.legal__block ul { margin: 0 0 14px; padding: 0; list-style: none; }
.legal__block ul li {
  position: relative; padding-left: 20px; margin-bottom: 9px;
  color: var(--muted); font-size: 15.5px; line-height: 1.7;
}
.legal__block ul li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold); opacity: .55;
}
.legal__block b { color: var(--text); font-weight: 500; }
.legal__block a { color: var(--gold); border-bottom: 1px solid rgba(239, 206, 140, .3); }
.legal__block a:hover { border-bottom-color: var(--gold); }

/* абзац, на который важно обратить внимание */
.legal__accent {
  padding: 16px 20px;
  border-left: 2px solid var(--gold);
  background: rgba(239, 206, 140, .05);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

/* реквизиты оператора */
.legal__dl { margin: 0; display: grid; grid-template-columns: 210px 1fr; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--r-sm); overflow: hidden; }
.legal__dl dt { padding: 13px 16px; background: var(--card); font-size: 13.5px; color: var(--muted-dim); }
.legal__dl dd { margin: 0; padding: 13px 16px; background: var(--bg-alt); font-size: 15px; }

/* незаполненные места подсвечиваются, чтобы их нельзя было пропустить */
[data-fill] { background: rgba(239, 206, 140, .1); border-bottom: 1px dashed rgba(239, 206, 140, .45); padding: 0 3px; }
[data-fill="email"], [data-fill="phone"] { background: none; border-bottom-style: solid; padding: 0; }

.legal__consent { padding: 30px 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.legal__hint { font-size: 13.5px !important; color: var(--muted-dim) !important; font-style: italic; }
.legal__back { margin-top: 48px; }

@media (max-width: 640px) {
  .legal__toc ol { columns: 1; }
  .legal__dl { grid-template-columns: 1fr; }
  .legal__dl dt { padding-bottom: 0; background: var(--bg-alt); }
  .legal__consent { padding: 24px 20px; }
}

/* ============================================================
   МОДАЛКА
   ============================================================ */

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(6, 6, 7, .8); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); animation: fade .25s var(--ease); }
.modal__box {
  position: relative; width: 100%; max-width: 470px; max-height: calc(100dvh - 40px); overflow-y: auto;
  padding: 36px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: pop .3s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.modal__close { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border: 0; background: none; color: var(--muted); font-size: 27px; line-height: 1; cursor: pointer; border-radius: 50%; transition: all .2s var(--ease); }
.modal__close:hover { color: var(--gold); background: rgba(239, 206, 140, .09); }
.modal__title { margin: 0 0 6px; font-size: 25px; font-weight: 400; letter-spacing: .01em; }
.modal__object { margin: 14px 0 22px; padding: 13px 15px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px; color: var(--muted); }
.modal__object b { color: var(--gold); font-weight: 500; }
.modal form { margin-top: 22px; }

.form-error { margin: 12px 0 0; font-size: 13.5px; color: var(--err); text-align: center; }
.f-control.is-invalid { border-color: var(--err); }

.modal__done { text-align: center; padding: 12px 0; }
.modal__tick { width: 62px; height: 62px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: rgba(98, 197, 132, .12); border: 1px solid rgba(98, 197, 132, .4); color: var(--ok); font-size: 28px; }
.modal__done h3 { margin: 0 0 10px; font-size: 22px; font-weight: 400; }
.modal__done p { margin: 0 0 26px; color: var(--muted); font-size: 14.5px; }

/* ============================================================
   АДАПТИВ
   ============================================================ */

@media (max-width: 1080px) {
  .catalog { grid-template-columns: 1fr; }
  .filters {
    position: fixed; inset: auto 0 0 0; z-index: 90;
    max-height: 86dvh; overflow-y: auto; padding-top: 0;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    transform: translateY(101%); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform .34s var(--ease), opacity .24s var(--ease), visibility .34s;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
  }
  .filters.is-open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .filters__head {
    position: sticky; top: 0; z-index: 2;
    margin: 0 -2px 22px; padding: 18px 2px 14px;
    background: linear-gradient(180deg, #24211d 0%, #211f1c 78%, rgba(33, 31, 28, .94) 100%);
    border-bottom: 1px solid rgba(239, 206, 140, .12);
  }
  .filters__close { display: grid; }
  .filters-veil {
    display: block; position: fixed; inset: 0; z-index: 80;
    padding: 0; border: 0; background: rgba(5, 5, 6, .72);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .28s var(--ease), visibility .28s;
  }
  .filters-veil.is-on { opacity: 1; visibility: visible; pointer-events: auto; }
  .filters__apply, .filters__toggle { display: inline-flex; }
  .calc-big { grid-template-columns: 1fr; }
  .calc-big__out { border-left: 0; border-top: 1px solid var(--line); }
  .cta__inner { grid-template-columns: 1fr; gap: 34px; }
  .insurance-head { grid-template-columns: 1fr; gap: 14px; }
  .insurance-head .section__lead { margin: 0; }
  .insurance-card, .insurance-card:nth-child(n+4) { grid-column: span 3; }
  .insurance-card--special:last-child { grid-column: span 6; }
  .service-feature__layout, .service-detail__layout { grid-template-columns: 1fr; gap: 38px; }
  .accreditation__steps { grid-template-columns: 1fr 1fr; }
  .specialists { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  /* Полное название остаётся частью логотипа и на телефоне. Чтобы
     шапка не распиралась, «ЦКИ» и подпись собираются в две строки. */
  .header .logo { gap: 9px; }
  .header .logo__mark { height: 22px; }
  .header .logo__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    font-size: 16px;
    letter-spacing: .14em;
    line-height: 1;
  }
  .header .logo__sub {
    display: block;
    margin: 0;
    font-size: 5.8px;
    line-height: 1.2;
    letter-spacing: .055em;
    white-space: nowrap;
  }
  .footer__brandmark { gap: 10px; }
  .footer__brandmark .logo__mark { height: 26px; }
  .footer__brandmark .logo__text { gap: 8px; font-size: 19px; }
  .footer__brandmark .logo__sub { font-size: 7.4px; letter-spacing: .08em; }
}

@media (max-width: 345px) {
  .header__inner { gap: 8px; }
  .header .logo { gap: 7px; }
  .header .logo__mark { height: 19px; }
  .header .logo__text { font-size: 14px; gap: 2px; letter-spacing: .12em; }
  .header .logo__sub { font-size: 5px; letter-spacing: .03em; }
}

/* На средних ноутбуках последовательно сокращаем только подпись бренда,
   не сжимая и не перенося пункты меню. */
@media (min-width: 1121px) and (max-width: 1240px) {
  .header .logo__text { display: none; }
}

@media (min-width: 1241px) and (max-width: 1550px) {
  /* Сохраняем полное название ЦКИ и на ноутбуках. Чуть уплотняем
     фирменную группу, чтобы меню по-прежнему оставалось в одну строку. */
  .header .logo { gap: 10px; }
  .header .logo__mark { height: 24px; }
  .header .logo__text { gap: 7px; font-size: 18px; }
  .header .logo__sub {
    display: inline-block;
    font-size: 7px;
    letter-spacing: .1em;
  }
}

@media (min-width: 1121px) and (max-width: 1320px) {
  .header__inner { gap: 16px; }
  .nav { gap: 12px; }
  .nav a,
  .nav__dropdown-toggle { font-size: 14px; }
  .header__actions { gap: 10px; }
  .header__phone { font-size: 13.5px; }
  .header__actions .btn--sm { padding: 9px 14px; font-size: 13px; }
}

/* Меню сворачивается в бургер раньше остальной вёрстки: с шестью пунктами
   плюс телефоном и кнопкой шапка перестаёт помещаться уже около 1030px.
   На телефоне меню — панель, выезжающая справа: логотип и крестик
   сверху, пункты, внизу политика, мессенджеры и «Заказать звонок».
   Верх и низ панели добавляет app.js, здесь — только вид. */
@media (max-width: 1120px) {
  .nav {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto;
    height: 100dvh; max-height: 100dvh;
    width: min(330px, 88vw);
    flex-direction: column; gap: 0; align-items: stretch;
    margin: 0;
    background: var(--bg-alt); border-left: 1px solid var(--line);
    padding: 18px 26px calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateX(105%); transition: transform .34s var(--ease);
    z-index: 90;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .nav.is-open { transform: none; box-shadow: -30px 0 80px rgba(0, 0, 0, .55); }
  .nav a { padding: 15px 0; border-bottom: 1px solid var(--line-soft); font-size: 16.5px; }
  .nav a::after { display: none; }

  .nav__dropdown { display: block; min-height: 0; }
  .nav__dropdown-toggle {
    width: 100%; justify-content: space-between; padding: 15px 0 8px;
    border-bottom: 0; font-size: 16.5px;
  }
  .nav .nav__dropdown:not(.is-open) .nav__dropdown-menu {
    max-height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0;
    opacity: 0; visibility: hidden; pointer-events: none;
  }
  .nav .nav__dropdown.is-open .nav__dropdown-menu {
    max-height: 280px; opacity: 1; visibility: visible; pointer-events: auto;
  }
  .nav .nav__dropdown:not(.is-open) .nav__dropdown-toggle span { transform: none; }
  .nav__dropdown-menu {
    position: static; width: 100%; max-height: 280px; overflow: hidden; padding: 0 0 8px 15px;
    border: 0; border-radius: 0; box-shadow: none; background: transparent;
    opacity: 1; visibility: visible; transform: none;
    transition: max-height .3s var(--ease), opacity .2s var(--ease), padding .3s var(--ease), visibility .3s;
  }
  /* Компьютерное :hover/:focus-within сдвигает выпадающий список на
     translateX(-50%). На сенсорном экране focus остаётся после касания,
     поэтому пункты выезжали за левую границу панели. Здесь намеренно
     перебиваем все десктопные состояния одним мобильным положением. */
  .nav .nav__dropdown .nav__dropdown-menu,
  .nav .nav__dropdown:hover .nav__dropdown-menu,
  .nav .nav__dropdown:focus-within .nav__dropdown-menu,
  .nav .nav__dropdown.is-picked .nav__dropdown-menu {
    position: static;
    inset: auto;
    left: auto;
    width: 100%;
    max-width: 100%;
    margin: 0;
    transform: none !important;
  }
  .nav__dropdown-menu a {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 11px 0;
    border-bottom: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 15px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .nav__dropdown.is-open .nav__dropdown-toggle span { transform: rotate(180deg); }

  .nav__head {
    position: sticky; top: -18px; z-index: 3;
    display: flex; align-items: center; justify-content: space-between;
    margin: -18px -4px 10px; padding: 18px 4px 12px;
    background: linear-gradient(180deg, var(--bg-alt) 78%, rgba(22, 22, 23, .96));
    border-bottom: 1px solid var(--line-soft);
  }
  .nav__head img { height: 30px; width: auto; }
  .nav__close {
    border: 0; background: none; cursor: pointer;
    color: var(--gold); font-size: 32px; line-height: 1; padding: 2px 6px;
  }

  .nav__foot { margin-top: auto; padding-top: 26px; display: flex; flex-direction: column; gap: 16px; }
  .nav__foot a { padding: 0; border-bottom: 0; }
  .nav__foot .privacy { font-size: 13.5px; color: var(--muted-dim); }
  .nav__foot .privacy:hover { color: var(--gold); }

  /* затемнение страницы за панелью */
  .nav-veil {
    position: fixed; inset: 0; z-index: 80;
    background: rgba(0, 0, 0, .55);
    opacity: 0; pointer-events: none;
    transition: opacity .3s var(--ease);
  }
  .nav-veil.is-on { opacity: 1; pointer-events: auto; }

  .burger { display: block; }
  .header__phone { display: none; }
  .header__actions .btn { display: none; }
}

/* на широких экранах служебных частей панели нет */
@media (min-width: 1121px) {
  .nav__head, .nav__foot, .nav-veil { display: none; }
}

@media (max-width: 860px) {
  .quick { grid-template-columns: 1fr 1fr; }
  .quick__field:nth-child(3) { grid-column: 1 / -1; }
  .quick__submit { grid-column: 1 / -1; }
  .hero__stats { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
  .article-properties__grid { grid-template-columns: 1fr 1fr; }
  .article-property:last-child:nth-child(odd) { display: none; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  /* «НЕДВИЖИМОСТЬ» — длинное слово, на узком экране оно упирается в край */
  .hero__title { font-size: clamp(30px, 8.6vw, 42px); }
  .hero__cta { align-items: stretch; flex-direction: column; margin-top: 20px; }
  .hero__cta .btn { width: 100%; }
  .hero__cta-note { max-width: none; text-align: center; }
  .grid { grid-template-columns: 1fr; }
  .catalog-pagination { align-items: stretch; flex-direction: column; padding: 19px 18px; }
  .catalog-pagination__actions { display: grid; grid-template-columns: 1fr; }
  .catalog-page-btn { width: 100%; }
  .card__actions { grid-template-columns: 1fr; }
  .results__sort { margin-left: 0; width: 100%; }
  .results__sort .f-control { flex: 1; }
  .calc-big__form, .calc-big__out { padding: 26px 22px; }
  .section__title { font-size: clamp(34px, 10vw, 48px); }
  .section__title--sub { font-size: clamp(28px, 8vw, 38px); }
  .section__lead { font-size: 17px; }
  .service-materials { grid-template-columns: 1fr; }
  .service-materials span { min-height: 88px; }
  .accreditation__steps { grid-template-columns: 1fr; }
  .accreditation__steps article { min-height: 215px; }
  .specialists { grid-template-columns: 1fr; }
  .specialists { padding: 8px 24px; border-radius: 22px; }
  .specialist:nth-child(n) { border-bottom: 1px solid var(--line-soft); }
  .specialist:last-child { border-bottom: 0; }
  .specialist { display: grid; grid-template-columns: 1fr; grid-template-rows: auto; row-gap: 0; }
  .specialist__role, .specialist h3, .specialist a,
  .specialist--role-only .specialist__role { grid-column: 1; grid-row: auto; }
  .specialist a { margin-top: 18px; }
  .insurance-grid { grid-template-columns: 1fr; }
  .insurance-card, .insurance-card:nth-child(n+4), .insurance-card--special:last-child { grid-column: auto; min-height: 260px; padding: 24px 22px; }
  .insurance-card__icon { margin-bottom: 28px; }
  .insurance-card__badge { position: static; width: fit-content; order: -1; margin: 0 0 16px; }
  .insurance-card--special .insurance-card__icon { margin-bottom: 22px; }
  .insurance-cta { align-items: stretch; flex-direction: column; padding: 22px; }
  .insurance-cta .btn { width: 100%; }
  .modal__box { padding: 28px 22px; }
  .footer__inner { grid-template-columns: 1fr; gap: 34px; }
  .footer__bottom { flex-direction: column; gap: 10px; }
  .article-properties { margin-top: 44px; padding-top: 34px; }
  .article-properties__head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .article-properties__grid { grid-template-columns: 1fr; }
  .article-property:last-child:nth-child(odd) { display: block; }
}

/* На телефоне отзывы идут одной непрерывной лентой. Край следующей
   карточки остаётся виден — это понятная подсказка, что блок можно
   листать пальцем. Клоны и точки добавляет app.js только на мобильной
   ширине, поэтому компьютерная сетка остаётся прежней. */
@media (max-width: 760px) {
  #reviews { overflow: hidden; }
  #reviews .reviews.is-carousel {
    display: flex;
    grid-template-columns: none;
    align-items: stretch;
    gap: 14px;
    margin-inline: -18px;
    padding: 4px 18px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 18px;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #reviews .reviews.is-carousel::-webkit-scrollbar { display: none; }
  #reviews .reviews.is-carousel .review {
    flex: 0 0 min(84vw, 410px);
    min-width: 0;
    min-height: 420px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .reviews-carousel__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 28px;
    margin: 10px 0 0;
  }
  .reviews-carousel__dot {
    position: relative;
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(239, 206, 140, .28);
    cursor: pointer;
    transition: width .32s var(--ease), background-color .32s var(--ease), box-shadow .32s var(--ease);
  }
  .reviews-carousel__dot::after {
    content: '';
    position: absolute;
    inset: -8px;
  }
  .reviews-carousel__dot.is-active {
    width: 28px;
    background: linear-gradient(90deg, var(--gold), var(--gold-bright));
    box-shadow: 0 0 18px rgba(239, 206, 140, .3);
  }
}

@media (max-width: 420px) {
  #reviews .reviews.is-carousel .review {
    flex-basis: calc(100vw - 54px);
    min-height: 400px;
    padding: 26px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* ============================================================
   СТРАНИЦА ОБЪЕКТА (object.html) — галерея и просмотр фото
   ============================================================ */

.obj__gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin: 26px 0 8px;
}
.obj__thumb {
  padding: 0; border: 1px solid var(--line-soft); border-radius: var(--r);
  background: var(--card-hi); overflow: hidden; cursor: pointer;
  aspect-ratio: 4 / 3;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.obj__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.obj__thumb:hover { border-color: var(--gold); transform: translateY(-2px); }
.obj__thumb:hover img { transform: scale(1.045); }
/* Первое фото — крупное, на две клетки.
   Свою пропорцию ему не задаём: высоту диктуют две строки сетки,
   иначе его низ не совпадает с соседними плитками и ряд ломается. */
.obj__thumb.is-big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
@media (max-width: 640px) {
  .obj__gallery { grid-template-columns: 1fr 1fr; }
  /* на телефоне большая плитка одна в строке — тут пропорция нужна своя */
  .obj__thumb.is-big { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 3; }
}

.obj__lb {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(8, 8, 9, .95);
  display: flex; align-items: center; justify-content: center;
}
.obj__lb img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: var(--r-sm); }
.obj__lb-x {
  position: absolute; top: 14px; right: 22px;
  color: #fff; font-size: 34px; line-height: 1; cursor: pointer; opacity: .8;
}
.obj__lb-a {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: #fff; font-size: 0; line-height: 1; cursor: pointer; opacity: .7;
  padding: 10px 18px; user-select: none;
  display: grid; place-items: center;
}
.obj__lb-a::before {
  content: ''; width: 18px; height: 18px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform-origin: center;
}
.obj__lb-p::before { transform: rotate(135deg); }
.obj__lb-n::before { transform: rotate(-45deg); }
.obj__lb-a:hover, .obj__lb-x:hover { opacity: 1; }
.obj__lb-p { left: 6px; } .obj__lb-n { right: 6px; }
.obj__lb-c {
  position: absolute; bottom: 16px; left: 0; right: 0;
  text-align: center; color: var(--muted); font-size: 13px;
}
@media (max-width: 640px) { .obj__lb-a { font-size: 0; padding: 8px 10px; } }


/* ============================================================
   ЛИСТАНИЕ ФОТО В КАРТОЧКЕ КАТАЛОГА
   Стрелки лежат поверх фото, но вне ссылки на объект —
   поэтому клик по ним листает, а не открывает страницу.
   ============================================================ */

.card__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 4;
  width: 34px; height: 34px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: rgba(14, 14, 15, .62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: var(--gold); font-size: 0; line-height: 1;
  cursor: pointer; opacity: 0;
  transition: opacity .22s var(--ease), background .22s var(--ease);
}
.card__nav::before {
  content: '';
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform-origin: center;
}
.card__nav--prev::before { transform: rotate(135deg); }
.card__nav--next::before { transform: rotate(-45deg); }
.card__nav--prev { left: 8px; }
.card__nav--next { right: 8px; }
.card__nav:hover { background: rgba(14, 14, 15, .85); }
.card:hover .card__nav { opacity: 1; }

.card__dots {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 9px;
  display: flex; justify-content: center; gap: 5px; pointer-events: none;
}
.card__dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255, 255, 255, .42);
  transition: background .22s var(--ease), transform .22s var(--ease);
}
.card__dots i.is-on { background: var(--gold); transform: scale(1.3); }

.card__count {
  position: absolute; z-index: 4; right: 10px; bottom: 10px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(14, 14, 15, .62);
  font-size: 11.5px; color: var(--muted);
  opacity: 0; transition: opacity .22s var(--ease);
  pointer-events: none;
}
.card:hover .card__count { opacity: 1; }

/* На телефоне наведения нет: стрелки убираем совсем — там свайп,
   а точки показываем всегда, иначе неясно, что фото несколько. */
@media (hover: none) {
  .card__nav { display: none; }
  .card__count { opacity: 1; }
}


/* карта расположения на странице объекта */
#objMap { height: 380px; border: 1px solid var(--line-soft); border-radius: var(--r);
  margin-top: 8px; }
#objMap .leaflet-tile { filter: brightness(.82) contrast(1.05); }
.hint-addr { margin: 10px 0 0; font-size: 14px; color: var(--muted-dim); }
@media (max-width: 640px) { #objMap { height: 260px; } }


/* ============================================================
   ВСТРОЕННЫЙ КАТАЛОГ ПАРТНЁРА (страница «Новостройки»)

   Чужая страница показывается в рамке. У неё сверху своё меню и свой
   телефон — внутри нашего сайта это выглядело бы как чужой сайт,
   поэтому верх обрезаем: сдвигаем содержимое вверх и прячем выступ.

   Высота задана числом: их страница не сообщает свою высоту наружу
   (postMessage не используется), а измерить чужое содержимое браузер
   не даёт. Значения подобраны по замерам для четырёх комплексов.
   ============================================================ */

.extframe {
  /* Замерено на той ширине, которую рамка занимает на самом деле
     (1192 px внутри контейнера, а не 1280 окна) — на другой ширине
     у них другая раскладка, и обрезка попадала мимо. */
  --crop: 328px;      /* их шапка и баннер — до начала блока каталога */
  --full: 4345px;     /* полная высота их страницы */
  position: relative;
  overflow: hidden;
  height: calc(var(--full) - var(--crop));
  margin-top: 28px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--card);   /* до загрузки — тёмный, как сайт */
}
/* пока рамка не подключена — спокойная надпись вместо белого пятна */
.extframe__wait {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-dim); font-size: 14px;
}
.extframe.is-ready { background: #fff; }   /* их каталог светлый */
.extframe.is-ready .extframe__wait { display: none; }

.extframe.is-fallback {
  height: auto;
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 64px);
  background:
    radial-gradient(circle at 82% 18%, rgba(239, 206, 140, .12), transparent 34%),
    var(--card);
}
.extframe__fallback { max-width: 720px; text-align: center; }
.extframe__fallback h2 { margin: 12px 0 16px; font-size: clamp(28px, 4vw, 48px); font-weight: 400; }
.extframe__fallback > p:not(.eyebrow) { margin: 0 auto; max-width: 650px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.extframe__fallback-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.extframe iframe {
  position: absolute;
  top: calc(-1 * var(--crop));
  left: 0;
  width: 100%;
  height: var(--full);
  border: 0;
  display: block;
}

/* на узком экране рамка шириной 339 px — свои замеры */
@media (max-width: 900px) {
  .extframe { --crop: 260px; --full: 6330px; }
  .extframe.is-fallback { min-height: 420px; padding: 34px 22px; }
  .extframe__fallback-actions .btn { width: 100%; }
}
