/* Tomatys: блоки повышения конверсии new.elit-strou.ru */
:root {
    --es-primary: #002ea5;
    --es-primary-dark: #00217a;
    --es-accent: #ff6b00;
    --es-accent-hover: #ff7f24;
    --es-text: #1b1e25;
    --es-muted: #646b78;
    --es-line: #e3e6ec;
    --es-bg: #f4f6fa;
    --es-ok: #1a9b4b;
    --es-err: #d6332a;
    --es-radius: 8px;
}

/* ---------- Главный баннер: компактнее, чтобы кнопки были на первом экране ---------- */
@media (min-width: 1025px) {
    .intec-banners.main .banners-content,
    .intec-banners.main .blocks-standard-1,
    .intec-banners.main .swiper,
    .intec-banners.main .swiper-wrapper,
    .intec-banners.main .swiper-slide {
        height: min(600px, calc(100vh - 150px)) !important;
        min-height: 480px !important;
    }
    .intec-banners.main .item-main,
    .intec-banners.main .item-main-content-wrapper,
    .intec-banners.main .item-main-content {
        height: 100% !important;
        min-height: 0 !important;
    }
}

/* ---------- Блоки-схемы на страницах услуг («Тип монтажа» и т.п.) ----------
   Шаблон рассчитан на иконки 48 px; для картинок делаем ровные карточки одного размера */
.intec-advantages.standard .blocks-standard-2 .item:has(.item-picture picture) {
    grid-template: auto 1fr / minmax(0, 1fr);
    min-width: 0;
}
.intec-advantages.standard .blocks-standard-2 .item-picture:has(picture) {
    height: auto;
    aspect-ratio: 4 / 3;
    background: #f4f6fa;
    border-radius: 12px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.intec-advantages.standard .blocks-standard-2 .item-picture:has(picture) picture {
    width: 100%;
    height: 100%;
    background: transparent;
}
/* фото — на всю карточку */
.intec-advantages.standard .blocks-standard-2 .item-picture:has(picture) img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}
/* схемы «Тип монтажа» (ID 1512–1515) — целиком, с полями */
.intec-advantages.standard .blocks-standard-2 .item[id$="_1512"] .item-picture,
.intec-advantages.standard .blocks-standard-2 .item[id$="_1513"] .item-picture,
.intec-advantages.standard .blocks-standard-2 .item[id$="_1514"] .item-picture,
.intec-advantages.standard .blocks-standard-2 .item[id$="_1515"] .item-picture {
    padding: 16px;
}
.intec-advantages.standard .blocks-standard-2 .item[id$="_1512"] img,
.intec-advantages.standard .blocks-standard-2 .item[id$="_1513"] img,
.intec-advantages.standard .blocks-standard-2 .item[id$="_1514"] img,
.intec-advantages.standard .blocks-standard-2 .item[id$="_1515"] img {
    object-fit: contain;
    mix-blend-mode: multiply;
}
.intec-advantages.standard .blocks-standard-2 .item:has(.item-picture picture) .item-content {
    min-width: 0;
}
@media (max-width: 550px) {
    .intec-advantages.standard .blocks-standard-2 .item:has(.item-picture picture) {
        grid-template: auto auto / minmax(0, 1fr);
    }
}

/* ---------- Промо-полоса ---------- */
.es-promo {
    position: relative;
    z-index: 5;
    background: var(--es-primary);
    color: #fff;
    font: 500 15px/1.35 Roboto, sans-serif;
}
.es-promo-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 9px 48px 9px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px 16px;
    flex-wrap: wrap;
    text-align: center;
}
.es-promo-btn {
    background: var(--es-accent);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 6px 14px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.es-promo-btn:hover { background: var(--es-accent-hover); }
.es-promo-short { display: none; }
.es-promo--mobile { z-index: 1; }
@media (max-width: 768px) {
    .es-promo-full { display: none; }
    .es-promo-short { display: inline; }
    .es-promo-inner { flex-wrap: nowrap; justify-content: space-between; text-align: left; gap: 10px; }
    .es-promo-btn { padding: 5px 10px; font-size: 13px; }
}
.es-promo-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: #fff;
    opacity: .75;
    font-size: 22px;
    line-height: 30px;
    cursor: pointer;
}
.es-promo-close:hover { opacity: 1; }

