/*
 * =======================================================================
 * MAIN.CSS — Стили нового дизайна Аквариус
 * =======================================================================
 *
 * СТРУКТУРА ФАЙЛА:
 *   1. Шрифты (@font-face Inter)
 *   2. Типографика (утилитарные классы + универсальные компоненты)
 *   3. Базовые стили (body, ссылки, кнопки, формы, утилиты)
 *   4. Общие компоненты (header, footer, mobile-menu, floating CTA)
 *   5. Компоненты страниц (hero, project-card, portfolio filters, etc.)
 *   6. Страница: Главная (main_msc.tpl) — quote, task-grid, gallery, таймлайн
 *   7. Страница: О компании (company.tpl)
 *   8. Страница: Блог (blog.tpl, blogs_category.tpl)
 *   9. Страница: Контакты (contacts.tpl)
 *   10. Страница: Цены (price.tpl)
 *   11. Страница: 404 (404.tpl)
 *   12. Адаптивность (все медиа-запросы в конце файла)
 *
 *   Примечание: Hero-секция (hero-section) — общий компонент в секции 5,
 *   используется на главной, портфолио и ЖК
 *
 * -----------------------------------------------------------------------
 * ТИПОГРАФИКА (справочник классов)
 * -----------------------------------------------------------------------
 *
 *   Универсальные компоненты:
 *     .page-title              — заголовок страницы H1 (24px → 40px на desktop)
 *     .content-typography      — контейнер для статей/политики/описаний
 *     .content-typography--lead-first — первый абзац = лид (больший отступ)
 *
 *   Заголовки SemiBold 600:
 *     .title-60   — 60px/68px (hero desktop)
 *     .title-40   — 40px/48px (секции)
 *     .title-32   — 32px/40px (подсекции)
 *     .title-24   — 24px/32px (карточки, блоки)
 *     .title-20   — 20px/26px (мелкие заголовки)
 *
 *   Подзаголовки SemiBold 600:
 *     .headline-18 — 18px/24px (заголовки карточек)
 *
 *   Lead-текст Regular 400 (hero, описания):
 *     .title-32-regular — 32px/40px
 *     .title-24-regular — 24px/32px
 *     .title-22-regular — 22px/30px
 *
 *   Body Light 300 (основной текст):
 *     .body-l-24  — 24px/32px (крупный body)
 *     .body-m-18  — 18px/26px (подзаголовки форм, описания комнат)
 *     .body-m-16  — 16px/22px (стандартный body)
 *     .body-s-14  — 14px/20px (мелкий текст, подписи)
 *     .body-s-14-semibold — 14px/20px SemiBold
 *
 * -----------------------------------------------------------------------
 * ЦВЕТА (CSS-переменные из bootstrap-variables.css)
 * -----------------------------------------------------------------------
 *
 *   Текстовые:
 *     --bs-gray-950 (#0B0C0E) — заголовки, акцентный текст
 *     --bs-gray-800 (#2D3139) — основной текст
 *     --bs-gray-700 (#434956) — вторичный текст (через .text-gray-700)
 *     --bs-gray-600           — мягкий серый
 *     --bs-gray-500 (#80899C) — placeholder, hints
 *
 *   Фоновые:
 *     --bs-light (#F7F7F5)    — светлый фон карточек
 *     --bs-gray-100           — разделители, бордеры
 *
 *   Утилитарные классы:
 *     .text-gray-950, .text-gray-800, .text-gray-700, .text-gray-600, .text-gray-500
 *     .bg-light-custom, .bg-gray-100
 *
 * -----------------------------------------------------------------------
 * КНОПКИ И ФОРМЫ
 * -----------------------------------------------------------------------
 *
 *   Кнопки:
 *     .btn-rounded       — скруглённая (border-radius: 56px)
 *     .btn-primary-custom — тёмная кнопка
 *     .btn-light-custom   — светлая кнопка
 *
 *   Формы:
 *     .form-control, .form-select — скруглённые инпуты (border-radius: 56px)
 *     .contacts-form-field — контейнер поля с иконкой
 *
 * =======================================================================
 */


/* =======================================================================
   1. ШРИФТЫ
   ======================================================================= */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/Inter-Light.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Inter-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/Inter-Medium.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Inter-SemiBold.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Inter-Bold.ttf') format('truetype');
}


/* =======================================================================
   2. ТИПОГРАФИКА
   ======================================================================= */

/* --- Утилитарные классы (для точечного использования) --- */

/* Заголовки SemiBold */
.title-60 { font-size: 60px; font-weight: 600; line-height: 68px; letter-spacing: 0; }
.title-40 { font-size: 40px; font-weight: 600; line-height: 48px; letter-spacing: 0; }
.title-32 { font-size: 32px; font-weight: 600; line-height: 40px; letter-spacing: 0; }
.title-24 { font-size: 24px; font-weight: 600; line-height: 32px; letter-spacing: 0; }
.title-20 { font-size: 20px; font-weight: 600; line-height: 26px; letter-spacing: 0; }

/* Подзаголовки */
.headline-18 { font-size: 18px; font-weight: 600; line-height: 24px; letter-spacing: 0; }

/* Lead-текст Regular */
.title-32-regular { font-size: 32px; font-weight: 400; line-height: 40px; letter-spacing: 0; }
.title-24-regular { font-size: 24px; font-weight: 400; line-height: 32px; letter-spacing: 0; }
.title-22-regular { font-size: 22px; font-weight: 400; line-height: 30px; letter-spacing: 0; }

/* Body Light 300 */
.body-l-24 { font-size: 24px; font-weight: 300; line-height: 32px; letter-spacing: 0; }
.body-m-18 { font-size: 18px; font-weight: 300; line-height: 26px; letter-spacing: 0; }
.body-m-16 { font-size: 16px; font-weight: 300; line-height: 22px; letter-spacing: 0; }
.body-s-14 { font-size: 14px; font-weight: 300; line-height: 20px; letter-spacing: 0; }
.body-s-14-semibold { font-size: 14px; font-weight: 600; line-height: 20px; letter-spacing: 0; }

/* --- Универсальный заголовок страницы --- */
.page-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: 0;
  color: var(--bs-gray-950);
}

/* --- Универсальный контейнер для контента (статьи, политика, описания) --- */
.content-typography {
  color: var(--bs-gray-800);
}

.content-typography > *:first-child { margin-top: 0; }
.content-typography > *:last-child { margin-bottom: 0; }

.content-typography p,
.content-typography li {
  font-size: 18px;
  line-height: 24px;
  font-weight: 300;
}

.content-typography > * { margin: 0 0 12px; }

.content-typography ul,
.content-typography ol { padding-left: 24px; }

.content-typography h2 {
  margin-top: 24px;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  color: var(--bs-gray-950);
}

.content-typography h3 {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: var(--bs-gray-950);
}

.content-typography img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
}

/* Модификатор: первый абзац = лид */
.content-typography--lead-first > p:first-of-type { margin-bottom: 48px; }


/* =======================================================================
   3. БАЗОВЫЕ СТИЛИ
   ======================================================================= */

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--bs-gray-950);
  background-color: #ffffff;
}

/* --- Ссылки --- */
a {
  color: var(--bs-link-color);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

a:hover {
  color: var(--bs-link-hover-color);
  border-bottom-color: currentColor;
}

a:focus-visible:not(.btn) {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 12, 14, 0.12);
  border-radius: 4px;
}

/* Ссылки без бордера (навигация, кнопки, карточки) */
a.btn, .btn, .nav-link, .dropdown-item, .top-menu-item,
.footer-section-link, .footer-phone-link, .logo,
.project-card__title, .blog-category-pill, .blog-card {
  border-bottom: none;
  text-decoration: none;
}

