:root {
    --blue: #2766D6;
    --ink: #111827;
    --muted: #5b667a;
    --line: #e5e7eb;
    --bg: #f4f7fb;
    --soft-blue: #eaf2ff;
    --white: #ffffff;
    --radius: 28px;
    --radius-sm: 18px;
    --shadow: 0 24px 70px rgba(17, 24, 39, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    color: var(--ink);
    background: #fbfcff;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1580px, calc(100% - 48px));
    margin: 0 auto;
}

.site-header {
    position: relative;
    z-index: 20;
    background: #fbfcff;
    border-bottom: 1px solid rgba(229, 231, 235, 0.75);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.logo img {
    display: block;
    width: 220px;
    height: auto;
}

.main-nav {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-left: auto;
    color: var(--muted);
    font-size: 15px;
}

.main-nav a:hover,
.phone:hover {
    color: var(--blue);
}

.phone {
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
}

.nav-toggle {
    display: none;
}

/* Контакты внутри бургер-меню нужны только на узком экране. */
.nav-contacts {
    display: none;
}

.nav-link,
.mega-trigger {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

/* Калькулятор — единственный инструмент в меню, выделяем его цветом,
   иначе ссылка теряется среди восьми одинаковых пунктов навигации. */
.nav-link-accent {
    color: var(--blue);
    font-weight: 500;
}

/* Позиционирование мега-меню отдано .header-bar. */
.mega-item {
    position: static;
}

.mega-trigger::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.18s ease;
}

/* Меню прижато к белой плашке шапки, а не к самой кнопке: иначе широкая
   панель уезжала за левый край экрана. */
.mega-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    right: 0;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding: 24px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 28px;
    background: white;
    box-shadow: var(--shadow);
    color: var(--ink);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

/* Мега-меню раскрывается по клику: на ховере оно перекрывало страницу. */
.mega-item.open .mega-menu {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
}

.mega-item.open .mega-trigger::after {
    transform: rotate(225deg) translate(-2px, -2px);
}

.mega-head {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.mega-head a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--soft-blue);
    color: var(--blue);
    font-weight: 800;
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.mega-group {
    min-width: 0;
    padding: 18px;
    border-radius: 20px;
    background: #f8fafc;
}

.mega-group ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mega-group .mega-group-title {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.mega-group a {
    display: flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.3;
    transition: color 0.15s ease;
}

.mega-group a:hover {
    color: var(--blue);
}

.mega-all {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    padding: 18px 22px;
    border-radius: 20px;
    background: var(--soft-blue);
    color: var(--ink);
    transition: background 0.18s ease;
}

.mega-all:hover {
    background: #dceaff;
}

.mega-all strong {
    color: var(--blue);
    font-size: 17px;
}

.mega-all span {
    color: var(--muted);
    font-size: 14px;
}

/* Каталог услуг на /uslugi/ */
.catalogue-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.catalogue-group {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
}

/* Разделы на 20-50 работ занимают всю ширину и раскладывают список
   в колонки — иначе одна колонка сетки уезжала вниз на два экрана. */
.catalogue-group--wide {
    grid-column: 1 / -1;
}

.catalogue-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.catalogue-group h3 {
    margin: 0;
    font-size: 20px;
}

.catalogue-group h3 a {
    color: var(--ink);
}

.catalogue-group h3 a:hover {
    color: var(--blue);
}

.catalogue-count {
    margin: 0;
    flex: none;
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

.catalogue-list {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.catalogue-group--wide .catalogue-list {
    display: block;
    columns: 3;
    column-gap: 28px;
}

.catalogue-group--wide .catalogue-list li {
    break-inside: avoid;
}

.catalogue-list a {
    display: block;
    padding: 6px 0;
    color: var(--muted);
    line-height: 1.4;
    border-bottom: 1px solid transparent;
}

.catalogue-list a:hover {
    color: var(--blue);
}

.city-switch {
    position: relative;
}

.city-trigger {
    gap: 7px;
    color: var(--ink);
    font-weight: 800;
}

.city-trigger::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 1px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.18s ease;
}

.pin-icon {
    position: relative;
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid var(--blue);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.pin-icon::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: var(--blue);
}

.city-menu {
    position: absolute;
    /* Выбор города стоит в разметке выше основной навигации, поэтому без
       z-index панель уходила под нее. */
    z-index: 30;
    top: calc(100% + 14px);
    right: 0;
    min-width: 220px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.city-menu a {
    display: block;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 700;
}

.city-menu a:hover {
    color: var(--blue);
    background: var(--soft-blue);
}

.city-switch.open .city-menu {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
}

.city-switch.open .city-trigger::after {
    transform: rotate(225deg) translate(-2px, -2px);
}

.tag-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-row a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    color: var(--muted);
    font-weight: 800;
}

.tag-row a:hover {
    color: var(--blue);
    border-color: rgba(39, 102, 214, 0.28);
    background: var(--soft-blue);
}

.hero {
    padding: 104px 0 72px;
    background:
        radial-gradient(circle at 82% 12%, rgba(39, 102, 214, 0.16), transparent 28%),
        linear-gradient(180deg, #f7faff 0%, #fbfcff 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px;
    align-items: center;
}

/* Первый экран этих страниц жил в отдельном узком контейнере (1040px) и не
   совпадал по левому краю с остальными секциями. Контейнер теперь общий, а
   длину строки держим прежней — иначе лид растягивался на всю ширину.
   Индекс блога исключен: там свой grid внутри контейнера. */
.page-hero:not(.blog-list-hero) > .container > *,
.post-hero > .container > * {
    max-width: 1040px;
}

.page-hero {
    padding: 92px 0 68px;
    background:
        radial-gradient(circle at 86% 18%, rgba(39, 102, 214, 0.12), transparent 26%),
        var(--bg);
    border-bottom: 1px solid rgba(229, 231, 235, 0.7);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--blue);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--soft-blue);
}

h1 {
    margin: 0;
    font-size: 58px;
    line-height: 1.06;
}

h2 {
    margin: 0 0 22px;
    font-size: 30px;
    line-height: 1.18;
}

h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.lead {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.answer-block {
    margin-top: 22px;
    padding: 18px 20px;
    border-left: 4px solid var(--blue);
    background: white;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
}

.answer-block p {
    margin: 0;
    line-height: 1.6;
    color: var(--ink);
}

.answer-block span {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    padding: 0 36px;
    overflow: hidden;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Блик пробегает по кнопке раз в несколько секунд — иначе постоянная
   анимация на странице с десятком кнопок отвлекает от текста. */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: translateX(0) skewX(-18deg);
    animation: btn-sheen 5.5s ease-in-out infinite;
}

.btn.secondary::after {
    background: linear-gradient(100deg, transparent, rgba(39, 102, 214, 0.16), transparent);
}

/* Ширина блика — 40% кнопки, поэтому путь от left:-60% до left:130%
   это 190% кнопки, то есть 475% ширины самого блика. */
@keyframes btn-sheen {
    0%, 72% { transform: translateX(0) skewX(-18deg); }
    88%, 100% { transform: translateX(475%) skewX(-18deg); }
}

@media (prefers-reduced-motion: reduce) {
    .btn::after { animation: none; }
    .btn:hover { transform: none; }
}

.btn.primary {
    color: white;
    background: var(--blue);
    box-shadow: 0 14px 30px rgba(39, 102, 214, 0.32);
}

.btn.primary:hover {
    box-shadow: 0 20px 40px rgba(39, 102, 214, 0.4);
}

.btn.secondary {
    border-color: var(--line);
    background: white;
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
}

.btn.secondary:hover {
    box-shadow: 0 16px 34px rgba(17, 24, 39, 0.12);
}

.estimate-card,
.card,
.contact-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: white;
}

/* --- Статья блога --------------------------------------------------- */

.post-hero {
    padding: 34px 0 30px;
    background: linear-gradient(180deg, var(--soft-blue), transparent);
}

.post-hero h1 {
    margin-top: 12px;
}

.post-hero .lead {
    max-width: 720px;
}

.post-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
    font-size: 14px;
}

.post-meta > div {
    padding: 10px 16px;
    border-radius: 14px;
    background: white;
    border: 1px solid var(--line);
}

.post-meta dt {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.post-meta dd {
    margin: 3px 0 0;
    font-weight: 700;
}

/* Обложка статьи была отдельной шириной 1180px и после выравнивания шапки
   заметно не совпадала по краю с текстом. Ставим тот же бокс, что у .container. */
.post-cover {
    width: min(1580px, calc(100% - 48px));
    margin: 0 auto;
}

.post-cover img {
    display: block;
    width: 100%;
    aspect-ratio: 21 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.post-cover figcaption {
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
}

.post-layout {
    padding-top: 34px;
}

.post-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

/* Текст страницы живет в одной белой карточке и читается сплошным потоком,
   а не набором отдельных плашек. */
.article-body {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: clamp(26px, 3.2vw, 56px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: 0 18px 50px rgba(17, 24, 39, 0.06);
}

.article-body section {
    display: block;
    scroll-margin-top: 40px;
}

.article-body h2 {
    margin: 42px 0 0;
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.25;
    scroll-margin-top: 40px;
}

.article-body > h2:first-child,
.article-body section:first-child h2 {
    margin-top: 0;
}

.article-body section + section h2 {
    margin-top: 42px;
}

.article-body p {
    margin-top: 14px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.75;
}

.article-body .check-list,
.article-body .cross-list,
.article-body .steps,
.article-body .inline-facts {
    margin-top: 20px;
}

.article-body .check-list li,
.article-body .cross-list li {
    color: var(--muted);
    font-size: 17px;
}

.article-body .table-wrap {
    box-shadow: none;
}

/* Короткие пары «параметр — значение» внутри текста. */
.inline-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin: 0;
}

.inline-facts > div {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.inline-facts dt {
    color: var(--ink);
    font-weight: 600;
}

.inline-facts dd {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

/* Сноска об источнике характеристик дома под таблицей фактов ЖК. */
.rich-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.post-list {
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
    list-style: none;
    counter-reset: post-step;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.post-list li {
    position: relative;
    padding-left: 34px;
}

/* Маркер рисуем сами: у ul это точка в круге, у ol — номер шага. */
.post-list li::before {
    position: absolute;
    left: 0;
    top: 2px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--soft-blue);
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
}

ul.post-list li::before {
    content: '';
    background:
        radial-gradient(circle at center, var(--blue) 0 3px, transparent 3px),
        var(--soft-blue);
}

ol.post-list li::before {
    counter-increment: post-step;
    content: counter(post-step);
}

.article-body .table-wrap {
    margin-top: 20px;
}

.post-note {
    margin-top: 20px;
    padding: 18px 20px;
    border-left: 4px solid var(--blue);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--soft-blue);
}

.post-note p {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
}

.toc-card {
    position: sticky;
    top: 98px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: 0 10px 36px rgba(17, 24, 39, 0.05);
}

.toc-list {
    counter-reset: toc;
    list-style: none;
    margin: 18px 0 20px;
    padding: 0;
    display: grid;
    gap: 4px;
}

.toc-list li {
    counter-increment: toc;
}

.toc-list a {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    padding: 9px 10px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
}

.toc-list a::before {
    content: counter(toc, decimal-leading-zero);
    color: var(--blue);
    font-weight: 800;
    font-size: 13px;
}

.toc-list a:hover {
    background: var(--soft-blue);
    color: var(--ink);
}

.toc-cta {
    width: 100%;
}

.post-author {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    margin-top: 42px;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--soft-blue);
}

.post-author-photo {
    margin: 0;
}

.post-author-photo img {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 18px;
}

.post-author strong {
    display: block;
    margin-top: 10px;
    font-size: 18px;
}

.post-author p:last-child {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.6;
}

/* Шапка сверху, шаги под ней: в две колонки левому блоку не хватало места. */
.process-wrap {
    display: grid;
    gap: 30px;
}

.process-head {
    display: grid;
    justify-items: start;
    gap: 12px;
    max-width: 760px;
}

.process-head > * {
    margin: 0;
}

.process-cta {
    margin-top: 6px;
}

.process-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.process-icons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.process-icons img {
    width: 100%;
    height: 96px;
    object-fit: contain;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05);
}

/* Карточка шага: номер, картинка и текст идут одной колонкой сверху вниз —
   в три колонки текст сжимался в узкий столбик, а номер висел у самого края. */
.process-list li {
    counter-increment: step;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    padding: 26px 26px 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: white;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.04);
}

.process-list li::before {
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
    background: var(--blue);
    font-weight: 900;
    justify-self: start;
}

.process-list img {
    display: block;
    width: 100%;
    height: 152px;
    object-fit: contain;
    margin: 20px 0 22px;
    padding: 12px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 18px;
    background: #f8fbff;
}

.process-copy,
.process-list div {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.process-copy strong,
.process-list strong {
    display: block;
    margin: 0;
    font-size: 19px;
    line-height: 1.25;
}

.process-copy span,
.process-list span {
    display: block;
    color: var(--muted);
    line-height: 1.55;
}

.process-list-simple li {
    grid-template-columns: 62px 74px minmax(0, 1fr);
    align-items: center;
    min-height: 124px;
}

.process-list-simple li::before {
    grid-row: auto;
    align-self: center;
}

/* Нумерованные шаги процесса (rich-content) */
.steps {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.step {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    padding: 22px 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.04);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.step:hover {
    border-color: rgba(39, 102, 214, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.08);
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: var(--blue);
    background: var(--soft-blue);
    font-weight: 900;
    font-size: 20px;
    line-height: 1;
}

.step:first-child .step-num {
    color: var(--white);
    background: var(--blue);
}

.step-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.step-copy strong {
    font-size: 19px;
    line-height: 1.3;
}

.step-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.cross-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cross-list li {
    position: relative;
    padding-left: 34px;
    line-height: 1.6;
    color: var(--ink);
}

.cross-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fbe0d1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 6l8 8M14 6l-8 8' stroke='%23b4470f' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

.rich-intro {
    font-size: 18px;
    line-height: 1.7;
    color: var(--muted);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.estimate-card {
    padding: 24px;
    box-shadow: var(--shadow);
}

/* Фото сверху на всю ширину, две карточки-подписи — одной строкой под ним:
   они больше не наезжают на снимок и не режут его по краям. */
.hero-showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.hero-main-photo {
    grid-column: 1 / -1;
    height: 520px;
    margin: 0;
    overflow: hidden;
    border-radius: 34px;
    background: var(--soft-blue);
    box-shadow: 0 34px 80px rgba(17, 24, 39, 0.16);
    position: relative;
}

.hero-main-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-main-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: inherit;
    pointer-events: none;
}

.hero-floating-card {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 18px;
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 62px rgba(17, 24, 39, 0.14);
}

.hero-floating-card img {
    width: 62px;
    height: 62px;
    object-fit: contain;
}

.hero-floating-card strong {
    display: block;
    margin-bottom: 5px;
    line-height: 1.25;
}

.hero-floating-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.42;
}

.photo-placeholder {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(39, 102, 214, 0.9), rgba(17, 24, 39, 0.92)),
        repeating-linear-gradient(45deg, rgba(255,255,255,0.12) 0 1px, transparent 1px 18px);
    box-shadow: var(--shadow);
}

.photo-placeholder::before {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: calc(var(--radius) - 10px);
}

.photo-placeholder::after {
    content: "";
    position: absolute;
    right: 28px;
    bottom: 26px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.photo-placeholder span {
    position: absolute;
    left: 28px;
    bottom: 28px;
    z-index: 1;
    color: white;
    font-weight: 900;
    font-size: 22px;
}

.photo-frame {
    display: block;
    position: relative;
    min-height: 190px;
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--soft-blue);
    box-shadow: var(--shadow);
}

.photo-frame img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
}

.photo-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: inherit;
    pointer-events: none;
}

