/* Правки шаблона villas-dom.ru (SEO-аудит 11.2026). Подключается после main.css.
   1) Заголовки, которые стали <h1> вместо <div>, выглядят как раньше: размер шрифта берут от родителя, как div.
   2) Заголовки разделов, переведённые из <h1> в <h2 class="as-h1"> (на странице должна быть одна h1), — вид прежней h1.
   3) .v-hidden — заголовок для поисковиков и экранных дикторов, когда тот же текст на странице показан картинкой/декором. */
h1.project-info__title,
h1.contacts-info__title {
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  margin-top: 0;
  padding: 0
}
.v-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important
}
.sale-title {
  font-weight: 400;
  font-size: 46px;
  line-height: 122%;
  text-transform: uppercase;
  margin: 0 0 30px
}
@media(max-width: 1004px) { .sale-title { font-size: 32px; line-height: 120% } }

/* Заголовки разделов, переведённые из <h1> в <h2 class="as-h1">: тот же вид, что был у h1.
   Сгенерировано из main.css (правила с h1 → .as-h1). Не править вручную — см. docs/CHANGES.md */
.as-h1 {font-size: 2em;
  margin: 0.67em 0;}
.as-h1 {margin: 0;
  padding: 0}
.as-h1 {font-weight: 400;
  font-size: 46px;
  line-height: 122%}
@media(min-width: 1900px) { .as-h1 {font-size: 72px;
    line-height: 111%} }
@media(max-width: 1420px) { .as-h1 {font-size: 43px} }
@media(max-width: 1004px) { .as-h1 {font-size: 32px;
    line-height: 120%} }
.modal__filter .as-h1 {margin-bottom: 40px}
@media(max-width: 767px) { .modal__filter .as-h1 {font-size: 28px;
    margin-bottom: 34px} }
.catalog-help-banner .catalog-help-banner-inner .as-h1 {color: #fff;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 100px;
  line-height: 120px}
@media(max-width: 1004px) { .catalog-help-banner .catalog-help-banner-inner .as-h1 {font-size: 48px;
    line-height: 48px} }
@media(max-width: 767px) { .catalog-help-banner .catalog-help-banner-inner .as-h1 {font-size: 36px;
    line-height: 39px} }