/* --- Кнопки --- */
.btn-rounded {
  --bs-btn-border-radius: 56px;
  border-radius: 56px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.btn-primary-custom {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: var(--bs-gray-800);
  --bs-btn-hover-border-color: var(--bs-gray-800);
  --bs-btn-focus-shadow-rgb: 11, 12, 14;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: var(--bs-gray-800);
  --bs-btn-active-border-color: var(--bs-gray-800);
  --bs-btn-disabled-color: #ffffff;
  --bs-btn-disabled-bg: var(--bs-gray-400);
  --bs-btn-disabled-border-color: var(--bs-gray-400);

  background-color: var(--bs-btn-bg);
  color: var(--bs-btn-color);
  border-color: var(--bs-btn-border-color);
}

.btn-primary-custom:hover {
  background-color: var(--bs-btn-hover-bg);
  color: var(--bs-btn-hover-color);
  border-color: var(--bs-btn-hover-border-color);
}

.btn-light-custom {
  --bs-btn-color: var(--bs-primary);
  --bs-btn-bg: var(--bs-light);
  --bs-btn-border-color: var(--bs-light);
  --bs-btn-hover-color: var(--bs-primary);
  --bs-btn-hover-bg: #e8e8e6;
  --bs-btn-hover-border-color: #e8e8e6;
  --bs-btn-focus-shadow-rgb: 11, 12, 14;
  --bs-btn-active-color: var(--bs-primary);
  --bs-btn-active-bg: #e8e8e6;
  --bs-btn-active-border-color: #e8e8e6;

  background-color: var(--bs-btn-bg);
  color: var(--bs-btn-color);
  border-color: var(--bs-btn-border-color);
}

.btn-light-custom:hover {
  background-color: var(--bs-btn-hover-bg);
  color: var(--bs-btn-hover-color);
  border-color: var(--bs-btn-hover-border-color);
}

.btn:focus,
.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(11, 12, 14, 0.12);
  outline: none;
}

/* --- Формы --- */
.form-control,
.form-select {
  padding: 14px 20px;
  border-radius: 56px;
  font-size: 14px;
  line-height: 20px;
  min-height: 48px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--bs-gray-950);
  box-shadow: 0 0 0 3px rgba(11, 12, 14, 0.12);
  outline: none;
}

.form-check-input:focus {
  border-color: var(--bs-gray-950);
  box-shadow: 0 0 0 3px rgba(11, 12, 14, 0.12);
  outline: none;
}

.form-check-input:checked {
  background-color: var(--bs-gray-950);
  border-color: var(--bs-gray-950);
}

.border_red { border-color: red; }

/* --- Утилиты --- */
.backdrop-blur {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.divider {
  height: 1px;
  background-color: var(--bs-gray-100);
  border: none;
  margin: 0;
}

.text-gray-500 { color: var(--bs-gray-500); }
.text-gray-600 { color: var(--bs-gray-600); }
.text-gray-700 { color: #434956; }
.text-gray-800 { color: var(--bs-gray-800); }
.text-gray-950 { color: var(--bs-gray-950); }

.bg-light-custom { background-color: var(--bs-light); }
.bg-gray-100 { background-color: var(--bs-gray-100); }

.invis { display: none; }
.field-hidden-abs { position: absolute; opacity: 0; pointer-events: none; }


/* =======================================================================
   4. ОБЩИЕ КОМПОНЕНТЫ
   ======================================================================= */

/* --- Header --- */
.header {
  height: 56px;
  border-radius: 8px;
  background: rgba(232, 232, 232, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0 16px;
}

.header-fixed {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 1320px;
  width: calc(100% - 32px);
  z-index: 1050;
}

/* На десктопе выравниваем ширину фикс-хедера с контентом container-lg
   (у container-lg есть внутренние паддинги, из-за которых контент визуально уже). */
@media (min-width: 992px) {
  .header-fixed {
    max-width: calc(1320px - var(--bs-gutter-x, 24px));
    width: calc(100% - 32px - var(--bs-gutter-x, 24px));
  }
}

.header .logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.header .top-menu-item {
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--bs-gray-950);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  text-decoration: none;
  transition: background-color 0.2s;
}

.header .top-menu-item:hover {
  background-color: rgba(255, 255, 255, 0.5);
  color: var(--bs-gray-950);
}

.header .dropdown-menu {
  border-radius: 12px;
  padding: 8px;
  border: 1px solid var(--bs-gray-100);
  box-shadow: 0 12px 32px rgba(11, 12, 14, 0.10);
}

.header .dropdown-item {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 20px;
  color: var(--bs-gray-950);
}

.header .dropdown-item:hover,
.header .dropdown-item:focus {
  background-color: rgba(232, 232, 232, 0.6);
  color: var(--bs-gray-950);
}

.header .dropdown-item:active {
  background-color: rgba(232, 232, 232, 0.85);
  color: var(--bs-gray-950);
}

/* --- Mobile Menu --- */
html.mobile-menu-open,
html.mobile-menu-open body { overflow: hidden; }

#menu-mobile-wrapper.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#menu-mobile-wrapper.mobile-menu.active {
  pointer-events: auto;
  opacity: 1;
}

.mobile-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
}

.mobile-menu__panel {
  position: absolute;
  inset: 0;
  background: #ffffff;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  will-change: transform;
}

#menu-mobile-wrapper.mobile-menu.active .mobile-menu__panel {
  transform: translateX(0);
}

.mobile-menu__panel-inner {
  position: relative;
  height: 100%;
  padding: 16px;
  padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu__header {
  height: 48px;
  border-radius: 8px;
  background: rgba(232, 232, 232, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px 4px 8px;
}

.mobile-menu__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-bottom: none;
}

.mobile-menu__close {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #434956;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu__nav { margin-top: 32px; }

.mobile-menu__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-menu__item { position: relative; }

.mobile-menu__link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: 0;
  color: #0b0c0e;
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
  text-decoration: none;
  border-bottom: none;
}

.mobile-menu__link:hover { color: #0b0c0e; }

.mobile-menu__chevron {
  color: #80899c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.mobile-menu__item.is-open > .mobile-menu__link .mobile-menu__chevron {
  transform: rotate(90deg);
}

.mobile-menu__sublist {
  list-style: none;
  padding: 0;
  margin: 14px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-menu__sublink {
  display: inline-flex;
  border-bottom: none;
  text-decoration: none;
  font-size: 18px;
  font-weight: 400;
  line-height: 24px;
  color: #434956;
}

.mobile-menu__sublink:hover { color: #0b0c0e; }

.mobile-menu__meta {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-menu__meta-link {
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
  color: #0b0c0e;
  text-decoration: none;
  border-bottom: none;
}

.mobile-menu__meta-link:hover { color: #0b0c0e; }

.mobile-menu__bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 1;
  padding: 40px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

.mobile-menu__bottom::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.92) 38%, #ffffff 72%, #ffffff 100%);
  pointer-events: none;
}

.mobile-menu__bottom > * { position: relative; }

.mobile-menu__cta {
  flex: 1 1 auto;
  min-height: 48px;
}

.mobile-menu__icon-btn {
  width: 48px;
  height: 48px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu__icon-btn img { display: block; }

/* --- Footer --- */
.footer { padding-top: 40px; }
.footer .footer-section { display: flex; flex-direction: column; gap: 8px; }
.footer .footer-legal { display: flex; flex-direction: column; gap: 8px; }

.footer .footer-section-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--bs-gray-950);
  margin-bottom: 0;
}

.footer .footer-section-link {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--bs-gray-800);
  text-decoration: none;
  transition: color 0.2s;
}

.footer .footer-section-link:hover {
  color: var(--bs-gray-950);
}

.footer .footer-phone-link {
  color: var(--bs-gray-950);
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.footer .footer-phone-link:hover { background: transparent; }

.footer-divider { height: 1px; background: var(--bs-gray-100); }
.footer-inner { max-width: 1320px; margin: 0 auto; }

.footer .footer-social-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer .footer-social-links .footer-section-link { display: block; }

/* --- Floating CTA --- */
.floating-cta {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1050;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.floating-cta__download {
  padding: 14px 20px;
  font-size: 14px;
  line-height: 1.43;
  white-space: nowrap;
}

.floating-cta__call {
  padding: 14px;
  width: 56px;
  height: 56px;
}

/* --- main.no-hero --- */
main.main.no-hero { padding-top: 140px !important; }


/* =======================================================================
   5. КОМПОНЕНТЫ СТРАНИЦ
   ======================================================================= */

/* --- Hero Section --- */
.hero-section {
  position: relative;
  height: 590px;
  overflow: hidden;
}

.hero-section .hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-section .hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-section .hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.32) 0%, rgba(0,0,0,0.20) 35%, rgba(0,0,0,0.40) 100%);
}

.hero-section .hero-content {
  position: relative;
  z-index: 1;
  justify-content: flex-end !important;
  padding-bottom: 64px;
}

.hero-section .hero-actions { gap: 12px !important; }

.hero-section .hero-actions > a.btn:not(.rounded-circle) { white-space: nowrap; }

.hero-section .hero-actions .hero-primary-btn { padding: 16px 24px; }

.hero-section .hero-title,
.hero-section .hero-text {
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.20);
}

