/*
 * Общие улучшения интерфейса поверх combined_style.css / responsive.css (подключается в <head> всех страниц
 * через tools/patch-partials.php, последним — поэтому перекрывает старые правила):
 *  1. читаемый телефон в шапке (контраст);
 *  2. ≥1200 px: логотип + меню в одну строку (и с пунктом «Калькулятор»);
 *     <1200 px: компактная шапка — тёмная строка 44 px (телефон, поиск, корзина) + логотип и кнопка «Меню» 56 px;
 *  3. нижняя панель «Позвонить · Написать · Рассчитать» на телефонах (js/site-ui.js);
 *  4. блок призыва к действию на страницах услуг и отзывы.
 */

.site-icon { display: inline-block; vertical-align: middle; flex: none; }

/* ---------- 1. контраст в верхней строке ---------- */
header .topRow .contact-info .phone,
header .topRow .contact-info .phone a { color: #fff; font-size: 14px; font-weight: 700; }
header .topRow .contact-info .phone .fa { color: #9fd98f; }
header .topRow .contact-info .email,
header .topRow .contact-info .email a,
header .topRow .cart a,
header .topRow .cart .fa-shopping-cart,
header .topRow .search .fa-search { color: #b9e3ae; }
header .topRow .contact-info .phone a:hover,
header .topRow .contact-info .email a:hover,
header .topRow .cart a:hover { color: #fff; }
header .topRow .contact-info { align-items: center; }
header .topRow .top-msg {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%; color: #b9e3ae; line-height: 1;
}
header .topRow .top-msg:hover, header .topRow .top-msg:focus-visible { color: #fff; background: rgba(255, 255, 255, .12); }

/* ---------- 2a. широкие экраны: логотип и 8 пунктов меню в одну строку ---------- */
@media (min-width: 1200px) {
    header .bottomRow .navbar .navbar-header .navbar-brand img { width: 170px; margin: 12px 18px 12px 0; }
    header .bottomRow .navbar #mainNav .nav > li > a { padding-left: 12px; padding-right: 12px; }
}

/* ---------- 2b. до 1199 px: компактная шапка с кнопкой «Меню» ---------- */
@media (max-width: 1199px) {
    body { padding-top: 100px !important; }
    #pageCover { margin-top: 0 !important; }

    header .topRow { height: 44px !important; line-height: 44px !important; display: block !important; }
    header .topRow .top-row-content {
        flex-direction: row !important; align-items: center !important; justify-content: space-between !important;
        height: 44px !important; min-height: 44px; padding: 0 16px !important;
    }
    header .topRow .top-row-item { width: auto !important; margin: 0 !important; padding: 0 !important; }
    header .topRow .contact-info { gap: 12px; }
    header .topRow .search-cart-group { width: auto !important; align-items: center !important; gap: 14px; }
    header .topRow .search .search-input { height: 30px; line-height: normal; font-size: 13px; vertical-align: middle; }

    header .bottomRow {
        top: 44px !important; height: 56px !important; min-height: 56px !important; max-height: none !important;
        box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
    }
    header .bottomRow .container { width: 100%; padding: 0 16px; }
    header .bottomRow .navbar { min-height: 56px; margin: 0; }
    header .bottomRow .navbar .container-fluid { padding: 0; }
    header .bottomRow .navbar .navbar-header {
        display: flex !important; justify-content: space-between; align-items: center;
        height: 56px; float: none !important; margin: 0 !important; padding: 0 !important;
    }
    /* clearfix Bootstrap (::before/::after) во flex-строке стал бы лишними элементами и сдвинул логотип */
    header .bottomRow .navbar .navbar-header::before,
    header .bottomRow .navbar .navbar-header::after { display: none !important; }
    header .bottomRow .navbar .navbar-header .navbar-brand {
        display: block !important; position: static !important; transform: none !important; left: auto !important; top: auto !important;
        width: auto !important; height: auto; padding: 0 !important; margin: 0 !important; float: none !important; order: 1;
    }
    header .bottomRow .navbar .navbar-header .navbar-brand img {
        width: 140px !important; max-height: 40px; margin: 0 !important; padding: 0 !important; position: static !important;
    }
    header .bottomRow .navbar .navbar-header .navbar-toggle {
        display: inline-flex !important; align-items: center; gap: 6px; position: static !important; float: none !important;
        width: auto !important; margin: 0 !important; padding: 8px 14px !important; line-height: 20px !important;
        font-size: 14px; font-weight: 600; text-transform: uppercase;
        background: #fff !important; color: #2f7829 !important; border: 2px solid #2f7829 !important; border-radius: 6px !important;
        order: 2;
    }
    header .bottomRow .navbar .navbar-header .navbar-toggle:not(.collapsed) { background: #2f7829 !important; color: #fff !important; }
    header .bottomRow .navbar .navbar-header .navbar-toggle i { margin: 0; }

    /* меню Bootstrap сворачивается до 1199 px (по умолчанию — только до 767) */
    header .navbar-collapse.collapse { display: none !important; }
    header .navbar-collapse.collapse.in, header .navbar-collapse.collapsing { display: block !important; }
    header .bottomRow .navbar-collapse {
        position: absolute !important; top: 56px; left: 0; right: 0; margin: 0 !important; padding: 0 !important; border: 0;
        background: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .15); max-height: calc(100vh - 100px); overflow-y: auto;
    }
    header .bottomRow .navbar #mainNav .nav,
    header .bottomRow .navbar .navbar-nav { float: none !important; margin: 0 !important; display: block; }
    header .bottomRow .navbar .navbar-right { float: none !important; margin-right: 0 !important; }
    header .bottomRow .navbar #mainNav .nav > li { float: none; width: 100%; }
    header .bottomRow .navbar #mainNav .nav > li > a {
        line-height: 48px !important; padding: 0 20px !important; text-align: left;
        font-size: 15px; border-bottom: 1px solid rgba(48, 48, 48, .08);
    }
    header .bottomRow .navbar #mainNav .nav > li.active > a:after { display: none; }
}

/* ---------- телефоны: email прячется, поиск раскрывается по лупе ---------- */
@media (max-width: 767px) {
    header .topRow .contact-info .email { display: none !important; }
    header .topRow .search .search-input { width: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; }
    header .topRow.search-open .search .search-input {
        width: 180px !important; height: 32px; padding: 4px 8px !important; border: 1px solid #2f7829 !important; opacity: 1;
    }
    header .topRow.search-open .contact-info { display: none !important; }
    header .topRow .search .fa-search { font-size: 18px; padding: 10px 6px; cursor: pointer; }
    header .topRow .cart a { font-size: 13px; }
    header .topRow .top-msg { display: none; } /* на телефонах мессенджеры — в нижней панели */
}

/* ---------- 3. нижняя панель на телефонах ---------- */
.mobile-bar { display: none; }
@media (max-width: 767px) {
    .mobile-bar {
        display: flex; gap: 6px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        background: #fff; border-top: 1px solid #dde5db; box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
    }
    .mobile-bar__btn {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
        min-height: 50px; padding: 4px; border: 0; border-radius: 8px; cursor: pointer;
        background: #eef5ec; color: #2f7829; font: 600 12px/1.2 'Montserrat', sans-serif; text-decoration: none !important;
    }
    .mobile-bar__btn--call { background: #2f7829; color: #fff !important; }
    .mobile-bar__btn:focus-visible { outline: 2px solid #1e5b1e; outline-offset: 2px; }
    .mobile-bar__sheet {
        position: absolute; left: 8px; right: 8px; bottom: calc(100% + 8px); display: flex; flex-direction: column; gap: 6px;
        padding: 8px; background: #fff; border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
    }
    .mobile-bar__sheet[hidden] { display: none; }
    .mobile-bar__msg {
        display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 8px;
        font-weight: 700; color: #fff !important; text-decoration: none !important; background: #2f7829;
    }
    .mobile-bar__msg--whatsapp { background: #1f9e4f; }
    .mobile-bar__msg--telegram { background: #1d8ac7; }

    body.has-mobile-bar { padding-bottom: 64px; }
    body.has-mobile-bar .callback-fab { display: none !important; }
    body.has-mobile-bar .cookie-notice { bottom: 64px; }
    body.has-mobile-bar .calc-promo { bottom: 76px; }
    body.has-mobile-bar.cookie-visible .calc-promo { bottom: 210px; }
}

/* ---------- 4a. призыв к действию на страницах услуг ---------- */
.site-cta { padding: 10px 0 50px; }
.site-cta__box {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 30px;
    padding: 28px 30px; border-radius: 12px; background: #f1f7ef; border: 1px solid #dbe9d6;
}
.site-cta__text { flex: 1 1 380px; }
.site-cta__text h2 { margin: 0 0 8px; font-size: 24px; color: #1e5b1e; text-transform: none; }
.site-cta__text p { margin: 0; font-size: 16px; color: #444; line-height: 1.5; }
.site-cta__actions { flex: 0 1 auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.site-cta__btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 8px;
    font: 600 15px/1.2 'Montserrat', sans-serif; text-decoration: none !important; cursor: pointer;
    background: #fff; color: #2f7829 !important; border: 2px solid #2f7829;
}
.site-cta__btn:hover, .site-cta__btn:focus-visible { background: #e3f0df; }
.site-cta__btn--main { background: #2f7829; color: #fff !important; }
.site-cta__btn--main:hover, .site-cta__btn--main:focus-visible { background: #25621f; }
.site-cta__msg { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: #555; }
.site-msg {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 18px;
    color: #fff !important; text-decoration: none !important; font-weight: 600; background: #2f7829;
}
.site-msg--whatsapp { background: #1f9e4f; }
.site-msg--telegram { background: #1d8ac7; }
@media (max-width: 767px) {
    .site-cta__box { padding: 20px 16px; }
    .site-cta__text h2 { font-size: 20px; }
    .site-cta__actions, .site-cta__btn { width: 100%; }
    .site-cta__btn { justify-content: center; }
}

/* ---------- 4b. отзывы ---------- */
.site-reviews { padding: 50px 0; }
.site-reviews h2 { margin: 0 0 26px; }
.site-reviews__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.review-card {
    margin: 0; padding: 20px 22px; border-radius: 10px; background: #fff; border: 1px solid #e3ebe1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04); display: flex; flex-direction: column; gap: 10px;
}
.review-stars { color: #f2a900; font-size: 18px; letter-spacing: 2px; }
.review-stars__off { color: #d8d8d8; }
.review-card__text { margin: 0; padding: 0; border: 0; font-size: 15px; line-height: 1.55; color: #333; flex: 1; }
.review-card figcaption { font-size: 14px; color: #555; display: flex; flex-direction: column; gap: 2px; }
.review-card__meta { color: #777; }
.review-card__source { font-size: 13px; }
.site-reviews__links { margin: 22px 0 0; font-size: 15px; }
.pp-review { margin: 22px 0; }
.pp-review-title { font-weight: 700; margin: 0 0 8px; }
