/* Каталог жилых комплексов — по макетам «Каталог ЖК / Десктоп 1920»
   (136:197) и «Каталог ЖК / Телефон 390» (142:202).

   Колонка 1440 внутри кадра 1920 (поля 240) — как на странице комплекса,
   а не 1680, как в каталоге квартир: так в макете.

   Обводки — внутренней тенью, а не рамкой: рамка добавляет пиксель к
   размеру, и карточка перестаёт сходиться с макетом. */

.ct__in {
  max-width: calc(1440px + var(--side) * 2);
  margin: 0 auto;
  padding: 0 var(--side);
}

/* ─── Шапка каталога (136:218) ────────────────────────────────────────────
   Секция 1920×317 на подложке #F4F5F7, поля 80 сверху и снизу,
   зазор заголовка и чисел 32. */

/* Поля секции живут на самой секции, а не на внутренней колонке: макет
   задаёт их кадру, и сверка (tools/figmacheck) меряет именно кадр. */
.ct__head { background: var(--bg-soft); padding: 24px 0 80px; }
.ct__head .ct__in { display: flex; flex-direction: column; gap: 14px; }

.ct__crumbs { display: flex; gap: 8px; font-size: 13px; font-weight: 500; line-height: 17.76px; }
.ct__crumbs a { color: var(--accent-2); }
.ct__crumbs a:hover { text-decoration: underline; }
.ct__crumbs span { color: var(--ink-2); }
.ct__crumbs span:first-of-type { color: var(--ink-3); }

/* H1 56/800, интерлиньяж 59, трекинг −1.68 (136:220). */
.ct__h1 {
  margin: 18px 0 0;
  font-size: 56px; font-weight: 800; line-height: 59px; letter-spacing: -1.68px;
  color: var(--ink);
}

/* Числа (136:221): зазор 80, значение 34/800, подпись 13/500. */
.ct__nums { display: flex; flex-wrap: wrap; gap: 80px; margin-top: 18px; }
.ct__num { display: flex; flex-direction: column; gap: 2px; }
.ct__num b { font-size: 34px; font-weight: 800; line-height: 46px; letter-spacing: -0.68px; color: var(--ink); }
.ct__num i { font-size: 13px; font-weight: 500; line-height: 18px; font-style: normal; color: var(--ink-3); }

/* ─── Фильтры (136:234) ───────────────────────────────────────────────────
   Полоса на белом: поля 32 сверху и 16 снизу, зазор 12. */

