/* Function mega menu shared by the homepage and inner pages. */
#nav #navtop6 {
    display: none;
}

#nav .wx-function-nav {
    position: relative;
    z-index: 1010;
    transform: none !important;
}

#nav .wx-function-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 100%;
    color: inherit;
}

.wx-function-caret {
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform .22s ease, margin .22s ease;
}

.wx-function-nav:hover .wx-function-caret,
.wx-function-nav:focus-within .wx-function-caret {
    margin-top: 4px;
    transform: rotate(225deg);
}

#nav .wx-function-mega {
    position: fixed;
    top: 76px;
    right: max(16px, calc((100vw - 1280px) / 2));
    left: max(16px, calc((100vw - 1280px) / 2));
    z-index: 1009;
    min-height: 492px;
    padding: 24px 30px 30px;
    overflow: hidden;
    border: 1px solid #dce8fb;
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(135deg, #f2f7ff 0%, #e4efff 100%);
    line-height: 1.5;
    text-align: left;
    box-shadow: 0 24px 60px rgba(18, 52, 105, .18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transform-origin: center top;
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}

#nav .wx-function-nav:hover .wx-function-mega,
#nav .wx-function-nav:focus-within .wx-function-mega {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.wx-function-heading {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 0 4px 18px;
}

.wx-function-heading strong {
    color: #182033;
    font-size: 20px;
    font-weight: 600;
}

.wx-function-heading span {
    color: #7f8ca1;
    font-size: 13px;
}

.wx-function-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

#nav .wx-function-card {
    display: flex;
    min-width: 0;
    height: 130px;
    padding: 16px 13px 14px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(213, 227, 247, .85);
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    color: #182033;
    text-align: center;
    box-shadow: 0 8px 22px rgba(45, 101, 184, .05);
    transition: color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

#nav .wx-function-card:hover {
    color: #2878f5;
    border-color: #b6d2ff;
    background: #fff;
    box-shadow: 0 13px 28px rgba(45, 111, 220, .14);
    transform: translateY(-3px);
}

.wx-function-card .iconfont {
    width: 40px;
    height: 34px;
    margin-bottom: 8px;
    border-radius: 7px;
    color: #2878f5;
    font-size: 28px;
    line-height: 34px;
    text-align: center;
    text-shadow: 9px 5px 0 rgba(40, 120, 245, .12);
}

.wx-function-card strong {
    max-width: 100%;
    overflow: hidden;
    font-size: 16px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wx-function-card span {
    max-width: 100%;
    margin-top: 5px;
    overflow: hidden;
    color: #8792a5;
    font-size: 12px;
    line-height: 19px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    #nav .wx-function-mega {
        right: 18px;
        left: 18px;
        padding-right: 22px;
        padding-left: 22px;
    }

    .wx-function-grid {
        gap: 10px;
    }

    #nav .wx-function-card {
        padding-right: 8px;
        padding-left: 8px;
    }
}

@media (max-width: 980px) {
    #nav .wx-function-nav {
        display: none;
    }
}
