/* Nagłówek i nawigacja główna */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--accent) 8%, var(--bg-header, rgba(15, 16, 20, 0.85))),
        var(--bg-header, rgba(15, 16, 20, 0.85))
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, 0.06));
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
}

.header-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0.65rem 1.25rem;
    min-height: 64px;
}

.logo {
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary, #fff);
    text-decoration: none;
}

.logo a:hover {
    color: var(--text-primary, #fff);
}

.logo img {
    display: block;
    height: 48px;
    width: auto;
    max-width: none !important;
    flex-shrink: 0;
    object-fit: contain;
}

.site-brand-icon {
    font-size: 2.25rem;
    color: var(--accent, #e50914);
    flex-shrink: 0;
    line-height: 1;
}

.site-brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
}

.header-center {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 520px;
}

.search-bar {
    position: relative;
    width: 100%;
}

.search-bar form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-bar form:focus-within {
    border-color: var(--accent, #e50914);
    box-shadow: 0 0 0 2px var(--search-focus-ring);
}

.search-bar input {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    padding: 8px 4px;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
}

.search-bar button {
    background: transparent;
    border: none;
    color: var(--text-secondary, #a0a0a0);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.search-bar button:hover {
    color: var(--text-primary, #fff);
}

.site-nav-panel {
    flex-shrink: 0;
    margin-left: auto;
}

.site-nav-drawer-head {
    display: none;
}

.site-nav-panel > ul {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav-panel > ul > li {
    margin: 0;
    padding: 0;
}

.site-nav-panel > ul > li > a,
.site-nav-panel > ul > li > button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 4px;
    white-space: nowrap;
    color: var(--text-primary, #fff);
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.site-nav-panel > ul > li > a:hover,
.site-nav-panel > ul > li > button:hover {
    color: var(--accent, #e50914);
    background: var(--nav-hover-bg);
}

.site-nav-panel > ul > li > a.active {
    color: var(--accent, #e50914);
    background: var(--nav-active-bg);
}

.nav-divider {
    width: 1px;
    height: 24px;
    margin: 0 0.35rem;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.15);
    align-self: center;
    list-style: none;
}

.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle.active {
    color: var(--accent, #e50914);
}

body.site-nav-menu-open {
    overflow: hidden;
}

body.site-nav-menu-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2999;
    pointer-events: auto;
}

body.site-nav-menu-open .site-header {
    z-index: 3001;
}

.site-header--scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

@media (max-width: 992px) {
    .header-container {
        padding: 0.55rem 0.85rem;
        gap: 0.5rem;
    }

    .logo img {
        height: 40px;
    }

    .site-brand-name {
        font-size: 1.05rem;
    }

    .header-center {
        display: none;
    }

    .site-nav-panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: 0;
        height: 100vh;
        height: 100dvh;
        margin: 0;
        background: var(--nav-drawer-bg);
        z-index: 3000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.28s ease, visibility 0.28s ease, width 0.28s ease;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        pointer-events: none;
    }

    .site-nav-panel.active {
        width: min(88vw, 320px);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.55);
        border-left: 1px solid rgba(255, 255, 255, 0.06);
    }

    .site-nav-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
        width: min(88vw, 320px);
        min-height: 64px;
        padding: 0 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        background: var(--nav-drawer-head-bg);
    }

    .site-nav-drawer-title {
        font-size: 1.1rem;
        font-weight: 600;
    }

    .site-nav-drawer-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        font-size: 1.15rem;
        cursor: pointer;
    }

    .site-nav-drawer-close:hover {
        background: var(--nav-hover-bg);
        color: var(--accent, #e50914);
    }

    .site-nav-panel > ul {
        flex: 1;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: min(88vw, 320px);
        flex-shrink: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 0;
    }

    .site-nav-panel > ul > li > a,
    .site-nav-panel > ul > li > button {
        width: 100%;
        min-height: 52px;
        padding: 14px 22px;
        font-size: 1.05rem;
        border-radius: 0;
        justify-content: flex-start;
    }

    .nav-divider {
        width: 100%;
        height: 1px;
        margin: 0.35rem 0;
        background: rgba(255, 255, 255, 0.08);
    }

    .mobile-menu-toggle {
        display: flex;
        position: relative;
        z-index: 2005;
    }
}

@media (max-width: 480px) {
    .logo a {
        gap: 0.5rem;
    }

    .site-brand-text {
        min-width: 0;
    }
}
