/*
 * Licej — zaglavlje u boji štita iz logotipa (IQ Media)
 * Lokacija na sajtu: wp-content/themes/astra-child/licej-hb.css
 * Učitava ga mu-plugin licej-unify.php kao poslednji sloj (LICEJ_HB_LIVE; pregled ?licej_hb=1).
 *   - Glavna traka (desktop, sticky i mobilna) u plavoj boji štita #094596.
 *   - Logo: licej-logo-header.png — beli naziv, šareni unutrašnji efekti štita, štit providan (zamena src u PHP-u).
 *   - Glavni meni beli, zlatna tačkica/linija ostaje (licej-nav.css).
 *   - Padajući meniji u plavoj boji logotipa (dublja nijansa), gornja ivica u liniji sa donjom ivicom zaglavlja
 *     (razmak meri skripta u licej-unify.php → promenljiva --hb-gap).
 * Gornja traka (tamnoplava) i crveno dugme „Започните упис” se ne menjaju.
 * Vraćanje: LICEJ_HB_LIVE = false (vraća i stari logo).
 * PRAVILO: tipografija se NE menja (font-family, font-size, font-weight, line-height, letter-spacing).
 */

:root {
    --hb-blue: #094596;
    --hb-blue-deep: #073a80;
    --hb-gold: #e8b84b;
    --hb-line: rgba(255, 255, 255, 0.12);
}

/* ---------- Glavna traka (desktop, sticky, mobilna) ---------- */
#masthead .ast-primary-header-bar,
#ast-fixed-header .ast-primary-header-bar,
.ast-header-sticked .ast-primary-header-bar {
    background: var(--hb-blue) !important;
    border-bottom: 1px solid var(--hb-line) !important;
}
#ast-fixed-header .ast-primary-header-bar,
#masthead.ast-header-sticked .ast-primary-header-bar,
.ast-header-sticked .ast-primary-header-bar {
    background: rgba(9, 69, 150, 0.97) !important;
    box-shadow: 0 8px 30px rgba(7, 26, 60, 0.28) !important;
}

/* ---------- Glavni meni (desktop) ---------- */
@media (min-width: 922px) {
    #masthead .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link,
    #masthead .ast-builder-menu-1 .main-header-menu > .menu-item:is(:hover, .current-menu-item, .current-menu-ancestor) > .menu-link {
        color: #fff !important;
    }
    #masthead .ast-builder-menu-1 .main-header-menu > .menu-item:hover > .menu-link {
        background: rgba(255, 255, 255, 0.08) !important;
    }
    #masthead .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link .dropdown-menu-toggle,
    #masthead .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link .dropdown-menu-toggle svg {
        color: #fff !important;
        fill: currentColor !important;
    }
    #masthead .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link:focus-visible {
        outline: 2px solid var(--hb-gold) !important;
        outline-offset: 2px;
    }

    /* ---------- Padajući meniji: boja logotipa, u liniji sa donjom ivicom zaglavlja ---------- */
    :is(#ast-hf-menu-1, #ast-hf-menu-1-sticky) > .menu-item > .sub-menu {
        top: calc(100% + var(--hb-gap, 8px)) !important;
        margin-top: 0 !important;
        border: 1px solid var(--hb-line) !important;
        border-top: 0 !important;
        border-radius: 0 0 12px 12px !important;
        background: var(--hb-blue-deep) !important;
        box-shadow: 0 22px 44px rgba(7, 26, 60, 0.32) !important;
    }
    /* Nevidljiv „most” preko razmaka do panela: meni se ne zatvara pri prelasku mišem. */
    :is(#ast-hf-menu-1, #ast-hf-menu-1-sticky) > .menu-item > .sub-menu::before {
        content: "" !important;
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 100% !important;
        height: calc(var(--hb-gap, 8px) + 4px) !important;
        background: transparent !important;
    }
    :is(#ast-hf-menu-1, #ast-hf-menu-1-sticky) > .menu-item > .sub-menu > .menu-item + .menu-item {
        border-top-color: rgba(255, 255, 255, 0.1) !important;
    }
    :is(#ast-hf-menu-1, #ast-hf-menu-1-sticky) > .menu-item > .sub-menu > .menu-item > .menu-link:hover,
    :is(#ast-hf-menu-1, #ast-hf-menu-1-sticky) > .menu-item > .sub-menu > .menu-item:is(.current-menu-item, .current-menu-ancestor) > .menu-link {
        background: rgba(255, 255, 255, 0.09) !important;
    }
}

/* ---------- Mobilna traka: dugme menija belo na plavom ---------- */
@media (max-width: 921px) {
    #masthead .ast-mobile-header-wrap .ast-primary-header-bar {
        box-shadow: 0 1px 0 var(--hb-line) !important;
    }
    #masthead .ast-mobile-header-wrap .menu-toggle,
    #masthead .ast-mobile-header-wrap .menu-toggle:hover,
    #masthead .ast-mobile-header-wrap .menu-toggle:focus {
        border: 1px solid rgba(255, 255, 255, 0.35) !important;
        background: rgba(255, 255, 255, 0.06) !important;
        color: #fff !important;
    }
    #masthead .ast-mobile-header-wrap .menu-toggle .ast-mobile-svg,
    #masthead .ast-mobile-header-wrap .menu-toggle svg {
        fill: #fff !important;
        color: #fff !important;
    }
    #masthead .ast-mobile-header-wrap .menu-toggle:focus-visible {
        outline: 2px solid var(--hb-gold) !important;
        outline-offset: 2px;
    }
}
