/* --- ГЛОБАЛЬНІ ФІКСИ (SAFARI & АДАПТИВ) --- */
html, body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior-y: auto;
}
.site-wrap { overflow-x: hidden; }

/* --- РІШЕННЯ ВІД МЕРЕХТІННЯ ФОНІВ ПРИ СКРОЛІ --- */
.bg-fixed-parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
@media (max-width: 1024px) {
    .bg-fixed-parallax {
        background-attachment: scroll !important;
    }
}

/* Контейнер */
.container {
    width: 100% !important;
    padding-right: 30px !important;
    padding-left: 30px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    max-width: 1440px !important; 
}
@media (max-width: 1600px) { .container { max-width: 1280px !important; } }
@media (max-width: 1200px) { .container { max-width: 1140px !important; } }

/* --- СКЛЯНА БОКОВА ПАНЕЛЬ --- */
.side-menu-item {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(12px) !important; 
    -webkit-backdrop-filter: blur(12px) !important; 
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
}
.side-menu-item:hover {
    background: rgba(252, 163, 17, 0.9) !important; 
    border-color: rgba(252, 163, 17, 1) !important;
    transform: scale(1.1) !important; 
}
.side-menu-item-icon i, .side-menu-item-icon svg { transition: all 0.3s ease; }
.side-menu-item:hover .side-menu-item-icon i, 
.side-menu-item:hover .side-menu-item-icon svg { color: #fff !important; fill: #fff !important; }

/* --- СЕКЦІЯ "ЩО МИ ПРОПОНУЄМО" --- */
.services-section-wrapper { padding: 90px 0; background-color: #ffffff; }
.h-entry {
    background: #fff;
    padding: 30px; 
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 6px 20px rgba(0,0,0,0.02);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
}
.h-entry:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    border-color: rgba(252, 163, 17, 0.3);
}
.h-entry img {
    border-radius: 10px; margin-bottom: 25px; width: 100%; height: 220px; 
    object-fit: cover;
}

/* ЛАКОНІЧНІ КНОПКИ */
.btn-sleek {
    background: transparent !important;
    color: #fca311 !important;
    border: 1px solid #fca311 !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    letter-spacing: 1px !important;
    border-radius: 6px !important;
    padding: 12px 25px !important;
    transition: all 0.3s ease !important;
}
.btn-sleek:hover, .btn-sleek:active, .btn-sleek:focus {
    background: #fca311 !important;
    color: #ffffff !important;
    border-color: #fca311 !important;
    box-shadow: 0 5px 15px rgba(252, 163, 17, 0.3) !important;
}

/* =======================================================
   НОВЕ ПОВНОЕКРАННЕ МОБІЛЬНЕ МЕНЮ (БУРГЕР)
   ======================================================= */
.mobile-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); z-index: 9998;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.mobile-backdrop.active { opacity: 1; visibility: visible; }

.custom-mobile-menu {
    position: fixed; top: 0; right: -100%; 
    width: 100%; 
    height: 100vh;
    min-height: 100vh; 
    background-color: #2b333e; 
    z-index: 9999; display: flex; flex-direction: column;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    overflow-y: auto;
}
.custom-mobile-menu.active { right: 0; }

