/* Общая часть всех вариантов «лакировки»: то, что стоит сделать при любом выборе.
   Разметка, шрифты, цвета и порядок блоков — их, без изменений. */

/* В их текстах остался мусор из Word: инлайн-шрифт Gilroy (не подключён), кегль в пунктах.
   Из-за него соседние абзацы набраны по-разному. Возвращаем текст к шрифту самого сайта. */
main section:not(.BlogDetail-Content) [style*="font-family"] { font-family: inherit !important; }
main section:not(.BlogDetail-Content) [style*="font-size"] { font-size: inherit !important; }
main section:not(.BlogDetail-Content) [style*="line-height"] { line-height: inherit !important; }
/* <strong><span style>…</span></strong> из Word: класс ставит dubai.js (unboldPasted) один раз при загрузке.
   Раньше здесь было strong:has(> span[style]) — на телефоне из-за него браузер перепроверял весь main при каждой
   смене атрибута style (слайдер, анимации), и прокрутка подвисала (замер 14.11.2026). :has с [style]/[aria-*] — нельзя. */
main .pf-unbold { font-weight: inherit; }

main h1, main h2, main h3 { text-wrap: balance; }
main p { text-wrap: pretty; }

/* картинки: плавное приближение под курсором вместо статичной плитки */
.project-card .image-container, .blog-card > div:first-child, .Home-ThreeColumnsPrimary .grid > div > div:first-child { overflow: hidden; }
.project-card .image-container img, .blog-card > div:first-child img, .Home-ThreeColumnsPrimary .grid > div > div:first-child img {
  transition: transform 1.1s cubic-bezier(.2, .7, .2, 1);
}
.project-card:hover .image-container img, .blog-card:hover > div:first-child img, .Home-ThreeColumnsPrimary .grid > div:hover > div:first-child img { transform: scale(1.05); }

/* первый экран: затемнение снизу вместо ровной серой плёнки — фото ярче, текст читается */
.Home-PromoSlider .slide-item .bg-black\/40 {
  background: linear-gradient(180deg, rgba(34, 33, 36, .28) 0%, rgba(34, 33, 36, .12) 38%, rgba(34, 33, 36, .72) 100%) !important;
}

.custom-btn { transition: background-color .25s, color .25s, border-color .25s, transform .15s; }
.custom-btn:active { transform: translateY(1px); }
main a:focus-visible, main button:focus-visible { outline: 2px solid #aea089; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .project-card .image-container img, .blog-card > div:first-child img { transition: none; }
}

/* ── Решения владельца от 10.11.2026 ─────────────────────────────────────────── */

/* Мессенджеры поверх страницы и вкладка «Мы вам перезвоним» уходят: их место занимает
   консультант (кнопка в правом нижнем углу, пока заглушка — /_bh/agent-stub.js). */
/* без :has(> a[aria-label=…]) — слайдер меняет aria-атрибуты, и такой :has на телефоне тормозил всю прокрутку */
main .social-buttons, main .sticky-social-buttons,
main div.fixed > a[aria-label="WhatsApp"], main div.fixed > a[aria-label="Telegram"],
body > div.flex.fixed.right-0 { display: none !important; }

