/* ==============================================================================
   TAYYAR FLOATING CYBERNETIC COMMAND DOCK & MOBILE COMMAND DRAWER
   ============================================================================== */

.site-header {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    width: 100%;
    z-index: var(--z-header);
    padding-block-start: 0;
    padding-inline: 0;
    transition: padding 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header.is-scrolled {
    padding-block-start: 14px;
    padding-inline: 16px;
}

.nav-dock-shell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    height: var(--header-height);
    margin-inline: auto;
    padding-inline: max(24px, calc((100vw - var(--container-max)) / 2 + 24px));
    background: rgba(9, 14, 26, 0.42);
    backdrop-filter: blur(20px) saturate(175%);
    -webkit-backdrop-filter: blur(20px) saturate(175%);
    border: 1px solid transparent;
    border-block-end-color: rgba(255, 255, 255, 0.07);
    border-radius: 0;
    overflow: hidden;
    transition:
        max-width 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        height 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        padding-inline 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        border-radius 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.site-header.is-scrolled .nav-dock-shell {
    max-width: 1220px;
    height: 68px;
    padding-inline: 22px;
    border-radius: 18px;
    background: rgba(9, 14, 26, 0.48);
    backdrop-filter: blur(22px) saturate(185%);
    -webkit-backdrop-filter: blur(22px) saturate(185%);
    border: 1px solid rgba(34, 211, 238, 0.22);
    box-shadow:
        0 14px 36px rgba(2, 6, 15, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

/* Telemetry Scroll Progress Line */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #0284c7, #06b6d4, #22d3ee);
    z-index: 9999;
    transform-origin: 0% 50%;
    transform: scaleX(0);
    will-change: transform;
    pointer-events: none;
}

[dir="rtl"] .scroll-progress-bar {
    transform-origin: 100% 50%;
}

.nav-telemetry-track {
    position: absolute;
    inset-block-end: 0;
    inset-inline: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
    z-index: 4;
}

.nav-telemetry-fill {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: 0% 50%;
    transform: scaleX(0);
    will-change: transform;
    background: linear-gradient(90deg, #0284c7, #06b6d4, #22d3ee, #67e8f9);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.85);
}

[dir="rtl"] .nav-telemetry-fill {
    transform-origin: 100% 50%;
}

/* Brand Identity */
.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    user-select: none;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.brand-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.35));
}

.brand-text-wrap {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-arabic-heading);
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    white-space: nowrap;
}

.brand-sub {
    font-size: 0.66rem;
    color: #22d3ee;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Desktop Navigation & Gliding Laser Pill */
.desktop-nav {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 42px;
    gap: 4px;
    padding: 3px;
    border-radius: var(--radius-full);
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.nav-laser-pill {
    position: absolute;
    left: 0;
    inset-block: 3px;
    width: 0;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(2, 132, 199, 0.34));
    border: 1px solid rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.24), inset 0 1px 0 rgba(103, 232, 249, 0.24);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.desktop-nav .nav-link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 0.86rem;
    font-weight: 700;
    color: #94a3b8;
    padding-block: 0;
    padding-inline: 14px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: color 0.22s ease;
}

.desktop-nav .nav-link:hover,
.desktop-nav .nav-link.is-active {
    color: #f0f9ff;
}

/* Header Controls: Unified 42px Oceanic Cyan Glass Switcher & CTA */
.header-actions {
    display: inline-flex;
    align-items: center;
    height: 42px;
    gap: 10px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.lang-switcher-group {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 42px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    padding: 3px;
    gap: 2px;
}

.lang-gliding-pill {
    position: absolute;
    left: 0;
    inset-block: 3px;
    width: 0;
    border-radius: 9px;
    background: rgba(6, 182, 212, 0.18);
    border: 1px solid rgba(34, 211, 238, 0.52);
    pointer-events: none;
    z-index: 1;
}

.btn-lang-pill {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding-block: 0;
    padding-inline: 11px;
    border-radius: 9px;
    background: transparent;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    white-space: nowrap;
    transition: color 0.22s ease;
}

.btn-lang-pill:hover {
    color: #f8fafc;
}

.btn-lang-pill.active {
    background: transparent;
    color: #ffffff;
}

.btn-nav-emerald {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding-block: 0;
    padding-inline: 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(2, 132, 199, 0.34));
    border: 1px solid rgba(34, 211, 238, 0.65);
    box-shadow: 0 8px 22px rgba(2, 132, 199, 0.36), inset 0 1px 0 rgba(103, 232, 249, 0.28);
    color: #f0f9ff;
    font-size: 0.85rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.btn-nav-emerald::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: -100%;
    width: 65%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
    transform: skewX(-22deg);
    transition: inset-inline-start 0.6s ease;
    pointer-events: none;
}

.btn-nav-emerald:hover::after {
    inset-inline-start: 145%;
}

.btn-nav-emerald:hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.34), rgba(2, 132, 199, 0.48));
    border-color: #67e8f9;
    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

