/*
Theme Name: Bumerang Divi Child
Theme URI: https://bumerangsistemi.hr/
Description: Divi child tema sa custom Bumerang Sistemi headerom i WordPress menijem.
Author: Step2Digital
Template: Divi
Version: 1.4.2
Text Domain: bumerang-divi-child
*/

#main-header,
#top-header,
.et-l--header {
    display: none !important;
}

body.et_fixed_nav.et_show_nav #page-container,
body.et_non_fixed_nav.et_transparent_nav.et_show_nav #page-container,
#page-container {
    padding-top: 0 !important;
}

.bwn-site-header {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 24px 56px;
    box-sizing: border-box;
    background: #12210a;
    transition: background .35s ease, border-color .35s ease, box-shadow .35s ease, backdrop-filter .35s ease;
    font-family: "Montserrat", sans-serif;
    border-bottom: 1px solid rgba(255,255,255,.12);
    position: relative;
    z-index: 99999;
}

.bwn-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    justify-self: start;
}

.bwn-logo img {
    height: 38px;
    width: auto;
    display: block;
}

.bwn-wordmark {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.bwn-brand-main {
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-size: 19px;
    letter-spacing: .5px;
    color: #fff;
}

.bwn-brand-sub {
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 3px;
    color: #8bc43f;
}

.bwn-menu-wrap {
    justify-self: center;
}

.bwn-nav {
    display: flex;
    align-items: center;
    gap: 34px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bwn-item {
    position: relative;
    list-style: none;
}

.bwn-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    opacity: .85;
    display: flex;
    align-items: center;
    padding-bottom: 6px;
    border-bottom: 2px solid transparent;
    transition: opacity .2s ease,border-color .2s ease;
}

.current-menu-item > .bwn-link,
.current-menu-parent > .bwn-link,
.current-menu-ancestor > .bwn-link,
.bwn-link.is-active {
    opacity: 1;
    border-color: #8bc43f;
}

.bwn-item:hover > .bwn-link,
.bwn-item:focus-within > .bwn-link {
    opacity: 1;
    border-color: #8bc43f;
}

.bwn-drop {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    opacity: 0;
    visibility: hidden;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    min-width: 230px;
    margin: 0;
    list-style: none;
    box-shadow: 0 24px 48px rgba(0,0,0,.25);
    transition: opacity .2s ease,transform .2s ease,visibility .2s ease;
    z-index: 20;
}

.bwn-item:hover > .bwn-drop,
.bwn-item:focus-within > .bwn-drop {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.bwn-drop a {
    display: block;
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 6px;
    white-space: nowrap;
}

.bwn-drop a:hover,
.bwn-drop a:focus,
.bwn-drop .current-menu-item > a {
    background: #eef7e2;
    color: #4b8a24;
}

.bwn-caret {
    display: inline-block;
    margin-left: 5px;
    font-size: 9px;
    transition: transform .2s ease;
    vertical-align: middle;
}

.bwn-item:hover > .bwn-link .bwn-caret,
.bwn-item:focus-within > .bwn-link .bwn-caret {
    transform: rotate(180deg);
}

.bwn-sub {
    position: relative;
    list-style: none;
}

.bwn-subdrop {
    position: absolute;
    top: -10px;
    left: calc(100% + 8px);
    opacity: 0;
    visibility: hidden;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    min-width: 210px;
    margin: 0;
    list-style: none;
    box-shadow: 0 24px 48px rgba(0,0,0,.25);
    transition: opacity .2s ease,transform .2s ease,visibility .2s ease;
    transform: translateX(-6px);
    z-index: 30;
}

.bwn-sub:hover > .bwn-subdrop,
.bwn-sub:focus-within > .bwn-subdrop {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.bwn-sub > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bwn-subcaret {
    font-size: 9px;
    opacity: .5;
}

.bwn-cta {
    padding: 12px 22px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 100px;
    white-space: nowrap;
    justify-self: end;
    transition: background .2s ease,border-color .2s ease,color .2s ease;
}

.bwn-cta:hover,
.bwn-cta:focus {
    background: #8bc43f;
    border-color: #8bc43f;
    color: #12210a;
}

.bwn-menu-toggle {
    display: none;
    justify-self: end;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 8px;
    cursor: pointer;
}

.bwn-menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    transition: transform .2s ease,opacity .2s ease;
}



/* Reset za treći nivo WordPress/Divi menija */
.bwn-subdrop {
    display: block;
    overflow: visible;
    z-index: 999;
}

.bwn-subdrop > li {
    display: block !important;
    position: relative;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.bwn-subdrop > li > a {
    display: block !important;
    width: 100%;
    box-sizing: border-box;
    color: #1a1a1a !important;
    opacity: 1 !important;
    visibility: visible !important;
    white-space: nowrap;
}

.bwn-subdrop > li > a:hover,
.bwn-subdrop > li.current-menu-item > a {
    background: #eef7e2;
    color: #4b8a24 !important;
}

/* Spriječi Divi da sakrije ugniježđene stavke */
.bwn-site-header ul,
.bwn-site-header li,
.bwn-site-header li ul,
.bwn-site-header li ul li {
    line-height: normal;
}

@media (min-width: 1181px) {
    .bwn-subdrop {
        pointer-events: auto;
    }

    .bwn-sub:hover > .bwn-subdrop,
    .bwn-sub:focus-within > .bwn-subdrop {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}



/* Stabilna hover zona između dropdowna i pod-podmenija */
@media (min-width: 1181px) {
    .bwn-drop {
        overflow: visible !important;
        z-index: 1000;
    }

    .bwn-sub {
        position: relative;
        z-index: 1;
    }

    .bwn-sub:hover,
    .bwn-sub:focus-within {
        z-index: 1002;
    }

    .bwn-subdrop {
        top: -10px;
        left: calc(100% + 4px);
        z-index: 1003 !important;
        pointer-events: auto;
    }

    /* Nevidljivi most preko praznine između dva menija */
    .bwn-subdrop::before {
        content: "";
        position: absolute;
        top: 0;
        right: 100%;
        width: 14px;
        height: 100%;
        background: transparent;
    }

    /* Zadržava podmeni otvorenim dok je miš na njemu */
    .bwn-sub:hover > .bwn-subdrop,
    .bwn-sub:focus-within > .bwn-subdrop,
    .bwn-subdrop:hover,
    .bwn-subdrop:focus-within {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
    }

    /* Glavni dropdown ostaje iznad susjednih stavki */
    .bwn-item:hover,
    .bwn-item:focus-within {
        z-index: 1001;
    }

    .bwn-item:hover > .bwn-drop,
    .bwn-item:focus-within > .bwn-drop,
    .bwn-drop:hover,
    .bwn-drop:focus-within {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(-50%) translateY(0) !important;
    }
}



/* Četvrti nivo menija */
.bwn-deepsub {
    position: absolute;
    top: -10px;
    left: calc(100% + 4px);
    opacity: 0;
    visibility: hidden;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    min-width: 210px;
    margin: 0;
    list-style: none;
    box-shadow: 0 24px 48px rgba(0,0,0,.25);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    transform: translateX(-6px);
    z-index: 1005;
}

.bwn-deep {
    position: relative;
    list-style: none;
}

.bwn-deep > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bwn-deepcaret {
    font-size: 9px;
    opacity: .5;
}

.bwn-deep:hover > .bwn-deepsub,
.bwn-deep:focus-within > .bwn-deepsub {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

@media (min-width: 1181px) {
    .bwn-deepsub {
        display: block;
        overflow: visible;
        pointer-events: auto;
    }

    .bwn-deepsub::before {
        content: "";
        position: absolute;
        top: 0;
        right: 100%;
        width: 14px;
        height: 100%;
        background: transparent;
    }

    .bwn-deep:hover,
    .bwn-deep:focus-within {
        z-index: 1004;
    }

    .bwn-deep:hover > .bwn-deepsub,
    .bwn-deep:focus-within > .bwn-deepsub,
    .bwn-deepsub:hover,
    .bwn-deepsub:focus-within {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
    }

    .bwn-deepsub > li,
    .bwn-deepsub > li > a {
        display: block !important;
        width: 100%;
        box-sizing: border-box;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .bwn-deepsub > li {
        margin: 0 !important;
        padding: 0 !important;
        list-style: none;
    }

    .bwn-deepsub > li > a {
        padding: 11px 14px;
        color: #1a1a1a !important;
        text-decoration: none;
        border-radius: 6px;
        white-space: nowrap;
    }

    .bwn-deepsub > li > a:hover,
    .bwn-deepsub > li.current-menu-item > a {
        background: #eef7e2;
        color: #4b8a24 !important;
    }
}



/* Transparentan header samo na naslovnoj stranici */
.bwn-site-header.bwn-home-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    border-bottom-color: rgba(255,255,255,.08);
}

/* Nakon skrolanja naslovna dobija standardnu zelenu pozadinu */
.bwn-site-header.bwn-home-header.is-scrolled {
    position: fixed;
    background: rgba(18,33,10,.96);
    border-bottom-color: rgba(255,255,255,.12);
    box-shadow: 0 10px 30px rgba(0,0,0,.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Sprječava pomjeranje sadržaja kada header pređe u fixed stanje */
body.admin-bar .bwn-site-header.bwn-home-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .bwn-site-header.bwn-home-header {
        top: 46px;
    }
}

@media (max-width: 1180px) {
    .bwn-site-header {
        grid-template-columns: 1fr auto;
        padding: 18px 24px;
        overflow: visible;
    }

    .bwn-menu-toggle {
        display: block;
    }

    .bwn-menu-wrap,
    .bwn-cta {
        display: none;
    }

    .bwn-site-header.is-open .bwn-menu-wrap {
        display: block;
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        padding-top: 18px;
        box-sizing: border-box;
    }

    .bwn-site-header.is-open .bwn-cta {
        display: block;
        grid-column: 1 / -1;
        width: 100%;
        justify-self: stretch;
        margin-top: 14px;
        text-align: center;
        box-sizing: border-box;
    }

    .bwn-nav {
        width: 100%;
        min-width: 0;
        gap: 0;
        flex-direction: column;
        align-items: stretch;
    }

    .bwn-nav > .bwn-item,
    .bwn-item,
    .bwn-sub {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .bwn-link {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        justify-content: space-between;
        padding: 13px 0;
        opacity: 1;
        border-bottom: 1px solid rgba(255,255,255,.1);
    }

    .current-menu-item > .bwn-link,
    .current-menu-parent > .bwn-link,
    .current-menu-ancestor > .bwn-link {
        color: #8bc43f;
        border-color: rgba(255,255,255,.1);
    }

    .bwn-item:hover > .bwn-link,
    .bwn-item:focus-within > .bwn-link {
        border-color: rgba(255,255,255,.1);
    }

    .bwn-drop {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin: 0 0 8px;
        padding: 8px;
        border-radius: 8px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .bwn-item.is-open > .bwn-drop {
        display: block;
    }

    .bwn-drop a,
    .bwn-sub > a,
    .bwn-subdrop a {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        box-sizing: border-box;
    }

    .bwn-sub > a {
        padding-right: 12px;
    }

    .bwn-subdrop {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        width: calc(100% - 12px);
        min-width: 0;
        max-width: calc(100% - 12px);
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin: 4px 0 6px 12px;
        padding: 6px;
        border-left: 2px solid #eef7e2;
        border-radius: 0 8px 8px 0;
        box-sizing: border-box;
        overflow: hidden;
    }

    .bwn-sub.is-open > .bwn-subdrop {
        display: block;
    }

    .bwn-deepsub {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        width: calc(100% - 12px);
        min-width: 0;
        max-width: calc(100% - 12px);
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin: 4px 0 6px 12px;
        padding: 6px;
        border-left: 2px solid #dbeec6;
        border-radius: 0 8px 8px 0;
        box-sizing: border-box;
        overflow: hidden;
    }

    .bwn-deep.is-open > .bwn-deepsub {
        display: block;
    }

    .bwn-deepsub a {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        box-sizing: border-box;
    }

    .bwn-deep.is-open > a .bwn-deepcaret {
        transform: rotate(90deg);
    }

    .bwn-item:hover > .bwn-link .bwn-caret,
    .bwn-item:focus-within > .bwn-link .bwn-caret {
        transform: none;
    }

    .bwn-item.is-open > .bwn-link .bwn-caret {
        transform: rotate(180deg);
    }

    .bwn-sub.is-open > a .bwn-subcaret {
        transform: rotate(90deg);
    }
}

@media (max-width: 520px) {
    .bwn-site-header {
        padding: 15px 16px;
    }

    .bwn-logo img {
        height: 32px;
    }

    .bwn-brand-main {
        font-size: 16px;
    }

    .bwn-brand-sub {
        font-size: 8px;
        letter-spacing: 2px;
    }
}


/* ==========================================================
   V1.4.1 — Transparentan je samo glavni header na početnoj.
   Svi dropdown nivoi uvijek imaju bijelu pozadinu.
   ========================================================== */

.bwn-drop,
.bwn-subdrop,
.bwn-deepsub {
    background: #ffffff !important;
    color: #1a1a1a !important;
    opacity: 0;
    visibility: hidden;
}

.bwn-drop a,
.bwn-subdrop a,
.bwn-deepsub a {
    color: #1a1a1a !important;
    background: transparent;
}

.bwn-drop a:hover,
.bwn-subdrop a:hover,
.bwn-deepsub a:hover,
.bwn-drop .current-menu-item > a,
.bwn-subdrop .current-menu-item > a,
.bwn-deepsub .current-menu-item > a {
    background: #eef7e2 !important;
    color: #4b8a24 !important;
}

/* Desktop: bijeli dropdowni ostaju potpuno neovisni od transparentnosti headera */
@media (min-width: 1181px) {
    .bwn-item:hover > .bwn-drop,
    .bwn-item:focus-within > .bwn-drop,
    .bwn-sub:hover > .bwn-subdrop,
    .bwn-sub:focus-within > .bwn-subdrop,
    .bwn-deep:hover > .bwn-deepsub,
    .bwn-deep:focus-within > .bwn-deepsub {
        background: #ffffff !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Mobilni/tablet: svi dropdowni ostaju unutar headera i širine ekrana */
@media (max-width: 1180px) {
    .bwn-site-header,
    .bwn-site-header.bwn-home-header,
    .bwn-site-header.bwn-home-header.is-scrolled {
        overflow: visible !important;
    }

    .bwn-menu-wrap,
    .bwn-nav,
    .bwn-nav > li,
    .bwn-item,
    .bwn-sub,
    .bwn-deep {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .bwn-drop,
    .bwn-subdrop,
    .bwn-deepsub {
        position: static !important;
        inset: auto !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        float: none !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 0 8px 0 !important;
        padding: 8px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        box-shadow: none !important;
        background: #ffffff !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .bwn-drop,
    .bwn-subdrop,
    .bwn-deepsub {
        display: none !important;
    }

    .bwn-item.is-open > .bwn-drop,
    .bwn-sub.is-open > .bwn-subdrop,
    .bwn-deep.is-open > .bwn-deepsub {
        display: block !important;
    }

    .bwn-subdrop,
    .bwn-deepsub {
        width: calc(100% - 12px) !important;
        max-width: calc(100% - 12px) !important;
        margin-left: 12px !important;
        border-left: 2px solid #eef7e2 !important;
        border-radius: 0 8px 8px 0 !important;
    }

    .bwn-drop li,
    .bwn-subdrop li,
    .bwn-deepsub li {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .bwn-drop a,
    .bwn-subdrop a,
    .bwn-deepsub a {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 11px 12px !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        box-sizing: border-box !important;
    }

    /* Neutralizira stari Divi pomak za mobilne menije */
    .bwn-site-header .sub-menu,
    .bwn-site-header ul.sub-menu {
        margin-left: 0 !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
    }
}


/* V1.4.2 — Cijeli mobilni meni je bijeli panel */
@media (max-width: 1180px) {
    .bwn-site-header.is-open .bwn-menu-wrap {
        background: #ffffff !important;
        border-radius: 10px;
        padding: 8px !important;
        margin-top: 14px;
        box-shadow: 0 18px 40px rgba(0,0,0,.18);
        overflow: hidden !important;
    }

    .bwn-site-header.is-open .bwn-nav {
        background: #ffffff !important;
    }

    .bwn-site-header.is-open .bwn-nav > .bwn-item {
        background: #ffffff !important;
    }

    .bwn-site-header.is-open .bwn-link {
        color: #1a1a1a !important;
        background: #ffffff !important;
        border-bottom: 1px solid #edf0ea !important;
        padding: 13px 12px !important;
    }

    .bwn-site-header.is-open .bwn-item:last-child > .bwn-link {
        border-bottom: 0 !important;
    }

    .bwn-site-header.is-open .current-menu-item > .bwn-link,
    .bwn-site-header.is-open .current-menu-parent > .bwn-link,
    .bwn-site-header.is-open .current-menu-ancestor > .bwn-link {
        color: #4b8a24 !important;
        background: #f7fbf2 !important;
    }

    .bwn-site-header.is-open .bwn-link:hover,
    .bwn-site-header.is-open .bwn-link:focus {
        color: #4b8a24 !important;
        background: #eef7e2 !important;
    }

    .bwn-site-header.is-open .bwn-caret {
        color: #4b8a24 !important;
    }

    .bwn-site-header.is-open .bwn-cta {
        margin-top: 10px;
        background: #8bc43f !important;
        border-color: #8bc43f !important;
        color: #12210a !important;
    }
}