/* --- Project Cards (portfolio, ZHK) --- */
.project-card .images {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bs-light);
}

.project-card__title,
.project-card__title:hover,
.project-card__title:focus-visible {
  border-bottom: none;
  text-decoration: none;
}

.project-card .portfolio_work {
  display: block;
  width: 100%;
  height: 245px;
  object-fit: cover;
}

/* Overlay tags */
.price_feature,
.video_feature {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 1000px;
  color: #ffffff;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.video_feature { left: auto; right: 12px; }

.video_feature_icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  flex: 0 0 auto;
}

.project-card__tags {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-card__tags .price_feature,
.project-card__tags .project-tag { position: static; }

.project-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 1000px;
  color: #ffffff;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.project-card--more {
  display: block;
  border-bottom: none;
  text-decoration: none;
}

.project-card--more__inner {
  height: 245px;
  border-radius: 8px;
  background: var(--bs-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.project-card--more__title {
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  color: var(--bs-gray-950);
}

.project-card--more__subtitle {
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: #434956;
}

/* --- HvrSlider (листалка превью) --- */
.hvr { margin-bottom: 8px; }

.hvr__images {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.hvr__sectors {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 2;
}

.hvr__sector { flex: 1 1 auto; }

.hvr__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
}

.hvr__dot {
  flex: 1 1 0;
  height: 3px;
  background: var(--bs-gray-100);
  transition: background-color 180ms ease;
}

.hvr__dot--active { background: var(--bs-gray-950); }

/* --- Swiper (мобильные карточки портфолио) --- */
.project-card .portfolioSwiper { position: relative; }

.project-card .portfolioSwiper .swiper-pagination {
  /* position: static; */
  margin-top: 8px;
  justify-content: center;
}

.project-card .portfolioSwiper .swiper-pagination-bullet {
  width: 6px;
  height: 6px;
  background: var(--bs-gray-100);
  opacity: 1;
}

.project-card .portfolioSwiper .swiper-pagination-bullet-active {
  background: var(--bs-primary);
}

/* --- ZHK Cards --- */
.zhk-card__image {
  height: 245px;
  border-radius: 8px;
  overflow: hidden;
  background: #f7f7f5;
}

.zhk-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.zhk-card__title { margin-top: 8px; }

.zhk-card:hover .zhk-card__image img {
  transform: scale(1.02);
  transition: transform 180ms ease;
}

/* ZHK page fix */
.zhk-page .images {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bs-light);
}

.zhk-page .portfolio_work {
  display: block;
  width: 100%;
  height: 245px;
  object-fit: cover;
}

/* --- Portfolio List (filters + tabs) --- */
.portfolio-room-tabs--list { margin-top: 0; }
.portfolio-room-tabs--list .portfolio-room-tabs__track { width: 100%; }

.portfolio-room-tabs--list .portfolio-room-tabs__tab {
  flex: 1 1 0;
  width: 50%;
}

.portfolio-list-controls { flex-wrap: nowrap; }
.portfolio-list-controls .portfolio-room-tabs { min-width: 0; }
.portfolio-list-controls .btn.rounded-circle { flex: 0 0 auto; }
.portfolio-room-tabs--list .portfolio-room-tabs__tab .portfolio-list-badge { margin-left: 6px; }

.portfolio-list-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 2px 6px;
  margin-left: 8px;
  border-radius: 1000px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--bs-gray-950);
  background: var(--bs-light);
}

.portfolio-list-badge--white { background: #fff; }

/* Portfolio Filters */
.portfolio-filters {
  position: relative;
  margin-top: 24px;
}

.portfolio-filters__panel { background: transparent; }

.portfolio-filters__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f2f2f2;
}

.portfolio-filters__title { font-weight: 600; }

.portfolio-filters__close {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--bs-gray-950);
  font-size: 28px;
  line-height: 40px;
  padding: 0;
}

.portfolio-filters__form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.portfolio-filters__section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portfolio-filters__label {
  font-size: 16px;
  line-height: 22px;
  color: var(--bs-gray-500);
}

.portfolio-filters__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portfolio-filters__item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.portfolio-filters__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.portfolio-filters__control {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: var(--bs-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.portfolio-filters__control::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: transparent;
}

.portfolio-filters__item input:checked + .portfolio-filters__control {
  background: var(--bs-gray-950);
}

.portfolio-filters__item input:checked + .portfolio-filters__control::after {
  background: #fff;
}

.portfolio-filters__text {
  font-size: 16px;
  line-height: 22px;
  color: var(--bs-gray-950);
}

.portfolio-area-input {
  display: flex;
  gap: 12px;
}

.portfolio-area-input__field {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--bs-gray-100);
  border-radius: 56px;
  padding: 14px 20px;
  background: #fff;
  color: var(--bs-gray-500);
  font-size: 14px;
  line-height: 20px;
}

.portfolio-area-input__field input {
  border: 0;
  outline: none;
  width: 100%;
  min-width: 0;
  color: var(--bs-gray-950);
  background: transparent;
}

.portfolio-area-input__suffix {
  flex: 0 0 auto;
  text-align: right;
  color: var(--bs-gray-500);
}

/* Range slider */
.portfolio-range {
  position: relative;
  height: 24px;
}

.portfolio-range::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  background: var(--bs-light);
  border-radius: 2px;
}

.portfolio-range .progress {
  position: absolute;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  background: var(--bs-gray-950);
  border-radius: 2px;
  left: 0;
  right: 0;
}

.portfolio-filters .range-input {
  position: absolute;
  inset: 0;
  height: 24px;
  z-index: 2;
}

.portfolio-filters .range-input input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 24px;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.portfolio-filters .range-input input.range-min { z-index: 3; }
.portfolio-filters .range-input input.range-max { z-index: 2; }
.portfolio-filters .range-input input:focus { outline: none; }

.portfolio-filters .range-input input::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent !important;
  border: 0;
  box-shadow: none;
}

.portfolio-filters .range-input input::-moz-range-track {
  height: 4px;
  background: transparent !important;
  border: 0;
  box-shadow: none;
}

.portfolio-filters .range-input input::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -10px;
  border-radius: 75px;
  background: #fff;
  border: 0.5px solid var(--bs-light);
  box-shadow: 0px 1.5px 9px -0.75px rgba(10, 9, 11, 0.1), 0px 1.5px 1.5px -0.75px rgba(10, 9, 11, 0.04);
}

.portfolio-filters .range-input input::-moz-range-thumb {
  pointer-events: auto;
  width: 24px;
  height: 24px;
  border-radius: 75px;
  background: #fff;
  border: 0.5px solid var(--bs-light);
  box-shadow: 0px 1.5px 9px -0.75px rgba(10, 9, 11, 0.1), 0px 1.5px 1.5px -0.75px rgba(10, 9, 11, 0.04);
}

.portfolio-filters .range-input input::-moz-range-progress { background: transparent !important; }
.portfolio-filters .range-input input::-moz-focus-outer { border: 0; }
.portfolio-filters__submit { margin-top: 8px; }

/* --- Unified hero for all pages in new design --- */
@media (max-width: 991px) {
  .main .hero-section {
    height: 520px;
  }
}

@media (min-width: 992px) {
  .main .hero-section {
    /* Header fixed: top 16px + height 56px + gap 16px */
    margin-top: 88px;
    height: 540px;
    /* Align hero outer width with container-lg content inset */
    width: calc(100% - var(--bs-gutter-x, 24px));
    max-width: calc(960px - var(--bs-gutter-x, 24px)); /* container-lg @ lg minus gutters */
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--bs-border-radius);
  }

  .main .hero-section .hero-content {
    padding-left: 50px;
    padding-top: 56px;
    padding-bottom: 56px;
  }
}

