/* Раздел «Коттеджные посёлки» (концепт VILLAGES-01).
   Токены, шрифт и шаг отступов — из site.css, как у всего каталога; новые
   цвета не заводим. Принципы — docs/design/ui-checklist.md и atlassian-design:
   шаг 4/8/12/16/24, близость важнее линий, одна акцентная кнопка, состояния
   несут текст, а не только цвет. */

/* ===== Каталог: шапка, фильтры, выдача ===== */

.villages-page { min-width: 0; }
/* Высоту карточек задаёт общий каталог: по содержимому текущего ряда,
   без отдельной минимальной высоты для посёлков. */
.v-subtitle { margin: 8px 0 0; max-inline-size: 62ch; color: var(--muted); font-size: 13px; line-height: 1.5; }
.v-toolbar-note { margin: 0; color: var(--muted); font-size: 13px; }
.v-results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; min-height: 32px; }
.v-results-head p { margin: 0; color: var(--muted); font-size: 13px; }
.v-results-head strong { margin-right: 3px; color: var(--ink); font-size: 18px; font-weight: 650; }
.v-results-sub { color: var(--muted); }
.v-filter-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.v-directory-empty { margin: 0; padding: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 18px; }
.villages-page .filter-check { display: flex; align-items: center; gap: 8px; }
.villages-page .filter-check small { margin-left: auto; color: var(--muted); font-size: 11px; }
.villages-page .filter-check.is-empty { opacity: .55; }
.v-muted { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.v-na { color: var(--muted); }

/* ===== Обложка-заглушка =====
   Настоящих фотографий у концепта нет: права на снимки и генпланы не
   подтверждены, а рисовать вымышленные дома чек-лист запрещает. Показываем
   абстрактную подложку и честную подпись — слот под будущие фото виден сразу. */

.villages-page .v-cover { border-radius: 0; }
.v-cover--0 { background-image: linear-gradient(165deg, #e2f0dc 0%, #bfe0b4 46%, #8cc98a 100%); }
.v-cover--1 { background-image: linear-gradient(165deg, #e0effb 0%, #b6d9f4 46%, #7fb8e8 100%); }
.v-cover--2 { background-image: linear-gradient(165deg, #fdf1da 0%, #f7dfa8 46%, #ecc878 100%); }
.v-cover--3 { background-image: linear-gradient(165deg, #e6eaf6 0%, #c5cde9 46%, #9aa7d8 100%); }
/* Обложка-заглушка. В карточках каталога иконка и подпись стоят друг под
   другом — раскладку задаёт базовая сетка карточек; на большой обложке
   страницы посёлка блок растягивается на весь контейнер (см. .v-hero-cover). */
.v-cover-icon .icon { width: 64px; height: 64px; color: rgba(24, 35, 51, .32); }

/* ===== Плашки состояний и статусов ===== */

.v-state { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 5px 10px; border-radius: 6px; font-size: 13px; line-height: 20px; font-weight: 500; white-space: nowrap; }
.v-state::before { content: ""; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.v-state.is-ok { color: #2E7D32; background: #EAF6EC; }
.v-state.is-progress { color: #0754bd; background: #EAF2FF; }
.v-state.is-planned { color: #B45309; background: #FFF4E5; }
.v-state.is-unknown { color: #596579; background: #F0F2F5; }
/* Цена — плитка на фотозоне и только по опубликованным предложениям
   застройщика: без них ценовой строки нет вовсе (см. шаблон карточки). */
/* На узких карточках плитка цены перекрывает подпись заглушки — поднимаем её. */
.villages-page .card-cover-frame:has(.preview-price-block) .card-placeholder { padding-bottom: 44px; }

/* ===== Страница посёлка: каркас — от дизайн-системы карточки ЖК =====
   Сетку, hero-карточку, навигацию, секции и сайдбар задают те же исходные
   файлы, что входят в бандл complex-detail.css (complex-page.css +
   detail-design.css). Здесь — только специфика загородной недвижимости. */

.v-demo-strip { margin: 0 0 16px; padding: 12px 16px; border: 1px solid #f3d9ae; border-left: 3px solid #B45309; border-radius: 8px; background: #FFF9EE; color: #693200; font-size: 13px; line-height: 1.5; }

/* Обложка вместо фотографии: слот правильных пропорций под будущие снимки.
   position: relative обязателен: .card-placeholder позиционируется абсолютно
   и без опорного блока растягивается на весь вьюпорт, закрывая заголовок. */
.v-hero-cover { position: relative; overflow: hidden; }
.v-hero-cover .v-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; min-height: 280px; }
.v-hero-cover .v-cover-icon { display: flex; align-items: center; justify-content: center; }
.v-hero-cover .v-cover-icon .icon { width: 88px; height: 88px; color: rgba(24, 35, 51, .28); }
.v-hero-cover .v-cover > span:last-child { padding: 6px 10px; border-radius: 6px; background: rgba(255, 255, 255, .85); color: var(--ink-soft); font-size: 12px; line-height: 18px; }

/* Тип объекта над именем посёлка — как надзаголовок карточки ЖК. */
.v-village .detail-heading .eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 12px; line-height: 18px; text-transform: uppercase; font-weight: 500; }

/* ===== Страница посёлка: секции и блоки ===== */

.v-formats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.v-format { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 14px; font-weight: 500; }
.v-format .icon { width: 16px; height: 16px; color: var(--muted); }
.v-format.is-inactive { background: var(--surface); color: var(--muted); font-weight: 400; }
.v-format small { color: var(--muted); font-size: 11px; }

.v-offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 16px; }
.v-offer { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.v-offer.is-sold { border-color: var(--line); background: var(--surface); }
.v-offer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.v-offer-kind { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 13px; line-height: 20px; }
.v-offer-kind .icon { flex: 0 0 16px; width: 16px; height: 16px; }
.v-offer-title { margin: 0; font-size: 18px; line-height: 26px; font-weight: 600; }
.v-offer.is-sold .v-offer-title { color: var(--muted); }
.v-offer-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.v-offer-facts dt { margin: 0 0 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.v-offer-facts dd { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 600; }
.v-offer-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.v-offer-price { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.v-offer-price-value { margin: 0; font-size: 20px; line-height: 28px; font-weight: 650; }
.v-offer-price-request { font-size: 15px; font-weight: 550; color: var(--ink-soft); }
.v-offer-price-scope { margin: 4px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.v-offer-price-source { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* Строки «коммуникации / инфраструктура»: иконка, название, состояние. */
.v-state-list { margin: 0; padding: 0; list-style: none; }
.v-state-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.v-state-row:last-child { border-bottom: 0; }
.v-state-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; color: var(--muted); }
.v-state-icon .icon { width: 20px; height: 20px; }
.v-state-name { min-width: 0; font-size: 16px; line-height: 1.45; font-weight: 600; }
.v-state-name small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.5; }

/* Легенда — свёрнутая и визуально второстепенная. Каждая строка: плашка
   состояния и пояснение под ней; длинные подписи переносятся внутри блока,
   а не вылезают за край (замечание владельца 17.10.2026). */
.v-legend { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 18px; }
.v-legend summary { display: inline-flex; align-items: center; min-height: 36px; font-size: 13px; cursor: pointer; color: var(--accent); }
.v-legend summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.v-legend ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px 20px; margin: 10px 0 0; padding: 0; list-style: none; }
.v-legend li { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.v-legend li .v-state { max-width: 100%; white-space: normal; }
.v-legend li small { min-width: 0; color: var(--muted); overflow-wrap: anywhere; }

.v-table-scroll { overflow-x: auto; margin: 0; padding-bottom: 2px; }
.v-compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.v-compare th, .v-compare td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.v-compare thead th { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.v-compare tbody th { max-width: 220px; font-weight: 600; }
.v-compare tbody th small { font-weight: 400; color: var(--muted); }
.v-compare tbody tr.is-sold { color: var(--muted); }
.v-compare tbody tr:last-child th, .v-compare tbody tr:last-child td { border-bottom: 0; }
.v-table-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

/* Документы — общий компонент `documents-list` страницы ЖК;
   отдельного списка с плашками у посёлка больше нет. */

/* Карта */
.v-map { height: 468px; border-radius: 8px; }
/* Пины посёлков используют общую форму и палитру ЖК из map-card.css.
   Стадия остаётся в карточках и фильтрах; цвет метки от неё не зависит. */
.v-map-fallback { padding: 18px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface); }
.v-map-fallback-title { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.v-map-fallback-text { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.v-location-facts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.v-location-facts li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.5; }
.v-location-facts .icon { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 3px; color: var(--muted); }
.v-map-popup { min-width: 190px; }
.v-map-popup a { font-weight: 600; }
/* Снимок в попапе — как карточка ЖК на карте каталога: сверху, по ширине окна. */
.v-map-popup-media { display: block; margin: -13px -20px 8px; overflow: hidden; border-radius: 6px 6px 0 0; }
.v-map-popup-photo { display: block; width: 100%; height: 112px; object-fit: cover; }
.v-map-popup-place, .v-map-popup-price, .v-map-popup-stage { margin: 4px 0 0; font-size: 12px; line-height: 1.4; }
.v-map-popup-place { color: #596579; }
.v-map-popup-price { color: #182333; font-weight: 600; }
.v-map-popup-stage { color: #596579; }

/* ===== Боковая колонка: собственные штрихи поверх карточек ЖК ===== */

.v-contact-org { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }
.v-contact-legal { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.v-check-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.v-check-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.v-check-list li:first-child { padding-top: 0; }
.v-check-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.v-check-list span { color: var(--muted); }
.v-check-list b { max-width: 60%; text-align: right; font-weight: 550; overflow-wrap: anywhere; }
.v-side-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* ===== Адаптивность: брейкпоинты как у карточки ЖК (detail-design.css) ===== */

@media (max-width: 767px) {
  .v-map { height: 340px; }
  .v-offers { grid-template-columns: minmax(0, 1fr); }
  .v-state-row { grid-template-columns: 28px minmax(0, 1fr); }
  .v-state-row .v-state { grid-column: 2; justify-self: start; margin-top: 2px; }
  .v-hero-cover .v-cover { min-height: 200px; }
  .v-hero-cover .v-cover-icon .icon { width: 64px; height: 64px; }
  .v-formats { margin-bottom: 12px; }
}

@media (max-width: 375px) {
  .v-offer-facts { grid-template-columns: minmax(0, 1fr); }
}

/* ===== Карточка посёлка: первый экран в системе карточки ЖК ===== */

/* Обложка-заглушка в герое: нейтральная подложка без большого градиента. */
.v-village .detail-media .hero-photo-primary { display: grid; overflow: hidden; position: relative; }
.v-village .detail-media .v-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 100%; height: 100%; padding: 16px; border-radius: 8px; background-image: none; background-color: var(--surface); color: var(--muted); text-align: center; }
.v-village .detail-media .v-cover::after { display: none; }
.v-village .detail-media .v-cover .v-cover-icon { position: relative; z-index: 1; }
.v-village .detail-media .v-cover > span:last-child { position: relative; z-index: 1; }
.v-village .detail-media .v-cover-icon .icon { width: 44px; height: 44px; color: var(--muted); opacity: .55; }

/* Панель карты в шапке убрана вместе с мини-картой: подложка `.hero-map-link`
   закрывала тайлы непрозрачным фоном, и панель читалась пустой рамкой
   (владелец, 30.10.2026). Расположение ведут кнопка на снимке и раздел
   «Расположение» с настоящей картой. */

/* Карточки «Другие посёлки»: обложка-заглушка вместо фотографии —
   в том же размере, что снимок у «Других ЖК». */
.detail-related .related-card-cover { position: relative; }
.detail-related .related-card-cover .v-cover { padding: 8px 6px; gap: 6px; font-size: 9px; background-color: var(--surface); }
.detail-related .related-card-cover .v-cover::after { display: none; }
.detail-related .related-card-cover .v-cover-icon .icon { width: 26px; height: 26px; }

@media (max-width: 767px) {
  .v-village .detail-media .v-cover-icon .icon { width: 40px; height: 40px; }
}

/* ===== Страницы районов области (VILLAGES-GEO-01) ===== */

.v-district-head { margin: 0 0 18px; }
.v-district-head h1 { margin: 0 0 8px; font-size: 32px; line-height: 40px; font-weight: 600; }
.v-district-map-block { margin: 0 0 18px; }
.v-map--district { height: 340px; }

@media (max-width: 767px) {
  .v-district-head h1 { font-size: 24px; line-height: 30px; }
  .v-map--district { height: 300px; }
}

/* ===== Снимок посёлка (Image Studio, 17.10.2026) ===== */

/* Снимок занимает ту же фотозону, что заглушка: кадр заполняет рамку. */
.v-hero-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