.catalog-help-banner .catalog-help-banner-inner .as-h1 span {color: #1a1a1a}
.project-characteristics .as-h1 {margin-bottom: 40px}
@media(max-width: 1004px) { .project-characteristics .as-h1 {margin-bottom: 31px} }
@media(max-width: 767px) { .project-characteristics .as-h1 {margin-bottom: 35px} }
.project-layout .as-h1 {margin-bottom: 12px}
@media(max-width: 767px) { .project-layout .as-h1 {margin-bottom: 15px} }
.project-equipment .as-h1 {margin-bottom: 14px}
@media(max-width: 767px) { .project-equipment .as-h1 {margin-bottom: 16px} }
.project-foundation .as-h1 {margin-bottom: 15px}
@media(max-width: 1004px) { .project-foundation .as-h1 {padding-left: 36px} }
@media(max-width: 767px) { .project-foundation .as-h1 {padding-left: 20px} }
.project-gallery-kingisepp .as-h1 {margin-bottom: 31px}
@media(min-width: 1900px) { .project-gallery-kingisepp .as-h1 {margin-bottom: 47px} }
@media(max-width: 1004px) { .project-gallery-kingisepp .as-h1 {padding: 0 34px} }
@media(max-width: 767px) { .project-gallery-kingisepp .as-h1 {padding: 0 20px} }
.mortgage-construction .as-h1 {margin-bottom: 40px}
@media(max-width: 767px) { .mortgage-construction .as-h1 {width: 230px;
    margin-bottom: 31px;
    padding-left: 20px} }
.additional-services .as-h1 {width: 400px}
@media(max-width: 1004px) { .additional-services .as-h1 {width: 290px} }
@media(max-width: 767px) { .additional-services .as-h1 {margin-bottom: 32px} }
.promo-help-banner .promo-help-banner-inner .as-h1 {display: flex;
  flex-direction: column;}
.promo-help-banner .promo-help-banner-inner .as-h1 .promo-help-banner-inner-h1-bottom {display: flex;
  gap: 12px;}
.promo-help-banner .promo-help-banner-inner .as-h1 .promo-help-banner-inner-h1-bottom .promo-help-banner-inner-question {width: 120px;
  background-position: left bottom;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M60 14.5C47.4355 14.5 36.0605 19.5928 27.8266 27.8266C19.5928 36.0605 14.5 47.4355 14.5 60C14.5 72.5645 19.5928 83.9395 27.8266 92.1734C36.0605 100.407 47.4355 105.5 60 105.5C72.5645 105.5 83.9395 100.407 92.1734 92.1734C100.407 83.9395 105.5 72.5645 105.5 60C105.5 47.4355 100.407 36.0605 92.1734 27.8266C83.9395 19.5928 72.5645 14.5 60 14.5Z' stroke='%23587B6B' stroke-width='9'/%3E%3Cpath d='M60 65.5C60 57.5 70.5 55 70.5 45C70.5 39.4772 65.5229 34.5 60 34.5C55.3404 34.5 50.6101 38.1869 49.5 42.5' stroke='%23587B6B' stroke-width='9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='60' cy='83' r='6' fill='%23587B6B'/%3E%3C/svg%3E%0A");}
@media(max-width: 1004px) { .promo-help-banner .promo-help-banner-inner .as-h1 .promo-help-banner-inner-h1-bottom .promo-help-banner-inner-question {} }
.promo-help-banner .promo-help-banner-inner .as-h1 {color: #1A1A1A;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 100px;
  line-height: 120px}
@media(max-width: 1004px) { .promo-help-banner .promo-help-banner-inner .as-h1 {font-size: 48px;
    line-height: 48px} }
@media(max-width: 767px) { .promo-help-banner .promo-help-banner-inner .as-h1 {font-size: 36px;
    line-height: 39px} }
.promo-help-banner .promo-help-banner-inner .as-h1 span {color: #1a1a1a}

/* Главная, «Популярные проекты»: название, площадь и цена на карточке (раньше название было видно только при наведении) */
.popular-meta {
  position: absolute;
  left: 24px;
  top: 24px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  color: #1a1a1a;
  pointer-events: none;
  max-width: calc(100% - 48px)
}
.popular-meta__name { font-size: 20px; line-height: 1.2 }
.popular-meta__info { font-size: 16px; line-height: 1.3; color: #587b6b; font-weight: 500 }
@media(max-width: 767px) {
  .popular-meta { left: 12px; top: 12px; padding: 8px 12px; border-radius: 12px; max-width: calc(100% - 24px) }
  .popular-meta__name { font-size: 16px }
  .popular-meta__info { font-size: 14px }
}

/* Нижняя панель связи для телефона (include/main/mobile-bar.php). Только на ширине < 768px. */
.vbar, .vbar-tab { display: none }
@media (max-width: 767px) {
  .vbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
    height: 56px; box-sizing: border-box; padding: 8px 6px 8px 10px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); height: calc(56px + env(safe-area-inset-bottom, 0px));
    background: #fff; box-shadow: 0 -2px 14px rgba(0, 0, 0, .10);
    align-items: center; gap: 6px;
  }
  .vbar__btn {
    flex: 1 1 0; min-width: 0; height: 40px; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    border-radius: 10px; border: 1.5px solid #46695D; background: #fff; color: #46695D;
    font-family: inherit; font-size: 13px; line-height: 16px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; padding: 0 6px;
  }
  .vbar__btn--main { background: #46695D; color: #fff }
  /* список номеров дежурных менеджеров над панелью (когда их двое) */
  .vbar__menu {
    display: none; position: absolute; left: 10px; bottom: calc(100% + 8px); min-width: 240px; box-sizing: border-box;
    background: #fff; border-radius: 16px; padding: 8px; gap: 2px; box-shadow: 0 20px 50px -20px rgba(24, 33, 31, .45), 0 2px 12px rgba(0, 0, 0, .08);
  }
  .vbar__menu.is-open { display: grid }
  .vbar__menu-t { font-size: 12px; color: #7a7a7a; padding: 6px 12px 4px; text-transform: uppercase; letter-spacing: .05em }
  .vbar__num { display: block; padding: 12px; border-radius: 10px; text-decoration: none; font-size: 18px; font-weight: 500; color: #1d1d1b !important; white-space: nowrap }
  .vbar__num:active, .vbar__num:hover { background: #F5ECDF }
  html.vbar-menu-open, html.vbar-menu-open body { cursor: pointer }
  .vbar__btn svg { flex: 0 0 auto }
  .vbar__hide {
    flex: 0 0 36px; width: 36px; height: 40px; padding: 0; border: 0; background: transparent; color: #666;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .vbar-tab {
    position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 9;
    height: 32px; padding: 0 16px; border: 0; border-radius: 14px 14px 0 0;
    background: #46695D; color: #fff; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 -2px 10px rgba(0, 0, 0, .15);
  }
  body.vbar-on .vbar { display: flex }
  body.vbar-off .vbar-tab { display: flex }
  /* контент, чат Битрикс24 и баннер cookie — над панелью */
  body.vbar-on { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)) }
  body.vbar-off { padding-bottom: 32px }
  /* кнопка чата Битрикс24 — в правом нижнем углу над панелью, на 20% меньше */
  .b24-widget-button-wrapper { right: 6px !important; transform: scale(.8); transform-origin: right bottom }
  body.vbar-on .b24-widget-button-wrapper { bottom: max(calc(60px + env(safe-area-inset-bottom, 0px)), calc(var(--vcookie, 0px) + 6px)) !important }
  body.vbar-off .b24-widget-button-wrapper { bottom: max(calc(6px + env(safe-area-inset-bottom, 0px)), calc(var(--vcookie, 0px) + 6px)) !important }
  body.vbar-on .legacy-cookie { bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important }
  body.vbar-off .legacy-cookie { bottom: 32px !important }
  body.hidden .vbar, body.hidden .vbar-tab { display: none !important } /* открыто окно заявки */
}

/* Кнопка «Отправить» в формах: состояние «Отправляем…» (include/main/form-submit.php) */
form .button.is-sending { pointer-events: none; cursor: default }
form .button.is-sending .button-original-fill { transform: none !important; opacity: 1 !important; background: #46695D !important; border-color: #46695D !important }
form .button.is-sending .button-original-text { transform: none !important; opacity: 1 !important; color: #fff !important }
form .button.is-sending .button-duplicate-fill, form .button.is-sending .button-duplicate-text { transform: translateY(100%) scale(.8) !important }
/* на сенсорных экранах у кнопок форм нет «наведения»: после касания кнопка не залипает зелёной */
@media (hover: none) {
  form .button:hover .button-original-fill { transform: none; opacity: 1 }
  form .button:hover .button-original-text { transform: none; opacity: 1 }
  form .button:hover .button-duplicate-fill, form .button:hover .button-duplicate-text { transform: translateY(100%) scale(.8) }
}

/* Мобильное меню: номера телефонов друг под другом без пустой строки (между ними выводится <br>),
   «Вконтакте» и «Youtube» — внизу меню */
@media (max-width: 1004px) {
  .modal__header-menu .modal__wrap { display: flex; flex-direction: column; overflow-y: auto; box-sizing: border-box }
  .modal__header-menu .header__nav { flex: 0 0 auto }
  .modal__header-menu .header__contact { flex: 1 0 auto }
  .modal__header-menu .header__contact br { display: none }
  .modal__header-menu .header__contact a[href^="tel:"] + a:not([href^="tel:"]) { margin-top: auto; padding-top: 24px }
}

/* Пункт меню «Акции» — неяркое красное подчёркивание (шапка и мобильное меню) */
.header__nav-item a[href="/sale/"] .btn-original-text,
.header__nav-item a[href="/sale/"] .btn-duplicate-text,
.modal__header-menu .header__nav-item a[href="/sale/"] {
  text-decoration: underline; text-decoration-color: rgba(192, 72, 64, .75);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.header__nav-item.active a[href="/sale/"] .btn-original-text,
.header__nav-item.active a[href="/sale/"] .btn-duplicate-text { text-decoration: none } /* активный пункт (страница «Акции») — без подчёркивания */

/* /sale/: «Проекты домов по горячим ценам» (include/sale/hot-projects.php) */
.sale-banner img { display: block; border-radius: 16px }
.hot { margin-top: 64px }
.hot__title { font-size: 44px; line-height: 120%; font-weight: 400; margin: 0 0 12px }
.hot__sub { font-size: 18px; line-height: 150%; color: #555; margin: 0 0 32px; max-width: 760px }
.hot__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px }
.hot-card { display: flex; flex-direction: column; background: #F5ECDF; border-radius: 16px; overflow: hidden; color: #1a1a1a; text-decoration: none; transition: box-shadow .25s, transform .25s }
.hot-card:hover { box-shadow: 0 18px 40px -22px rgba(24, 33, 31, .45); transform: translateY(-2px) }
.hot-card__img { position: relative; display: block; aspect-ratio: 4 / 3; background: #e6ddd0 }
.hot-card__img img { width: 100%; height: 100%; object-fit: cover; display: block }
.hot-card__badge { position: absolute; left: 16px; top: 16px; padding: 6px 12px; border-radius: 50px; background: #B04A42; color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .01em }
.hot-card__body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; flex: 1 }
.hot-card__name { font-size: 26px; line-height: 120% }
.hot-card__meta { font-size: 15px; color: #666 }
.hot-card__prices { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px }
.hot-card__price { font-size: 28px; line-height: 120%; font-weight: 600; color: #46695D }
.hot-card__old { font-size: 16px; color: #888 }
.hot-card__until { font-size: 14px; color: #B04A42 }
.hot-card__more { margin-top: auto; padding-top: 12px; font-size: 14px; text-transform: uppercase; letter-spacing: .03em; color: #46695D; font-weight: 600 }
@media (max-width: 1004px) {
  .hot { margin-top: 44px }
  .hot__title { font-size: 32px }
  .hot__sub { font-size: 16px; margin-bottom: 24px }
  .hot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px }
}
@media (max-width: 600px) {
  .sale-banner img { border-radius: 10px }
  .hot__title { font-size: 28px }
  .hot__grid { grid-template-columns: 1fr }
  .hot-card__name { font-size: 22px }
  .hot-card__price { font-size: 24px }
}

/* Каталог проектов и «Бани и домики»: у всех карточек одинаковая рамка фото (1.45 : 1) на любом экране.
   Фото, близкие к рамке, заполняют её целиком (срез не больше 5% с края — небо/газон); остальные показываются целиком,
   поля заполняет размытая копия фото (класс card__img-fit ставит шаблон news.list). Высота карточки — по содержимому. */
.catalog__wrap .card { height: auto !important }
.catalog__wrap .card .card__wrap {
  position: relative; height: 100%; min-height: 100%; box-sizing: border-box;
  padding: calc(100% / 1.45 + 24px) 24px 21px;
}
.catalog__wrap .card .card__img { height: auto !important; aspect-ratio: 1.45 / 1; overflow: hidden; background: #e9e6e1 }
.catalog__wrap .card .card__img img { object-fit: cover !important; object-position: center }
.catalog__wrap .card .card__img img.card__img-fit { object-fit: contain !important; background-size: cover; background-position: center; background-repeat: no-repeat }
@media (min-width: 1900px) { .catalog__wrap .card .card__wrap { padding: calc(100% / 1.45 + 32px) 32px 32px } }