@media (min-width: 992px) and (max-width: 1366px) {
  .main .hero-section .hero-title {
    font-size: clamp(48px, 4.2vw, 60px);
    line-height: 1.12;
  }
}

@media (min-width: 1200px) {
  .main .hero-section {
    max-width: calc(1140px - var(--bs-gutter-x, 24px)); /* container-lg @ xl minus gutters */
  }
}

@media (min-width: 1400px) {
  .main .hero-section {
    max-width: calc(1320px - var(--bs-gutter-x, 24px)); /* container-lg @ xxl minus gutters */
  }
}

.portfolio-case-content {
  padding-top: 64px;
  padding-bottom: 64px;
}

.portfolio-case-section { margin-top: 64px; }
.portfolio-case-room { margin-top: 64px; }

/* First section in the case content should not double-stack margins with padding-top */
.portfolio-case-content > .portfolio-case-section:first-child,
.portfolio-case-content > .portfolio-case-room:first-child {
  margin-top: 0;
}

.overlay-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 16px;
  border-radius: 1000px;
  color: #fff;
  font-size: 16px;
  line-height: 18px;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: fit-content;
}

.overlay-tag__label { font-weight: 400; }
.overlay-tag__value { font-weight: 400; }

/* Links inside overlay tags should stay white (inherit), including visited state */
.overlay-tag a,
.overlay-tag a:visited {
  color: inherit !important;
  text-decoration: none;
}

.overlay-tag a:hover,
.overlay-tag a:focus {
  color: inherit !important;
  text-decoration: underline;
}

/* Room tabs */
.portfolio-room-tabs__track {
  display: flex;
  padding: 4px;
  background: var(--bs-light);
  border-radius: 35px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.portfolio-room-tabs__track::-webkit-scrollbar { display: none; }

.portfolio-room-tabs__tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 80px;
  color: var(--bs-gray-950);
  font-size: 14px;
  line-height: 20px;
  border-bottom: none;
  text-decoration: none;
  background: transparent;
  white-space: nowrap;
  transition: background-color 420ms ease, color 420ms ease, box-shadow 420ms ease;
}

.portfolio-room-tabs__tab.is-active {
  background: #fff;
  font-weight: 500;
}

.portfolio-room-tabs__tab:focus-visible { background: #fff; }

.portfolio-room-tabs--mobile {
  position: sticky;
  top: var(--portfolio-tabs-top, 88px);
  z-index: 1020;
}

.portfolio-room-tabs--desktop {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  z-index: 1040;
  margin-top: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.portfolio-room-tabs--desktop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.portfolio-room-tabs--mobile.is-hidden { display: none; }

.portfolio-room-tabs--desktop.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.portfolio-case-room,
#drawings_block,
#materials_block {
  scroll-margin-top: calc(var(--portfolio-tabs-top, 88px) + 12px);
}

/* Variant pills */
.portfolio-variants {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
  margin-bottom: 16px;
}

.portfolio-case-room .portfolio-variants { margin-bottom: 16px; }
.portfolio-case-room .gridzy { margin-top: 16px; }

.portfolio-variant-pill {
  border: 1px solid var(--bs-gray-100);
  background: transparent;
  padding: 12px 20px;
  border-radius: 80px;
  font-size: 16px;
  line-height: 22px;
  color: var(--bs-gray-950);
}

.portfolio-variant-pill.is-active {
  background: var(--bs-light);
  border-color: var(--bs-light);
  font-weight: 500;
}

.portfolio-room-variant {
  display: none;
  margin-top: 16px;
}

.portfolio-room-variant.is-active { display: block; }

/* Mosaic images */
.portfolio-mosaic__img {
  display: block;
  width: 100%;
  height: 221px;
  object-fit: cover;
  border-radius: 8px;
}

.portfolio-case-room .gridzy a {
  border-bottom: 0 !important;
  text-decoration: none !important;
}

.portfolio-case-room .gridzy .gridzyImage {
  display: block;
  border-radius: 8px;
}

.portfolio-mosaic__img--tall { height: 458px; }

/* Docs strip (drawings/materials) */
.portfolio-docs-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 54px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.portfolio-docs-strip__item {
  border-bottom: none;
  text-decoration: none;
}

.portfolio-docs-strip__img {
  display: block;
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

.portfolio-docs-strip__item:nth-child(1) .portfolio-docs-strip__img,
.portfolio-docs-strip__item:nth-child(5) .portfolio-docs-strip__img {
  width: 166px;
  height: 120px;
  opacity: 0.5;
}

.portfolio-docs-strip__item:nth-child(2) .portfolio-docs-strip__img,
.portfolio-docs-strip__item:nth-child(4) .portfolio-docs-strip__img {
  width: 277px;
  height: 200px;
  opacity: 0.7;
}

.portfolio-docs-strip__item:nth-child(3) .portfolio-docs-strip__img {
  width: 554px;
  height: 400px;
  opacity: 1;
}

/* Need project block */
.portfolio-need-project {
  margin-top: 120px;
  text-align: center;
}

.portfolio-need-project__form {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.portfolio-need-project__form .form-control {
  max-width: 100%;
}

.portfolio-need-project__policy {
  margin-top: 16px;
  font-size: 12px;
  line-height: 16px;
  color: #8c94a6;
}

.portfolio-need-project__policy a {
  color: var(--bs-gray-950);
  text-decoration: underline;
  border-bottom: none;
}

/* --- Collapsible text --- */
.collapse-text { position: relative; }
.collapse-text__content { overflow: hidden; }

.collapse-text__toggle {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.collapse-text__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 5px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #ffffff 92%);
}

.collapse-text__overlay .collapse-text__toggle { pointer-events: auto; }

.collapse-text.is-expanded .collapse-text__overlay {
  position: static;
  height: auto;
  padding: 12px 0 0;
  background: transparent;
  pointer-events: auto;
  justify-content: center;
}

/* =======================================================================
   6. СТРАНИЦА: ГЛАВНАЯ (main_msc.tpl)
   ======================================================================= */

/* --- Quote block (отзыв клиента) --- */
.quote-block {
  background-color: var(--bs-light);
  border-radius: 8px;
  padding: 120px 32px 32px;
  position: relative;
  margin-top: 80px;
}

.quote-block::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background-color: var(--bs-light);
  background-image: url('../images/pages/home/anastasia-reviewer.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 8px solid #ffffff;
}

.quote-block .quote-author { text-align: center; margin-bottom: 48px; }

.quote-block .quote-author-name {
  font-size: 32px;
  font-weight: 600;
  line-height: 40px;
  color: var(--bs-gray-950);
  margin-bottom: 0;
}

.quote-block .quote-author-role {
  font-size: 18px;
  font-weight: 400;
  line-height: 24px;
  color: var(--bs-gray-500);
  margin-top: 0;
}

.quote-block .quote-text {
  font-size: 24px;
  font-weight: 300;
  line-height: 32px;
  color: var(--bs-gray-950);
  text-align: center;
}

/* --- Task grid (проблемы ремонта) --- */
.task-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background-color: var(--bs-light);
  padding: 4px;
  border-radius: 8px;
}

.task-card {
  background-color: #ffffff;
  padding: 32px 8px;
  border-radius: 4px;
  text-align: center;
  font-size: 20px;
  line-height: 26px;
  color: var(--bs-gray-950);
}

.task-grid-2 { grid-template-columns: repeat(2, 1fr); }

/* --- Developers logos slider --- */
.developers-logos-swiper .swiper-slide {
  height: auto;
}

.developers-logo-card {
  min-height: 88px;
  border: 1px solid #e6e8eb;
  border-radius: 12px;
  background: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.developers-logo-card img {
  max-height: 52px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.developers-logo-fallback {
  display: none;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  color: #1f2937;
  text-align: center;
}

.developers-logo-fallback--visible {
  display: block;
}

/* --- Image Gallery (Swiper) --- */
.image-gallery { position: relative; }

.gallery-main-swiper {
  width: 100%;
  height: 620px;
  border-radius: 8px;
  overflow: hidden;
}

.gallery-main-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.gallery-thumbs-swiper {
  width: 100%;
  height: 109px;
  padding: 0 8px;
}

.gallery-thumbs-swiper.is-centered {
  padding-left: 0;
  padding-right: 0;
}

.gallery-thumbs-swiper.is-centered .swiper-wrapper {
  justify-content: center;
  transform: translate3d(0px, 0px, 0px) !important;
}

.gallery-thumbs-swiper .swiper-slide {
  width: auto;
  height: 100%;
}

.gallery-thumbs-swiper .swiper-slide-thumb-active .image-gallery-thumb {
  border: 1px solid var(--bs-gray-950) !important;
}

.image-gallery-thumb {
  flex: 1;
  height: 109px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
  overflow: hidden;
}

.image-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.image-gallery-thumb:hover { opacity: 0.8; }

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--bs-gray-950);
  color: #ffffff;
  border: none;
  width: 56px;
  height: 56px;
  border-radius: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
  z-index: 10;
}

.gallery-nav-btn:hover { background-color: var(--bs-gray-800); }
.gallery-nav-btn.prev { left: 20px; }
.gallery-nav-btn.next { right: 20px; }

/* --- Таймлайн «Как мы работаем» --- */
.pb_wrapper {
  position: relative;
  top: 0;
  left: 0;
  overflow: visible;
  z-index: 20;
}

.pb_wrapper .table-responsive {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #bdbdbd #e6e6e6;
}

.pb_wrapper .table-responsive::-webkit-scrollbar { height: 10px; }
.pb_wrapper .table-responsive::-webkit-scrollbar-thumb {
  background-color: #bdbdbd;
  border-radius: 999px;
  border: 3px solid #e6e6e6;
}
.pb_wrapper .table-responsive::-webkit-scrollbar-track {
  background: #e6e6e6;
  border-radius: 999px;
}

.pb {
  width: 1296px;
  background-color: #FAFAFA;
  padding: 40px;
  margin-top: 45px;
  overflow: visible;
  position: static;
  border-radius: 12px;
}

.pb_line {
  display: block;
  height: 4px;
  width: 100%;
  background: #cecece;
  margin-top: 20px;
  position: relative;
}

.month {
  position: absolute;
  top: -18px;
  left: 0;
  display: flex;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #121212;
  color: #fff;
  font-size: 18px;
}

.pb_text {
  background: none;
  height: 420px;
}

.pb .row.gx-0 > .col-2 { position: relative; }

.pb .row.gx-0 > .col-2::after {
  content: '';
  position: absolute;
  left: 0;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0.22) 0px, rgba(0,0,0,0.22) 10px, transparent 10px, transparent 20px);
  pointer-events: none;
  z-index: 0;
}