.photo-frame.large {
    min-height: 390px;
}

.photo-frame.tall {
    min-height: 330px;
    grid-row: span 2;
}

.photo-placeholder.large {
    min-height: 390px;
}

.photo-placeholder.tall {
    min-height: 330px;
    grid-row: span 2;
}

.estimate-card p,
.card p,
.note {
    color: var(--muted);
    line-height: 1.55;
}

.section {
    padding: 58px 0;
}

.section.muted {
    background: var(--bg);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

/* ── Слайдер: общая механика ─────────────────────────────── */
.slider {
    position: relative;
}

.slider-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 20px;
    margin: 0;
    padding: 4px 2px 8px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* Боковой padding сдвигает точку привязки первого слайда: без такого же
       scroll-padding браузер сразу после верстки доскроллит трек на 2px, а
       любой скролл до первой отрисовки полностью отключает замер LCP. */
    scroll-padding-inline: 2px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.slider-track::-webkit-scrollbar {
    display: none;
}

.slider-track:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
    border-radius: var(--radius);
}

.slider-slide {
    scroll-snap-align: start;
    min-width: 0;
}

.slider-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 22px;
}

.slider-count {
    margin: 0;
    min-width: 62px;
    text-align: center;
    color: var(--muted);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.slider-progress {
    height: 4px;
    margin: 18px auto 0;
    width: min(420px, 70%);
    border-radius: 999px;
    background: var(--soft-blue);
    overflow: hidden;
}

.slider-progress span {
    display: block;
    height: 100%;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    border-radius: 999px;
    background: var(--blue);
    transition: transform 0.28s ease;
}

.slider-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

/* Точка размером 9px — слишком мелкая цель для пальца, поэтому кликабельная
   область у кнопки 30x24, а сама точка рисуется псевдоэлементом. */
.slider-dot {
    display: grid;
    place-items: center;
    width: 30px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.slider-dot::before {
    content: '';
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.2s ease;
}

.slider-dot.active::before {
    width: 26px;
    background: var(--blue);
}

/* ── Отзывы ──────────────────────────────────────────────── */
.review-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 32px;
    align-items: center;
    height: 100%;
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 12px 40px rgba(17, 24, 39, 0.05);
}

.review-copy {
    display: grid;
    gap: 18px;
}

.stars {
    margin: 0;
    color: #f59e0b;
    font-size: 22px;
    letter-spacing: 2px;
}

.review-copy blockquote {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
    line-height: 1.6;
    font-weight: 600;
}

.review-copy blockquote p {
    margin: 0;
}

.review-author {
    display: grid;
    gap: 4px;
}

.review-author strong {
    font-size: 20px;
}

.review-author span {
    color: var(--muted);
}

.review-shot {
    margin: 0;
    align-self: stretch;
    display: flex;
    justify-content: center;
    align-items: center;
}

.review-shot img {
    display: block;
    max-width: 100%;
    max-height: 440px;
    object-fit: contain;
    filter: drop-shadow(0 18px 34px rgba(17, 24, 39, 0.22));
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.card {
    padding: 24px;
    box-shadow: 0 10px 36px rgba(17, 24, 39, 0.05);
}

.card:hover {
    border-color: var(--blue);
    transform: translateY(-2px);
}

.trust-section {
    padding-top: 24px;
}

.trust-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 16px;
}

.trust-card {
    min-height: 220px;
    padding: 26px;
    border-radius: var(--radius);
    background: white;
    border: 1px solid var(--line);
    box-shadow: 0 10px 36px rgba(17, 24, 39, 0.05);
}

.trust-card.main {
    background: var(--soft-blue);
}

.trust-card.main p:last-child {
    color: var(--muted);
    line-height: 1.6;
}

.trust-card.stat {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #101828;
    color: white;
}

.trust-card.stat strong {
    display: block;
    margin-bottom: 12px;
    font-size: 48px;
    line-height: 1;
}

.trust-card.stat span {
    color: #cbd5e1;
    line-height: 1.45;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}

.split-section {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 36px;
    align-items: center;
}

.section-text {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

.placeholder-gallery {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 16px;
}

.placeholder-gallery.wide {
    grid-template-columns: 1.2fr repeat(3, 1fr);
}

.visual-strip {
    padding-bottom: 18px;
}

.check-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 26px;
    margin: 12px 0;
    line-height: 1.5;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--blue);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: white;
    box-shadow: 0 10px 36px rgba(17, 24, 39, 0.05);
}

