/* 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, #3668de, #6d28d9);
    box-shadow: 0 8px 24px rgba(139, 92, 246, .25), inset 0 1px 0 rgba(255, 255, 255, .3);
    color: #040813;
    border-radius: 10px;
    display: grid;
    place-items: center;
}

.brand-mark svg {
    width: 22px;
    height: 22px;
    display: block;
}

.brand-name {
    color: #e0e0e0;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.5px;
}

.brand-name>span {
    color: #8b5cf6;
    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: #e0e0e0;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: -5px;
    height: 2px;
    border-radius: 2px;
    background: #8b5cf6;
    box-shadow: 0 0 10px rgba(139, 92, 246, .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;
}

.dropdown-trigger svg {
    transition: transform 0.2s ease;
}

.nav-dropdown-wrap:hover .dropdown-trigger,
.dropdown-trigger.active {
    color: #e0e0e0;
}

.nav-dropdown-wrap:hover .dropdown-trigger svg,
.dropdown-trigger.active svg {
    transform: rotate(180deg);
}

.mega-menu {
    display: none;
    position: absolute;
    top: calc(100% + 25px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    background: rgba(15, 20, 28, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 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: 269px;
    z-index: 99999;
}

.mega-menu::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 0;
    width: 100%;
    height: 30px;
    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(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.2);
    color: #e0e0e0;
    transform: translateX(3px);
}

.mega-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b5cf6;
    font-size: 15px;
    flex-shrink: 0;
    transition: background 0.18s, border-color 0.18s;
}

.mega-item:hover .mega-icon {
    background: rgba(139, 92, 246, 0.16);
    border-color: rgba(139, 92, 246, 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: #8b5cf6;
    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% + 24px);
    right: auto;
    top: -10px;
    min-width: 240px;
    background: rgba(15, 20, 28, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    padding: 8px;
    z-index: 999999;
}

.mega-child-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: -30px;
    width: 30px;
    height: 100%;
    background: transparent;
}

.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(139, 92, 246, .35);
    color: #e0e0e0;
    background: rgba(139, 92, 246, .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: #8b5cf6;
    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: #141c29;
    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(139, 92, 246, .1);
    color: #e0e0e0;
}

.lang-option.active {
    color: #8b5cf6;
    background: rgba(139, 92, 246, .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: #8b5cf6;
        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(139, 92, 246, 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;
        transform: none;
    }

    .mega-child-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        background: transparent;
        border: none;
        padding: 5px 0 5px 15px;
    }
}

/* Unified public navbar — matches the homepage/Figma navigation */
.solution-topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    isolation: isolate;
    padding: 0;
    background: rgba(4, 8, 19, 0.92);
    border-bottom: 1px solid rgba(117, 137, 187, 0.16);
    box-shadow: none;
    backdrop-filter: blur(18px);
}

.solution-topbar .solution-nav {
    width: min(1240px, calc(100% - 128px));
    min-height: 66px;
    padding: 0;
}

.solution-topbar .brand img {
    width: 190px !important;
    height: auto !important;
}

.solution-topbar .nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-flow: row nowrap;
    gap: 18px;
}