.ct__filters { background: #fff; padding: 32px 0 16px; }
.ct__filters .ct__in { display: flex; flex-direction: column; gap: 12px; }

/* Плашки районов 39 высотой, скругление круглое, зазор 8 (136:236).
   Полоса переносится: девять районов в 1440 не помещаются, а прокрутка
   на широком экране прячет часть перелинковки от глаз. */
.ct__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ct__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; font-weight: 600; line-height: 19px; color: var(--ink);
}
.ct__chip i { font-size: 12px; font-weight: 600; font-style: normal; color: var(--ink-3); }
.ct__chip:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
/* Выбранный район — оранжевая заливка без рамки, как в макете. */
.ct__chip.is-on { background: var(--accent); box-shadow: none; color: #fff; }
.ct__chip.is-on i { color: #fff; }

/* Строка полей: два поля и кнопка. Поле .ff и кнопка «Показать» взяты из
   каталога квартир — компонент один на все три места. */
.ct__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ct__row .ff { flex: 0 1 329px; max-width: 329px; }

/* Переключатель вида (140:203): 45 высотой, поля 4, кнопки 37 с полями
   9/18. Выбранный вид — белая плашка на серой подложке. */
.ct__view {
  display: inline-flex; align-items: center; gap: 2px; align-self: flex-start;
  padding: 4px; border-radius: var(--r-pill); background: var(--bg-soft);
}
.ct__viewbtn {
  padding: 9px 18px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; line-height: 19px; color: var(--ink-2);
}
.ct__viewbtn.is-on { background: #fff; box-shadow: var(--shadow); color: var(--ink); }
a.ct__viewbtn:hover { color: var(--ink); }

/* Кнопка «Фильтры» и переключатель — только на телефоне (142:246). */
.ct__tgl, .ct__mobbtn { display: none; }

/* ─── Список (137:202) ────────────────────────────────────────────────────
   Колонка 1440, зазор 16, поля 0/80. */

.ct__list { padding: 24px 0 80px; }
.ct__list .ct__in { display: flex; flex-direction: column; gap: 16px; }
.ct__found { font-size: 22px; font-weight: 800; line-height: 30.05px; letter-spacing: -0.44px; color: var(--ink); }

/* Три карточки 469 с зазором 16 (469×3 + 16×2 = 1439 ≈ 1440). Крупная
   карточка и врезка занимают ряд целиком. */
.ct__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Подложка вместо фотографии — та же, что на странице комплекса: силуэт
   города. Чужой дом показывать нельзя, это будет другой дом (§14). */
.ctl__stub, .ctc__stub {
  position: absolute; inset: 0;
  background: linear-gradient(155deg, #313d4d 0%, #1b222c 55%, #12161d 100%);
}
.ct__sky {
  position: absolute; left: 0; right: 0; bottom: 0; height: 60%;
  background: url("/static/img/skyline.svg") bottom center / auto 100% no-repeat;
  opacity: .14;
}

/* Плашка на фотографии 30 высотой, поля 7/12, текст 12/800 (137:206). */
.ct__badge {
  display: inline-flex; align-items: center;
  padding: 7px 12px; border-radius: var(--r-pill); background: #fff;
  font-size: 12px; font-weight: 800; line-height: 16px; font-style: normal;
  color: var(--ink); white-space: nowrap;
}
.ct__badge--hot { color: var(--accent-2); }

/* ─── Крупная карточка (137:204) ──────────────────────────────────────────
   1440×420: фотография 780 слева, содержание 660 справа с полями 32. */

.ctl {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 780px 1fr;
  background: #fff; border-radius: var(--r-card);
  box-shadow: inset 0 0 0 1px var(--line); overflow: hidden;
}
.ctl__photo { position: relative; display: block; min-height: 420px; background: var(--bg-soft); }
.ctl__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ctl__badges { position: absolute; left: 20px; top: 20px; display: flex; flex-wrap: wrap; gap: 8px; max-width: calc(100% - 40px); }

.ctl__info { display: flex; flex-direction: column; gap: 14px; padding: 32px; }
.ctl__eyebrow {
  font-size: 12px; font-weight: 600; line-height: 16px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--accent-2);
}
.ctl__name { font-size: 36px; font-weight: 800; line-height: 49px; letter-spacing: -0.9px; color: var(--ink); }
.ctl__name:hover { color: var(--accent-2); }
.ctl__desc { margin: 0; font-size: 15px; font-weight: 500; line-height: 23px; color: var(--ink-2); }

.ctl__nums { display: flex; flex-wrap: wrap; gap: 32px; margin-top: auto; }
.ctl__numi { display: flex; flex-direction: column; gap: 1px; }
.ctl__numi b { font-size: 22px; font-weight: 800; line-height: 30px; letter-spacing: -0.44px; color: var(--ink); }
.ctl__numi i { font-size: 12px; font-weight: 500; line-height: 16px; font-style: normal; color: var(--ink-3); }
/* Дом без квартир в продаже: вместо трёх чисел одна честная строка. */
.ctl__none { margin: auto 0 0; font-size: 17px; font-weight: 800; line-height: 23px; color: var(--ink-2); }

.ctl__cta {
  align-self: flex-start;
  padding: 15px 26px; border-radius: var(--r-fld); background: var(--accent);
  font-size: 15px; font-weight: 600; line-height: 20px; color: #fff;
}
.ctl__cta:hover { background: var(--accent-2); }

/* ─── Карточка дома (137:227) ─────────────────────────────────────────────
   469×418: фотография 260, содержание с полями 24 и зазором 8. */

.ctc {
  display: flex; flex-direction: column;
  background: #fff; border-radius: var(--r-card);
  box-shadow: inset 0 0 0 1px var(--line); overflow: hidden;
}
.ctc:hover { box-shadow: inset 0 0 0 1px var(--ink-3), var(--shadow); }

.ctc__photo { position: relative; display: block; height: 260px; background: var(--bg-soft); }
.ctc__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ctc__photo .ct__badge { position: absolute; left: 12px; top: 12px; max-width: calc(100% - 24px); }

.ctc__info { display: flex; flex-direction: column; gap: 8px; padding: 24px; }
.ctc__eyebrow {
  font-size: 11px; font-weight: 600; line-height: 15px; font-style: normal;
  letter-spacing: .04em; text-transform: uppercase; color: var(--accent-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ctc__name { font-size: 22px; font-weight: 800; line-height: 30px; letter-spacing: -0.44px; color: var(--ink); }
.ctc__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
/* «Пока нет в продаже» приглушено: это состояние дома, а не цена. */
.ctc__val { font-size: 17px; font-weight: 800; line-height: 23px; color: var(--ink-2); }
.ctc__val--on { color: var(--ink); }
.ctc__m2 { font-size: 13px; font-weight: 500; line-height: 18px; font-style: normal; color: var(--ink-3); }
.ctc__meta { font-size: 13px; font-weight: 500; line-height: 18px; font-style: normal; color: var(--ink-2); }

/* ─── Врезка подбора (139:202) ────────────────────────────────────────────
   1440×208 на подложке #FFF4EE: фотография 120 круглая, зазор 32. */

.cti {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 32px;
  padding: 32px; border-radius: var(--r-card); background: var(--accent-bg);
}
.cti__ava { width: 120px; height: 120px; border-radius: var(--r-pill); object-fit: cover; flex: 0 0 auto; }
.cti__body { display: flex; flex-direction: column; gap: 8px; }
.cti__role {
  font-size: 12px; font-weight: 600; line-height: 16px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--accent-2);
}
.cti__quote { margin: 0; font-size: 22px; font-weight: 800; line-height: 31px; letter-spacing: -0.33px; color: var(--ink); }
.cti__acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.cti__btn {
  padding: 15px 24px; border-radius: var(--r-fld); background: var(--accent);
  font-size: 15px; font-weight: 600; line-height: 20px; color: #fff;
}
.cti__btn:hover { background: var(--accent-2); }
.cti__phone {
  padding: 15px 24px; border-radius: var(--r-fld); background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 15px; font-weight: 600; line-height: 20px; color: var(--ink);
}

/* ─── Пустая выдача (261:1080) ────────────────────────────────────────── */

.ct__empty {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 40px; border-radius: var(--r-card); background: var(--bg-soft);
}
.ct__empty b { font-size: 22px; font-weight: 800; line-height: 30px; letter-spacing: -0.44px; }
.ct__empty p { margin: 0; font-size: 15px; font-weight: 500; line-height: 23px; color: var(--ink-2); }
.ct__reset {
  margin-top: 6px; padding: 15px 24px; border-radius: var(--r-fld);
  background: var(--accent); font-size: 15px; font-weight: 600; color: #fff;
}
.ct__reset:hover { background: var(--accent-2); }

/* ─── Липкая кнопка карты (143:267) ───────────────────────────────────────
   Только на телефоне: на широком экране ссылка на карту стоит в шапке и
   всегда на виду, а полоса поверх содержимого там ничего не решает. */

.ct__sticky { display: none; }

/* ─── Промежуточные ширины ─────────────────────────────────────────────── */

@media (max-width: 1280px) {
  /* Фотография крупной карточки перестаёт быть половиной ряда раньше, чем
     колонка успевает сжаться: иначе содержание уезжает в две строки. */
  .ctl { grid-template-columns: 1fr 1fr; }
  .ct__grid { grid-template-columns: repeat(2, 1fr); }
  .ct__nums { gap: 40px; }
}

/* ─── Телефон, кадр 390 (142:202) ─────────────────────────────────────────
   Поля 20, колонка 350. Разметка та же — раскладку решает CSS. */

@media (max-width: 760px) {
  /* Шапка: поля 24/20, H1 32/800 с интерлиньяжем 34, зазор 20. */
  .ct__head { padding: 16px 0 24px; }
  .ct__head .ct__in { gap: 12px; }
  .ct__h1 { margin-top: 8px; font-size: 32px; line-height: 33.6px; letter-spacing: -0.96px; }

  /* Числа в две колонки: в макете 2×2 по 163 при колонке 350 и зазоре 12. */
  /* 2×2 по 163 при колонке 350 и зазоре 12 — так в макете (142:215).
     По вертикали зазор 14: в макете это лента с переносом, и перенос
     у неё шире, чем расстояние между соседями в строке. */
  .ct__nums { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-top: 12px; }
  .ct__num { gap: 1px; }
  .ct__num b { font-size: 24px; line-height: 33px; letter-spacing: -0.48px; }
  .ct__num i { font-size: 12px; line-height: 16px; }

  .ct__filters { padding: 14px 0; }
  .ct__filters .ct__in { gap: 10px; }

  /* Полоса районов идёт лентой с прокруткой: девять плашек в 350 не
     помещаются, а переносить их на четыре ряда — половина первого экрана. */
  .ct__chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(var(--side) * -1); padding: 0 var(--side);
  }
  .ct__chips::-webkit-scrollbar { display: none; }
  .ct__chip { flex: 0 0 auto; }

  /* Поля прячутся за кнопку. Переключатель — флажок, а не скрипт: фильтры
     обязаны открываться и без JS. */
  .ct__mobbtn {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 14px; min-height: 45px;
    border-radius: var(--r-fld); background: #fff;
    box-shadow: inset 0 0 0 1px var(--line);
    font-size: 14px; font-weight: 600; line-height: 19px; color: var(--ink);
    cursor: pointer;
  }
  .ct__mobbtn b { color: var(--accent-2); }
  .ct__mobbtn i { margin-left: auto; font-style: normal; color: var(--ink-3); }
  .ct__row { display: none; }
  .ct__tgl:checked ~ .ct__row { display: flex; flex-direction: column; align-items: stretch; }
  .ct__row .ff { flex: 1 1 auto; max-width: none; }
  /* Кнопку «Показать» на телефоне не прячем даже со скриптами: список
     фильтров раскрыт, и без неё непонятно, чем закончить выбор. */
  .js .ct__tgl:checked ~ .ct__row .fl__apply { display: block; height: 50px; }

  .ct__list { padding: 16px 0 40px; }
  .ct__list .ct__in { gap: 12px; }
  .ct__found { font-size: 19px; line-height: 26px; }

  /* Одна колонка. Крупная карточка складывается в столбец: фотография 260,
     под ней содержание (142:253). */
  .ct__grid { grid-template-columns: 1fr; }
  .ctl { grid-template-columns: 1fr; }
  .ctl__photo { min-height: 260px; height: 260px; }
  .ctl__info { gap: 10px; padding: 16px; }
  .ctl__name { font-size: 24px; line-height: 32px; letter-spacing: -0.48px; }
  .ctl__desc { font-size: 14px; line-height: 21px; }
  .ctl__nums { gap: 18px; margin-top: 4px; }
  .ctl__numi b { font-size: 18px; line-height: 25px; }
  .ctl__cta { align-self: stretch; text-align: center; }

  .ctc__photo { height: 180px; }
  .ctc__info { gap: 6px; padding: 14px; }
  .ctc__eyebrow { font-size: 10px; line-height: 14px; }
  .ctc__name { font-size: 19px; line-height: 26px; letter-spacing: -0.38px; }
  .ctc__val { font-size: 16px; line-height: 22px; }
  .ctc__meta { font-size: 12px; line-height: 16px; }

  /* Врезка на телефоне — столбцом, фотография 56 (143:207). */
  .cti { flex-direction: column; align-items: stretch; gap: 12px; padding: 18px 16px; }
  .cti__ava { width: 56px; height: 56px; }
  .cti__quote { font-size: 17px; line-height: 24px; }
  .cti__btn, .cti__phone { flex: 1 1 auto; text-align: center; }

  /* Полоса 390×82 поверх низа страницы: кнопка 183×50, поля 15/24,
     подложка размыта, чтобы под ней читались карточки. */
  .ct__sticky {
    display: flex; justify-content: center; align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; height: 82px; z-index: 20;
    background: linear-gradient(to top, rgba(255,255,255,.96) 55%, rgba(255,255,255,0));
    pointer-events: none;
  }
  .ct__mapbtn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 15px 24px; border-radius: var(--r-pill); background: var(--bg-dark);
    font-size: 15px; font-weight: 600; line-height: 20px; color: #fff;
    box-shadow: var(--shadow); pointer-events: auto;
  }
  /* Полоса перекрывает конец подвала — освобождаем ей место. */
  body.ct { padding-bottom: 82px; }

  .ct__empty { padding: 24px 20px; }
  .ct__empty b { font-size: 19px; line-height: 26px; }
  .ct__reset { align-self: stretch; text-align: center; }
}

/* ─── Застройщики (/developers) ───────────────────────────────────────────
   Своего кадра в макете нет: страница живёт в той же колонке, что каталог,
   и пользуется его шапкой с числами. Здесь — только сетка карточек. */
.dv__intro {
  max-width: 900px; margin-top: 6px;
  font-size: 16px; font-weight: 500; line-height: 25.6px; color: var(--ink-2);
}
.dv { padding: 48px 0 72px; }
.dv__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap);
}
.dv__card {
  display: flex; flex-direction: column; gap: 8px;
  background: #fff; border-radius: var(--r-card); padding: 24px 26px;
  box-shadow: inset 0 0 0 1px var(--line); text-decoration: none;
}
.dv__card:hover { box-shadow: var(--shadow); }
.dv__name { font-size: 20px; font-weight: 800; line-height: 27.3px; color: var(--ink); text-decoration: none; }
.dv__name:hover { color: var(--accent-2); }
/* Дома застройщика ссылками — перелинковка для робота (§8). Мелким шрифтом
   под платежом: главное в карточке — сам застройщик и его цена. */
