/* One Design 1 navigation on every public page. */
body { padding-top: 72px; }
body.anchor-home-page { padding-top: 0; }
nav.custom-navbar {
    --ink: #0b0e13; --white: #fff; --amber: #ffb31a;
    --muted-d: #9aa3b1; --line-d: rgba(255,255,255,.1);
    --header-h: 72px; --gut: clamp(16px,4vw,40px);
    --f-body: 'IBM Plex Sans Arabic',system-ui,sans-serif;
    --f-display: 'Alexandria','IBM Plex Sans Arabic',system-ui,sans-serif;
    --f-mono: 'IBM Plex Mono',monospace;
    --ease: cubic-bezier(.2,.7,.1,1);
}
nav.custom-navbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    width: 100%;
    min-height: var(--header-h);
    padding: 0;
    direction: rtl;
    font-family: var(--f-body);
    color: var(--white);
    background: #0b0e13;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

nav.custom-navbar>.container {
    max-width: 1440px;
}

nav.custom-navbar .navbar-container,
nav.custom-navbar .navbar-content {
    width: 100%;
}

nav.custom-navbar .navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: var(--header-h);
}

nav.custom-navbar .navbar-brand {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav.custom-navbar .brand-link,
nav.custom-navbar .brand-wrapper {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

nav.custom-navbar .logo-img {
    display: block;
    width: auto;
    max-width: 184px;
    max-height: 52px;
    object-fit: contain;
}

nav.custom-navbar .navbar-navigation {
    flex: 1;
    justify-content: center;
}

nav.custom-navbar .navbar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2vw, 32px);
    margin: 0;
    padding: 0;
}

nav.custom-navbar .nav-item {
    list-style: none;
}

nav.custom-navbar .nav-link {
    position: relative;
    padding: 10px 4px;
    color: rgba(255, 255, 255, .78);
    font-family: var(--f-body);
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    transition: color .25s ease;
}

nav.custom-navbar .nav-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 2px;
    width: 0;
    height: 2px;
    background: var(--amber);
    transition: width .25s ease;
}

nav.custom-navbar .nav-link:hover,
nav.custom-navbar .nav-link:focus-visible {
    color: var(--white);
}

nav.custom-navbar .nav-link:hover::after,
nav.custom-navbar .nav-link:focus-visible::after {
    width: 100%;
}

nav.custom-navbar .anchor-navbar-login {
    padding: 10px 18px;
    border: 1px solid rgba(255, 179, 26, .65);
    border-radius: 999px;
    color: var(--amber);
}

nav.custom-navbar .anchor-navbar-login::after {
    display: none;
}

nav.custom-navbar .anchor-navbar-login:hover {
    background: var(--amber);
    color: var(--ink);
}

nav.custom-navbar .navbar-toggler {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    padding: 8px;
    color: #fff;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .55);
    box-shadow: none;
}

nav.custom-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 179, 26, .2);
}

nav.custom-navbar .navbar-toggler-icon {
    width: 26px;
    height: 26px;
    filter: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%23ffffff' stroke-linecap='round' stroke-width='2.2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Design 1 navigation: pill links and a staggered full-screen mobile menu. */
nav.custom-navbar.anchor-nav-enhanced .navbar-nav { gap: 4px; }
nav.custom-navbar.anchor-nav-enhanced .nav-link {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 17px;
    transition: color .2s, background .2s;
}
nav.custom-navbar.anchor-nav-enhanced .nav-link::after { display: none; }
nav.custom-navbar.anchor-nav-enhanced .nav-link:hover,
nav.custom-navbar.anchor-nav-enhanced .nav-link:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .07);
}
nav.custom-navbar.anchor-nav-enhanced .nav-link:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
}
nav.custom-navbar .anchor-nav-number { display: none; }

