header.nav {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 200;
    padding-block: 24px;
    transition:
        background .4s var(--ease),
        padding .4s var(--ease),
        border-color .4s;
    border-bottom: 1px solid transparent;
}

header.nav.scrolled {
    background: var(--nav-scrim);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding-block: 14px;
    border-color: var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo svg {
    width: 32px;
    height: 32px;
}

.logo-mark-d,
.logo-mark-v {
    stroke: var(--cyan);
}

.dynamic-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-word {
    font-weight: 800;
    font-size:16px;
    letter-spacing: .01em;
    color: var(--ink-0);
    white-space: nowrap;
}

.logo-word span {
    color: var(--cyan);
}

.links {
    display: flex;
    align-items: center;
    gap: 36px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.links li {
    padding: 0;
    margin: 0;
}

.links a {
    font-size:16px;
    color: var(--ink-1);
    position: relative;
    padding-block: 4px;
    text-decoration: none;
    transition: color .2s;
}

.links a::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    inset-inline-end: 100%;
    bottom: -2px;
    height: 1px;
    background: var(--cyan);
    transition: inset-inline-end .3s var(--ease);
}

.links a:hover,
.links a.active {
    color: var(--ink-0);
}

.links a:hover::after,
.links a.active::after {
    inset-inline-end: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: inherit;
    font-size:16px;
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    padding: 4px;
}

.lang-switch button {
    background: none;
    border: none;
    color: var(--ink-2);
    padding: 5px 11px;
    border-radius: 16px;
    font-size:16px;
    font-family: inherit;
    cursor: pointer;
    transition: .2s ease;
}

.lang-switch button.active {
    background: var(--blue-btn);
    color: #fff;
}

.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--ink-1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .25s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--ink-0);
    border-color: var(--cyan);
}

.theme-toggle svg {
    width: 17px;
    height: 17px;
}

.btn-nav {
    padding: 10px 20px;
    font-size:16px;
    white-space: nowrap;
}

 .menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(8, 123, 255, .72);
    background: rgba(8, 123, 255, .08);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    z-index: 410;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(8, 123, 255, .04), 0 0 18px rgba(8, 123, 255, .08);
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease, transform .25s ease;
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
    border-color: var(--blue);
    background: rgba(8, 123, 255, .15);
    box-shadow: 0 0 22px rgba(8, 123, 255, .18);
}

.menu-toggle:active {
    transform: scale(.96);
}

.menu-toggle span {
    display: block;
    width: 21px;
    height: 2px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #fff;
    transform-origin: center;
    transition: transform .34s var(--ease), opacity .22s ease, width .34s var(--ease), background-color .25s ease;
}

.menu-toggle span:nth-child(2) {
    width: 15px;
    align-self: center;
}

.menu-toggle:hover span,
.menu-toggle:focus-visible span {
    background: var(--cyan);
}

.menu-toggle.active {
    border-color: var(--blue);
    background: rgba(8, 123, 255, .14);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 190;
    background: var(--bg-0);
    padding: 104px 24px 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition:
        opacity .3s var(--ease),
        transform .3s var(--ease),
        visibility .3s;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.mobile-menu ul {
    list-style: none;
    margin: 35px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.mobile-menu ul li {
    border-bottom: 1px solid var(--line);
}

.mobile-menu ul a {
    display: block;
    padding: 18px 0;
    font-size:22px;
    font-weight: 600;
    color: var(--ink-0);
    text-decoration: none;
}

.mobile-menu-tools {
    display:flex;
    flex-direction:column;
    gap:12px;
    width:100%;
    margin-top:auto;
    padding-top:22px;
    border-top:1px solid var(--line);
}

.mobile-menu-tool-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    min-height:58px;
    padding:10px 12px;
    border:1px solid var(--line);
    border-radius:var(--radius-s);
    background:rgba(255,255,255,.015);
}

.mobile-menu-tool-label{
    font-size:16px;
    font-weight:600;
    color:var(--ink-1);
}

.mobile-lang-switch{
    flex-shrink:0;
}

.mm-theme-toggle {
    margin:0;
    width:auto;
    min-width:142px;
    min-height:42px;
    padding:9px 14px;
    border-radius:999px;
    border:1px solid var(--line-strong);
    background:transparent;
    color:var(--ink-1);
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    cursor:pointer;
    transition:border-color .25s ease,background .25s ease,color .25s ease;
}

.mm-theme-toggle:hover,
.mm-theme-toggle:focus-visible{
    border-color:var(--blue);
    background:rgba(8,123,255,.10);
    color:var(--ink-0);
}

.mm-theme-toggle svg {
    width:18px;
    height:18px;
    flex-shrink:0;
}

.mm-theme-toggle span{
    font-size:16px;
    font-weight:600;
    white-space:nowrap;
}

.mobile-cta {
    justify-content:center;
    width:100%;
    margin-top:14px;
}

body.menu-open {
    overflow:hidden;
}

html[dir="rtl"] .links {
    direction:rtl;
}

html[dir="rtl"] .nav-inner,
html[dir="rtl"] .mobile-menu {
    font-family:var(--font-ar);
}

html[dir="rtl"] .mobile-menu ul {
    text-align:right;
}

html[dir="rtl"] .mobile-menu-tool-row{
    direction:rtl;
}


@media (max-width:480px){
    .mobile-menu{
        padding-inline:18px;
        padding-bottom:20px;
    }

    .mobile-menu ul{
        margin:24px 0;
    }

    .mobile-menu ul a{
        padding:15px 0;
        font-size:20px;
    }

    .mobile-menu-tool-row{
        min-height:54px;
        padding:8px 10px;
    }

    .mm-theme-toggle{
        min-width:132px;
        padding-inline:12px;
    }
}

/* FINAL FIX — transparent fixed header over page hero videos */
body.page-video-under-header header.nav:not(.scrolled){
    background:transparent!important;
    border-bottom-color:transparent!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
}