.dv__houses {
  margin: 12px 0 0; padding: 12px 0 0; list-style: none;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 5px;
}
.dv__houses li { font-size: 13px; line-height: 18px; }
.dv__houses a { color: var(--ink-2); text-decoration: none; }
.dv__houses a:hover { color: var(--accent-2); text-decoration: underline; }
.dv__houses span { color: var(--ink-3); }
.dv__sub { font-size: 14px; font-weight: 500; line-height: 20px; color: var(--ink-2); }
.dv__price { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.dv__price b { font-size: 18px; font-weight: 700; line-height: 24.6px; color: var(--ink); }
/* Платёж рядом с ценой — §11: человек примеряет к зарплате рубли за месяц,
   а не миллионы. */
.dv__price i { font-style: normal; font-size: 14px; font-weight: 600; color: var(--accent-2); }
/* 🔴 §10, ст. 28 ФЗ «О рекламе»: условия расчёта стоят под платежами. */
.dv__terms { margin-top: 20px; font-size: 13px; font-weight: 500; line-height: 19px; color: var(--ink-3); }
.dv__empty { font-size: 16px; font-weight: 500; color: var(--ink-2); }
.dv__empty a { color: var(--accent-2); text-decoration: underline; }

@media (max-width: 1180px) {
  .dv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dv { padding: 32px 0 48px; }
  .dv__grid { grid-template-columns: 1fr; }
  .dv__card { padding: 20px; }
  .dv__name { font-size: 18px; line-height: 24.6px; }
}