/* ---------- Общие контейнеры ---------- */
.es-calc,
.es-strip {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: Roboto, sans-serif;
    color: var(--es-text);
    box-sizing: border-box;
}
.es-calc *, .es-strip * { box-sizing: border-box; }
/* справа у шаблона фиксированная панель (корзина/сравнение) — не прячем под неё кнопки */
@media (min-width: 1025px) and (max-width: 1560px) {
    .es-calc, .es-strip { padding-right: 84px; }
}

/* ---------- Калькулятор ---------- */
#es-calc { scroll-margin-top: 110px; }
.es-calc-wrap { padding: 48px 0 16px; }
.es-calc-wrap--service { padding: 32px 0 16px; }
.es-calc-box {
    border: 1px solid var(--es-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 34px rgba(17, 32, 77, .07);
    overflow: hidden;
}
.es-calc-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px 32px;
    padding: 28px 32px 0;
}
.es-calc-title {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
}
.es-calc-sub { margin: 0; color: var(--es-muted); font-size: 15px; line-height: 1.45; }
.es-calc-badge {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: var(--es-bg);
    border-radius: 10px;
    padding: 12px 18px;
    text-align: right;
}
.es-calc-badge-label { font-size: 13px; color: var(--es-muted); }
.es-calc-badge-value { font-size: 26px; font-weight: 700; color: var(--es-primary); line-height: 1.2; white-space: nowrap; }
.es-calc-badge-note { font-size: 12px; color: var(--es-muted); }
.es-calc-tabs {
    display: flex;
    gap: 8px;
    padding: 20px 32px 0;
    flex-wrap: wrap;
}
.es-calc-tab {
    border: 1px solid var(--es-line);
    background: var(--es-bg);
    color: var(--es-text);
    border-radius: 999px;
    padding: 10px 18px;
    font: 500 14px/1 Roboto, sans-serif;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.es-calc-tab:hover { border-color: var(--es-primary); }
.es-calc-tab[aria-selected="true"] { background: var(--es-primary); border-color: var(--es-primary); color: #fff; }
.es-calc-body {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 32px;
    padding: 24px 32px 28px;
    align-items: stretch;
}
.es-calc-preview {
    background: var(--es-bg);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}
.es-calc-svg { display: flex; justify-content: center; }
.es-calc-svg svg { width: 100%; max-width: 380px; max-height: 250px; height: auto; display: block; }
.es-calc-summary {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
}
.es-calc-summary b,
.es-calc-summary span {
    background: #fff;
    border: 1px solid var(--es-line);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}
.es-calc-summary b { font-weight: 600; color: var(--es-primary); }
.es-calc-form { display: flex; flex-direction: column; gap: 18px; justify-content: space-between; }
.es-calc-row { display: flex; gap: 12px; flex-wrap: wrap; }
.es-calc-field { display: flex; flex-direction: column; gap: 6px; flex: none; }
.es-calc-row > .es-calc-field { flex: 1 1 140px; }
.es-calc-label { font-size: 14px; color: var(--es-muted); }
.es-calc-label i { font-style: normal; opacity: .75; }
.es-calc-input {
    height: 46px;
    border: 1px solid var(--es-line);
    border-radius: var(--es-radius);
    padding: 0 14px;
    font: 16px Roboto, sans-serif;
    color: var(--es-text);
    background: #fff;
    width: 100%;
}
.es-calc-input:focus { outline: none; border-color: var(--es-primary); box-shadow: 0 0 0 3px rgba(0, 46, 165, .12); }
.es-calc-input.is-error { border-color: var(--es-err); }
.es-calc-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.es-calc-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--es-line);
    cursor: pointer;
    padding: 0;
}
.es-calc-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--es-primary); }
.es-calc-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.es-calc-chip {
    border: 1px solid var(--es-line);
    background: #fff;
    border-radius: var(--es-radius);
    padding: 9px 12px;
    font: 14px Roboto, sans-serif;
    cursor: pointer;
    color: var(--es-text);
}
.es-calc-chip[aria-pressed="true"] { border-color: var(--es-primary); background: rgba(0, 46, 165, .06); color: var(--es-primary); font-weight: 500; }
.es-calc-checks { display: flex; gap: 20px; flex-wrap: wrap; }
.es-check { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.es-check input { width: 18px; height: 18px; accent-color: var(--es-primary); margin: 0; }
.es-calc-lead { border-top: 1px dashed var(--es-line); padding-top: 18px; }
.es-calc-trust {
    display: flex;
    justify-content: space-between;
    gap: 8px 20px;
    flex-wrap: wrap;
    margin: 0;
    padding: 14px 32px;
    list-style: none;
    background: var(--es-bg);
    border-top: 1px solid var(--es-line);
    font-size: 14px;
}
.es-calc-trust li::before { content: "✓"; color: var(--es-ok); font-weight: 700; margin-right: 6px; }

/* ---------- Форма отправки (общая) ---------- */
.es-lead { display: flex; flex-direction: column; gap: 10px; }
.es-calc-submit-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.es-calc-submit-row .es-calc-input { flex: 1 1 220px; width: auto; }
.es-lead--stack .es-calc-submit-row { flex-direction: column; }
.es-lead--stack .es-calc-submit-row .es-calc-input { flex: none; width: 100%; }
.es-lead--stack .es-btn { width: 100%; }
.es-btn {
    height: 46px;
    border: 0;
    border-radius: var(--es-radius);
    background: var(--es-accent);
    color: #fff;
    font: 600 16px Roboto, sans-serif;
    padding: 0 24px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.es-btn:hover { background: var(--es-accent-hover); }
.es-btn[disabled] { opacity: .6; cursor: default; }
.es-consent { font-size: 12px; line-height: 1.4; color: var(--es-muted); display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.es-consent input { margin: 1px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--es-primary); }
.es-consent a { color: var(--es-primary); }
.es-consent.is-error { color: var(--es-err); }
.es-msg { font-size: 14px; margin: 0; }
.es-msg--err { color: var(--es-err); }
.es-done { text-align: center; padding: 20px 12px; }
.es-done-title { font-size: 22px; font-weight: 600; margin: 0 0 8px; color: var(--es-ok); }
.es-done-text { color: var(--es-muted); margin: 0; }
.es-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------- Полоса «Рассчитаем стоимость за 15 минут» ---------- */
.es-strip-wrap { padding: 32px 0; }
.es-strip-box {
    background: var(--es-primary);
    color: #fff;
    border-radius: 14px;
    padding: 28px 32px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px 32px;
    align-items: center;
}
.es-strip-title { font-size: 24px; font-weight: 600; margin: 0 0 6px; line-height: 1.25; }
.es-strip-text { margin: 0; opacity: .85; font-size: 15px; }
.es-strip-box .es-calc-input { border-color: transparent; }
.es-strip-box .es-consent { color: rgba(255, 255, 255, .8); }
.es-strip-box .es-consent a { color: #fff; }
.es-strip-box .es-consent.is-error { color: #ffd0cc; }
.es-strip-box .es-msg--err { color: #ffd0cc; }
.es-strip-box .es-done-title { color: #fff; }
.es-strip-box .es-done-text { color: rgba(255, 255, 255, .85); }
.es-strip-box .es-done-text a { color: #fff; }

/* ---------- «Нашли дешевле? Сделаем цену ниже!» ---------- */
.es-cheap-wrap { padding: 40px 0; }
.es-cheap {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(120deg, var(--es-primary-dark) 0%, var(--es-primary) 60%, #1d55d8 100%);
    color: #fff;
    padding: 36px;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 28px 40px;
    align-items: center;
}
.es-cheap::after {
    content: "₽";
    position: absolute;
    left: -20px;
    bottom: -110px;
    font: 700 260px/1 Roboto, sans-serif;
    color: rgba(255, 255, 255, .05);
    pointer-events: none;
}
.es-cheap-info { position: relative; z-index: 1; }
.es-cheap-tag {
    display: inline-block;
    background: var(--es-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
    padding: 5px 12px;
    margin-bottom: 14px;
}
.es-cheap-title { font-size: 30px; line-height: 1.2; font-weight: 700; margin: 0 0 10px; }
.es-cheap-text { font-size: 16px; line-height: 1.5; margin: 0 0 22px; opacity: .88; max-width: 560px; }
.es-cheap-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    counter-reset: es-step;
}
.es-cheap-steps li {
    counter-increment: es-step;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.es-cheap-steps li::before {
    content: counter(es-step);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    color: var(--es-primary);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}
.es-cheap-steps b { font-size: 15px; }
.es-cheap-steps span { font-size: 13px; opacity: .8; line-height: 1.4; }
.es-cheap-card {
    position: relative;
    z-index: 1;
    background: #fff;
    color: var(--es-text);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 16px 40px rgba(0, 10, 50, .25);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.es-cheap-card-title { font-size: 20px; font-weight: 600; margin: 0; }
.es-cheap-card-text { font-size: 14px; color: var(--es-muted); margin: -6px 0 2px; }
.es-cheap-tg { font-size: 14px; color: var(--es-primary); text-decoration: none; text-align: center; }
.es-cheap-tg:hover { text-decoration: underline; }

/* ---------- Мобильная панель ---------- */
.es-mbar { display: none; }

@media (max-width: 1024px) {
    .es-cheap { grid-template-columns: 1fr; }

}

@media (max-width: 900px) {
    .es-calc-top { flex-direction: column; padding: 20px 16px 0; }
    .es-calc-badge { align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 14px; width: 100%; }
    .es-calc-badge-value { font-size: 22px; }
    .es-calc-body { grid-template-columns: 1fr; gap: 18px; padding: 18px 16px 20px; }
    .es-calc-tabs { padding: 14px 16px 0; }
    .es-calc-title { font-size: 22px; }
    .es-calc-trust { padding: 12px 16px; justify-content: flex-start; font-size: 13px; }
    .es-strip-box { grid-template-columns: 1fr; padding: 22px 18px; }
    .es-strip-title { font-size: 20px; }
    .es-calc-wrap { padding-top: 28px; }
    .es-cheap { padding: 24px 18px; }
    .es-cheap-title { font-size: 24px; }
    .es-cheap-steps { grid-template-columns: 1fr; gap: 8px; }
    .es-cheap-steps li { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 12px; }
    .es-cheap-steps li::before { margin: 0; }
    .es-cheap-steps span { flex-basis: 100%; padding-left: 38px; }
}

@media (max-width: 768px) {
    .es-promo { font-size: 13px; }
    .es-promo-inner { padding: 8px 40px 8px 12px; }
    .es-btn { width: 100%; }
    .es-mbar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 990;
        gap: 8px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        background: #fff;
        box-shadow: 0 -4px 16px rgba(17, 32, 77, .12);
        font-family: Roboto, sans-serif;
    }
    .es-mbar a, .es-mbar button {
        flex: 1;
        height: 44px;
        border-radius: var(--es-radius);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font: 600 15px Roboto, sans-serif;
        text-decoration: none;
        border: 0;
        cursor: pointer;
    }
    .es-mbar-call { background: var(--es-ok); color: #fff; }
    .es-mbar-tg { background: #2aabee; color: #fff; flex: 0 0 52px !important; }
    .es-mbar-tg-icon { width: 26px; height: 26px; display: block; object-fit: contain; }
    .es-mbar-calc { background: var(--es-accent); color: #fff; }
    body.es-has-mbar { padding-bottom: 64px; }
    /* Нижнюю панель шаблона заменяем панелью «Позвонить / Telegram / Рассчитать» */
    body.es-has-mbar int-panel-bottom { display: none !important; }
    /* Виджет Roistat поднимаем над панелью, чтобы не перекрывал кнопки */
    body.es-has-mbar .roistat-multiwidget-pulsator-holder { bottom: 62px !important; transform: scale(.75); transform-origin: right bottom; }
}

@media (max-width: 600px) {
    /* на телефоне схема и сводка не нужны — сразу параметры и телефон */
    .es-calc-preview { display: none; }
    .es-calc-body { padding-top: 14px; }
    .es-cheap-text { margin-bottom: 14px; }
    .es-cheap-steps span { display: none; }
}
