/* DEFINICIJA REPERA NA VRHU FAJLA */
:root {
    --logo-size: 2.5vw; /* Tvoj zlatni standard */
}

/* ============================================================
    1. STRUKTURA HEDERA
   ============================================================ */
.site-header {
    width: 100vw;
    background-color: var(--bg-header);
    padding: 0.5vw 0;
    position: sticky;
    top: 0;
    z-index: 9999;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02), 
                0 2px 5px rgba(0, 0, 0, 0.01);
}

.header-flex-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100vw;
    margin: 0 auto;
    padding: 0 2vw;
}

/* ============================================================
    2. LOGO (Očišćeno od dupliranja)
   ============================================================ */
.site-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--logo-size) !important;
    height: var(--logo-size) !important;
    min-width: 20px;
    min-height: 20px;
    overflow: hidden;
}

.site-logo a.custom-logo-link {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    align-items: center;
    justify-content: center;
}

.site-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    display: block;
}

/* LIGHT MODE: Ako je pozadina bela, logo pretvaramo u tamno sivu/crnu */
[data-theme="light"] .site-logo img {
    /* Invertuje boje: od bele pravi crnu */
    filter: invert(1) brightness(0.2); 
}

/* DARK MODE: Vraćamo ga na original (belo) */
[data-theme="dark"] .site-logo img {
    filter: none;
}
/* ============================================================
    3. NAVIGACIJA I KONTROLE
   ============================================================ */
.header-right-group {
    display: flex;
    align-items: center;
    gap: 2vw;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5vw;
}

.nav-menu a {
    color: var(--text-main) !important;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(12px, 0.9vw, 15px);
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent) !important;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.2vw;
}

.theme-btn {
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    padding: 0.4vw 1vw;
    cursor: pointer;
    border-radius: 4px;
}

/* ============================================================
    4. MOBILNA VERZIJA
   ============================================================ */
.menu-toggle {
    display: none; /* Skriven na desktopu */
    background: transparent;
    border: none;
    cursor: pointer;
}

@media (max-width: 768px) {
        .site-logo {
        width: 8vw !important;
        height: 8vw !important;
        min-width: 32px;
        min-height: 32px;
    }

    .site-header {
        padding: 12px 0; /* Stabilna visina na mobilnom */
    }

    .header-flex-container {
    padding: 0 2vw;
}

    .header-controls {
        gap: 25px; /* Razmak za lakši dodir */
    }

    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        z-index: 10001;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--text-main) !important;
        border-radius: 2px;
        transition: 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    }

    .nav-menu {
        display: none !important; /* Ovo ga potpuno uklanja iz vidokruga */
    }

    /* OTVORENI MOBILNI MENI */
    .nav-menu.active {
        display: flex !important;
        position: fixed;
        top: 0; left: 0;
        width: 100vw; height: 100vh;
        background-color: var(--bg-header);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 10vw;
        overflow-y: auto;
        z-index: 10000;
    }

    .nav-menu.active li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active li a {
        font-size: 16px !important;
        padding: 15px 0;
        color: var(--text-main) !important;
    }

    /* X ANIMACIJA */
    .menu-toggle.is-active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
    .menu-toggle.is-active span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
    .menu-toggle.is-active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
    
    /* Zlatni akcenti za aktivne linkove */
    .nav-menu.active li.current-menu-item a,
    .nav-menu.active li a:hover {
        color: var(--accent) !important;
    }
}