

.nav-wrapper {
    position: fixed;
    top: 24px;
    inset-inline: 0;
    display: flex;
    justify-content: center;
    z-index: 1000;
    padding: 0 clamp(16px, 4vw, 32px);
    pointer-events: none;
}

.nav-wrapper > * { pointer-events: auto; }

.site-nav {
    background: var(--nav-bg);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 12px 12px 32px;
    width: 100%;
    max-width: 1320px;
    box-shadow: var(--card-shadow);
    transition: background var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}

html[dir="rtl"] .site-nav {
    padding: 12px 32px 12px 12px;
}

.site-nav.scrolled {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.logo {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.04em;
    flex-shrink: 0;
}

.logo span {
    color: var(--chartreuse);
    font-size: 2rem;
    line-height: 0;
}

/* ── younex brand logo (image, theme-swapped) ─────────────────────────────
   Two <img> versions live in the DOM; CSS shows the one that reads on the
   current surface. Navy wordmark on light nav, light wordmark on dark nav. */
.brand-logo { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo-img { height: 42px; width: auto; display: block; }
.brand-logo--light { display: none; }
html[data-theme="dark"] .brand-logo--dark { display: none; }
html[data-theme="dark"] .brand-logo--light { display: inline-block; }
.drawer-logo .brand-logo-img { height: 34px; }
.site-footer .brand-logo-img { height: 40px; }

.nav-links {
    display: flex;
    gap: clamp(20px, 2.5vw, 36px);
    margin-inline-start: auto;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    position: relative;
    padding: 8px 0;
    white-space: nowrap;
}

html[lang="ar"] .nav-links a {
    letter-spacing: 0;
    font-size: 0.95rem;
    text-transform: none;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    inset-inline-start: 0;
    background-color: var(--chartreuse);
    transition: width var(--t-med) var(--ease);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle,
.lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text);
    background: transparent;
    transition: all var(--t-fast) var(--ease);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.theme-toggle:hover,
.lang-toggle:hover {
    background: var(--chartreuse);
    color: var(--black);
    border-color: var(--chartreuse);
    transform: translateY(-1px);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

html[data-theme="light"] .theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.nav-portal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text);
    transition: all var(--t-fast) var(--ease);
}

html[lang="ar"] .nav-portal {
    text-transform: none;
    font-size: 0.85rem;
    letter-spacing: 0;
}

.nav-portal:hover {
    border-color: var(--chartreuse);
    color: var(--chartreuse);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin-inline-start: auto;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    transition: all var(--t-fast) var(--ease);
}

@media (max-width: 1100px) {
    .nav-links .long { display: none; }
    .nav-portal span { display: none; }
    .nav-portal { padding: 10px; }
}

@media (max-width: 960px) {
    .nav-toggle { display: flex; }
    /* The desktop nav-links is fully hidden on mobile — the drawer takes over */
    .nav-links { display: none !important; }
    .nav-actions .lang-toggle,
    .nav-actions .nav-portal,
    .nav-actions .theme-toggle,
    .nav-actions .btn-sm { display: none !important; }
    .nav-actions { margin-inline-start: auto; }
    .site-nav { padding: 12px 16px 12px 24px; }
    html[dir="rtl"] .site-nav { padding: 12px 24px 12px 16px; }
}

@media (max-width: 640px) {
    .nav-wrapper { top: 16px; }
}

/* ═══════════════════════════════════════════════════════════════
   PREMIUM MOBILE DRAWER
   Slides in from the inset-end (right in RTL, left in LTR) with a
   blurred backdrop. Hidden on desktop.
   ═══════════════════════════════════════════════════════════════ */
.drawer-backdrop, .mobile-drawer { display: none; }

@media (max-width: 960px) {
    .drawer-backdrop {
        display: block;
        position: fixed; inset: 0;
        background: rgba(8, 8, 8, 0.55);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .35s ease;
        z-index: 9998;
    }
    .drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

    .mobile-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        inset-inline-end: 0;
        width: 85vw;
        max-width: 380px;
        height: 100dvh;
        height: 100vh;
        background:
            radial-gradient(120% 80% at 0% 0%, rgba(201, 162, 75,0.08) 0%, transparent 50%),
            linear-gradient(165deg, #0e0e0e 0%, #050505 100%);
        color: #F4F4F4;
        box-shadow: -30px 0 80px -20px rgba(0,0,0,.65);
        border-inline-start: 1px solid rgba(201, 162, 75,0.18);
        transform: translateX(100%);
        transition: transform .42s cubic-bezier(.22, 1, .36, 1);
        z-index: 9999;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 22px 0 16px;
    }
    html[dir="rtl"] .mobile-drawer { transform: translateX(-100%); }
    html[dir="ltr"] .mobile-drawer { transform: translateX(100%); }
    .mobile-drawer.is-open { transform: translateX(0) !important; }

    /* Subtle ambient glow */
    .mobile-drawer::before {
        content: '';
        position: absolute;
        inset-inline-start: 0;
        top: 0;
        bottom: 0;
        width: 1px;
        background: linear-gradient(180deg, transparent, rgba(201, 162, 75,0.55), transparent);
        pointer-events: none;
    }

    .drawer-head {
        display: flex; align-items: center; justify-content: space-between;
        padding: 6px 22px 18px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        margin-bottom: 14px;
    }
    .drawer-logo {
        font-family: var(--font-head, 'Montserrat', sans-serif);
        font-size: 1.6rem;
        font-weight: 900;
        color: #fff;
        text-decoration: none;
        letter-spacing: -0.02em;
    }
    .drawer-logo span {
        color: #C9A24B;
        margin-inline-start: 1px;
    }
    .drawer-close {
        width: 38px; height: 38px;
        border-radius: 50%;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.10);
        color: #fff;
        cursor: pointer;
        display: inline-flex; align-items: center; justify-content: center;
        transition: background .2s, transform .15s;
    }
    .drawer-close:hover {
        background: rgba(201, 162, 75,0.18);
        color: #C9A24B;
        transform: rotate(90deg);
    }

    .drawer-nav {
        display: flex; flex-direction: column;
        padding: 4px 14px;
        gap: 2px;
    }
    .drawer-link {
        display: flex; align-items: center; gap: 14px;
        padding: 14px 14px;
        border-radius: 12px;
        color: rgba(244,244,244,0.85);
        font-size: 1rem;
        font-weight: 600;
        text-decoration: none;
        transition: background .25s ease, color .25s ease, transform .25s ease;
        position: relative;
        opacity: 0;
        transform: translateX(20px);
    }
    html[dir="ltr"] .drawer-link { transform: translateX(-20px); }
    .mobile-drawer.is-open .drawer-link {
        animation: drawerLinkIn .5s ease forwards;
        animation-delay: calc(80ms + var(--i, 0) * 60ms);
    }
    @keyframes drawerLinkIn {
        to { opacity: 1; transform: translateX(0); }
    }

    .drawer-link-glyph {
        width: 36px; height: 36px;
        border-radius: 10px;
        background: rgba(201, 162, 75,0.10);
        border: 1px solid rgba(201, 162, 75,0.20);
        color: #C9A24B;
        display: inline-flex; align-items: center; justify-content: center;
        font-size: 0.95rem;
        flex-shrink: 0;
        transition: background .25s, transform .25s;
    }
    .drawer-link-label { flex: 1; }
    .drawer-link-arrow {
        opacity: 0;
        color: #C9A24B;
        transform: translateX(-6px);
        transition: opacity .25s, transform .25s;
    }
    html[dir="ltr"] .drawer-link-arrow { transform: translateX(6px); }

    .drawer-link:hover, .drawer-link.is-active {
        background: linear-gradient(90deg, rgba(201, 162, 75,0.10), rgba(201, 162, 75,0.02));
        color: #fff;
    }
    html[dir="ltr"] .drawer-link:hover, html[dir="ltr"] .drawer-link.is-active {
        background: linear-gradient(270deg, rgba(201, 162, 75,0.10), rgba(201, 162, 75,0.02));
    }
    .drawer-link:hover .drawer-link-glyph,
    .drawer-link.is-active .drawer-link-glyph {
        background: rgba(201, 162, 75,0.22);
        transform: scale(1.05);
    }
    .drawer-link:hover .drawer-link-arrow,
    .drawer-link.is-active .drawer-link-arrow {
        opacity: 1;
        transform: translateX(0);
    }
    .drawer-link.is-active {
        background: linear-gradient(90deg, rgba(201, 162, 75,0.18), rgba(201, 162, 75,0.04));
    }
    .drawer-link.is-active::before {
        content: '';
        position: absolute;
        inset-inline-start: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px; height: 50%;
        background: #C9A24B;
        border-radius: 0 4px 4px 0;
    }
    html[dir="ltr"] .drawer-link.is-active::before { border-radius: 0 4px 4px 0; }
    html[dir="rtl"] .drawer-link.is-active::before { border-radius: 4px 0 0 4px; }

    .drawer-cta-block {
        margin: 18px 18px 14px;
        padding: 16px;
        background: linear-gradient(135deg, rgba(201, 162, 75,0.06), rgba(255,255,255,0.02));
        border: 1px solid rgba(201, 162, 75,0.20);
        border-radius: 16px;
        display: flex; flex-direction: column; gap: 10px;
    }
    .drawer-cta-block .btn { width: 100%; justify-content: center; font-weight: 700; }
    .drawer-cta-block .btn-primary { background: #C9A24B; color: #0a0a0a; border: 0; }
    .drawer-cta-block .btn-primary:hover { background: #d3e542; transform: translateY(-1px); }
    .drawer-cta-block .btn-ghost {
        background: transparent;
        color: #F4F4F4;
        border: 1px solid rgba(255,255,255,0.18);
    }
    .drawer-cta-block .btn-ghost:hover {
        background: rgba(37, 211, 102, 0.12);
        border-color: rgba(37, 211, 102, 0.45);
        color: #25D366;
    }
    .drawer-wa {
        display: inline-flex !important;
        align-items: center;
        gap: 10px;
        text-align: start;
        padding-block: 10px !important;
    }
    .drawer-wa-text {
        display: flex; flex-direction: column;
        align-items: flex-start;
        line-height: 1.2;
        gap: 2px;
    }
    .drawer-wa-label {
        font-size: .92rem;
        font-weight: 700;
    }
    .drawer-wa-number {
        font-size: .76rem;
        font-weight: 500;
        color: rgba(244,244,244,0.55);
        letter-spacing: .04em;
        font-family: 'Inter', system-ui, sans-serif;
    }
    .drawer-wa:hover .drawer-wa-number {
        color: rgba(37, 211, 102, 0.85);
    }

    .drawer-foot {
        margin-top: auto;
        padding: 16px 18px 6px;
        border-top: 1px solid rgba(255,255,255,0.06);
    }
    .drawer-foot-row {
        display: flex; flex-wrap: wrap; gap: 6px;
        margin-bottom: 14px;
    }
    .drawer-chip {
        flex: 1; min-width: 0;
        display: inline-flex; align-items: center; justify-content: center; gap: 6px;
        padding: 8px 10px;
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 100px;
        color: rgba(244,244,244,0.75);
        font-size: 0.78rem;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
        font-family: inherit;
        transition: background .2s, color .2s, border-color .2s;
        white-space: nowrap;
    }
    .drawer-chip:hover {
        background: rgba(201, 162, 75,0.10);
        color: #C9A24B;
        border-color: rgba(201, 162, 75,0.30);
    }
    .drawer-socials {
        display: flex; gap: 10px; justify-content: center;
        margin-bottom: 10px;
    }
    .drawer-socials a {
        width: 34px; height: 34px;
        border-radius: 50%;
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.08);
        color: rgba(244,244,244,0.65);
        display: inline-flex; align-items: center; justify-content: center;
        transition: color .2s, border-color .2s, transform .2s, background .2s;
    }
    .drawer-socials a:hover {
        color: #C9A24B;
        border-color: rgba(201, 162, 75,0.45);
        background: rgba(201, 162, 75,0.08);
        transform: translateY(-2px);
    }
    .drawer-tag {
        text-align: center;
        font-size: 0.72rem;
        color: rgba(244,244,244,0.35);
        margin: 0;
        letter-spacing: 0.5px;
    }

    /* Body scroll lock while drawer is open */
    body.drawer-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-drawer, .drawer-backdrop { transition: none !important; }
    .drawer-link { animation: none !important; opacity: 1 !important; transform: none !important; }
}

.site-footer {
    background: var(--bg-dark);
    color: var(--white);
    padding: 100px 0 18px;
    margin-top: 80px;
}

.site-footer .logo { color: var(--white); }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-brand { max-width: 360px; }
.footer-brand p {
    color: #e8e8e8;
    margin: 20px 0 32px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--white);
    transition: all var(--t-fast) var(--ease);
}