@media (max-width: 991.98px) {
    body.anchor-menu-open { overflow: hidden; }
    nav.custom-navbar.anchor-nav-enhanced {
        position: fixed;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    nav.custom-navbar.anchor-nav-enhanced .navbar-brand,
    nav.custom-navbar.anchor-nav-enhanced .navbar-toggler {
        position: relative;
        z-index: 2;
    }
    nav.custom-navbar.anchor-nav-enhanced .navbar-content { gap: 0; }
    nav.custom-navbar.anchor-nav-enhanced .navbar-toggler {
        position: relative;
        border-radius: 12px;
    }
    nav.custom-navbar.anchor-nav-enhanced .navbar-toggler-icon {
        position: relative;
        display: block;
        width: 100%;
        height: 100%;
        background-image: none;
    }
    nav.custom-navbar.anchor-nav-enhanced .navbar-toggler-icon::before,
    nav.custom-navbar.anchor-nav-enhanced .navbar-toggler-icon::after {
        content: '';
        position: absolute;
        inset-inline: 4px;
        height: 2px;
        border-radius: 2px;
        background: #fff;
        transition: transform .35s var(--ease);
    }
    nav.custom-navbar.anchor-nav-enhanced .navbar-toggler-icon::before { top: 8px; }
    nav.custom-navbar.anchor-nav-enhanced .navbar-toggler-icon::after { top: 17px; }
    nav.custom-navbar.anchor-nav-enhanced .navbar-toggler[aria-expanded='true'] .navbar-toggler-icon::before {
        transform: translateY(4.5px) rotate(45deg);
    }
    nav.custom-navbar.anchor-nav-enhanced .navbar-toggler[aria-expanded='true'] .navbar-toggler-icon::after {
        transform: translateY(-4.5px) rotate(-45deg);
    }
    nav.custom-navbar.anchor-nav-enhanced .navbar-navigation {
        position: fixed;
        inset: 0;
        z-index: 1;
        display: flex !important;
        align-items: flex-start;
        justify-content: flex-start;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        padding: calc(var(--header-h) + 24px) var(--gut) max(32px, env(safe-area-inset-bottom));
        background: var(--ink);
        overflow-y: auto;
        overscroll-behavior: contain;
        clip-path: circle(0% at 8% 4%);
        visibility: hidden;
        pointer-events: none;
        transition: clip-path .6s var(--ease), visibility 0s .6s;
    }
    nav.custom-navbar.anchor-nav-enhanced .navbar-navigation.anchor-menu-visible {
        clip-path: circle(150% at 8% 4%);
        visibility: visible;
        pointer-events: auto;
        transition: clip-path .6s var(--ease), visibility 0s;
    }
    nav.custom-navbar.anchor-nav-enhanced .navbar-nav {
        width: 100%;
        align-items: stretch;
        gap: 0;
        padding: 0;
    }
    nav.custom-navbar.anchor-nav-enhanced .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
        width: 100%;
        margin: 0;
        padding: 10px 0;
        border: 0;
        border-bottom: 1px solid var(--line-d);
        border-radius: 0;
        color: #fff;
        font-family: var(--f-display);
        font-size: clamp(2rem, 9vw, 3rem);
        font-weight: 700;
        line-height: 1.5;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity .4s, transform .5s var(--ease), color .2s;
    }
    nav.custom-navbar.anchor-nav-enhanced .anchor-navbar-login { color: var(--amber); }
    nav.custom-navbar.anchor-nav-enhanced .anchor-menu-visible .nav-link {
        opacity: 1;
        transform: none;
        transition-delay: var(--nav-delay, 0s);
    }
    nav.custom-navbar.anchor-nav-enhanced .nav-link:hover,
    nav.custom-navbar.anchor-nav-enhanced .nav-link:focus-visible {
        color: var(--amber);
        background: transparent;
    }
    .anchor-nav-number {
        display: block;
        flex-shrink: 0;
        font-family: var(--f-mono);
        font-size: 12px;
        font-weight: 400;
        color: var(--muted-d);
    }
}
@media (prefers-reduced-motion: reduce) {
    nav.custom-navbar.anchor-nav-enhanced .navbar-navigation,
    nav.custom-navbar.anchor-nav-enhanced .nav-link,
    nav.custom-navbar.anchor-nav-enhanced .navbar-toggler-icon::before,
    nav.custom-navbar.anchor-nav-enhanced .navbar-toggler-icon::after {
        transition: none;
        transition-delay: 0s;
        transform: none;
    }
}


/* Reset inherited navbar geometry and legacy !important link rules. */
nav.custom-navbar { box-shadow: none; }
nav.custom-navbar > .container { width: 100%; padding-inline: var(--gut); }
nav.custom-navbar .navbar-container { width: 100%; margin: 0; }
nav.custom-navbar .navbar-content { flex-wrap: nowrap; min-height: 72px; }
nav.custom-navbar .brand-wrapper { gap: 0; }
nav.custom-navbar .logo-img { height: 52px; }
nav.custom-navbar .navbar-navigation { padding: 0; order: 0; flex-basis: auto; }
nav.custom-navbar .navbar-nav { width: 100%; flex-direction: row; }
nav.custom-navbar .navbar-nav .nav-link {
    padding: 8px 16px !important; color: rgba(255,255,255,.78) !important;
    font-size: 17px; font-weight: 500; letter-spacing: 0; line-height: 1.85;
}
nav.custom-navbar .navbar-nav .anchor-navbar-login { color: #ffb31a !important; margin: 0; }
nav.custom-navbar .navbar-nav .nav-link:hover,
nav.custom-navbar .navbar-nav .nav-link:focus-visible { color: #fff !important; }
nav.custom-navbar .navbar-toggler { display: none; margin: 0; }
nav.custom-navbar .navbar-toggler-icon { display: block; }
@media (max-width: 991.98px) {
    nav.custom-navbar .navbar-toggler { display: inline-flex; align-items: center; justify-content: center; }
    nav.custom-navbar .navbar-navigation { flex-basis: 100%; }
    nav.custom-navbar .navbar-nav { flex-direction: column; }
    nav.custom-navbar.anchor-nav-enhanced .navbar-nav .nav-link {
        padding: 10px 0 !important; color: #fff !important; font-size: clamp(2rem,9vw,3rem);
        font-weight: 700; line-height: 1.5; white-space: normal;
    }
    nav.custom-navbar.anchor-nav-enhanced .navbar-nav .anchor-navbar-login { width: 100%; color: #ffb31a !important; }
}
@media (max-width: 575.98px) {
    body { padding-top: 64px; }
    body.anchor-home-page { padding-top: 0; }
    nav.custom-navbar { --header-h: 64px; }
    nav.custom-navbar .navbar-content { min-height: 64px; }
    nav.custom-navbar .logo-img { height: 46px; max-height: 46px; max-width: 150px; }
}