.price-groups {
    display: grid;
    gap: 56px;
}

.price-group h3 {
    margin-bottom: 14px;
}

.price-group a {
    color: var(--blue);
    font-weight: 800;
}

.price-list-note {
    max-width: 720px;
    margin: -6px 0 22px;
    color: var(--muted);
}

.price-count {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.82em;
}

/* В чипе фильтра число липло к названию и терялось: ставим его в скобки,
   отбиваем пробелом и красим в цвет самого чипа. */
.price-filter .price-count {
    margin-left: 7px;
    color: inherit;
    opacity: 0.7;
    font-weight: 500;
    font-size: 0.92em;
}

.price-filter .price-count::before {
    content: '(';
}

.price-filter .price-count::after {
    content: ')';
}

.price-promo {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0 0 28px;
    padding: 28px 32px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: white;
    text-decoration: none;
}

.price-promo:hover {
    background: #0b1220;
}

.price-promo-text {
    display: grid;
    gap: 8px;
}

.price-promo-title {
    font-weight: 800;
    font-size: 20px;
}

.price-promo-note {
    color: rgba(255, 255, 255, 0.72);
    max-width: 62ch;
}

.price-promo-arrow {
    margin-left: auto;
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}

@media (max-width: 620px) {
    .price-promo {
        padding: 22px 20px;
        gap: 16px;
    }

    .price-promo-title {
        font-size: 18px;
    }

    .price-promo-arrow {
        display: none;
    }
}

.price-group h3 .price-count {
    margin-left: 6px;
}

.price-geo {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.price-geo-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 12px;
}

.price-geo-links a {
    color: var(--blue);
    font-weight: 700;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

th,
td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    line-height: 1.55;
}

thead th {
    background: var(--soft-blue);
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(39, 102, 214, 0.22);
}

