/* ===== Header ===== */
#site-header {
    position: relative;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: stretch;
    height: 110px;
    background: var(--color-white);
    max-width: 100%;
    padding: 0 40px;
    margin: 0;
    box-sizing: border-box;
}

/* ===== Логотип ===== */
.header-logo-wrap {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.header-logo-body {
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
}

.header-logo-body img {
    max-width: 200px;
    max-height: 100px;
    width: auto;
    height: auto;
    display: block;
}

/* ===== Навигация ===== */
.header-nav {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
}

.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.primary-menu > li {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0;
}

.primary-menu > li > a {
    font-family: var(--font-family);
    font-size: 16px;
    text-transform: uppercase;
    color: var(--color-accent);
    text-decoration: none;
    padding: 8px 0;
    transition: opacity 0.2s;
    line-height: 1;
    border-bottom: 1px solid transparent;
}

.primary-menu > li > a:hover {
    opacity: 0.7;
}

/* Разделитель / */
.primary-menu > li:not(:last-child)::after {
    content: '/';
    color: var(--color-accent);
    margin: 0 12px;
    font-size: 16px;
}

/* Активный пункт */
.primary-menu > li.active > a,
.primary-menu > li.current-menu-item > a {
    border-bottom-color: var(--color-accent);
}

/* ===== Выпадающее меню ===== */
.primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-md);
    list-style: none;
    padding: var(--space-xs) 0;
    margin: 0;
    min-width: 240px;
    z-index: 101;
}

.primary-menu > li:hover > .sub-menu {
    display: block;
}

.primary-menu .sub-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--color-accent);
    text-decoration: none;
    font-size: 16px;
    text-transform: uppercase;
    transition: opacity 0.2s;
}

.primary-menu .sub-menu li a::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 10px;
    background-image: url('../images/arrow-submenu.svg');
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.primary-menu .sub-menu li a:hover {
    opacity: 0.7;
}

.primary-menu .sub-menu li:not(:last-child) {
    border-bottom: 1px solid var(--color-accent);
}

/* ===== Бургер-кнопка (мобилка) ===== */
.burger-toggle {
    display: none;
}

/* ===== Нижняя граница ===== */
.header-bottom-border {
    height: 1px;
    background: var(--color-accent);
}

/* ===== Off-canvas ===== */
.offcanvas-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
}

.offcanvas-overlay.active {
    display: block;
}

#offcanvas-menu {
    position: fixed;
    top: 0;
    right: -66%;
    width: 66%;
    height: 100vh;
    background: var(--color-white);
    z-index: 9999;
    padding: var(--space-xl) var(--space-md);
    transition: right 0.3s ease;
    overflow-y: auto;
}

#offcanvas-menu.active {
    right: 0;
}

.offcanvas-close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: none;
    border: none;
    font-size: 32px;
    color: var(--color-accent);
    cursor: pointer;
}

.offcanvas-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.offcanvas-nav li {
    margin-bottom: var(--space-sm);
}

.offcanvas-nav a {
    font-size: 18px;
    color: var(--color-accent);
    text-decoration: none;
    text-transform: uppercase;
}

/* ===== Адаптивность ===== */
@media (max-width: 1024px) {
    .header-nav {
        display: none;
    }

    .header-inner {
        justify-content: space-between;
        padding: 0;
        overflow: hidden;
    }

    .burger-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100px;
        height: 110px;
        flex-shrink: 0;
        background: var(--color-white);
        border: 1px solid var(--color-accent);
        border-right: none;
        cursor: pointer;
        padding: 0;
        box-sizing: border-box;
    }

    .burger-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--color-accent);
    }

    .header-logo-wrap {
        width: auto;
        flex-shrink: 0;
    }

    .header-logo-body {
        padding-left: 15px;
        padding-right: 15px;
    }

    .header-logo-body img {
        max-width: 180px;
    }
}