.pb_line,
.pb_text,
.month,
.pb_btn,
.pb_btn_0 {
  position: relative;
  z-index: 1;
}

.pb_zamer_icon {
  width: 110px;
  height: 55px;
  display: block;
}

.pb_text p {
  margin-top: 1rem;
  font-size: 20px;
  line-height: 54px;
}

.pb_btn {
  display: flex;
  height: 50px;
  border-radius: 25px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #282828;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  position: relative;
  z-index: 5;
  user-select: none;
}

.pb_btn_1 { margin-top: 80px; width: 200%; transform: translateX(-30%); }
.pb_btn_2 { margin-top: 150px; width: 200%; transform: translateX(-10%); }
.pb_btn_3 { margin-top: 220px; width: 400%; transform: translateX(-65%); }
.pb_btn_4 { margin-top: 290px; width: 200%; transform: translateX(-10%); }

.pb_ {
  position: absolute;
  width: 405px;
  background-color: #fff;
  border-radius: 8px;
  padding: 17px 20px;
  font-size: 16px;
  z-index: 999;
  box-shadow: 0 6px 28px 0 #0000001F;
  -webkit-overflow-scrolling: auto !important;
}

.pb_0 { top: 258px; left: 48px; }
.pb_1 { top: 320px; left: 130px; }
.pb_2 { top: 390px; left: 416px; }
.pb_3 { top: 460px; left: 130px; }
.pb_4 { top: 530px; left: 820px; }

.pb_ .modal-header { position: relative; }

.pb_ .modal-header .btn-close {
  position: absolute;
  top: -5px;
  right: -10px;
  transform: scale(0.9);
  transform-origin: right top;
}


/* =======================================================================
   7. СТРАНИЦА: О КОМПАНИИ (company.tpl)
   ======================================================================= */

.company-section-title { margin-bottom: 0; }

.company-service-card {
  background-color: var(--bs-light);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  min-height: 100px;
}

.company-service-number {
  position: absolute;
  right: 3px;
  bottom: -32px;
  transform: rotate(4deg);
  font-size: 112px;
  line-height: 142px;
  font-weight: 500;
  color: #ffffff;
  pointer-events: none;
  user-select: none;
}

.company-page .company-project-steps .bg-light-custom {
  min-height: 135px;
  display: flex;
  align-items: center;
}

.company-services-callout {
  background-color: var(--bs-gray-950);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.company-services-callout-text {
  font-size: 18px;
  line-height: 24px;
  font-weight: 400;
  color: #c6cad2;
}

.company-services-underline {
  position: relative;
  display: inline-block;
}

.company-services-underline::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 8px;
  background: url('../images/pages/company/underline.svg') no-repeat center / 100% 100%;
  pointer-events: none;
}

.company-lead {
  font-size: 24px;
  font-weight: 300;
  line-height: 32px;
}

.company-team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.company-team-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: 354px;
}

.company-team-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.company-team-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 43.367%, #000000 124.91%);
  pointer-events: none;
}

.company-team-overlay {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.company-team-name {
  color: var(--bs-gray-100);
  line-height: 20px;
  font-weight: 300;
}

.company-team-role {
  color: #ffffff;
  line-height: 22px;
  font-weight: 400;
}

.company-app-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.company-app-divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(198,202,210,1) 25%, rgba(198,202,210,1) 75%, rgba(255,255,255,1) 100%);
}


/* =======================================================================
   8. СТРАНИЦА: БЛОГ (blog.tpl, blogs_category.tpl)
   ======================================================================= */

/* Blog List */
.blog-hero {
  padding-top: 0;
  padding-bottom: 48px;
}

.blog-hero__lead {
  margin: 0;
  font-size: 18px;
  font-weight: 300;
  line-height: 24px;
  letter-spacing: 0;
  color: var(--bs-gray-800);
}

.blog-content { padding-bottom: 120px; }
.blog-categories { margin-bottom: 32px; }

.blog-categories__track {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.blog-category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 56px;
  border: 1px solid var(--bs-gray-100);
  background: #fff;
  color: var(--bs-gray-950);
  font-size: 16px;
  line-height: 22px;
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}

.blog-category-pill:hover {
  background: var(--bs-light);
  border-color: var(--bs-light);
  color: var(--bs-gray-950);
}

.blog-category-pill.is-active {
  background: var(--bs-light);
  border-color: var(--bs-light);
  font-weight: 500;
}

.blog-category-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 12, 14, 0.12);
}

.blog-card {
  display: block;
  border-bottom: 0;
  text-decoration: none;
  color: inherit;
}

.blog-card__img {
  height: 245px;
  border-radius: 8px;
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
}

.blog-card__body { padding-top: 8px; }

.blog-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0;
  color: var(--bs-gray-950);
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card:hover .blog-card__title { color: var(--bs-gray-800); }

.blog-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 12, 14, 0.12);
  border-radius: 8px;
}

/* Blog Article */
.blog-article-hero { padding-bottom: 24px; }

.blog-article__cover {
  border-radius: 8px;
  overflow: hidden;
  height: 245px;
}

.blog-article__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.blog-article-layout { padding-bottom: 120px; }

/* Blog TOC */
.blog-toc {
  border: 0;
  border-radius: 0;
  padding: 0;
}

.blog-toc__label {
  font-size: 16px;
  line-height: 22px;
  color: var(--bs-gray-500);
  margin-bottom: 12px;
}

.blog-toc__content ol {
  margin: 0;
  padding-left: 24px;
  list-style: decimal;
  color: #0a090b;
}

.blog-toc__content li {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 400;
}