.cmm-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 25px 30px; background: transparent; 
}
.cmm-logo { font-size: 22px; font-weight: bold; color: #fff; text-decoration: none; display: flex; align-items: center; }
.cmm-logo svg { margin-right: 10px; }

.cmm-close { 
    background: rgba(255,255,255,0.1); color: #fff; border: none; font-size: 24px;
    width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

.cmm-body { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; }
.cmm-nav { list-style: none; padding: 0; margin: 0 0 30px 0; }
.cmm-nav li { margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 15px; }
.cmm-nav a { color: #fff; font-size: 20px; text-decoration: none; font-weight: 500; display: flex; justify-content: space-between; }
.cmm-nav .cmm-dropdown { list-style: none; padding-left: 20px; margin-top: 15px; display: none; }
.cmm-nav .cmm-dropdown a { font-size: 16px; color: rgba(255,255,255,0.7); margin-bottom: 12px; }
.cmm-nav li.expanded .cmm-dropdown { display: block; }

.cmm-lang { display: flex; gap: 15px; margin-bottom: 40px; }
.cmm-lang a { padding: 8px 20px; border-radius: 8px; font-size: 16px; color: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.2); text-decoration: none;}
.cmm-lang a.active { background: #fca311; border-color: #fca311; color: #fff; font-weight: bold; }

.cmm-contacts { margin-top: auto; padding-top: 20px; }
.cmm-contacts p { margin-bottom: 15px; color: #fff; font-size: 18px; display: flex; align-items: center; }
.cmm-contacts p i { margin-right: 15px; font-size: 20px; color: #fca311; }
.cmm-contacts a { color: #fff; text-decoration: none; }

.cmm-socials { display: flex; gap: 15px; margin-top: 25px; }
.cmm-socials a {
    width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center; text-decoration: none; transition: 0.3s;
}
.cmm-socials a svg { width: 24px; height: 24px; fill: #fff; }
.cmm-socials a i { font-size: 24px; color: #fff; }
.cmm-socials a.tg:hover { background: #0088cc; }
.cmm-socials a.vb:hover { background: #7360f2; }

/* =======================================================
   БЛОК "РЕЗУЛЬТАТИ" ТА КОНСАЛТИНГ
   ======================================================= */
.results-section { background-color: #fcfcfc; padding: 100px 0; }
.modern-title-clean { font-size: calc(2rem + 1vw) !important; font-weight: 800; color: #392ec9 !important; margin-bottom: 0 !important; }
.brush-highlight { background-color: #d32f2f; color: #ffffff !important; padding: 2px 15px 6px 15px; display: inline-block; border-radius: 4px 12px 6px 15px; transform: rotate(-2deg); }
.modern-result-card { background: #ffffff; padding: 30px; border-radius: 16px; box-shadow: 0 5px 25px rgba(0,0,0,0.04); height: 100%; border: 1px solid rgba(0,0,0,0.02); }
.glass-icon-wrapper { width: 70px; height: 70px; background: rgba(57, 46, 201, 0.05); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-right: 25px; flex-shrink: 0; }
.result-svg-icon { width: 34px; height: 34px; fill: #392ec9 !important; }
.counter-number-blue { font-size: 40px !important; font-weight: 800 !important; color: #392ec9 !important; line-height: 1 !important; margin-bottom: 5px !important;}

.premium-consulting-section { padding: 100px 0 !important; }
.premium-consulting-card { background: #ffffff; padding: 60px; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.08); }
@media (min-width: 1200px) { .overlapping-text-card { margin-left: -120px; z-index: 10; position: relative; } }
.check-icon-wrapper-red { width: 26px; height: 26px; background: #d32f2f; border-radius: 6px; display: flex; align-items: center; justify-content: center; margin-right: 15px; flex-shrink: 0; }
.check-icon-wrapper-red i { color: #fff; font-size: 12px; }

/* =======================================================
   ДИЗАЙН НОВОГО БІЗНЕС-МОДАЛЬНОГО ВІКНА (ВИПРАВЛЕНО)
   ======================================================= */
.business-modal {
    max-width: 800px !important; 
    width: 95% !important;
}

.business-input {
    background-color: #f4f7f9 !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    height: 50px !important;
    padding: 10px 15px !important;
    font-size: 15px !important;
    color: #333333 !important;
    transition: all 0.3s ease !important;
    -webkit-appearance: none;
    appearance: none;
}

.business-input:focus {
    background-color: #ffffff !important;
    border-color: #392ec9 !important;
    box-shadow: 0 0 0 4px rgba(57, 46, 201, 0.1) !important;
    outline: none !important;
}

.business-submit-btn {
    transition: all 0.3s ease !important;
}

.business-submit-btn:hover {
    background-color: #e08e0b !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(252, 163, 17, 0.4) !important;
}

/* Округлене значення для уникнення помилок парсера */
@media screen and (max-width: 767px) {
    .business-modal { 
        max-width: 400px !important; 
    }
}
/* --- СТИЛІ ДЛЯ ВІКНА ЕКСПРЕС-ДІАГНОСТИКИ --- */
.glass-express-popup {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 340px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    padding: 25px;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-express-popup.show-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.express-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}
.express-close:hover {
    color: #fca311;
}

.express-header {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: #392ec9;
    margin-bottom: 15px;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.express-title {
    font-weight: 800;
    font-size: 18px;
    color: #222;
    margin-bottom: 10px;
}

.express-desc {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
    margin-bottom: 20px;
}

.express-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border 0.3s;
    margin-bottom: 15px; /* Додав відступ для полів */
}
.express-input:focus {
    border-color: #fca311;
}

.express-btn {
    width: 100%;
    background: #fca311;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(252, 163, 17, 0.3);
    transition: background 0.3s, transform 0.2s;
}
.express-btn:hover {
    background: #e5930c;
    transform: translateY(-2px);
}

@media (max-width: 576px) {
    .glass-express-popup {
        left: 15px;
        right: 15px;
        bottom: 15px;
        width: auto;
    }
}
/* ======================================================
   КОМПАКТНЕ МОБІЛЬНЕ МЕНЮ (ЩОБ ВМІЩАЛОСЯ БЕЗ СКРОЛУ)
   Діє для мобільних екранів
   ====================================================== */
@media (max-width: 576px) {
    /* Зменшуємо відступи між основними пунктами меню */
    .business-nav li a {
        padding: 10px 0 !important; /* Було більше, робимо компактніше */
        font-size: 16px !important;
    }
    
    /* Ущільнюємо випадаючий список "Послуги" */
    .cmm-dropdown {
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }
    .cmm-dropdown li a {
        padding: 6px 0 !important;
        font-size: 14px !important;
    }

    /* Зменшуємо простір навколо перемикача мов (Ua/Ru) */
    .cmm-lang {
        margin-bottom: 15px !important;
    }

    /* Стискаємо нижній блок із контактами */
    .cmm-bottom-contacts {
        padding-top: 15px !important;
        margin-top: 10px !important;
    }
    
    /* Менші відступи між іконками соцмереж */
    .cmm-socials-grid {
        margin-bottom: 10px !important;
    }
    
    /* Робимо телефони трохи меншими та ближчими один до одного */
    .cmm-phones a {
        font-size: 16px !important;
        margin-bottom: 4px !important;
    }
    
    .cmm-email a {
        font-size: 14px !important;
    }

    /* Зменшуємо загальні внутрішні відступи самого вікна меню */
    .cmm-body {
        padding: 15px 20px 20px 20px !important;
    }
    .cmm-header {
        padding: 15px 20px !important;
    }
}

/* Спеціальне правило для дуже коротких екранів (наприклад, старих iPhone) */
@media (max-height: 700px) {
    .business-nav li a { padding: 7px 0 !important; }
    .cmm-socials-grid { display: flex; gap: 10px; justify-content: center; }
    .cmm-phones a { font-size: 15px !important; }
}
/* ======================================================
   РОЗПОДІЛ ПРОСТОРУ В МОБІЛЬНОМУ МЕНЮ (ПРИТИСКАННЯ ДО НИЗУ)
   ====================================================== */
.cmm-body {
    display: flex !important;
    flex-direction: column !important;
    min-height: calc(100vh - 70px); /* Висота екрану мінус шапка з логотипом */
}

.cmm-bottom-contacts {
    margin-top: auto !important; /* МАГІЯ: Відштовхує контакти від меню і притискає до самого низу */
    padding-bottom: 30px !important;
    width: 100%;
}
/* ==========================================
   ВИПРАВЛЕННЯ МОБІЛЬНОГО МЕНЮ (СКРОЛІНГ)
   ========================================== */
.custom-mobile-menu {
    /* Дозволяємо скролити вміст меню, якщо він не влазить */
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important; /* Плавний скрол на iOS */
}

/* Додамо відступ знизу, щоб контакти не прилипали до низу */
.cmm-bottom-contacts {
    padding-bottom: 40px !important;
}
/* ==========================================
   АДАПТАЦІЯ ТЕКСТУ КНОПКИ У МЕНЮ
   ========================================== */
@media (max-width: 576px) {
    .cmm-cta-wrap .btn {
        /* Дозволяємо тексту переноситися на другий рядок */
        white-space: normal !important; 
        
        /* Зменшуємо розмір шрифту спеціально для мобільних */
        font-size: 14px !important; 
        
        /* Збільшуємо відступи всередині, щоб текст не тулився до країв */
        padding: 15px 10px !important; 
    }
}
/* ======================================================
   АДАПТАЦІЯ ДЛЯ МОБІЛЬНИХ ПРИСТРОЇВ (ШИРИНА ТА ЛІЧИЛЬНИК)
   ====================================================== */
@media (max-width: 767px) {
    /* 1. Приховуємо лічильник часу на мобільних телефонах */
    #siteTimer, .site-time-indicator {
        display: none !important;
    }

    /* 2. Зменшуємо порожні відступи по боках екрану */
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
    }

    /* 3. Зменшуємо "паразитні" відступи між колонками сітки Bootstrap */
    .row {
        margin-left: -10px !important;
        margin-right: -10px !important;
    }
    [class*="col-"] {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* 4. Розширюємо самі картки та блоки (щоб вони не були стиснутими) */
    .card, .bg-white.shadow, .modern-form, .contact-info-block, .promo-block {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 20px !important; /* Робимо внутрішні відступи меншими */
        padding-right: 20px !important;
        border-radius: 12px !important; /* Трохи акуратніший радіус для мобілок */
    }
    
    /* Якщо великі відступи прописані через класи p-4 або p-5, зменшуємо їх */
    .p-4, .p-5 {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}
/* ======================================================
   РОЗШИРЕННЯ КАРТОК "ЩО МИ ПРОПОНУЄМО" (ТІЛЬКИ МОБІЛЬНІ)
   ====================================================== */
@media (max-width: 767px) {
    /* 1. Розширюємо контейнер саме для цієї секції (прибираємо сірі боки) */
    .services-section-wrapper .container {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    /* 2. Прибираємо зайві відступи колонок Bootstrap навколо карток */
    .services-section-wrapper .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .services-section-wrapper [class*="col-"] {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    /* 3. Зменшуємо внутрішні відступи в картках (перебиваємо inline-стилі) */
    .services-section-wrapper .h-entry h2,
    .services-section-wrapper .h-entry p,
    .services-section-wrapper .h-entry .mt-4 {
        padding-left: 12px !important; /* Було 20px, робимо компактніше */
        padding-right: 12px !important;
    }
    
    /* 4. Трохи зменшуємо "повітря" між самими картками по вертикалі */
    .services-section-wrapper .mb-5 {
        margin-bottom: 25px !important;
    }
}
/* ======================================================
   ТОЧКОВА АДАПТАЦІЯ ДЛЯ СЕКЦІЇ КОНСАЛТИНГУ
   ====================================================== */

/* 1. Глобальні налаштування для Desktop/Tablet (від 992px) */
@media (min-width: 992px) {
    /* Робимо картинку на 15% більшою */
    .consulting-img {
        transform: scale(1.15) !important;
        transform-origin: center center;
    }

    /* Збільшуємо відступ вниз від заголовка на 10%. (BS mb-4 = 1.5rem. Робимо 1.65rem) */
    .consulting-title-creative {
        margin-bottom: 1.65rem !important;
    }
}

/* 2. Налаштування для Mobile/Tablet (менше 992px) */
@media (max-width: 991px) {
    /* Приховуємо блок з картинкою повністю */
    .consulting-image-wrapper {
        display: none !important;
    }
}

/* 3. Зменшення висоти всього блоку (відступів Зверху/Знизу) на 10% - Hierarchical target */
/* Цей селектор цілить у будь-яку секцію, що містить consulting-container.
   Ми припускаємо стандартний відступ site-section близько 100px. Зменшуємо на 10% (до 90px).
   Якщо використовуються rem equivalents BS py-5 (3rem), зменшуємо до 2.7rem */
section > .consulting-container {
    /* Hierarchy target for section containing the container */
    padding-top: 6.3rem !important; /* Наприклад, якщо Site-Section Default 7rem */
    padding-bottom: 6.3rem !important;
}

/* *НАЙБЕЗПЕЧНІШИЙ метод vertical padding reduction*: цілити безпосередньо в контейнер.
   Ми припускаємо, що 3rem ( py-5 ) є default і робимо 2.7rem. */
.consulting-container {
    padding-top: 2.7rem !important;
    padding-bottom: 2.7rem !important;
}
/* ======================================================
   ТОЧКОВА АДАПТАЦІЯ ДЛЯ СЕКЦІЇ КОНСАЛТИНГУ (ВЕРСІЯ 2.0)
   Додаємо нові та виправлені правила.
   Старий код для мобільного ховання картинки вже працює.
   ====================================================== */

/* 1. Глобальні налаштування для Desktop (від 992px) */
@media (min-width: 992px) {
    /* РОБИМО КАРТИНКУ НА 15% БІЛЬШОЮ */
    .consulting-img {
        transform: scale(1.15) !important;
        transform-origin: center center;
        z-index: 2; /* Щоб картинка була поверх інших елементів */
    }
    
    /* ГАРАНТУЄМО, ЩО БАТЬКИ НЕ ОБРІЗАЮТЬ КАРТИНКУ (Overflow hidden) */
    .premium-image-card,
    .consulting-image-wrapper {
        overflow: visible !important;
    }

    /* ЗБІЛЬШУЄМО ВІДСТУП ВНИЗ ВІД ЗАГОЛОВКА НА 10% (відстань text-consulting) */
    .consulting-title-creative {
        margin-bottom: 1.65rem !important; /* Трохи збільшили rem */
    }
}

/* 2. ЗМЕНШЕННЯ ВИСОТИ СЕКЦІЇ НА 10% (Зверху/Знизу) */
/* Цей селектор цілить у батьківську секцію, що містить контейнер.
   Ми припускаємо, що default Site-Section Padding-Top/Bottom ~100px. Робимо ~90px.
   Якщо rem equivalents 3rem ( py-5 ), робимо 2.7rem. */
section:has(.consulting-container) {
    padding-top: 2.7rem !important;
    padding-bottom: 2.7rem !important;
}

/* Fallback: Якщо `:has` не підтримується, спробуємо цілити безпосередньо в контейнер.
   Це безпечно і нічого не зламає в інших секціях. */
div.consulting-container {
    padding-top: 2.7rem !important;
    padding-bottom: 2.7rem !important;
}