.footer-socials a:hover {
    background: var(--chartreuse);
    color: var(--black);
    border-color: var(--chartreuse);
    transform: translateY(-2px);
}

.footer-col h3,
.footer-col h4,
.footer-col .footer-h {
    color: var(--white);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
    font-weight: 700;
}

html[lang="ar"] .footer-col h3,
html[lang="ar"] .footer-col h4,
html[lang="ar"] .footer-col .footer-h {
    text-transform: none;
    letter-spacing: 0;
    font-size: 1rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    color: #e8e8e8;
    font-size: 0.9rem;
    transition: color var(--t-fast) var(--ease);
}

.footer-col a:hover { color: var(--chartreuse); }
.footer-col li { color: #e8e8e8; font-size: 0.9rem; }

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    /* Explicit high-contrast color for AA pass on the dark footer bg */
    color: #e8e8e8;
    font-size: 0.85rem;
}
.footer-bottom p { color: #e8e8e8; }

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a { color: #f0f0f0; }
.footer-legal a:hover { color: var(--chartreuse); }

.powered-by {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.powered-by.powered-by-inline {
    margin: 0;
    padding: 0;
}
.powered-by .pb-rule {
    flex: 1;
    max-width: 180px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 162, 75, 0.35), transparent);
}
.powered-by .pb-label {
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: #e0e0e0;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
    white-space: nowrap;
}
html[lang="ar"] .powered-by .pb-label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.85rem;
}
.powered-by .pb-brand {
    font-family: var(--font-head);
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--white);
    letter-spacing: -0.025em;
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
}
.powered-by .pb-brand em {
    color: var(--chartreuse);
    font-size: 1.5em;
    line-height: 0;
    font-style: normal;
    animation: pb-pulse 2.4s ease-in-out infinite;
}
@keyframes pb-pulse {
    0%, 100% { opacity: 1; transform: translateY(-1px) scale(1); }
    50%      { opacity: 0.55; transform: translateY(-1px) scale(0.82); }
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    .footer-brand { grid-column: 1 / -1; max-width: none; }
}

@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .powered-by { gap: 6px; }
    .powered-by .pb-label { font-size: 0.64rem; letter-spacing: 2px; }
    html[lang="ar"] .powered-by .pb-label { font-size: 0.78rem; }
    .powered-by .pb-brand { font-size: 1rem; }
}
