
@media (max-width: 1199px) {
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--white);
    }

    /* Компенсируем отступ, чтобы контент не уходил под шапку */
    body {
        padding-top: 73px; /* Высота .header (72px) + 1px на границу */
    }
}

/* ===== TOP BAR ===== */

.top-bar {

    background: var(--dark);

    color: white;

    font-size: 12px;

    padding: 8px 0;

}



.top-bar-inner {

    max-width: 1280px;

    margin: 0 auto;

    padding: 0 24px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    flex-wrap: wrap;

    gap: 8px;

}



.top-bar a {

    color: rgba(255,255,255,0.7);

    transition: var(--transition);

}



.top-bar a:hover { color: white; }



.top-bar-links {

    display: flex;

    gap: 20px;

    align-items: center;

}



.top-bar-links a {

    display: flex;

    align-items: center;

    gap: 4px;

}



/* ===== HEADER ===== */

.header {

    background: var(--white);

    border-bottom: 1px solid var(--border);

    position: sticky;

    top: 0;

    z-index: 1000;

}



.header-inner {

    max-width: 1280px;

    margin: 0 auto;

    padding: 0 24px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    height: 72px;

}



.header-right {

    display: flex;

    align-items: center;

    gap: 12px;

}



.search-btn {

    width: 40px;

    height: 40px;

    border: 1px solid var(--border);

    border-radius: var(--radius-sm);

    background: transparent;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    color: var(--text-secondary);

    transition: var(--transition);

}



.search-btn:hover {

    border-color: var(--accent);

    color: var(--accent);

    border-radius: 0;

}



.mobile-menu-btn {

    display: none;

    width: 40px;

    height: 40px;

    border: 1px solid var(--border);

    background: transparent;

    cursor: pointer;

    align-items: center;

    justify-content: center;

    color: var(--dark);

}



.mobile-menu-btn svg { display: block; }



/* Навигация */

.site-navigation {

    display: flex;

    gap: 4px;

    list-style: none;

    margin: 0;

    padding: 0;

}



.site-navigation-item {

    position: static;

}



.site-navigation-item > a,

.site-navigation-item details > summary {

    display: block;

    padding: 8px 16px;

    font-size: 14px;

    font-weight: 500;

    color: var(--text-secondary);

    transition: var(--transition);

    white-space: nowrap;

    cursor: pointer;

}



.site-navigation-item details > summary {

    list-style: none;

}



.site-navigation-item details > summary::-webkit-details-marker,

.site-navigation-item details > summary::marker {

    display: none;

}



.site-navigation-item > a:hover,

.site-navigation-item details > summary:hover {

    background: var(--accent-light);

    color: var(--accent);

}



.site-navigation-item > a.active,

.site-navigation-item details[open] > summary {

    background: var(--accent-light);

    color: var(--accent);

    box-shadow: 0 20px 0 0 var(--accent-light);

}



/* Выпадающее меню */

.header-container {

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    position: absolute;

    top: calc(100% + 1px);

    left: 0;

    right: 0;

    background: white;

    padding: 0;

    margin: 0;

    list-style: none;

    z-index: 1000;

}



/* Внутренний контейнер для центрирования контента */

.header-container-inner {

    display: flex;

    flex-wrap: wrap;

    flex-direction: column;

    max-height: 275px;

    padding: 8px 16px;

    max-width: 1200px;

    width: 100%;

}



.header-container li a {

    display: block;

    padding: 10px 20px;

    font-size: 13px;

    color: var(--dark);

    transition: var(--transition);

}



.header-container li a:hover {

    background: var(--accent-light);

    color: var(--accent);

}



/* Меню для ГКО (2 колонки) */

.header-container-gko {

    width: 360px;

    column-count: 2;

    column-gap: 0;

    padding: 12px 0;

}



.header-container-gko li {

    break-inside: avoid;

    page-break-inside: avoid;

}



.header-container-gko li a {

    padding: 8px 20px;

    font-size: 12px;

    line-height: 1.4;

}



@media (max-width: 1200px) {

    .header-container-gko { width: 340px; }

}



@media (max-width: 1024px) {

    .header-container-gko {

        width: 100%;

        column-count: 1;

    }

}



/* Мобильное меню */

.mobile-nav {

    position: fixed;

    top: 0;

    left: 0;

    right: 0;

    bottom: 0;

    background: var(--white);

    z-index: 2000;

    padding: 24px;

    transform: translateX(100%);

    transition: transform 0.3s ease;

    overflow-y: auto;

}



.mobile-nav.active { transform: translateX(0); }



.mobile-nav-header {

    display: flex;

    justify-content: flex-end;

    margin-bottom: 32px;

}



.mobile-nav-close {

    width: 40px;

    height: 40px;

    border: 1px solid var(--border);

    background: transparent;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    color: var(--dark);

}



.mobile-nav-links {

    display: flex;

    flex-direction: column;

    gap: 4px;

}



.mobile-nav-links a {

    padding: 14px 16px;

    font-size: 16px;

    font-weight: 500;

    color: var(--dark);

    transition: var(--transition);

}



.mobile-nav-links a:hover {

    background: var(--accent-light);

    color: var(--accent);

}



.mobile-overlay {

    position: fixed;

    inset: 0;

    background: rgba(0,0,0,0.4);

    z-index: 1999;

    opacity: 0;

    pointer-events: none;

    transition: opacity 0.3s ease;

}



.mobile-overlay.active {

    opacity: 1;

    pointer-events: all;

}



/* Закрытие других details при открытии одного */

.site-navigation-item details[open] {

    position: static;

}