.blog-toc__content li:last-child { margin-bottom: 0; }
.blog-toc__content ol ol { margin-top: 6px; padding-left: 16px; }

.blog-toc__content a {
  color: #0a090b;
  border-bottom: none;
  text-decoration: none;
}

.blog-toc__content a:hover { color: var(--bs-gray-800); }

.blog-toc--desktop {
  position: sticky;
  top: 120px;
}


/* =======================================================================
   9. СТРАНИЦА: КОНТАКТЫ (contacts.tpl)
   ======================================================================= */

.contacts-map {
  height: 458px;
  border-radius: 8px;
  overflow: hidden;
}

.contacts-map iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}

.contacts-map > * {
  width: 100%;
  height: 100%;
}

.contacts-pill-icon { display: block; }

.contacts-question-phone {
  border-bottom: none;
  text-decoration: none;
}

.contacts-question-phone:hover {
  border-bottom: none;
  text-decoration: none;
}

.contacts-form-field {
  width: 343px;
  max-width: 100%;
}

.contacts-form-field .form-control { padding-left: 48px; }

.contacts-input-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.contacts-submit {
  min-height: 48px;
  white-space: nowrap;
}

.contacts-disclaimer {
  font-size: 12px;
  line-height: 16px;
  color: var(--bs-gray-400);
}

.contacts-disclaimer-link { color: var(--bs-gray-950); }
.contacts-disclaimer-link:hover { color: var(--bs-gray-950); }


/* =======================================================================
   10. СТРАНИЦА: ЦЕНЫ (price.tpl)
   ======================================================================= */

.price-page .price-calc-card {
  padding: 140px 16px 32px;
  background-color: var(--bs-gray-950);
}

.price-page .price-calc-card h2 {
  position: relative;
  z-index: 1;
}

.price-page .price-calc-card__icon {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
}

.price-page .price-design-card__img { height: 245px; }

.price-page .price-design-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.price-page .price-advantage-link,
.price-page .price-advantage-link:hover,
.price-page .price-advantage-link:focus-visible {
  color: var(--bs-gray-950);
  border-bottom: none;
  text-decoration: none;
}

.price-page .price-remont-card { gap: 4px; }

.price-page .price-remont-card__img {
  height: 245px;
  margin-bottom: 8px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
}

.price-page .remont_price_img_1 { background-image: url('/view/images/remont_price_type_1.jpg'); }
.price-page .remont_price_img_2 { background-image: url('/view/images/remont_price_type_2.jpg'); }
.price-page .remont_price_img_3 { background-image: url('/view/images/remont_price_type_3.jpg'); }

.price-page .price-params-block .company-service-number {
  right: -10px;
  bottom: -36px;
  transform: rotate(5deg);
  font-size: clamp(140px, 12vw, 240px);
  line-height: 1;
  font-weight: 500;
  color: #ffffff;
  /* opacity: 0.55; */
  z-index: 0;
}

.price-page .price-params-block h3,
.price-page .price-params-block p {
  position: relative;
  z-index: 1;
}

/* =======================================================================
   10B. СТРАНИЦА: РЕМОНТ (remont.tpl)
   ======================================================================= */

.remont-page .hero-section .hero-content { max-width: 80%; }
.remont-page .price-remont-card { gap: 4px; }

.remont-page .price-remont-card__img {
  height: 245px;
  margin-bottom: 8px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
}

.remont-page .remont_price_img_1 { background-image: url('/view/images/remont_price_type_1.jpg'); }
.remont-page .remont_price_img_2 { background-image: url('/view/images/remont_price_type_2.jpg'); }
.remont-page .remont_price_img_3 { background-image: url('/view/images/remont_price_type_3.jpg'); }

.remont-page .remont-how-block .company-service-number {
  right: 8px;
  bottom: -22px;
  transform: rotate(5deg);
  font-size: clamp(96px, 8vw, 164px);
  line-height: 1;
  font-weight: 500;
  color: #ffffff;
  z-index: 0;
}

