/* Główne ustawienia */
.site-header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: var(--nav-height);
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.header-brand {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 5px 0;
    transition: transform 0.2s ease;
    text-decoration: none;
}

.header-brand:hover { transform: scale(1.02); }

.header-logo {
    height: auto;
    max-height: 65px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Nawigacja Desktop */
.nav-list {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-list a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.nav-list a:hover { color: #fff; }

.nav-list a:focus-visible {
    outline: 3px solid #ffcc00;
    outline-offset: 4px;
}

/* Hamburger - Ukryty na Desktopie */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    width: 44px;
    height: 44px;
}

.hamburger {
    display: block;
    width: 25px;
    height: 2px;
    background: white;
    position: relative;
    transition: background 0.3s ease;
}

.hamburger::before, .hamburger::after {
    content: '';
    width: 25px;
    height: 2px;
    background: white;
    position: absolute;
    left: 0;
    transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

/* flaga */
/* Kontener znaczka */
.eu-sticky-badge {
    position: fixed;
    left: 0;
    top: 15%;
    transform: translateY(-50%);
    z-index: 9999;
    border: 1px solid #003399; /* Unijny błękit */
    border-left: none;
    display: flex;
    align-items: center;
    text-decoration: none;
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    width: 45px; /* Początkowa szerokość (tylko ikona) */
    overflow: hidden;
    white-space: nowrap;
}

/* Zawartość znaczka */
.eu-badge-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eu-badge-content img {
    width: 45px;
    height: auto;
    flex-shrink: 0;
}

.eu-badge-content span {
    color: #003399;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* EFEKT PO NAJECHANIU (Rozwinięcie) */
.eu-sticky-badge:hover {
    width: 220px; /* Rozszerza się, by pokazać napis */
    background-color: #003399;
    border-color: #ffffff;
}

.eu-sticky-badge:hover .eu-badge-content span {
    color: #ffffff;
    opacity: 1;
}

/* Delikatna animacja pulsowania przy wejściu na stronę */
@keyframes bounceLeft {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(5px); }
}

.eu-sticky-badge {
    animation: bounceLeft 2s infinite ease-in-out;
    animation-play-state: running;
}

.eu-sticky-badge:hover {
    animation-play-state: paused;
}

/* Responsywność - na małych ekranach chowamy napis na stałe */
@media (max-width: 480px) {
    .eu-sticky-badge {
        padding: 0px;
        width: 45px;
        border-radius: 0;
    }
    .eu-sticky-badge:hover {
        width: 46px; /* Nie rozszerzaj na bardzo małych telefonach */
    }
}

@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Animacja Burgera do X */
    .menu-toggle.is-active .hamburger {
        background: transparent;
    }
    .menu-toggle.is-active .hamburger::before {
        top: 0;
        transform: rotate(45deg);
    }
    .menu-toggle.is-active .hamburger::after {
        bottom: 0;
        transform: rotate(-45deg);
    }

    /* Wysuwane Menu Mobile - Poprawione */
    .header-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(15, 23, 42, 0.97); /* Solidniejsze tło dla lepszego kontrastu */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        
        /* KLUCZOWE: Stan ukryty */
        opacity: 0;
        visibility: hidden;
        pointer-events: none; /* Blokuje klikanie w niewidoczne linki */
        transform: translateY(-30px); /* Większy dystans dla lepszego efektu */
        
        /* Łagodne przejście */
        transition: 
            opacity 0.5s ease, 
            transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
            visibility 0.5s;
        
        z-index: 1000;
    }

    /* KLUCZOWE: Stan aktywny */
    .header-nav.is-active {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        transform: translateY(0); /* Powrót na miejsce */
    }

    .nav-list {
        flex-direction: column;
        gap: 2rem;
    }

    .nav-list a {
        font-size: 1.6rem;
        padding: 10px 40px;
        display: block;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    /* Efekt pojawiania się linków jeden po drugim (stagger) */
    .header-nav.is-active .nav-list a {
        opacity: 1;
        transform: translateY(0);
    }

    .header-nav.is-active .nav-list li:nth-child(1) a { transition-delay: 0.2s; }
    .header-nav.is-active .nav-list li:nth-child(2) a { transition-delay: 0.3s; }
    .header-nav.is-active .nav-list li:nth-child(3) a { transition-delay: 0.4s; }
    .header-nav.is-active .nav-list li:nth-child(4) a { transition-delay: 0.5s; }

    .header-logo {
        max-height: 50px;
    }
}