tbody th[scope="row"] {
    font-weight: 800;
    color: var(--ink);
    background: #fbfcff;
}

tbody tr:last-child th,
tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover th[scope="row"],
tbody tr:hover td {
    background: #f7faff;
}

.table-wrap:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.faq-wrap {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.faq-intro {
    position: sticky;
    top: 96px;
}

.faq-intro .btn {
    margin-top: 18px;
}

.faq-list {
    display: grid;
    gap: 12px;
}

details {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    background: white;
}

summary {
    cursor: pointer;
    font-weight: 800;
}

details p {
    color: var(--muted);
    line-height: 1.55;
}

.faq-item {
    padding: 0;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.faq-item[open] {
    border-color: rgba(39, 102, 214, 0.35);
    box-shadow: 0 16px 40px rgba(17, 24, 39, 0.07);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    list-style: none;
    font-size: 18px;
    line-height: 1.4;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:hover .faq-q {
    color: var(--blue);
}

.faq-item summary:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: -2px;
    border-radius: var(--radius-sm);
}

.faq-mark {
    position: relative;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--soft-blue);
    transition: background 0.18s ease, transform 0.22s ease;
}

.faq-mark::before,
.faq-mark::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: var(--blue);
    transform: translate(-50%, -50%);
    transition: opacity 0.18s ease;
}

.faq-mark::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item[open] .faq-mark {
    background: var(--blue);
}

.faq-item[open] .faq-mark::before,
.faq-item[open] .faq-mark::after {
    background: var(--white);
}

.faq-item[open] .faq-mark::after {
    opacity: 0;
}

.faq-a {
    padding: 0 24px 24px;
    border-top: 1px solid var(--line);
}

.faq-a p {
    margin: 18px 0 0;
    font-size: 17px;
    line-height: 1.7;
}

.contact-panel {
    display: grid;
    gap: 12px;
    padding: 28px;
    font-size: 20px;
}

/* Карта офиса на странице контактов. */
.map-frame {
    overflow: hidden;
    margin: 22px 0 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    line-height: 0;
}

.map-frame iframe {
    display: block;
    width: 100%;
    border: 0;
}

.cta-section {
    padding-top: 24px;
}

.cta-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 30px;
    align-items: start;
    padding: 32px;
    border-radius: var(--radius);
    background: #101828;
    color: white;
    box-shadow: var(--shadow);
}

.cta-panel p:not(.eyebrow) {
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.6;
}

.cta-panel .cta-calc-link {
    font-size: 16px;
}

.cta-panel .cta-calc-link a {
    color: white;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.cta-form {
    display: grid;
    gap: 18px;
    padding: 26px;
    border-radius: var(--radius-sm);
    background: white;
    color: var(--ink);
}

.cta-form label {
    display: grid;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.3;
    color: var(--muted);
}

/* Согласие на обработку данных: единственный label в форме, который идет
   строкой, а не колонкой, поэтому grid из .cta-form label здесь снимается. */
.consent-field {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px !important;
    line-height: 1.45;
}

.consent-field input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    min-height: 18px;
    height: 18px;
    margin-top: 1px;
    padding: 0;
    accent-color: var(--blue);
    cursor: pointer;
}

.consent-field a {
    color: var(--blue);
    text-decoration: underline;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.cta-form input,
.cta-form textarea {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-weight: 400;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cta-form input::placeholder,
.cta-form textarea::placeholder {
    color: #9aa5b5;
}

.cta-form input:hover,
.cta-form textarea:hover {
    border-color: #cbd5e1;
}

.cta-form input:focus,
.cta-form textarea:focus {
    outline: none;
    background: white;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(39, 102, 214, 0.14);
}

.cta-form textarea {
    min-height: 104px;
    resize: vertical;
}

/* Кнопки в форме — во всю ширину, отдельным блоком от полей */
.cta-form .btn {
    width: 100%;
    justify-content: center;
    /* justify-content центрирует текст целиком, но если подпись переносится,
       вторая строка выравнивается по text-align — без этого «Позвонить: 8 (963)
       297-42-23» на узком экране прижимался влево. */
    text-align: center;
    min-height: 54px;
}

.cta-form .btn.primary {
    margin-top: 6px;
}

.cta-form .btn.secondary {
    margin-top: -8px;
    border-color: var(--line);
    background: transparent;
    color: var(--ink);
}

.cta-form .btn.secondary:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.form-message {
    min-height: 22px;
    margin: -8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.form-message.success {
    color: #047857;
}

.form-message.error {
    color: #b91c1c;
}

.cta-form button:disabled {
    opacity: 0.72;
    cursor: wait;
}

.site-footer {
    margin-top: 40px;
    padding: 72px 0 34px;
    color: white;
    background: #101828;
    border-radius: var(--radius) var(--radius) 0 0;
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
    gap: 64px;
    padding-bottom: 54px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand > p {
    margin: 32px 0 0;
    max-width: 46ch;
    font-size: 15px;
    line-height: 1.75;
}

.footer-logo {
    font-size: 24px;
}

/* Колонки подстраиваются под ширину: на широком экране их пять в ряд. */
.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 40px 28px;
}

.footer-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-contacts {
    display: grid;
    gap: 32px;
    margin: 32px 0 0;
}

.footer-contacts dt {
    color: #8fa3bd;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-contacts dd {
    margin: 6px 0 0;
}

/* У текстовых dd отступ от подписи визуально больше на половину межстрочного
   интервала, а у ряда кнопок он равен margin — подпись прилипает к иконкам.
   Добавляем эту половину padding-ом: margin у списка схлопнулся бы с margin
   самого dd и ничего бы не изменил. */
.footer-contacts dd .social-links {
    padding-top: 6px;
}

.footer-contacts dd a {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.footer-contacts .muted-note {
    color: #8fa3bd;
    font-size: 14px;
}

/* .site-footer a задает display: block — кнопке возвращаем флекс,
   иначе текст не центрируется. */
.site-footer .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Селектор с .site-footer обязателен: ниже .site-footer a сбрасывает margin
   и по специфичности перебивает одиночный класс. */
.site-footer .footer-cta {
    margin-top: 32px;
    width: 100%;
}

.footer-cities {
    padding: 36px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-city-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.footer-city-row a {
    margin: 0;
    padding: 9px 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 15px;
}

.footer-city-row a:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.site-footer .footer-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 24px;
    color: white;
}

.site-footer a {
    display: block;
    margin: 0;
    color: #c3d1e4;
    font-size: 15px;
    line-height: 1.5;
    transition: color 0.15s ease;
}

.footer-column li + li {
    margin-top: 18px;
}

.footer-column a:hover,
.footer-contacts a:hover {
    color: white;
}

.site-footer p,
.footer-bottom {
    color: #cbd5e1;
}

/* Верхняя тонкая строка: только контакты и город, чтобы не спорить
   с основным баром. */
.header-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 56px;
    color: var(--muted);
    font-size: 14px;
}

.header-tagline {
    margin: 0;
}

.header-strip-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-mail:hover {
    color: var(--blue);
}

/* ── Иконки мессенджеров ─────────────────────────────────── */
.social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social-links a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 12px;
    background: white;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.social-links a:hover {
    border-color: var(--blue);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.1);
    transform: translateY(-2px);
}

.social-links img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* В шапке кнопки чуть компактнее: строка над логотипом низкая. */
.social-links--header a {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.social-links--header img {
    width: 17px;
    height: 17px;
}

@media (prefers-reduced-motion: reduce) {
    .social-links a:hover {
        transform: none;
    }
}

.header-bar-wrap {
    padding-bottom: 26px;
}

/* Логотип, навигация и заявка живут в одной белой плашке. */
.header-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 16px 16px 16px 28px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 999px;
    background: white;
    box-shadow: 0 16px 40px rgba(17, 24, 39, 0.08);
}

.header-contacts {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.header-cta,
.header-calc {
    min-height: 52px;
    padding: 0 22px;
    font-size: 16px;
}

/* «Ещё»: узкий список у своей кнопки, а не мега-меню во всю ширину шапки. */
.nav-more {
    position: relative;
}

.nav-more-menu {
    left: auto;
    right: 0;
    width: max-content;
    min-width: 230px;
    padding: 10px;
    border-radius: 18px;
}

.nav-more-menu a {
    display: block;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 500;
}

.nav-more-menu a:hover {
    color: var(--blue);
    background: var(--soft-blue);
}

.header-bar .main-nav {
    gap: 2px;
    margin-left: 8px;
}

.header-bar .nav-link,
.header-bar .mega-trigger {
    min-height: 44px;
    padding: 0 13px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.2px;
    white-space: nowrap;
}

.header-bar .nav-link:hover,
.header-bar .mega-trigger:hover {
    color: var(--blue);
    background: var(--soft-blue);
}

/* Плашки «что получает заказчик» под кнопками hero: плоские, без hover —
   это не ссылки, а короткие тезисы. */
.trust-plates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.trust-plates li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 10px 24px -12px rgba(16, 24, 40, 0.18);
}

.trust-plates svg {
    width: 34px;
    height: 34px;
    color: var(--blue);
}

.trust-plates span {
    color: var(--ink);
    font-weight: 500;
    font-size: 15px;
    line-height: 1.35;
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.benefit-card {
    display: grid;
    align-content: start;
    justify-items: center;
    text-align: center;
    min-height: 320px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: 0 10px 36px rgba(17, 24, 39, 0.05);
}

.benefit-figure {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 128px;
    margin: 0 0 18px;
}

.benefit-figure img {
    display: block;
    width: auto;
    max-width: 170px;
    max-height: 128px;
    object-fit: contain;
}

.benefit-card p {
    color: var(--muted);
    line-height: 1.6;
}

.works-section {
    overflow: hidden;
}

.slider-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.slider-controls {
    display: flex;
    gap: 8px;
}

.slider-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: white;
    color: var(--ink);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.slider-btn svg {
    width: 22px;
    height: 22px;
}

.slider-btn:hover:not(:disabled) {
    color: white;
    background: var(--blue);
    border-color: var(--blue);
}

.slider-btn:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.slider-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.case-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.case-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    color: var(--ink);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.05);
}

.case-tab:hover,
.case-tab.active {
    color: white;
    border-color: #101828;
    background: #101828;
}

.case-panel {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 46px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: 0 10px 36px rgba(17, 24, 39, 0.05);
}

.case-panel:not(.active) {
    display: none;
}

.case-panel.active {
    display: grid;
}

.case-slider {
    min-width: 0;
}

.case-slider .slider-track {
    gap: 0;
    padding: 0;
    border-radius: 22px;
}

.case-photo {
    height: 100%;
    min-height: 460px;
    margin: 0;
    overflow: hidden;
    border-radius: 22px;
    background: var(--soft-blue);
}

.case-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-arrows {
    position: absolute;
    right: 18px;
    bottom: 62px;
    display: flex;
    gap: 10px;
}

.slider-btn.shadow {
    border: 0;
    background: white;
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.22);
}

