:root {
    --brand-dark: #0d1e25;      /* Точный темно-синий из вашей картинки */
    --brand-cyan: #1ea2c1;      /* Насыщенный бирюзовый акцент */
    --brand-lime: #8bc53f;      /* Фирменный салатовый цвет кнопок действия */
    --brand-green: #50a919;
    --brand-light: #f2f7f9;     /* Градиентный светлый фон для легкости макета */
}

::selection {
  background-color: #dee5da; /* Цвет фона выделения */
  color: #50a919; /* Цвет текста */
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--brand-dark);
    background-color: #ffffff;
}

.brand-triangle { color: var(--brand-cyan); margin-right: 6px; }
.main-title { color: var(--brand-dark); line-height: 1.2; }
.accent-cyan, .accent-link { color: var(--brand-cyan); }

/* Оформление кнопок */
.btn-brand-dark {
    background-color: var(--brand-dark); color: #fff; transition: all 0.2s ease;
}
.btn-brand-dark:hover { background-color: #17323d; color: #fff; }

.btn-brand-lime {
    background-color: var(--brand-lime); color: #fff; font-weight: 600; transition: all 0.2s ease;
}
.btn-brand-lime:hover { background-color: #79ab35; color: #fff; }

.btn-brand-green {
    background-color: var(--brand-green); color: #fff; font-weight: 600; transition: all 0.2s ease;
}
.btn-brand-green:hover { background-color: #5c8d1a; color: #fff; }

/* Прилипающий заголовок */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    background-color: rgb(255 255 255 / 90%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(13, 30, 37, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
}

/* Элегантная читаемость десктопного текста */
.premium-menu-link {
    font-size: 15px !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    color: #2d3748 !important;
    text-decoration: none;
    transition: color 0.2s ease !important;
}
.premium-menu-link:hover { color: var(--brand-cyan) !important; }

/* ИЗЯЩНЫЙ И ТОНКИЙ БУРГЕР (Толщина 1.5px) */
.burger-icon-box {
    width: 18px; height: 12px; position: relative; display: flex; flex-direction: column; justify-content: space-between;
}
.burger-icon-box span {
    display: block; width: 100%; height: 1.5px; background-color: #2d3748; border-radius: 1px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, background-color 0.2s ease;
}

/* ТРАНСФОРМАЦИЯ БУРГЕРА В КРЕСТИК НА ПК */
.open-active .burger-icon-box span:nth-child(1) { transform: translateY(5px) rotate(45deg); background-color: var(--brand-cyan); }
.open-active .burger-icon-box span:nth-child(2) { opacity: 0; }
.open-active .burger-icon-box span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); background-color: var(--brand-cyan); }

/* ==========================================================================
   СЛОЙ 2: ДЕСКТОПНЫЕ МЕГА-ПАНЕЛИ И СЛОЙ ЗАТЕМНЕНИЯ ФОНА
   ========================================================================== */

.desktop-mega-panel {
    position: fixed;
    top: 73px;
    left: 0;
    width: 100vw;
    background: #ffffff;
    z-index: 1040;
    border-bottom: 1px solid rgba(13, 30, 37, 0.08);
    box-shadow: 0 30px 60px rgba(13, 30, 37, 0.12);
    
    /* Производительные CSS-трансформации вместо скачков высоты */
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, visibility 0.25s;
}

/* Класс активации через JS */
.desktop-mega-panel.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.menu-links-list a {
    color: #4a5568; text-decoration: none; transition: color 0.15s ease;
}
.menu-links-list a:hover { color: var(--brand-cyan); }
.panel-promo { background-color: var(--brand-light); border: 1px solid rgba(13, 30, 37, 0.06); }

/* Оформление большой строки поиска на ширину 12 колонок */
.main-search-input {
    font-size: 16px; color: var(--brand-dark); border-color: rgba(13, 30, 37, 0.15) !important; box-shadow: none !important; transition: all 0.2s ease;
}
.main-search-input:focus { border-color: var(--brand-cyan) !important; background-color: var(--brand-light); }
.rounded-start-0 { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }

/* Активное состояние кнопки лупы */
.active-btn { color: var(--brand-cyan) !important; background-color: var(--brand-light); border-radius: 50%; }

/* ДЕСКТОПНЫЙ ЗАHАВЕС */
.menu-backdrop {
    position: fixed; top: 73px; left: 0; width: 100vw; height: 100vh;
    background-color: rgba(13, 30, 37, 0.55); z-index: 1030;
    opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease;
}
.menu-backdrop.active { opacity: 1; visibility: visible; }

/* Оформление карточек контента */
.mock-certificate { max-width: 360px; transform: rotate(1deg); }
.certificate-body { height: 140px; background: repeating-linear-gradient(45deg, var(--brand-light), var(--brand-light) 10px, #ffffff 10px, #ffffff 20px); }
.certificate-stamp { width: 44px; height: 44px; border: 2px dashed var(--brand-cyan); }

.modern-card { border: 1px solid rgba(13, 30, 37, 0.07); border-radius: 20px; transition: all 0.3s ease; background: #fff; }
.modern-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(13, 30, 37, 0.06); border-color: var(--brand-cyan); }
.modern-card.active { background: linear-gradient(135deg, var(--brand-cyan), #178fa9); color: #fff; border: none; }

.section-light-bg { background-color: var(--brand-light); }
.main-footer { background-color: var(--brand-dark); color: #a1b0cb; }

/* ==========================================================================
   СЛОЙ 3: МОБИЛЬНАЯ АДАПТАЦИЯ (МЕДИА-ЗАПРОСЫ) И АНИМАЦИЯ КРЕСТИКА
   ========================================================================== */

/* СВЯЗЫВАЕМ СОСТОЯНИЕ МОБИЛЬНОГО OFFCANVAS С БУРГЕРОМ В ШАПКЕ */
/* Когда у шторки, лежащей выше по коду, появляется класс .show, мы скрещиваем линии в хедере ниже */
#mobileMenuOffcanvas.show ~ .sticky-header .burger-icon-box span:nth-child(1) {
    transform: translateY(5px) rotate(45deg); background-color: var(--brand-cyan);
}
#mobileMenuOffcanvas.show ~ .sticky-header .burger-icon-box span:nth-child(2) {
    opacity: 0;
}
#mobileMenuOffcanvas.show ~ .sticky-header .burger-icon-box span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg); background-color: var(--brand-cyan);
}

@media (max-width: 991.98px) {
    /* Фиксируем высоту шапки на смартфонах и поднимаем её слой выше шторки */
    .sticky-header {
        position: sticky; top: 0; background: #ffffff; z-index: 1100 !important; height: 73px;
    }

    /* Мобильный Offcanvas выезжает сверху СТРОГО ИЗ-ПОД ХЕДЕРА */
    .mobile-nav-offcanvas {
        position: fixed !important;
        top: 73px !important; /* Начинается ровно под срезом шапки */
        left: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: auto !important;
        max-height: calc(100vh - 73px) !important;
        background: #ffffff !important;
        z-index: 1080 !important; /* Слой ниже шапки */
        border-top: 1px solid rgba(13, 30, 37, 0.05) !important;
        border-bottom: 1px solid rgba(13, 30, 37, 0.08) !important;
        border-radius: 0 0 24px 24px !important; /* Эстетичные скругления нижних углов */
        box-shadow: 0 25px 50px rgba(13, 30, 37, 0.15) !important;
    }

    /* Включаем оверлей затемнения для мобильной шторки */
    .mobile-nav-offcanvas.show ~ .menu-backdrop {
        opacity: 1 !important; visibility: visible !important; display: block !important;
    }
    .menu-backdrop {
        display: block !important; z-index: 1070 !important; /* Слой под шторкой */
    }

    /* Отключаем десктопные панели на смартфонах во избежание багов */
    .desktop-mega-panel { display: none !important; }

    /* Оформление ссылок для удобного тапа пальцем */
    .mobile-nav-list li { border-bottom: 1px solid rgba(13, 30, 37, 0.04); }
    .mobile-nav-list a {
        display: block; padding: 0.75rem 0; color: var(--brand-dark); text-decoration: none; font-size: 16px; font-weight: 500;
    }
    .mobile-catalog-list a { color: #4a5568; text-decoration: none; display: block; padding: 0.4rem 0; }

    .mock-certificate { transform: none; margin-top: 2rem; }
    .footer-contacts-block { text-align: left !important; margin-top: 1rem; }
}




/* Блок с карточками категорий услуг на главной под баннером */
/* Базовое состояние карточки с центрированием */
.client-segment-card {
    background-color: #ffffff;
    border-radius: 12px !important;
    display: flex;
    flex-direction: column;
    align-items: center;    /* Центрируем иконку и текст по горизонтали */
    justify-content: center; /* Центрируем содержимое по вертикали */
    text-align: center;      /* Выравниваем текст по центру */
    min-height: 180px;       /* Задаем фиксированную высоту для ровности рядов */
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

/* Увеличиваем размер иконки и делаем отступ снизу */
.client-segment-card .card-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;     /* Отступ между иконкой и текстом */
}

/* Навешиваем увеличенный размер шрифта для иконки */
.client-segment-card .card-icon-box i {
    font-size: 3rem !important; /* Увеличили размер иконки в 1.5 раза */
    /*color: #004b87; */
    transition: color 0.2s ease, transform 0.3s ease;
    display: inline-block;
}

/* Настройки заголовка */
.client-segment-card .card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #212529;
    padding: 0 10px;         /* Чтобы текст не прижимался к краям карточки */
    transition: color 0.2s ease;
}

/* Эффекты при наведении */
.client-segment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08) !important;
}

.client-segment-card:hover .card-icon-box i {
    color: #8cc63f !important; /* Фирменный зеленый для иконки */
    transform: scale(1.1);     /* Иконка приятно увеличивается */
}

.client-segment-card:hover .card-title {
    color: #8cc63f !important; /* Фирменный зеленый для текста */
}

