@media (min-width: 1440px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        max-width: 1440px;
    }
}

body, .sp-preloader {
    background-color: #F5F5F5;
    color: #524A4A;
}

.sppb-nav.sppb-nav-modern li a {
    margin: 0px;
    font-size: 18px;
    font-weight: 500;
    padding: 8px 25px;
    color: #16151A;
    background: #ffffff;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #e6ebeb;
}

.sppb-nav.sppb-nav-modern {
    background: #ffffff;
    padding: 20px;
    width: max-content;
    margin: 0 auto;
    border-radius: 16px;
    border: 1px solid #e6ebeb;
    gap: 8px;
    margin-bottom: 90px;
}

#sp-header .logo {
    height: 120px;
}

/* ==========================================================================
   1. ДЕСКТОПНАЯ ВЕРСИЯ (ТВОЙ КОД БЕЗ ИЗМЕНЕНИЙ)
   ========================================================================== */

/* Общая строка шапки и центрирование логотипа */
#sp-header .row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}
.logo {
    display: flex;
    justify-content: center;
}

/* Левая колонка — Языки */
#sp-top1, .sp-column:has(.mod-languages) {
    display: flex;
    align-items: center;
}
ul.lang-inline {
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
}

/* Правая校онка — Кнопка «О компании» */
#sp-menu {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 60px !important; /* Твой рабочий фикс высоты */
}
#sp-menu .sp-column {
    display: flex !important;
    justify-content: flex-end !important;
}
/* Сброс высоты строки Helix */
#sp-menu .mod-sppagebuilder {
    line-height: normal !important; 
}
#sp-menu .sppb-btn-custom {
    margin: 0 !important;
    padding: 10px 20px !important;
}

/* ==========================================================================
   2. АДАПТИВНОСТЬ ПОД ПЛАНШЕТЫ (1200px - 800px)
   ========================================================================== */
@media (max-width: 1199px) and (min-width: 800px) {
    #sp-header .row {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        padding: 0 10px !important;
    }
    #sp-top1 { width: 20% !important; flex: 0 0 20% !important; }
    #sp-logo { width: 50% !important; flex: 0 0 50% !important; }
    #sp-menu { width: 30% !important; flex: 0 0 30% !important; padding: 15px 0 !important; }

    #sp-top1, #sp-menu, #sp-header .d-none, #sp-header .d-lg-block, #sp-header .sp-module {
        display: flex !important;
    }
    .burger-icon, .nd-burger-icon, #offcanvas-toggler, .col-2.d-flex.d-lg-none {
        display: none !important;
    }
    .logo img, #sp-logo img {
        max-width: 100% !important;
        height: auto !important;
    }
    #sp-menu .sppb-btn-custom {
        padding: 8px 12px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }
}

/* ==========================================================================
   3. МОБИЛЬНАЯ ВЕРСИЯ (МЕНЬШЕ 800px) — ПЕРЕНОС НА 2 СТРОКИ
   ========================================================================== */
@media (max-width: 799px) {
    /* Разрешаем перенос колонок на новую строку */
    #sp-header .row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important; /* Включаем перенос */
        padding: 10px !important;
    }

    /* Включаем отображение скрытых модулей */
    #sp-top1, #sp-menu, #sp-logo, #sp-header .d-none, #sp-header .d-lg-block, #sp-header .sp-module {
        display: flex !important;
    }
    .burger-icon, .nd-burger-icon, #offcanvas-toggler, .col-2.d-flex.d-lg-none {
        display: none !important;
    }

    /* ЭТАЖ 1: Языки уходят налево, кнопка направо */
    #sp-top1 { 
        width: 50% !important; 
        max-width: 50% !important;
        flex: 0 0 50% !important;
        order: 1 !important; /* Первый элемент */
        justify-content: flex-start !important;
    }
    #sp-menu { 
        width: 50% !important; 
        max-width: 50% !important;
        flex: 0 0 50% !important;
        order: 2 !important; /* Второй элемент */
        justify-content: flex-end !important;
        padding: 5px 0 !important; /* Сбрасываем гигантские 60px */
    }
    #sp-menu .sp-column {
        justify-content: flex-end !important;
        width: 100% !important;
    }

    /* ЭТАЖ 2: Логотип падает вниз под них и растягивается по центру */
    #sp-logo { 
        width: 100% !important; 
        max-width: 100% !important;
        flex: 0 0 100% !important;
        order: 3 !important; /* Падает вниз */
        justify-content: center !important;
        margin-top: 15px !important; /* Отступ от верхнего ряда */
    }

    /* Настройки логотипа, чтобы он стал крупнее и центрировался */
    .logo {
        width: 100% !important;
        justify-content: center !important;
    }
    .logo img, #sp-logo img {
        max-width: 85% !important; /* Делаем логотип читаемым на мобилке */
        height: auto !important;
        display: block !important;
        margin: 0 auto !important;
    }

    /* Возвращаем кнопке нормальный человеческий вид (шрифт 13px, без переносов) */
    #sp-menu .sppb-btn-custom {
        font-size: 13px !important;
        padding: 8px 16px !important;
        white-space: nowrap !important;
        display: inline-block !important;
    }
}

 /* Статичная Шапка*/