.case-copy {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 4px 10px 6px 0;
}

.case-copy h3 {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
}

/* Подзаголовок держится своего абзаца: сверху воздуха больше, чем снизу. */
.case-copy h4 {
    margin: 18px 0 0;
}

.case-copy p,
.case-copy blockquote,
.case-meta {
    margin: 0;
    max-width: 70ch;
    color: var(--muted);
    line-height: 1.65;
}

.case-copy blockquote {
    padding: 22px 24px;
    border-left: 4px solid var(--blue);
    border-radius: 12px;
    background: var(--bg);
}

.case-copy > strong {
    margin-top: 4px;
}

.service-hero {
    padding: 92px 0 68px;
    background:
        radial-gradient(circle at 86% 18%, rgba(39, 102, 214, 0.12), transparent 26%),
        var(--bg);
    border-bottom: 1px solid rgba(229, 231, 235, 0.7);
}

.service-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px;
    align-items: center;
}

/* display: grid — чтобы картинка растягивалась на всю карточку.
   При одном min-height высота родителя остается auto, и height: 100%
   у <img> не срабатывает: снизу оставалась пустая голубая полоса. */
.service-hero-photo {
    display: grid;
    min-height: 600px;
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--soft-blue);
    box-shadow: var(--shadow);
}

.service-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-media-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 32px;
    align-items: center;
}

.blog-list-head {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 40px;
    align-items: end;
}

.category-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.category-pills button {
    font-family: inherit;
    cursor: pointer;
}

/* Фильтр прайса стоит между заголовком и таблицами. */
.price-filter {
    margin: 18px 0 22px;
}

.category-pills a,
.category-pills button,
.blog-category {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    color: var(--muted);
    font-weight: 600;
    font-size: 15px;
}

.category-pills a.active,
.category-pills a:hover,
.category-pills button.active,
.category-pills button:hover,
.blog-category {
    color: var(--blue);
    background: var(--soft-blue);
    border-color: transparent;
}

.blog-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.blog-card,
.related-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: white;
    box-shadow: 0 10px 36px rgba(17, 24, 39, 0.05);
}

.blog-card figure,
.related-card figure {
    height: 210px;
    margin: 0;
    overflow: hidden;
    background: var(--soft-blue);
}

.blog-card img,
.related-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card div,
.related-card div {
    display: grid;
    gap: 10px;
    padding: 20px;
}

.blog-card time,
.blog-card p,
.related-card p {
    color: var(--muted);
}

.blog-card p,
.related-card p {
    margin: 0;
    line-height: 1.55;
}

.blog-card h3,
.related-card h3,
.blog-card p,
.related-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.blog-card h3,
.related-card h3 {
    min-height: 2.35em;
    margin-bottom: 0;
    line-height: 1.18;
    -webkit-line-clamp: 2;
}

.blog-card p,
.related-card p {
    -webkit-line-clamp: 2;
}

.related-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

details {
    position: relative;
    padding: 0;
    overflow: hidden;
}

summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 62px;
    padding: 18px 54px 18px 20px;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: "";
    position: absolute;
    right: 22px;
    top: 26px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--blue);
    border-bottom: 2px solid var(--blue);
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

details[open] summary::after {
    transform: rotate(225deg);
}

/* У FAQ свой индикатор — кружок .faq-mark, шеврон там лишний. */
.faq-item summary::after {
    content: none;
}

details p {
    margin: 0;
    padding: 0 20px 20px;
}

.footer-logo img {
    display: block;
    width: 246px;
    max-width: 100%;
    height: auto;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    padding-top: 28px;
    font-size: 13px;
}

.footer-bottom a {
    color: #cbd5e1;
    text-decoration: underline;
}

.footer-bottom a:hover {
    color: white;
}

/* Правовые страницы: сплошной текст без карточек, нумерация пунктов
   сквозная внутри раздела. */