.solution-topbar .nav-links>a,
.solution-topbar .nav-links .dropdown-trigger {
    padding: 10px 8px;
    color: #b8bdd0;
    background: transparent;
    border: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

.solution-topbar .nav-links>a:hover,
.solution-topbar .nav-links>a.active,
.solution-topbar .nav-links .dropdown-trigger:hover,
.solution-topbar .nav-links .dropdown-trigger.active {
    color: #fff;
    background: transparent;
}

.solution-topbar .nav-links a.active::after {
    display: none;
}

.solution-topbar .lang-btn {
    min-height: 38px;
    padding: 8px 13px;
    color: #d3d7e2;
    background: #0a1020;
    border-color: #1c2741;
}

.solution-topbar .lang-globe {
    color: #c8cfdd;
    stroke: currentColor;
}

.solution-topbar .mega-menu {
    top: calc(100% + 16px);
    right: -168px;
    left: auto;
    z-index: 1100;
    min-width: 391px;
    padding: 20px;
    transform: none;
    background: #0f141c;
    border: 1px solid rgba(126, 79, 255, .24);
    border-radius: 20px;
}

.solution-topbar .mega-menu::before {
    top: -16px;
    height: 16px;
}

.solution-topbar .mega-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.solution-topbar .mega-item {
    color: #aeb6c7;
    text-transform: uppercase;
}

.solution-topbar .mega-all-link {
    color: #aeb6c7;
}

.solution-topbar .mobile-lang-button {
    display: none;
}

@media (max-width: 900px) {
    .solution-topbar {
        padding: 5px 0;
    }

    .solution-topbar .solution-nav {
        position: relative;
        width: min(100% - 48px, 1160px);
        min-height: 58px;
        gap: 8px;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .solution-topbar .brand {
        display: inline-flex !important;
        align-items: center !important;
        flex: 0 1 auto;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .solution-topbar .brand img {
        display: block !important;
        width: 160px !important;
        height: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .solution-topbar .mobile-lang-button {
        display: inline-grid;
        place-items: center;
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        margin-left: auto;
        padding: 0;
        color: #d5d9e5;
        background: #090f1c;
        border: 1px solid #202a40;
        border-radius: 9px;
        cursor: pointer;
    }

    .solution-topbar .mobile-lang-button svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .solution-topbar .menu-toggle {
        display: inline-grid;
        place-items: center;
        flex: 0 0 44px;
        width: 44px !important;
        height: 44px !important;
        margin-left: 0;
        padding: 0 !important;
        color: #9a61ff !important;
        background: #090f1c !important;
        border: 1px solid #202a40 !important;
        border-radius: 10px !important;
        overflow: hidden;
    }

    .solution-topbar .menu-toggle::before,
    .solution-topbar .menu-toggle::after {
        content: none !important;
        display: none !important;
    }

    .solution-topbar .menu-toggle>span {
        display: none !important;
    }

    .solution-topbar .menu-toggle-icon {
        display: block !important;
        width: 23px !important;
        height: 23px !important;
        overflow: visible;
        fill: none !important;
        stroke: currentColor !important;
        stroke-width: 2 !important;
        stroke-linecap: round !important;
    }

    .solution-topbar .menu-line {
        transform-box: fill-box;
        transform-origin: center;
        transition: transform .2s ease, opacity .2s ease;
    }

    .solution-topbar .menu-toggle.is-open .menu-line-top {
        transform: translateY(6px) rotate(45deg);
    }

    .solution-topbar .menu-toggle.is-open .menu-line-middle {
        opacity: 0;
    }

    .solution-topbar .menu-toggle.is-open .menu-line-bottom {
        transform: translateY(-6px) rotate(-45deg);
    }

    .solution-topbar .nav-links {
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        left: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 16px;
        background: rgba(15, 20, 28, .98);
        border: 1px solid rgba(255, 255, 255, .08);
        border-radius: 18px;
        box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);
        transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    }

    .solution-topbar .nav-links.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .solution-topbar .nav-links.language-focus>*:not(.lang-selector) {
        display: none !important;
    }

    .solution-topbar .nav-links.language-focus .lang-btn {
        display: none;
    }

    .solution-topbar .nav-links.language-focus .lang-dropdown {
        position: static;
        display: block;
        width: 100%;
        min-width: 0;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .solution-topbar .nav-links>a,
    .solution-topbar .nav-links .dropdown-trigger,
    .solution-topbar .lang-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 48px;
        padding: 10px 16px;
        color: #cfd6df;
        background: rgba(255, 255, 255, .02);
        border: 1px solid rgba(255, 255, 255, .03);
        border-radius: 12px;
        font-size: 14px;
        font-weight: 700;
    }

    .solution-topbar .nav-dropdown-wrap,
    .solution-topbar .lang-selector {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .solution-topbar .mega-menu {
        position: static;
        display: none;
        width: 100%;
        min-width: 0;
        margin-top: 8px;
        padding: 10px;
        background: rgba(0, 0, 0, .2);
        border: 1px solid rgba(255, 255, 255, .05);
        border-radius: 12px;
        box-shadow: none;
    }

    .solution-topbar .nav-dropdown-wrap.open .mega-menu,
    .solution-topbar .nav-dropdown-wrap:hover .mega-menu {
        display: block;
    }

    .solution-topbar .mega-menu-grid {
        grid-template-columns: 1fr;
    }
}