/* Жестко отключаем фиксацию шапки, которую Helix вешает через JS */
body #sp-header, 
body .is-sticky #sp-header,
body #sp-header.fixed-to-top {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    animation: none !important;
    transform: none !important;
}

/* Сбрасываем фантомный отступ у body, если скрипт Helix его добавляет */
body.sticky-header {
    padding-top: 0 !important;
}


/* ФИНАЛЬНЫЙ СТИЛЬ КНОПКИ «СКАЧАТЬ» С ИКОНКОЙ */

/* 1. Общие стили для тега ссылки */

a.sppb-dynamic-content-file_link {

    text-decoration: none !important;

    display: inline-flex !important;

    align-items: center;

    justify-content: center;

}



/* 2. Скрываем сырой длинный путь и пишем «Скачать» */

div.sppb-addon-wrapper [class*="custom-download-link"] {

    font-size: 0px !important; /* Полностью скрываем старый текст-путь */

    line-height: 0px !important;

    

    color: #ffffff !important;

    background-color: #111111 !important;

    

    padding: 14px 24px !important; /* Комфортные отступы для аккуратной кнопки */

    border-radius: 6px !important;

    

    display: inline-flex !important;

    align-items: center;

    gap: 8px;

    

    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);

    transition: background-color 0.2s ease-in-out, transform 0.1s ease, box-shadow 0.2s ease !important;

}



/* Генерируем новое статичное слово внутри кнопки */

div.sppb-addon-wrapper [class*="custom-download-link"]::before {

    content: "Скачать" !important;

    font-size: 14px !important; /* Задаем нормальный размер шрифта для слова */

    line-height: 1 !important;

    font-weight: 600 !important;

    color: #ffffff !important;

    display: inline-block !important;

}



/* 3. Эффект при наведении (Ховер) */

a.sppb-dynamic-content-file_link:hover [class*="custom-download-link"] {

    background-color: #262626 !important; /* Плавное осветление фона */

    transform: translateY(-1px);

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);

}



/* 4. Эффект при клике (Активное состояние) */

a.sppb-dynamic-content-file_link:active [class*="custom-download-link"] {

    transform: translateY(1px);

    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

}



/* 5. Удалить пустую ссылку

/* СКРЫТЬ ПУСТУЮ КНОПКУ СКАЧИВАНИЯ */



/* Если href пустой */

a.sppb-dynamic-content-file_link[href=""], 

/* Если href ведет на заглушку */

a.sppb-dynamic-content-file_link[href="#"],

/* Если href содержит только косую черту */

a.sppb-dynamic-content-file_link[href="/"] {

    display: none !important;

}



/* БЕЗОПАСНОЕ СКРЫТИЕ ПУСТОГО БЛОКА СКАЧИВАНИЯ */



/* Нацеливаемся строго на аддон, у которого внутри есть НАШ кастомный класс */

div.sppb-addon-wrapper:has([class*="custom-download-link"]):not(:has(a[href*="media/attachments"])) {

    display: none !important;

} 