/* Блок цифр: вместо плиток с пиктограммами — крупные цифры и тонкие линии. */
.Common-WhyBestHome .stat-item > img { display: none; }
.Common-WhyBestHome .stats-grid { gap: 0 32px !important; }
.Common-WhyBestHome .stat-item {
  background: transparent !important; height: auto !important; border-radius: 0 !important;
  align-items: flex-start !important; justify-content: flex-start !important;
  padding: 22px 0 26px !important; border-top: 1px solid #c6bdab; gap: 0 !important;
}
.Common-WhyBestHome .stat-item > div { align-items: flex-start !important; gap: 10px !important; }
.Common-WhyBestHome .stat-number { font-size: clamp(44px, 5.2vw, 72px) !important; line-height: 1 !important; font-variant-numeric: tabular-nums; }
.Common-WhyBestHome .stat-item span:not(.stat-number) { font: 400 12px/1.5 Geist, sans-serif !important; letter-spacing: 1px; text-transform: uppercase; color: #706a6b; text-align: left; }

/* Телефон: крупные заголовки не ломаются посреди слова и не упираются в край */
@media (max-width: 959px) {
  .projects-title, .why-title { font-size: clamp(32px, 9.4vw, 44px) !important; line-height: 1.15 !important; }
  .promo-title { font-size: clamp(52px, 17vw, 72px) !important; }
  main section h2[class*="text-[5"], main section h2[class*="text-[6"] { font-size: clamp(32px, 9.4vw, 44px) !important; line-height: 1.15 !important; }
}

/* Карточки проектов: кнопки «Контакты / Подробнее» стоят на одной линии, как бы ни
   различалась длина описаний (у них кнопки «плясали» по высоте). */
.projects-swiper .swiper-slide { height: auto !important; }
.projects-swiper .project-card { height: 100%; }
.projects-swiper .project-card .content-container { flex: 1; }
.projects-swiper .project-card .content-container > div { flex: 1; justify-content: space-between; }
.projects-swiper .project-card .project-name { min-height: 2.4em; }
.projects-swiper .project-card .content-container > div > div:first-child { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* подпись студии, делавшей старый сайт, в подвале не нужна: сайт собран заново */
footer a[href*="clockwork"] { display: none !important; }

/* ── Карточки проектов (каталог, главная, BestHome Plus): «Контакты / Подробнее» ──
   Кнопки стоят на одной линии во всём ряду, как бы ни отличалась длина описания: описание растягивается,
   кнопки прижаты к низу карточки. «Контакты» раз в несколько секунд переливается бликом — волной по ряду
   (задержка по месту карточки), при наведении темнеет и блик проходит сразу. «Подробнее» — тонкая линия,
   которую при наведении перерисовывает акцентная, и стрелка. Без анимаций, если они выключены в системе. */
.project-card .content-container { flex: 1; }
.project-card .content-container > div:last-child { flex: 1; }
.project-card .buttons-container { margin-top: auto; flex-wrap: wrap; row-gap: 12px; }
.project-card .buttons-container .custom-btn { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }
.project-card .btn-default {
  position: relative; overflow: hidden; isolation: isolate; padding: 0 24px;
  background: #e8e5dd; color: #2b2a2d;
  transition: background-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.project-card .btn-default::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .85) 48%, rgba(255, 246, 225, .55) 54%, transparent 70%);
  transform: translateX(-130%);
  animation: bh-shine 7s cubic-bezier(.45, 0, .2, 1) infinite; animation-delay: var(--bh-shine-d, 1s);
}
.projects-grid > :nth-child(4n + 2) .btn-default, .swiper-slide:nth-child(4n + 2) .btn-default { --bh-shine-d: 1.25s; }
.projects-grid > :nth-child(4n + 3) .btn-default, .swiper-slide:nth-child(4n + 3) .btn-default { --bh-shine-d: 1.5s; }
.projects-grid > :nth-child(4n + 4) .btn-default, .swiper-slide:nth-child(4n + 4) .btn-default { --bh-shine-d: 1.75s; }
@keyframes bh-shine { 0%, 76% { transform: translateX(-130%); } 92%, 100% { transform: translateX(130%); } }
@keyframes bh-shine-now { from { transform: translateX(-130%); } to { transform: translateX(130%); } }
.project-card .btn-default:hover, .project-card .btn-default:focus-visible {
  background: #222124; color: #f4f1ea; box-shadow: 0 10px 24px -14px rgba(34, 33, 36, .7);
}
.project-card .btn-default:hover::after, .project-card .btn-default:focus-visible::after {
  background: linear-gradient(105deg, transparent 30%, rgba(201, 185, 154, .55) 50%, transparent 70%);
  animation: bh-shine-now .9s cubic-bezier(.3, 0, .2, 1) 1 both;
}
.project-card .btn-line {
  gap: 8px; padding: 0; border-bottom: 0 !important; color: #2b2a2d;
  background:
    linear-gradient(#9a8466, #9a8466) left calc(100% - 9px) / 0 1px no-repeat,
    linear-gradient(currentColor, currentColor) left calc(100% - 9px) / 100% 1px no-repeat;
  transition: background-size .45s cubic-bezier(.3, 0, .2, 1), color .25s;
}
.project-card .btn-line::after { content: "→"; font-size: 14px; letter-spacing: 0; line-height: 1; transition: transform .3s cubic-bezier(.3, 0, .2, 1); }
.project-card .btn-line:hover, .project-card .btn-line:focus-visible { color: #7d6a50; background-size: 100% 1px, 100% 1px; }
.project-card .btn-line:hover::after, .project-card .btn-line:focus-visible::after { transform: translateX(4px); }
.project-card :is(.btn-default, .btn-line):focus-visible { outline: 2px solid #9a8466; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .project-card .btn-default::after { animation: none !important; transform: translateX(-130%); }
  .project-card .btn-line::after { transition: none; }
}

/* Арабский и персидский (dir="rtl", src/i18n.ts): телефоны и почта читаются слева направо, иначе «+90 242 511 22 08»
   показывается задом наперёд. */
[dir="rtl"] a[href^="tel:"], [dir="rtl"] a[href^="mailto:"] { direction: ltr; unicode-bidi: isolate; }

/* Листать мышкой (правка владельца 16.11, №4; поведение — public/polish/drag.js). Только мышь: на телефоне
   курсора нет и всё листалось пальцем и раньше. */
@media (pointer: fine) {
  .swiper-horizontal { cursor: grab; }
  .swiper-horizontal:active { cursor: grabbing; }
  .swiper img { -webkit-user-drag: none; user-select: none; }
  .bh-draggable { cursor: grab; }
  .bh-dragging { cursor: grabbing; user-select: none; }
  .bh-dragging * { pointer-events: none; }
}

/* Оформление из «Редактора сайта» (19.11.2026, src/site-look.ts): его CSS говорит шрифтами и цветами исходной
   платформы (--f-display, --f-body, --c-dark, --c-text2, --red) — здесь они становятся шрифтами и цветами BestHome;
   «красный» конструктора у нас — золотой. */
:root { --f-display: var(--bh-font-display, "Playfair Display", serif); --f-body: Geist, ui-sans-serif, system-ui, sans-serif; --c-dark: #222124; --c-text2: #3a3836; --red: #b08d57; }
