/* ==========================================================================
   AAPOLIX HEADER NAVIGATION
========================================================================== */
/* ==========================================================================
   HEADER BASE
========================================================================== */
.apx-header{
    position:sticky;
    top:0;
    z-index:1000;
    background:#FFFFFF;
    border-bottom:0px solid var(--apx-border,#D3BEFF);
    height:65px;
    transition:height .25s ease, box-shadow .25s ease;
    box-shadow:0 4px 18px rgba(43,0,113,.08);
}
/* SCROLL STATE */
.apx-header.is-scrolled{
    height:55px;
    box-shadow:0 4px 18px rgba(43,0,113,.08);
}
/* ==========================================================================
   HEADER INNER
========================================================================== */
.apx-header-inner{
    max-width:1280px;
    margin:0 auto;
    height:100%;
    padding:0 16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    transition:height .25s ease;
}
/* ==========================================================================
   LOGO
========================================================================== */
.apx-logo{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    flex:0 0 auto;
    flex-shrink:0;
    min-width:0;
}
.apx-logo img,
.apx-logo .custom-logo-link img{
    display:block;
    width:auto;
    height:56px;
    max-height:56px;
    object-fit:contain;
    padding:4px 0;
    transition:height .25s ease;
}
/* LOGO SIZES */
.apx-header:not(.is-scrolled) .custom-logo-link img{
    height:56px;
}
.apx-header.is-scrolled .custom-logo-link img{
    height:48px;
}
/* ==========================================================================
   HAMBURGER
========================================================================== */
.apx-menu-toggle{
    display:flex;
    flex-direction:column;
    gap:5px;
    border:0;
    background:none;
    cursor:pointer;
    flex-shrink:0;
}
.apx-menu-toggle span{
    width:22px;
    height:2px;
    background:#2B0071;
}
/* ==========================================================================
   MOBILE NAV
========================================================================== */
.apx-nav{
    position:absolute;
    top:55px;
    left:0;
    right:0;
    background:#FFFFFF;
    border-top:1px solid #D3BEFF;
    display:none;
}
.apx-nav.is-open{
    display:block;
}
/* ==========================================================================
   MENU BASE
========================================================================== */
.apx-menu{
    list-style:none;
    margin:0;
    padding:0;
}
.apx-menu li{
    position:relative;
}
.apx-menu a{
    display:flex;
    align-items:left;
    justify-content:space-between;
    padding:12px 16px;
    text-decoration:none;
    color:var(--apx-text);
    font-weight:400;
    text-transform:uppercase;
    font-size:var(--apx-text-xs);
    border-bottom:1px solid #F5F1FF;
}
/* ==========================================================================
   MOBILE CARET
========================================================================== */
.apx-menu-arrow{
    width:7px;
    height:7px;
    border-right:1px solid currentColor;
    border-bottom:1px solid currentColor;
    transform:rotate(45deg);
    margin-left:10px;
    flex-shrink:0;
}
/* ==========================================================================
   MOBILE SUBMENU
========================================================================== */
.sub-menu{
    display:none;
    list-style:none;
    margin:0;
    padding:0;
    background:#F5F1FF;
}
.menu-item-has-children.open>.sub-menu{
    display:block;
}
.sub-menu li{
    position:relative;
}
.sub-menu a{
    padding:10px 16px;
    border:none;
    transition:background .2s ease;
}
.sub-menu a:hover{
    background:var(--apx-surface);
}
/* ==========================================================================
   SEARCH
========================================================================== */
.apx-search-form{
    display:flex;
    align-items:center;
    gap:2px;
    flex:0 0 auto;
    width:auto;
    max-width:140px;
    padding:0;
    border-radius:999px;
    border:1px solid rgba(43,0,113,.08);
    background:rgba(255,255,255,.85);
    backdrop-filter:blur(10px);
    box-shadow:0 1px 2px rgba(43,0,113,.04);
    transition:.2s;
}
.apx-search-form:focus-within{
    box-shadow:0 6px 18px rgba(43,0,113,.15);
}
.apx-search-input{
    width:70px;
    border:none;
    outline:none;
    background:transparent;
    font-size:var(--apx-text-sm);
    color:#18003F;
    min-width:0;
}
.apx-search-input::placeholder{
    color:rgba(100,116,139,.7);
}
.apx-search-button{
    width:26px;
    height:26px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    border:none;
    background:rgba(43,0,113,.08);
    color:var(--apx-primary,#2B0071);
    cursor:pointer;
    transition:.2s;
}
.apx-search-button:hover{
    color:#FFFFFF;
}
/* ==========================================================================
   DESKTOP NAVIGATION
========================================================================== */
@media (min-width:992px){
    /* =========================
       HEADER
    ========================= */
    .apx-header-inner{
        gap:24px;
    }
    /* =========================
       LOGO
    ========================= */
    .apx-logo img,
    .apx-logo .custom-logo-link img{
        height:56px;
        max-height:56px;
    }
    .apx-header.is-scrolled .custom-logo-link img{
        height:48px;
    }
    /* =========================
       HAMBURGER
    ========================= */
    .apx-menu-toggle{
        display:none;
    }
    /* =========================
       SEARCH
    ========================= */
    .apx-search-form{
        max-width:400px;
    }
    .apx-search-input{
        width:350px;
    }
    /* =========================
       NAVIGATION
    ========================= */
    .apx-nav{
        position:static;
        display:block;
        background:transparent;
        border:none;
        margin-right:auto;
        padding-left:100px;
    }
    /* =========================
       TOP LEVEL
    ========================= */
    .apx-menu{
        display:flex;
        align-items:center;
        gap:20px;
    }
    .apx-menu>li{
        position:relative;
    }
    .apx-menu>li>a{
        display:flex;
        align-items:center;
        padding:10px 0;
        border:0;
        white-space:nowrap;
    }
    /* =========================
       FIRST LEVEL DROPDOWN
    ========================= */
    .apx-menu>li>.sub-menu{
        position:absolute;
        top:100%;
        left:0;
        min-width:240px;
        display:none;
        margin:0;
        padding:0;
        list-style:none;
        background:#FFFFFF;
        border:1px solid var(--apx-border);
        border-radius:8px;
        overflow:visible;
        box-shadow:0 12px 30px rgba(43,0,113,.08);
        z-index:999;
    }
    .apx-menu>li:hover>.sub-menu{
        display:block;
    }
    /* =========================
       DROPDOWN ITEMS
    ========================= */
    .sub-menu li{
        position:relative;
    }
    .sub-menu li+li::before{
        content:"";
        position:absolute;
        top:0;
        left:16px;
        right:16px;
        height:1px;
        background:var(--apx-border);
    }
    .sub-menu a{
        display:flex;
        align-items:center;
        justify-content:space-between;
        padding:11px 16px;
        border:0;
        white-space:nowrap;
        text-transform:none;
        font-size:var(--apx-text-sm);
        transition:background .2s ease;
    }
    .sub-menu a:hover{
        background:var(--apx-surface);
    }
    /* =========================
       SECOND / THIRD LEVEL
    ========================= */
    .sub-menu .sub-menu{
        position:absolute;
        top:-1px;
        left:calc(100% - 1px);
        min-width:240px;
        display:none;
        margin:0;
        padding:0;
        background:#FFFFFF;
        border:1px solid var(--apx-border);
        border-radius:8px;
        overflow:visible;
        box-shadow:0 12px 30px rgba(43,0,113,.08);
        z-index:1000;
    }
    .sub-menu li:hover>.sub-menu{
        display:block;
    }
}
/* ==========================================================================
   SMALL MOBILE REFINEMENTS
   Keep logo visible without affecting desktop
========================================================================== */
@media (max-width:767px){
    .apx-header{
        height:64px;
    }
    .apx-header.is-scrolled{
        height:58px;
    }
    .apx-header-inner{
        padding:0 12px;
        gap:8px;
    }
    /* =========================
       LOGO
    ========================= */
    .apx-logo{
        flex:1 1 auto;
        min-width:0;
    }
    .apx-logo img,
    .apx-logo .custom-logo-link img{
        height:50px;
        max-height:50px;
        width:auto;
        object-fit:contain;
    }
    .apx-header.is-scrolled .custom-logo-link img{
        height:44px;
    }
    /* =========================
       SEARCH
    ========================= */
    .apx-search-form{
    max-width:280px;
    width:100%;
    padding:0 8px;
}
.apx-search-input{
    width:230px;
    font-size:var(--apx-text-xs);
}
.apx-search-button{
    width:32px;
    height:32px;
}
}
/* ==========================================================================
   EXTRA SMALL DEVICES
========================================================================== */
@media (max-width:420px){
    .apx-header-inner{
        gap:6px;
    }
    .apx-logo img,
    .apx-logo .custom-logo-link img{
        height:46px;
        max-height:46px;
    }
    .apx-search-form{
    max-width:190px;
    width:100%;
}
	.apx-search-input{
		width:140px;
	}
}
/* ==========================================================================
   REDUCED MOTION
========================================================================== */
@media (prefers-reduced-motion:reduce){
    .apx-header,
    .apx-logo img,
    .apx-logo .custom-logo-link img,
    .apx-search-form{
        transition:none;
    }
}