/* Strictly Hide Mobile Controls on Desktop */
@media (min-width: 1201px) {

    .btn-mobile-toggle,
    .mobile-nav-backdrop,
    .mobile-nav-drawer {
        display: none !important;
    }
}

/* Tablet & Mobile Command Drawer (<= 1200px) */
@media (max-width: 1200px) {

    .desktop-nav,
    .header-cta-btn {
        display: none;
    }

    .header-actions {
        display: contents;
    }

    .btn-mobile-toggle {
        order: -1;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 42px;
        height: 42px;
        border-radius: var(--radius-sm);
        background: rgba(15, 23, 42, 0.55);
        border: 1px solid rgba(34, 211, 238, 0.32);
        color: #f0f9ff;
        flex-shrink: 0;
        position: relative;
        z-index: 2;
    }

    .lang-switcher-group {
        position: relative;
        z-index: 2;
    }

    .toggle-bar {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 2px;
        background: #67e8f9;
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, width 0.2s ease;
    }

    .toggle-bar-mid {
        width: 13px;
    }

    .btn-mobile-toggle.open .toggle-bar-top {
        transform: translateY(7px) rotate(45deg);
    }

    .btn-mobile-toggle.open .toggle-bar-mid {
        opacity: 0;
        width: 0;
    }

    .btn-mobile-toggle.open .toggle-bar-bot {
        transform: translateY(-7px) rotate(-45deg);
    }

    .mobile-nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(3, 6, 13, 0.78);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: var(--z-backdrop);
    }

    .mobile-nav-backdrop.active {
        display: block;
    }

    .mobile-nav-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        width: min(320px, 85vw);
        height: 100dvh;
        background: linear-gradient(170deg, rgba(10, 18, 32, 0.97), rgba(6, 11, 20, 0.99));
        backdrop-filter: blur(22px);
        -webkit-backdrop-filter: blur(22px);
        border-inline-end: 1px solid rgba(34, 211, 238, 0.32);
        box-shadow: 16px 0 48px rgba(0, 0, 0, 0.85);
        z-index: var(--z-drawer);
        padding-block: 22px 28px;
        padding-inline: 22px;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.34s ease;
    }

    [dir="rtl"] .mobile-nav-drawer {
        transform: translateX(105%);
        box-shadow: -16px 0 48px rgba(0, 0, 0, 0.85);
    }

    [dir="ltr"] .mobile-nav-drawer {
        transform: translateX(-105%);
    }

    .mobile-nav-drawer.open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-block-end: 16px;
        margin-block-end: 16px;
        border-block-end: 1px solid rgba(255, 255, 255, 0.08);
    }

    .btn-drawer-close {
        width: 36px;
        height: 36px;
        border-radius: var(--radius-sm);
        background: rgba(19, 31, 51, 0.85);
        border: 1px solid rgba(34, 211, 238, 0.28);
        color: #67e8f9;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-drawer-links {
        display: flex;
        flex-direction: column;
        gap: 6px;
        flex-grow: 1;
    }

    .mobile-drawer-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-block: 12px;
        padding-inline: 14px;
        border-radius: var(--radius-sm);
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-slate);
        border: 1px solid transparent;
        transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

    .mobile-drawer-link:hover,
    .mobile-drawer-link.is-active {
        background: rgba(6, 182, 212, 0.16);
        border-color: rgba(34, 211, 238, 0.35);
        color: #67e8f9;
    }

    .mobile-drawer-footer {
        padding-block-start: 16px;
        border-block-start: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mobile-drawer-cta {
        width: 100%;
        padding-block: 13px;
        font-size: 0.94rem;
    }
}









@media (max-width: 600px) {
    .site-header.is-scrolled {
        padding-block-start: 10px;
        padding-inline: 10px;
    }

    .site-header.is-scrolled .nav-dock-shell {
        height: 62px;
        padding-inline: 14px;
        border-radius: 15px;
    }

    .nav-dock-shell {
        padding-inline: 14px;
        gap: 8px;
    }

    .brand-logo-img {
        width: 32px;
        height: 32px;
    }

    .brand-name {
        font-size: 1.04rem;
    }
}

@media (max-width: 480px) {
    .brand-sub {
        display: none;
    }

    .btn-lang-pill {
        padding-block: 4px;
        padding-inline: 8px;
        font-size: 0.72rem;
    }

    .mobile-nav-drawer {
        width: min(275px, 80vw);
        padding-block: 16px 20px;
        padding-inline: 16px;
    }

    .mobile-drawer-header {
        padding-block-end: 12px;
        margin-block-end: 12px;
    }

    .mobile-drawer-header .brand-name {
        font-size: 0.96rem;
    }

    .btn-drawer-close {
        width: 32px;
        height: 32px;
    }

    .mobile-drawer-links {
        gap: 4px;
    }

    .mobile-drawer-link {
        padding-block: 9px;
        padding-inline: 12px;
        font-size: 0.85rem;
    }

    .mobile-drawer-footer {
        padding-block-start: 12px;
    }

    .mobile-drawer-cta {
        padding-block: 10px;
        font-size: 0.84rem;
    }
}