/* Safe Header Override v1.1 */
body.arabim-safe-header-active {
    --ash-navy:#173A67;
    --ash-green:#248A46;
    --ash-gold:#C49A6C;
    --ash-muted:#667085;
    --ash-border:#e6edf5;
}
body.arabim-hide-old-header header.site-header,
body.arabim-hide-old-header .site-header,
body.arabim-hide-old-header .main-header,
body.arabim-hide-old-header .header-main,
body.arabim-hide-old-header .theme-header,
body.arabim-hide-old-header .arabim-header,
body.arabim-hide-old-header .navbar,
body.arabim-hide-old-header .main-navigation,
body.arabim-hide-old-header .primary-navigation {
    display:none !important;
}
#arabim-safe-header,
#arabim-safe-header * { box-sizing:border-box; }
#arabim-safe-header {
    position:sticky;
    top:0;
    z-index:99999;
    width:100%;
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(16px);
    border-bottom:1px solid rgba(23,58,103,.10);
    box-shadow:0 10px 26px rgba(15,35,60,.05);
    font-family: Cairo, Tajawal, Inter, Arial, sans-serif;
}
.admin-bar #arabim-safe-header { top:32px; }
.ash-inner {
    max-width:1240px;
    margin:auto;
    padding:10px 18px;
    display:flex;
    align-items:center;
    gap:14px;
}
.ash-brand {
    display:flex;
    align-items:center;
    gap:10px;
    text-decoration:none !important;
    color:var(--ash-navy) !important;
    flex:0 0 auto;
    min-width:260px;
}
.ash-logo {
    width:44px;
    height:44px;
    border-radius:14px;
    background:#fff;
    border:1px solid var(--ash-border);
    display:grid;
    place-items:center;
    overflow:hidden;
}
.ash-logo img { max-width:38px; max-height:38px; object-fit:contain; }
.ash-brand-text strong { display:block; font-size:15px; line-height:1.25; font-weight:900; color:var(--ash-navy); }
.ash-brand-text small { display:block; font-size:12px; color:var(--ash-muted); margin-top:2px; }
.ash-nav { flex:1 1 auto; display:flex; justify-content:center; min-width:0; }
.ash-menu {
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    align-items:center;
    gap:4px;
}
.ash-menu > li { position:relative; }
.ash-menu a {
    display:flex;
    align-items:center;
    gap:6px;
    color:#26384f !important;
    text-decoration:none !important;
    padding:10px 10px;
    border-radius:12px;
    font-weight:800;
    font-size:14px;
    white-space:nowrap;
    transition:.16s ease;
}
.ash-menu > li > a:hover,
.ash-menu > li.current-menu-item > a,
.ash-menu > li.current-menu-ancestor > a {
    color:var(--ash-navy) !important;
    background:#f4f7fb;
}
.ash-menu .menu-item-has-children > a::after {
    content:"";
    width:7px;
    height:7px;
    border-inline-end:2px solid var(--ash-gold);
    border-bottom:2px solid var(--ash-gold);
    transform:rotate(45deg) translateY(-2px);
    margin-inline-start:5px;
}
.ash-menu .sub-menu {
    position:absolute;
    top:calc(100% + 9px);
    inset-inline-start:0;
    min-width:245px;
    list-style:none;
    margin:0;
    padding:10px;
    background:#fff;
    border:1px solid rgba(23,58,103,.13);
    border-radius:16px;
    box-shadow:0 20px 54px rgba(20,45,80,.16);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(8px);
    transition:.18s ease;
}
.ash-menu li:hover > .sub-menu,
.ash-menu li:focus-within > .sub-menu,
.ash-menu li.is-open > .sub-menu {
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translateY(0);
}
.ash-menu .sub-menu a {
    padding:11px 12px;
    justify-content:flex-start;
    color:var(--ash-navy) !important;
    background:transparent;
}
.ash-menu .sub-menu a:hover { background:#f4f7fb; color:var(--ash-green) !important; }
.ash-sub-toggle { display:none; }
.ash-actions {
    display:flex;
    align-items:center;
    gap:8px;
    flex:0 0 auto;
}
.ash-lang-switch {
    height:34px;
    min-width:44px;
    padding:0 11px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#fff;
    color:var(--ash-navy) !important;
    border:1px solid #dbe4ef;
    text-decoration:none !important;
    font-weight:900;
    font-size:13px;
    box-shadow:0 8px 18px rgba(23,58,103,.06);
}
.ash-lang-switch:hover { background:var(--ash-navy); color:#fff !important; }
.ash-social {
    display:flex;
    align-items:center;
    gap:7px;
}
.ash-social-link {
    width:34px;
    height:34px;
    border-radius:12px;
    display:grid;
    place-items:center;
    color:var(--ash-navy);
    background:#f6f8fb;
    border:1px solid #e6edf5;
    text-decoration:none !important;
    transition:.16s ease;
}
.ash-social-link svg { width:17px; height:17px; fill:currentColor; }
.ash-social-link:hover { background:var(--ash-navy); color:#fff; transform:translateY(-1px); }
.ash-mobile-toggle {
    display:none;
    width:42px;
    height:42px;
    border-radius:13px;
    border:1px solid var(--ash-border);
    background:#fff;
    color:var(--ash-navy);
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:5px;
    cursor:pointer;
}
.ash-mobile-toggle span { display:block; width:20px; height:2px; background:currentColor; border-radius:99px; }

@media(max-width:1160px) {
    .ash-brand { min-width:220px; }
    .ash-social { display:none; }
    .ash-menu a { padding:9px 7px; font-size:13px; }
}
@media(max-width:900px) {
    .admin-bar #arabim-safe-header { top:46px; }
    .ash-inner { flex-wrap:wrap; padding:9px 14px; }
    .ash-brand { flex:1 1 auto; min-width:0; }
    .ash-brand-text strong { font-size:13px; }
    .ash-brand-text small { font-size:11px; }
    .ash-logo { width:38px; height:38px; border-radius:12px; }
    .ash-logo img { max-width:32px; max-height:32px; }
    .ash-mobile-toggle { display:flex; }
    .ash-actions { order:3; }
    .ash-nav {
        display:none;
        width:100%;
        order:5;
        flex-basis:100%;
        background:#fff;
        border:1px solid var(--ash-border);
        border-radius:18px;
        padding:8px;
        margin-top:8px;
        justify-content:stretch;
    }
    #arabim-safe-header.is-open .ash-nav { display:block; }
    .ash-menu { display:block; width:100%; }
    .ash-menu > li {
        display:grid;
        grid-template-columns:1fr auto;
        align-items:center;
        border-bottom:1px solid #f0f3f7;
    }
    .ash-menu > li:last-child { border-bottom:0; }
    .ash-menu a { padding:13px 12px; width:100%; }
    .ash-menu .menu-item-has-children > a::after { display:none; }
    .ash-sub-toggle {
        display:inline-flex;
        width:34px;
        height:34px;
        border:1px solid var(--ash-border);
        border-radius:10px;
        align-items:center;
        justify-content:center;
        background:#fff;
        color:var(--ash-navy);
        cursor:pointer;
        margin-inline-end:6px;
    }
    .ash-sub-toggle::before { content:"⌄"; font-weight:900; color:var(--ash-gold); }
    li.is-open > .ash-sub-toggle::before { content:"⌃"; }
    .ash-menu .sub-menu {
        position:static;
        grid-column:1 / -1;
        display:none;
        min-width:0;
        opacity:1;
        visibility:visible;
        transform:none;
        pointer-events:auto;
        box-shadow:none;
        border:0;
        background:#f6f8fb;
        border-radius:14px;
        margin:0 8px 10px;
        padding:6px;
    }
    .ash-menu li.is-open > .sub-menu { display:block; }
}
