/* Navbar Structural Styles */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(12, 17, 23, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    box-shadow: 0 12px 36px rgba(0, 0, 0, .3);
    backdrop-filter: blur(12px);
    padding: 5px 0;
}
.wrap {
    width: min(1160px, calc(100% - 36px));
    margin: 0 auto;
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 24px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-weight: 800;
    text-decoration: none;
}
.brand-mark {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #36DEB3, #13b98f);
    box-shadow: 0 8px 24px rgba(57, 225, 182, .25), inset 0 1px 0 rgba(255, 255, 255, .3);
    color: #04130f;
    border-radius: 10px;
    display: grid;
    place-items: center;
}
.brand-mark svg {
    width: 22px;
    height: 22px;
    display: block;
}
.brand-name {
    color: #fff;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.5px;
}
.brand-name > span {
    color: #39e1b6;
    font-weight: 800;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav-links a {
    padding: 10px 13px;
    border-radius: 8px;
    color: #a0aaba;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color .2s;
    text-decoration: none;
    position: relative;
}
.nav-links a.active, .nav-links a:hover {
    color: #fff;
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: -5px;
    height: 2px;
    border-radius: 2px;
    background: #39e1b6;
    box-shadow: 0 0 10px rgba(57, 225, 182, .5);
}

/* Mega Menu Dropdown */
.nav-dropdown-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.dropdown-trigger {
    color: #a0aaba;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color .2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.nav-dropdown-wrap:hover .dropdown-trigger, .dropdown-trigger.active {
    color: #fff;
}
.mega-menu {
    display: none;
    position: absolute;
    top: calc(100% + 16px);
    right: -20px;
    left: auto;
    transform: none;
    background: rgba(15, 20, 28, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(57, 225, 182, 0.15);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
    padding: 20px;
    min-width: 380px;
    z-index: 99999;
}
.mega-menu::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    width: 100%;
    height: 16px;
    background: transparent;
}
.nav-dropdown-wrap:hover .mega-menu {
    display: block;
}
.mega-menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 12px;
}
.mega-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #c3cad5;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.18s ease;
    border: 1px solid transparent;
}
.mega-item:hover {
    background: rgba(57, 225, 182, 0.08);
    border-color: rgba(57, 225, 182, 0.2);
    color: #fff;
    transform: translateX(3px);
}
.mega-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(57, 225, 182, 0.08);
    border: 1px solid rgba(57, 225, 182, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #39e1b6;
    font-size: 15px;
    flex-shrink: 0;
    transition: background 0.18s, border-color 0.18s;
}
.mega-item:hover .mega-icon {
    background: rgba(57, 225, 182, 0.16);
    border-color: rgba(57, 225, 182, 0.35);
}
.mega-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
    text-align: center;
}
.mega-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #39e1b6;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: gap 0.2s;
}
.mega-all-link:hover {
    gap: 10px;
}

/* Sub-Platform Child Menu */
.mega-parent-wrap {
    position: relative;
}
.mega-child-menu {
    display: none;
    position: absolute;
    left: calc(100% + 8px);
    right: auto;
    top: 0;
    min-width: 240px;
    background: rgba(15, 20, 28, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(57, 225, 182, 0.15);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    padding: 8px;
    z-index: 999999;
}
.mega-parent-wrap.has-kids:hover .mega-child-menu {
    display: block;
}
.mega-child-item {
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 12px;
}
.mega-child-item .mega-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-radius: 8px;
}

/* Language Selector */
.lang-selector {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .06);
    color: #c3cad5;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.lang-btn:hover {
    border-color: rgba(57, 225, 182, .35);
    color: #fff;
    background: rgba(57, 225, 182, .08);
}
.lang-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s;
}
.lang-selector.open .lang-btn svg {
    transform: rotate(180deg);
}
.lang-globe {
    width: 16px;
    height: 16px;
    stroke: #39e1b6;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 190px;
    background: #111823;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .05);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease;
    z-index: 99;
}
.lang-selector.open .lang-dropdown {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}
.lang-dropdown-inner {
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .1) transparent;
}
.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #c3cad5;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.lang-option:hover {
    background: rgba(57, 225, 182, .1);
    color: #fff;
}
.lang-option.active {
    color: #39e1b6;
    background: rgba(57, 225, 182, .08);
}
.lang-option .lang-flag {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

/* Mobile Responsive */
.menu-toggle {
    display: none;
}
@media (max-width: 900px) {
    .menu-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
        width: 44px;
        height: 44px;
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 12px;
        color: #39e1b6;
        background: rgba(255, 255, 255, 0.03);
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transition: background 0.2s, border-color 0.2s;
        gap: 5px;
    }
    .menu-toggle:active {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(57, 225, 182, 0.3);
    }
    .menu-toggle span, .menu-toggle::before, .menu-toggle::after {
        content: '';
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform .2s ease, opacity .2s ease;
    }
    .menu-toggle.is-open span {
        opacity: 0;
    }
    .menu-toggle.is-open::before {
        transform: translateY(7px) rotate(45deg);
    }
    .menu-toggle.is-open::after {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(13, 18, 25, 0.98);
        border-bottom: 1px solid rgba(255,255,255,0.06);
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 12px;
        z-index: 9999;
    }
    .nav-links.is-open {
        display: flex;
    }
    .nav-dropdown-wrap {
        flex-direction: column;
        align-items: stretch;
    }
    .mega-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        background: transparent;
        border: none;
        padding: 10px 0;
    }
    .mega-child-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        background: transparent;
        border: none;
        padding: 5px 0 5px 15px;
    }
}
