header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    z-index: 100;
    backdrop-filter: blur(14px);
}

.header_relative {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1180px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
}

.site_brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--theme-ink);
    text-decoration: none;
    min-width: 220px;
}

.site_brand:hover {
    color: var(--theme-ink);
}

.site_brand .logo {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.site_brand .logo img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.brand_text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand_text strong {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand_text small {
    max-width: 220px;
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header_nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: var(--theme-page);
}

.header_nav a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.header_nav a:hover {
    background: #ffffff;
    color: var(--theme-primary);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.header_actions,
.social_icon {
    display: flex;
    align-items: center;
}

.social_icon {
    gap: 8px;
}

.social_icon a {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #334155;
    background: var(--theme-page);
    border: 1px solid #e5e7eb;
    font-size: 17px;
    text-decoration: none;
}

.social_icon a:hover {
    color: #ffffff;
    background: var(--theme-primary);
    border-color: var(--theme-primary);
}

.header_margin {
    display: none;
}

@media (max-width: 992px) {
    .header_relative {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
    }

    .site_brand {
        min-width: 0;
        flex: 1 1 calc(100% - 180px);
    }

    .header_nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .header_nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .header_nav a {
        justify-content: center;
        min-height: 44px;
        padding: 8px;
        text-align: center;
    }

    .header_relative {
        width: min(100% - 24px, 1180px);
    }

    .site_brand .logo {
        width: 46px;
        height: 46px;
    }

    .site_brand .logo img {
        width: 36px;
        height: 36px;
    }

    .brand_text strong {
        font-size: 15px;
    }

    .brand_text small,
    .header_actions {
        display: none;
    }
}