.remont-page .remont-how-block .bg-light-custom {
  min-height: 176px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.remont-page .remont-how-block h3,
.remont-page .remont-how-block p {
  position: relative;
  z-index: 1;
}

.remont-page .remont-content-cta {
  padding: 18px 40px;
  font-size: 18px;
  line-height: 24px;
  font-weight: 400;
}


/* =======================================================================
   10C. СТРАНИЦА: МЕБЕЛЬ (mebel.tpl)
   ======================================================================= */

.mebel-page .mebel-marquiz-block {
  background: var(--bs-light);
  border-radius: 8px;
  min-height: 600px;
  overflow: hidden;
}


/* =======================================================================
   10A. СТРАНИЦА: ДИЗАЙН (design_msc.tpl)
   ======================================================================= */

.design-msc-page .design-msc-approach-block .company-service-number {
  right: 8px;
  bottom: -22px;
  transform: rotate(5deg);
  font-size: clamp(96px, 8vw, 164px);
  line-height: 1;
  font-weight: 500;
  color: #ffffff;
  z-index: 0;
}

.design-msc-page .design-msc-approach-block .bg-light-custom {
  min-height: 176px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.design-msc-page .design-msc-approach-block h3,
.design-msc-page .design-msc-approach-block p {
  position: relative;
  z-index: 1;
}

.design-msc-page .design-msc-content-cta {
  padding: 18px 40px;
  font-size: 18px;
  line-height: 24px;
  font-weight: 400;
}

.price-page .remont-content-cta {
  padding: 18px 40px;
  font-size: 18px;
  line-height: 24px;
  font-weight: 400;
}

.company-page .company-content-cta {
  padding: 18px 40px;
  font-size: 18px;
  line-height: 24px;
  font-weight: 400;
}

@media (max-width: 991.98px) {
  .remont-page .remont-how-block .bg-light-custom {
    min-height: 152px;
  }

  .remont-page .remont-how-block .company-service-number {
    right: 6px;
    bottom: -16px;
    font-size: 112px;
  }

  .remont-page .remont-content-cta {
    padding: 14px 26px;
    font-size: 16px;
    line-height: 22px;
  }

  .design-msc-page .design-msc-approach-block .bg-light-custom {
    min-height: 152px;
  }

  .design-msc-page .design-msc-approach-block .company-service-number {
    right: 6px;
    bottom: -16px;
    font-size: 112px;
  }

  .design-msc-page .design-msc-content-cta {
    padding: 14px 26px;
    font-size: 16px;
    line-height: 22px;
  }

  .price-page .remont-content-cta {
    padding: 14px 26px;
    font-size: 16px;
    line-height: 22px;
  }

  .company-page .company-content-cta {
    padding: 14px 26px;
    font-size: 16px;
    line-height: 22px;
  }

  .company-page .company-project-steps .bg-light-custom {
    min-height: 122px;
  }
}

.design-msc-page .quote-block--olga::before {
  background-image: url('/view/images/design_msc/art-director.jpg');
  border-width: 12px;
}

/* Кнопка "Смотреть проекты" — белая, чтобы не сливаться с фоном quote */
.design-msc-page .quote-block--olga .btn.btn-light {
  background: #ffffff;
  border-color: var(--bs-gray-100);
}

.design-msc-page .quote-block--olga .btn.btn-light:hover,
.design-msc-page .quote-block--olga .btn.btn-light:focus-visible {
  background: #ffffff;
  border-color: var(--bs-gray-950);
}

/* --- "Мебель и материалы" (Swiper thumbs gallery снизу) --- */
.design-msc-page .design-msc-materials-main {
  position: relative;
  width: 100%;
  height: 620px;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

.design-msc-page .design-msc-materials-main .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.design-msc-page .design-msc-materials-main .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Миниатюры снизу */
.design-msc-page .design-msc-materials-thumbs {
  width: 100%;
  height: 109px;
  padding: 0 8px;
}

.design-msc-page .design-msc-materials-thumbs.is-centered .swiper-wrapper {
  width: 100%;
  justify-content: center;
  transform: translate3d(0px, 0px, 0px) !important;
}

.design-msc-page .design-msc-materials-thumbs .swiper-slide {
  width: 109px;
  height: 100%;
}

.design-msc-page .design-msc-materials-thumbs .image-gallery-thumb {
  height: 109px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid transparent;
}

.design-msc-page .design-msc-materials-thumbs .image-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.design-msc-page .design-msc-materials-thumbs .swiper-slide-thumb-active .image-gallery-thumb {
  border-color: var(--bs-gray-950);
}

@media (max-width: 576px) {
  .design-msc-page .design-msc-materials-main { height: 343px; }
  .design-msc-page .design-msc-materials-thumbs { height: 72px; padding: 0 4px; }
  .design-msc-page .design-msc-materials-thumbs .image-gallery-thumb { height: 72px; }
}

/* --- Блок "Дизайн / Реализация" (twentytwenty) --- */
.design-msc-page .design-msc-before-after {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  max-height: 760px;
}

.design-msc-page {
  --ba-main-height: min(760px, 68vh);
  --ba-thumb-gap: 10px;
  --ba-col-gap: 12px;
  --ba-thumb-size: calc((var(--ba-main-height) - (2 * var(--ba-thumb-gap))) / 3);
}

.design-msc-page .design-msc-before-after__label {
  position: absolute;
  top: 5px;
  padding: 8px 20px;
  color: #fff;
  font-size: 20px;
  line-height: 32px;
  font-weight: 300;
  background: rgba(0, 0, 0, 0.20);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 20;
  border-radius: 8px;
}

.design-msc-page .design-msc-before-after__label--left { left: 5px; }
.design-msc-page .design-msc-before-after__label--right { right: 5px; }

/*
  Важно: не переопределяем размеры img/контейнера twentytwenty (иначе плагин считает высоту = 0 и всё схлопывается).
  Используем штатный twentytwenty.css и только косметически отключаем его overlay-лейблы.
*/
.design-msc-page .twentytwenty-overlay { display: none; }
.design-msc-page .twentytwenty-before-label,
.design-msc-page .twentytwenty-after-label { display: none; }

/* Превью (twentytwenty) */
.design-msc-page .before_after_selecter {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
}

.design-msc-page .before_after_selecter a { 
  display: block; 
  flex: 0 0 124px; 
  border: none;
  border-radius: 8px;
}

.design-msc-page .before_after_selecter img {
  display: block;
  width: 100%;
  height: 124px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
  border: 0;
  box-shadow: inset 0 0 0 2px transparent;
  outline: 0 solid transparent;
  outline-offset: -3px;
  transition: box-shadow 160ms ease;
}

@media (min-width: 992px) {
  .design-msc-page .design-msc-compare-row {
    display: flex;
    align-items: stretch;
    --bs-gutter-x: 0;
  }

  .design-msc-page .design-msc-thumbs-col {
    flex: 0 0 var(--ba-thumb-size);
    width: var(--ba-thumb-size);
    max-width: var(--ba-thumb-size);
    height: var(--ba-main-height);
  }

  .design-msc-page .design-msc-main-col {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: var(--ba-col-gap);
  }

  /* На десктопе миниатюры слева вертикально */
  .design-msc-page .before_after_selecter {
    flex-direction: column;
    overflow: visible;
    justify-content: flex-start;
    gap: var(--ba-thumb-gap);
    width: var(--ba-thumb-size);
    height: var(--ba-main-height);
  }
  .design-msc-page .before_after_selecter a {
    flex: 0 0 auto;
    width: var(--ba-thumb-size);
    height: var(--ba-thumb-size);
    aspect-ratio: 1 / 1;
  }
  .design-msc-page .before_after_selecter img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
  }
}

.design-msc-page .before_after_selecter img.active {
  box-shadow: inset 0 0 0 3px #8f96a3;
  outline: 3px solid #8f96a3;
  background: #fff;
}

/* Делаем before/after компактнее по высоте без искажения: кадрируем квадратные исходники */
@media (min-width: 992px) {
  .design-msc-page .before_after_block {
    height: var(--ba-main-height);
    overflow: hidden;
  }

  .design-msc-page .before_after_block > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .design-msc-page .before_after_block.twentytwenty-container {
    height: var(--ba-main-height) !important;
    overflow: hidden;
  }

  .design-msc-page .before_after_block.twentytwenty-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
  }
}

@media (max-width: 991.98px) {
  .design-msc-page .before_after_block {
    height: min(68vh, 500px);
    overflow: hidden;
  }

  .design-msc-page .before_after_block > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .design-msc-page .before_after_block.twentytwenty-container {
    height: min(68vh, 500px) !important;
    overflow: hidden;
  }

  .design-msc-page .before_after_block.twentytwenty-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
  }
}

@media (max-width: 576px) {
  .design-msc-page .before_after_block,
  .design-msc-page .before_after_block.twentytwenty-container {
    height: min(60vh, 430px) !important;
  }

  .design-msc-page .design-msc-before-after { max-height: none; }
  .design-msc-page .design-msc-before-after__label {
    padding: 4px 8px;
    font-size: 14px;
    line-height: 20px;
  }

  .design-msc-page .twentytwenty-handle {
    width: 36px;
    height: 36px;
    margin-left: -18px;
    margin-top: -18px;
  }

  .design-msc-page .twentytwenty-handle:before { bottom: 36px; }
  .design-msc-page .twentytwenty-handle:after { top: 36px; }
}

@media (max-width: 576px) {
  .price-page #form_cb.portfolio-need-project__form {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 343px;
    margin-left: auto;
    margin-right: auto;
  }

  .price-page #form_cb.portfolio-need-project__form .contacts-form-field,
  .price-page #form_cb.portfolio-need-project__form .contacts-submit {
    width: 100%;
  }

  .price-page .price-calc-card { padding: 120px 16px 16px; }

  .price-page .price-calc-card__icon { top: 20px; }

  .price-page .price-calc-card .title-32 {
    font-size: 20px;
    line-height: 26px;
  }

  .price-page .price-calc-card .title-24-regular {
    font-size: 14px;
    line-height: 20px;
    color: #c6cad2;
  }
}


/* =======================================================================
   11. СТРАНИЦА: 404 (404.tpl)
   ======================================================================= */

.notfound {
  position: relative;
  min-height: 520px;
  display: flex;
    align-items: center;
  justify-content: center;
  padding: 80px 0 120px;
  overflow: hidden;
}