.legal-container {
    width: min(900px, 100%);
}

.legal-date {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 14px;
}

.legal-body .legal-list {
    margin: 14px 0 0;
    padding-left: 22px;
    display: grid;
    gap: 10px;
    color: var(--muted);
    line-height: 1.6;
}

.legal-body .legal-list li {
    padding-left: 4px;
}

.legal-body .legal-list strong {
    color: var(--ink);
}

.legal-body p + .legal-list {
    margin-top: 10px;
}

.legal-page h1 {
    margin: 18px 0 12px;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.2;
}

.legal-page .lead {
    max-width: 720px;
}

@media (max-width: 920px) {
    .header-bar {
        flex-wrap: wrap;
        gap: 14px;
        padding: 12px 16px;
        border-radius: 26px;
    }

    .header-tagline {
        display: none;
    }

    /* Телефон, почта и калькулятор переехали внутрь бургер-меню: отдельной
       строкой под логотипом они занимали пол-экрана до первого экрана сайта. */
    .header-contacts,
    .header-mail {
        display: none;
    }

    /* Тэглайн скрыт, и в строке остается один блок — он прижимался влево,
       а правый угол пустовал. Растягиваем блок на всю ширину: город у левого
       края, кнопки мессенджеров в правом, по одной горизонтали. */
    .header-strip-right {
        flex: 1;
        justify-content: space-between;
        gap: 12px;
    }

    .nav-contacts {
        display: grid;
        gap: 12px;
        margin-top: 10px;
        padding-top: 16px;
        border-top: 1px solid var(--line);
    }

    .nav-phone {
        font-size: 20px;
        font-weight: 700;
        color: var(--ink);
    }

    .nav-mail {
        color: var(--muted);
    }

    .nav-contacts .btn {
        min-height: 48px;
        justify-content: center;
    }

    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 48px;
        height: 44px;
        margin-left: auto;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: white;
        color: var(--ink);
        box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
    }

    .nav-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
    }

    .nav-toggle b {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .site-header.nav-open .nav-toggle span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .site-header.nav-open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .site-header.nav-open .nav-toggle span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .main-nav {
        display: none;
        order: 3;
        width: 100%;
        margin-left: 0;
        padding: 6px 0 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .site-header.nav-open .main-nav {
        display: flex;
    }

    .header-bar .main-nav {
        border-radius: 22px;
        padding: 6px 0 0;
        margin: 0;
    }

    .nav-link,
    .mega-trigger {
        width: 100%;
        min-height: 46px;
        justify-content: space-between;
        padding: 0 4px;
        font-weight: 500;
    }

    .mega-item,
    .nav-more {
        position: static;
    }

    .city-switch {
        position: static;
    }

    .nav-more-menu {
        min-width: 0;
        width: 100%;
    }

    .mega-trigger::after {
        margin-left: auto;
    }

    .city-trigger::after {
        margin-left: auto;
    }

    .mega-item.open .mega-trigger::after {
        transform: rotate(225deg) translate(-2px, -2px);
    }

    .city-switch.open .city-trigger::after {
        transform: rotate(225deg) translate(-2px, -2px);
    }

    .mega-menu {
        position: static;
        width: 100%;
        max-height: 0;
        padding: 0;
        border: 0;
        border-radius: 18px;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        overflow: hidden;
        pointer-events: auto;
        visibility: visible;
        transform: none;
        transition: max-height 0.24s ease;
    }

    .city-menu {
        position: static;
        min-width: 0;
        max-height: 0;
        padding: 0;
        border: 0;
        border-radius: 18px;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        overflow: hidden;
        pointer-events: auto;
        visibility: visible;
        transform: none;
        transition: max-height 0.24s ease;
    }

    .mega-item.open .mega-menu {
        max-height: 72vh;
        margin: 0 0 10px;
        padding: 12px;
        border: 1px solid var(--line);
        background: white;
    }

    .city-switch.open .city-menu {
        max-height: 420px;
        margin: 0 0 10px;
        padding: 8px;
        border: 1px solid var(--line);
        background: white;
    }

    .mega-head {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .mega-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mega-group {
        padding: 12px;
        border-radius: 14px;
    }

    .phone {
        order: 2;
    }

    .hero-grid,
    .service-hero-grid,
    .service-media-grid,
    .blog-list-head,
    .content-grid,
    .footer-top,
    .split-section,
    .trust-grid,
    .cta-panel,
    .post-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

    .review-card {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 26px;
    }

    .review-shot {
        order: -1;
    }

    .case-arrows {
        bottom: 56px;
        right: 12px;
    }

    .toc-card,
    .faq-intro {
        position: static;
    }

    .faq-wrap {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .post-author {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .post-cover img {
        aspect-ratio: 16 / 10;
    }

    .cards,
    .benefit-grid,
    .blog-card-grid,
    .related-card-grid,
    .placeholder-gallery,
    .placeholder-gallery.wide,
    .catalogue-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalogue-group--wide .catalogue-list {
        columns: 2;
    }

    h1 {
        font-size: 40px;
    }

    .case-panel.active {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .case-copy {
        padding: 0;
    }

    .hero-main-photo {
        height: 380px;
    }

    .case-photo,
    .service-hero-photo {
        min-height: 300px;
    }

    .process-icons {
        max-width: 420px;
    }
}

@media (max-width: 620px) {
    .trust-plates,
    .cards,
    .benefit-grid,
    .blog-card-grid,
    .related-card-grid {
        grid-template-columns: 1fr;
    }

    .placeholder-gallery,
    .placeholder-gallery.wide,
    .catalogue-grid {
        grid-template-columns: 1fr;
    }

    .catalogue-group--wide .catalogue-list {
        columns: 1;
    }

    .step {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 14px;
        padding: 20px 18px;
    }

    .step-num {
        width: 42px;
        height: 42px;
        font-size: 17px;
    }

    .hero {
        padding-top: 64px;
    }

    .hero-showcase {
        grid-template-columns: 1fr;
    }

    .hero-main-photo {
        height: 300px;
    }

    .process-list li {
        padding: 20px 20px 22px;
    }

    .process-list li::before {
        width: 38px;
        height: 38px;
    }

    .process-list img {
        height: 128px;
        margin: 16px 0 18px;
        border-radius: 14px;
    }

    .process-list-simple li {
        grid-template-columns: 44px 56px minmax(0, 1fr);
    }

    .logo img {
        width: 180px;
    }

    h1 {
        font-size: 34px;
    }

    .lead {
        font-size: 18px;
    }

    .review-copy blockquote {
        font-size: 18px;
    }

    .review-shot img {
        max-height: 430px;
    }

    .header-contacts {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .case-copy h3 {
        font-size: 24px;
    }

    .case-photo,
    .service-hero-photo {
        min-height: 240px;
    }

    .footer-bottom {
        display: block;
    }

    /* Подписи кнопок формы на узком экране переносились на две строки: на 390px
       вложенные отступы (32 у панели + 26 у формы + 36 у кнопки) не оставляли
       тексту места. Ужимаем их — кнопка становится шире, подпись встает в строку. */
    .cta-panel {
        padding: 22px;
    }

    .cta-form {
        padding: 18px;
    }

    .cta-form .btn {
        padding: 14px 8px;
        font-size: 16px;
        line-height: 1.3;
    }

    /* Кнопки первого экрана: в ряд они на мобилке не помещаются и вставали
       разной ширины по длине подписи. Ставим колонкой во всю ширину. */
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        padding: 14px 18px;
        text-align: center;
    }
}

/* Каталог ЖК на хабе новостроек */
.jk-group-title {
    margin: 40px 0 18px;
    font-size: 20px;
}

.jk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.jk-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.jk-card:hover {
    border-color: var(--blue);
    transform: translateY(-2px);
}

.jk-card-name {
    font-weight: 600;
    color: var(--ink);
}

.jk-card-meta {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}

/* ==========================================================================
   Калькулятор стоимости ремонта (/calculator/)
   ========================================================================== */

/* Калькулятор — первый экран страницы, поэтому у секции фон и отступы героя. */
.calc-section {
    padding: 34px 0 72px;
    background:
        radial-gradient(circle at 86% 12%, rgba(39, 102, 214, 0.12), transparent 30%),
        var(--bg);
    border-bottom: 1px solid rgba(229, 231, 235, 0.7);
}

.calc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 344px;
    gap: 28px;
    align-items: start;
}

/* Стартовый экран идет без боковой карточки: на всю ширину он читался бы плохо. */
.calc.is-wide {
    grid-template-columns: minmax(0, 1fr);
    max-width: 1080px;
}

.calc-section .answer-block {
    max-width: 1080px;
    margin-top: 26px;
}

.calc-main {
    padding: 34px 36px 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow);
}

.calc-eyebrow {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
}

/* ---------- стартовый экран ---------- */

.calc-intro {
    padding: 6px 0 4px;
}

.calc-intro-title {
    margin: 0 0 16px;
    max-width: 760px;
    font-size: clamp(28px, 3.4vw, 44px);
    font-weight: 600;
    line-height: 1.12;
}

.calc-intro-text {
    margin: 0 0 28px;
    max-width: 720px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.calc-intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.calc-intro-meta {
    margin: 16px 0 0;
    font-size: 14px;
    color: var(--muted);
}

.calc-intro-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.calc-intro-list li {
    flex: 1 1 190px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.calc-intro-list strong {
    display: block;
    font-size: 20px;
    font-weight: 600;
}

.calc-intro-list span {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: var(--muted);
}

/* ---------- прогресс ---------- */

.calc-progress {
    margin-bottom: 26px;
}

.calc-progress-label {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
}

.calc-dots {
    display: flex;
    gap: 6px;
}

.calc-dot {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: var(--line);
    transition: background 0.2s ease;
}

.calc-dot.is-done {
    background: rgba(39, 102, 214, 0.45);
}

.calc-dot.is-current {
    background: var(--blue);
}

/* ---------- шаг ---------- */

.calc-step-title {
    margin: 0 0 8px;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 600;
    line-height: 1.25;
}

.calc-step-hint {
    margin: 0 0 24px;
    color: var(--muted);
    line-height: 1.6;
}

.calc-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.calc-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
    text-align: left;
    font: inherit;
    color: inherit;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.calc-card:hover {
    border-color: var(--blue);
    transform: translateY(-2px);
}

.calc-card.is-active {
    border-color: var(--blue);
    box-shadow: 0 0 0 1px var(--blue), 0 16px 34px rgba(39, 102, 214, 0.16);
}

.calc-card-media {
    display: block;
    height: 128px;
    background-color: var(--soft-blue);
    background-size: cover;
    background-position: center;
}

.calc-card-media.is-placeholder {
    background-image: linear-gradient(135deg, #eaf2ff, #dbe7fb);
}

.calc-card-body {
    display: block;
    padding: 18px 20px 20px;
}

.calc-card-title {
    display: block;
    font-size: 17px;
    font-weight: 600;
}

.calc-card-desc {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
}

.calc-card-note {
    display: inline-block;
    margin-top: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--blue);
    background: var(--soft-blue);
}

.calc-card-includes {
    display: block;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.calc-card-includes span {
    display: block;
    position: relative;
    padding-left: 18px;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

.calc-card-includes span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
}

/* ---------- площадь ---------- */

.calc-area-field {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 18px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.calc-area-field input {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: clamp(38px, 6vw, 62px);
    font-weight: 600;
    color: var(--ink);
    outline: none;
    -moz-appearance: textfield;
}

.calc-area-field input::-webkit-outer-spin-button,
.calc-area-field input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calc-area-field span {
    font-size: 22px;
    font-weight: 500;
    color: var(--muted);
}

.calc-pills,
.calc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.calc-pill,
.calc-chip {
    padding: 11px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.calc-pill:hover,
.calc-chip:hover {
    border-color: var(--blue);
}

.calc-pill.is-active,
.calc-chip.is-active {
    border-color: var(--blue);
    background: var(--blue);
    color: white;
}

.calc-area-note {
    margin: 16px 0 0;
    font-size: 14px;
    color: var(--muted);
}

/* ---------- работы ---------- */

.calc-accordion {
    display: grid;
    gap: 10px;
}

.calc-acc {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.calc-acc.is-open {
    border-color: var(--blue);
}

.calc-acc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 18px 22px;
    border: 0;
    background: white;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.calc-acc-head::after {
    content: '';
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.2s ease;
}

.calc-acc.is-open .calc-acc-head::after {
    transform: rotate(-135deg) translate(-2px, -2px);
}

.calc-acc-meta {
    margin-left: auto;
    font-size: 14px;
    font-weight: 400;
    color: var(--muted);
}

.calc-acc-body {
    display: grid;
    gap: 8px;
    padding: 4px 22px 22px;
}

.calc-extras {
    display: grid;
    gap: 8px;
    margin-top: 20px;
}

.calc-work {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.calc-work:hover {
    border-color: var(--blue);
}

.calc-work.is-active {
    border-color: var(--blue);
    background: var(--soft-blue);
}

.calc-work-label {
    font-size: 15px;
}

.calc-work-price {
    flex: none;
    font-size: 14px;
    color: var(--muted);
}

.calc-work.is-active .calc-work-price {
    color: var(--blue);
}

/* ---------- материалы и допы ---------- */

.calc-more {
    margin-top: 18px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 15px;
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.calc-choice {
    display: grid;
    gap: 18px;
    margin-top: 20px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.calc-choice-row .calc-chips {
    margin-top: 10px;
}

.calc-choice-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.calc-design {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.calc-design-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
}

.calc-design-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

/* ---------- навигация по шагам ---------- */

.calc-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.calc-nav .btn {
    min-height: 56px;
    padding: 0 30px;
    font-size: 16px;
}

.calc-error:empty {
    display: none;
}

.calc-error {
    margin: 14px 0 0;
    font-size: 14px;
    font-weight: 500;
    color: #b3261e;
}

@keyframes calc-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-7px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(2px); }
}

.calc-step.is-shake {
    animation: calc-shake 0.42s ease;
}

/* ---------- боковая карточка ---------- */

.calc-aside {
    position: sticky;
    top: 24px;
    padding: 26px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
}

.calc-aside-title {
    margin: 0 0 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.calc-aside-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.calc-aside-row span {
    font-size: 14px;
    color: var(--muted);
}

.calc-aside-row b {
    font-size: 15px;
    font-weight: 600;
    text-align: right;
}

.calc-aside-row:hover b {
    color: var(--blue);
}

.calc-aside-empty {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

.calc-aside-total {
    margin-top: 20px;
    padding: 18px 20px;
    border-radius: var(--radius-sm);
    background: white;
}

.calc-aside-total span {
    display: block;
    font-size: 13px;
    color: var(--muted);
}

.calc-aside-total b {
    display: block;
    margin-top: 4px;
    font-size: 24px;
    font-weight: 600;
}

.calc-aside-total em {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    font-style: normal;
    color: var(--muted);
}

.calc-aside-note {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
}

/* ---------- результат ---------- */

.calc-result-title {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 600;
    line-height: 1.2;
}

.calc-result-sub {
    margin: 0 0 26px;
    color: var(--muted);
}

.calc-breakdown {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.calc-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
}

.calc-row:last-child {
    border-bottom: 0;
}

.calc-row span {
    color: var(--muted);
}

.calc-row b {
    font-size: 17px;
    font-weight: 600;
}

.calc-row-total {
    background: var(--soft-blue);
}

.calc-row-total span {
    color: var(--ink);
    font-weight: 500;
}

.calc-row-total b {
    font-size: 20px;
    color: var(--blue);
}

.calc-disclaimer {
    margin: 18px 0 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--muted);
}

.calc-offer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    margin-top: 30px;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--bg);
}

.calc-offer h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 600;
}

.calc-offer-text p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.calc-offer-list {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.calc-offer-list li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 9px;
    font-size: 15px;
    line-height: 1.5;
}

.calc-offer-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 7px;
    height: 12px;
    border-right: 2px solid var(--blue);
    border-bottom: 2px solid var(--blue);
    transform: rotate(45deg);
}

.calc-offer .cta-form {
    margin: 0;
}

.calc-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.calc-noscript {
    line-height: 1.7;
    color: var(--muted);
}

/* ---------- история расчетов ---------- */

.calc-history {
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
    text-align: left;
}

.calc-history-title {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.calc-hist-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.calc-hist-info b {
    display: block;
    font-size: 18px;
    font-weight: 600;
}

.calc-hist-info span {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    color: var(--muted);
}

.calc-hist-info em {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    font-style: normal;
    color: var(--muted);
}

.calc-hist-pdf {
    flex: 0 0 auto;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    font: inherit;
    font-size: 14px;
    color: var(--blue);
    cursor: pointer;
}

.calc-hist-pdf:hover {
    border-color: var(--blue);
}

/* ---------- помещения ---------- */

.calc-rooms {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.calc-room {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
}

.calc-room.is-active {
    border-color: var(--blue);
    background: var(--soft-blue);
}

.calc-room-pick {
    flex: 1 1 auto;
    padding: 8px 12px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 15px;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.calc-room.is-active .calc-room-pick {
    font-weight: 600;
    color: var(--blue);
}

.calc-room-fields {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calc-room-area input {
    width: 62px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    font: inherit;
    font-size: 14px;
    text-align: center;
    -moz-appearance: textfield;
}

.calc-room-area input::-webkit-outer-spin-button,
.calc-room-area input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calc-room-count {
    display: flex;
    align-items: center;
    gap: 4px;
}

.calc-room-count button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: white;
    font: inherit;
    font-size: 16px;
    line-height: 1;
    color: var(--blue);
    cursor: pointer;
}

.calc-room-count button:hover {
    border-color: var(--blue);
}

.calc-room-count b {
    min-width: 18px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.calc-skip {
    margin-left: auto;
}

/* ---------- что учтено в расчете ---------- */

.calc-summary {
    margin-top: 26px;
    padding: 24px 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.calc-summary-title {
    margin: 0 0 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.calc-sum-row {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.calc-sum-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.calc-sum-row > span {
    font-size: 14px;
    color: var(--muted);
}

.calc-sum-row > div {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.55;
}

.calc-sum-list {
    margin: 0;
    padding-left: 18px;
}

.calc-sum-list li {
    margin-bottom: 4px;
    font-weight: 400;
}

/* ---------- заявка на экране результата ---------- */

.calc-cta-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.calc-cta-tab {
    flex: 1 1 180px;
    padding: 13px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    font: inherit;
    font-size: 15px;
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.calc-cta-tab:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.calc-cta-tab.is-active {
    border-color: var(--blue);
    background: var(--blue);
    color: white;
    font-weight: 600;
}

.calc-gift {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--soft-blue);
    font-size: 14px;
    font-weight: 500;
    color: var(--blue);
    display: inline-block;
}

.calc-smeta-link {
    margin: 18px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

/* ---------- боковая карточка на результате ---------- */

.calc-aside-count {
    margin: 14px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--blue);
}

.calc-aside-actions {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.calc-aside-actions .btn {
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    font-size: 15px;
}

/* ---------- мобильная панель ---------- */

.calc-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: none;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
}

.calc-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.calc-bar-sum span {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.calc-bar-sum b {
    font-size: 18px;
    font-weight: 600;
}

.calc-bar .btn {
    min-height: 50px;
    padding: 0 26px;
    font-size: 15px;
}

@media (max-width: 1080px) {
    .calc {
        grid-template-columns: minmax(0, 1fr);
    }

    .calc.is-wide {
        max-width: none;
    }

    .calc-aside {
        position: static;
    }
}

@media (max-width: 720px) {
    .calc-main {
        padding: 24px 20px 28px;
        border-radius: var(--radius-sm);
    }

    .calc-aside {
        display: none;
    }

    .calc-bar:not([hidden]) {
        display: block;
    }

    .calc-offer {
        grid-template-columns: minmax(0, 1fr);
        padding: 22px 20px;
    }

    .calc-sum-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .calc-hist-row {
        flex-wrap: wrap;
    }

    .calc-section {
        padding: 22px 0 96px;
    }

    .calc-nav .btn {
        flex: 1 1 140px;
    }
}

/* ==========================================================================
   Направления и блок доверия на /uslugi/
   ========================================================================== */

/* Шапка блока: заголовок, лид и группы идут одной колонкой, чтобы текст
   читался как продолжение заголовка, а не как подпись в соседнем столбце. */
.directions .section-head {
    display: block;
    margin-bottom: 6px;
}

.directions .section-head h2 {
    max-width: 900px;
    margin-bottom: 0;
}

.directions .section-text {
    max-width: 760px;
    margin: 18px 0 0;
}

.directions-group {
    margin-top: 58px;
    padding-top: 42px;
    border-top: 1px solid var(--line);
}

.directions-group:first-of-type {
    margin-top: 40px;
}

.directions-head {
    max-width: 760px;
    margin-bottom: 32px;
}

.directions-head h3 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
}

.directions-head p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
}

.directions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.direction-card {
    position: relative;
    display: block;
    padding: 26px 62px 28px 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.direction-card:hover {
    border-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(17, 24, 39, 0.08);
}

.direction-title {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
}

.direction-text {
    display: block;
    margin-top: 10px;
    max-width: 46ch;
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
}

.direction-arrow {
    position: absolute;
    top: 26px;
    right: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--soft-blue);
    color: var(--blue);
    font-size: 15px;
    transition: background 0.15s ease, color 0.15s ease;
}

.direction-card:hover .direction-arrow {
    background: var(--blue);
    color: white;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.why-card {
    padding: 26px 24px 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
}

.why-num {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--blue);
}

.why-card h3 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 600;
}

.why-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 1080px) {
    .directions-grid,
    .why-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .directions-grid,
    .why-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .directions-group {
        margin-top: 40px;
        padding-top: 30px;
    }

    .directions-head {
        margin-bottom: 22px;
    }

    .directions-head h3 {
        font-size: 22px;
    }
}
