/* ==========================================================================
   2. ЦВЕТОВАЯ ПАЛИТРА И СЕТКА ПЕРЕМЕННЫХ (:root)
   ========================================================================== */
:root {
    --color-primary: #1e293b;       /* Глубокий темно-сине-серый тон */
    --color-accent: #0ea5e9;        /* Яркий лазурный оттенок */
    --color-accent-hover: #0369a1;  /* Темно-лазурный цвет */
    --color-bg-main: #f8fafc;       /* Светло-серый оттенок фона */
    --color-bg-card: #ffffff;       /* Чистый белый цвет карточек */
    --color-text-dark: #0f172a;     /* Угольно-черный цвет */
    --color-text-light: #ffffff;    /* Белый цвет контрастных текстов */
    --color-text-muted: #64748b;    /* Приглушенный серый тон */
    --color-border: #e2e8f0;        /* Светлая граница */
    --color-shadow: rgba(15, 23, 42, 0.08); /* Полупрозрачный темный оттенок */
}

/* Общие базовые стили для документа */
html {
    scroll-behavior: smooth; /* Включает плавную прокрутку по всей странице */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-main);
    color: var(--color-text-dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Скрытый чекбокс переключателя меню */
.menu-switcher {
    display: none !important;
}

/* ==========================================================================
   3. СТРУКТУРА HTML (БЛОКИ И КЛАССЫ БЭМ)
   ========================================================================== */

/* --- Блок: Шапка (header) --- */
.header {
    background-color: var(--color-primary);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 140px;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header__container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Подблок: Логотип (logo) --- */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo:hover {
    transform: scale(1.02); /* Легкое, почти незаметное увеличение */
    opacity: 0.9;            /* Мягкое изменение прозрачности */
}

.logo__circle {
    width: 50px;
    height: 50px;
    background-color: var(--color-accent);
    color: var(--color-text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 1px;
}

.logo__text-box {
    display: flex;
    flex-direction: column;
}

.logo__title {
    color: var(--color-text-light);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.logo__subtitle {
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 400;
}

/* --- Подблок: Инфо-панель (info-panel) --- */
.info-panel {
    display: flex;
    gap: 80px;
}

.info-panel__column {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-panel__tag {
    color: var(--color-text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-panel__tag::before {
    content: "";
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
    border-radius: 50%;
    display: inline-block;
}

.info-panel__link {
    color: var(--color-text-light);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.info-panel__link:hover {
    color: var(--color-accent);
}

/* --- Подблок: Кнопка бургера (burger-btn) --- */
.burger-btn {
    display: none; /* По умолчанию скрыт в десктопной версии */
    flex-direction: column;
    justify-content: center; /* Центрируем линии вместо растягивания */
    gap: 6px;                /* Задаем жесткий, одинаковый шаг между линиями */
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
}

.burger-btn__line {
    width: 100%;
    height: 2px;
    background-color: var(--color-text-light);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- Блок: Главная обертка (page-wrapper) --- */
.page-wrapper {
    max-width: 1200px;
    margin: 140px auto 0 auto; /* Компенсация фиксированной десктопной шапки */
    padding: 40px 20px;
    display: flex;
    gap: 40px;
    flex: 1; /* Чтобы прижимать футер вниз, если контента мало */
}

/* --- Блок: Боковая панель (sidebar) --- */
.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar__contacts {
    background-color: var(--color-bg-card);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    margin-bottom: 30px;
    box-shadow: 0 2px 4px var(--color-shadow);
}

.sidebar__contacts-title {
    color: var(--color-primary);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 6px;
}

.sidebar__contacts-text {
    color: var(--color-text-dark);
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.sidebar__contacts-text:last-child {
    margin-bottom: 0;
}

/* Стили для кликабельных ссылок в контактах сайдбара */
.sidebar__contacts-link {
    color: var(--color-text-dark);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.sidebar__contacts-link:hover {
    color: var(--color-accent); /* Подсветка лазурным цветом при наведении */
}

/* --- Подблок: Меню навигации (side-menu) --- */
.side-menu {
    background-color: var(--color-bg-card);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 4px var(--color-shadow);
}

.side-menu__title {
    display: block;
    color: var(--color-text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 700;
}

.side-menu__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.side-menu__item {
    display: block;
}

.side-menu__link {
    display: block;
    color: var(--color-text-dark);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.side-menu__link:hover {
    background-color: var(--color-bg-main);
    color: var(--color-accent);
}

/* Модификатор активного пункта меню */
.side-menu__link--active {
    background-color: transparent !important; /* Убираем тяжелый голубой фон */
    color: var(--color-accent) !important;      /* Делаем лазурным только сам текст */
    padding-left: 8px !important;              /* Слегка сдвигаем текст для баланса */
    border-left: 3px solid var(--color-accent);/* Добавляем изящную вертикальную полосу слева */
    border-radius: 0 4px 4px 0 !important;     /* Скругляем углы только с правой стороны */
}

/* Стили вложенного списка продукции */
.side-menu__sublist {
    list-style: none;
    margin-top: 5px;
    padding-left: 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 1px solid var(--color-border);
}

.side-menu__subitem {
    display: block;
}

.side-menu__sublink {
    display: block;
    color: var(--color-text-muted);
    font-size: 15px;
    text-decoration: none;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.side-menu__sublink:hover {
    color: var(--color-accent-hover);
}

/* --- Блок: Основной контент (main-content) --- */
.main-content {
    flex-grow: 1;
}

/* Подблок: Приветственная секция */
.hero-section {
    background-color: var(--color-bg-card);
    padding: 30px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    margin-bottom: 40px;
    box-shadow: 0 2px 4px var(--color-shadow);
}

.hero-section__title {
    color: var(--color-primary);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero-section__subtitle {
    color: var(--color-primary);
    font-size: 22px;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 15px;
}

.hero-section__text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-dark);
    margin-bottom: 15px;
}

.hero-section__text:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   4. МЕДИА-ЗАПРОСЫ И ЛОГИКА АДАПТИВНОСТИ (@media)
   ========================================================================== */
@media (max-width: 768px) {
    .header {
        height: 75px;
    }
    
    .info-panel {
        display: none; /* Полное скрытие инфо-панели */
    }
    
    .burger-btn {
        display: flex; /* Включение видимости иконки меню */
    }

    .page-wrapper {
        margin-top: 75px; /* Уменьшение отступа под новую высоту шапки */
        flex-direction: column; /* Вертикальная ориентация колонок */
        gap: 20px;
        padding: 20px 15px;
    }

    .sidebar {
        position: fixed;
        top: 75px;
        left: -290px; /* Вынесена за левый экранный край */
        width: 280px;
        height: calc(100vh - 75px);
        z-index: 999;
        background-color: var(--color-bg-main);
        padding: 20px 15px;
        border-right: 1px solid var(--color-border);
        box-shadow: 4px 0 15px var(--color-shadow);
        overflow-y: auto; /* Вертикальный скролл для длинных списков */
        transition: left 0.3s ease-in-out; /* Плавный выезд */
    }

    .sidebar__contacts,
    .side-menu {
        box-shadow: none;
    }
    
    /* CSS-логика интерактивности через Checked Hack */
    .menu-switcher:checked ~ .page-wrapper .sidebar {
        left: 0;
    }

    .menu-switcher:checked ~ .header .burger-btn .burger-btn__line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .menu-switcher:checked ~ .header .burger-btn .burger-btn__line:nth-child(2) {
        opacity: 0;
    }
    .menu-switcher:checked ~ .header .burger-btn .burger-btn__line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}