.notfound-watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(160px, 28vw, 420px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: var(--bs-light);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.notfound-content {
  position: relative;
  z-index: 1;
  max-width: 343px;
}


/* =======================================================================
   12. АДАПТИВНОСТЬ
   ======================================================================= */

/* --- Desktop (992px+) --- */
@media (min-width: 992px) {
  .page-title {
    font-size: 40px;
    line-height: 48px;
  }

  .content-typography p,
  .content-typography li {
  font-size: 24px;
  line-height: 32px;
  }

  .content-typography > * { margin-bottom: 20px; }

  .content-typography h2 {
    margin-top: 48px;
    margin-bottom: 24px;
    font-size: 32px;
    line-height: 40px;
  }

  .content-typography h3 {
    margin-top: 24px;
    margin-bottom: 24px;
    font-size: 24px;
    line-height: 32px;
  }

  .content-typography img { margin: 24px 0; }

  /* Header dropdown hover */
  .header nav .dropdown:hover > .dropdown-menu,
  .header nav .dropdown:focus-within > .dropdown-menu { display: block; }

  .header nav .dropdown:hover > .top-menu-item,
  .header nav .dropdown:focus-within > .top-menu-item {
    background-color: rgba(255, 255, 255, 0.5);
    color: var(--bs-gray-950);
  }

  #menu-mobile-wrapper.mobile-menu { display: none; }

  .hero-section .hero-content { max-width: 70%; }
  .design-msc-page .hero-section .hero-content { max-width: 90%; }

  .notfound-content { max-width: 520px; }

  .blog-hero__lead {
    font-size: 32px;
    line-height: 40px;
  }

  .blog-article-hero { padding-bottom: 48px; }
  .blog-article__cover { height: 665px; }

  .portfolio-room-tabs--desktop .portfolio-room-tabs__tab {
  font-size: 16px;
  line-height: 22px;
    padding: 12px 20px;
  }

  .portfolio-filters__backdrop,
  .portfolio-filters__header { display: none; }
}

/* --- Large Desktop (1200px+) --- */
@media (min-width: 1200px) {
  .company-team-grid { grid-template-columns: repeat(5, 1fr); }
}

/* --- Extra Large (1441px+) --- */
@media (min-width: 1441px) {
  .main .hero-section { height: 680px; }
}

/* --- Tablet (max 991px) --- */
@media (max-width: 991.98px) {
  html.portfolio-filters-open,
  html.portfolio-filters-open body { overflow: hidden; }

  .portfolio-filters {
    position: fixed;
    inset: 0;
    z-index: 1050;
    margin-top: 0;
    pointer-events: none;
  }

  .portfolio-filters__backdrop {
  position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 180ms ease;
  }

  .portfolio-filters__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 220ms ease;
  }

  .portfolio-filters__form {
    padding: 16px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 110px;
    min-height: 100%;
  }

  .portfolio-filters__submit {
    position: sticky;
    bottom: -35px;
    z-index: 6;
    background: var(--bs-gray-950);
    margin-top: auto;
  }

  .portfolio-filters.is-open { pointer-events: auto; }
  .portfolio-filters.is-open .portfolio-filters__backdrop { opacity: 1; }
  .portfolio-filters.is-open .portfolio-filters__panel { transform: translateY(0); }

  .company-team-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Tablet/Mobile (max 768px) --- */
@media (max-width: 768px) {
  main.main.no-hero { padding-top: 100px !important; }

  .portfolio-case-content {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .portfolio-case-section { margin-top: 48px; }
  .portfolio-case-room { margin-top: 48px; }

  .company-lead { font-size: 16px; line-height: 22px; }

  .company-team-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .company-team-card {
    flex: 0 0 auto;
    width: 190px;
    height: 278px;
    scroll-snap-align: start;
  }

  .footer .footer-cta > a { flex: 1 0 0%; }

  .footer .footer-cta .btn.btn-primary-custom.btn-rounded { padding: 10px 16px; }

  .footer .footer-social-links {
    display: block;
    column-count: 2;
    column-gap: 8px;
  }

  .footer .footer-social-links .footer-section-link {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 8px;
  }

  .footer .footer-social-links .footer-section-link:last-child { margin-bottom: 0; }

  .contacts-buttons a { width: 100%; }
  .contacts-address { justify-content: center; }
  .contacts-form-field { width: 100%; max-width: 100%; }

  .notfound-watermark { font-size: 175px; top: 45%; }

  .task-grid { grid-template-columns: repeat(2, 1fr); }
  .task-card { padding: 24px 8px; font-size: 18px; line-height: 24px; }

  .header { padding: 0 8px; }
  .header .top-menu-item { font-size: 14px; padding: 6px; }
  .header-fixed { top: 12px; width: calc(100% - 24px); }

  .quote-block { padding: 96px 20px 28px; margin-top: 64px; }
  .quote-block::before { width: 140px; height: 140px; top: -70px; }
  .quote-block .quote-author-name { font-size: 24px; line-height: 30px; }
  .quote-block .quote-author-role { font-size: 14px; line-height: 20px; }
  .quote-block .quote-text { font-size: 18px; line-height: 26px; text-align: left; }

  .gallery-main-swiper { height: 420px; }
  .gallery-thumbs-swiper { height: 84px; }
  .image-gallery-thumb { height: 84px; }
  .gallery-nav-btn { width: 48px; height: 48px; }
  .gallery-nav-btn.prev { left: 12px; }
  .gallery-nav-btn.next { right: 12px; }

  .floating-cta__download { display: none !important; }
}

/* --- Mobile (max 576px) --- */
@media (max-width: 576px) {
  .title-60 { font-size: 32px; line-height: 38px; }
  .title-40 { font-size: 28px; line-height: 34px; }
  .title-32 { font-size: 24px; line-height: 32px; }
  .title-24 { font-size: 24px; line-height: 28px; }
  .title-20 { font-size: 20px; line-height: 26px; }
  .title-24-regular { font-size: 18px; line-height: 26px; }
  .body-l-24 { font-size: 18px; line-height: 26px; }

  /* Модалки обратной связи: согласие с политикой (чтобы на мобильном не переносилось) */
  #modal_callback .agree,
  #modal_callback_universal .agree {
    font-size: 12px;
    line-height: 16px;
  }

  .main .hero-section { height: 660px; }

  .hero-section .container-lg { padding-left: 16px; padding-right: 16px; }
  .hero-section .hero-image img { object-position: center; }

  .hero-section .hero-content {
    justify-content: flex-end !important;
    padding: 0 0 calc(24px + env(safe-area-inset-bottom)) 0;
    max-width: 343px;
  }

  .hero-section .hero-title {
    font-size: 26px;
    line-height: 38px;
    font-weight: 500;
    margin-bottom: 12px !important;
  }

  .hero-section .hero-text {
    font-size: 16px;
    line-height: 22px;
    font-weight: 400;
    margin-bottom: 4px !important;
  }

  .hero-section .hero-text:last-of-type { margin-bottom: 0 !important; }

  .hero-section .hero-actions {
    margin-top: 16px;
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    width: fit-content;
    max-width: 100%;
  }

  .hero-section .hero-actions > a.btn:not(.rounded-circle) {
    flex: 0 1 auto;
    height: 56px;
    padding: 0 26px !important;
    border-radius: 56px !important;
    background-color: #f7f7f5 !important;
    border-color: transparent !important;
    color: #0b0c0e !important;
    font-size: 16px;
    line-height: 22px;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }

  .hero-section .hero-actions > a.btn.rounded-circle {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    padding: 14px !important;
    border-radius: 56px !important;
    background-color: #f7f7f5 !important;
    border-color: transparent !important;
  }

  .project-card .portfolio_work { height: 245px; }

  .portfolio-variant-pill {
    font-size: 14px;
    line-height: 20px;
    padding: 10px 20px;
  }

  .portfolio-mosaic__img { height: 216px; }
  .portfolio-mosaic__img--tall { height: 458px; }

  .portfolio-docs-strip { gap: 24px; }
  .portfolio-docs-strip__item:nth-child(n+4) { display: none; }

  .portfolio-docs-strip__item:nth-child(1) .portfolio-docs-strip__img,
  .portfolio-docs-strip__item:nth-child(3) .portfolio-docs-strip__img {
    width: 166px;
    height: 120px;
    opacity: 1;
  }

  .portfolio-docs-strip__item:nth-child(2) .portfolio-docs-strip__img {
    width: 277px;
    height: 200px;
    opacity: 1;
  }

  .portfolio-need-project { margin-top: 48px; }
  .portfolio-need-project__form { gap: 12px; }
  .portfolio-need-project__form .btn { width: 343px; max-width: 100%; }

  .zhk-show-more-btn { width: 100%; }

  .blog-categories__track {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .blog-categories__track::-webkit-scrollbar { display: none; }
  .blog-categories__track { scrollbar-width: none; }

  .task-grid { grid-template-columns: 1fr; }

  .quote-block { padding: 88px 16px 24px; margin-top: 56px; }
  .quote-block::before { width: 120px; height: 120px; top: -60px; }

  .gallery-main-swiper { height: 280px; }
  .gallery-thumbs-swiper { height: 72px; padding: 0 4px; }
  .image-gallery-thumb { height: 72px; }
  .gallery-nav-btn { display: none; }

  @media (max-height: 780px) {
    .main .hero-section { height: 620px; }

    .hero-section .hero-content { padding: 0 0 calc(20px + env(safe-area-inset-bottom)) 0; }

    .hero-section .hero-title {
      line-height: 34px;
      margin-bottom: 8px !important;
    }

    .hero-section .hero-text {
      margin-bottom: 2px !important;
    }

    .hero-section .hero-actions {
      margin-top: 12px;
    }

    .hero-section .hero-actions > a.btn:not(.rounded-circle) {
      height: 52px;
      padding: 0 22px !important;
      font-size: 16px;
      line-height: 22px;
      font-weight: 400;
    }

    .hero-section .hero-actions > a.btn.rounded-circle {
      width: 52px;
      height: 52px;
      padding: 12px !important;
    }
  }

  .floating-cta__download { display: none !important; }
}

/* --- Timeline mobile --- */
@media (max-width: 767px) {
  .pb_wrapper { width: 100%; }
}
