/* =========================================================================
 * MeiG 官网内页通用外壳（导航 Logo 区 + 页面顶栏装饰）
 * ========================================================================= */

/* 旧版横向菜单：左侧留 Logo 位 */
.topmenu--legacy,
.topmenu:has(.menu.menumain) {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    min-height: 64px !important;
    height: auto !important;
    padding: 8px 24px 8px 210px !important;
    box-sizing: border-box !important;
    background-image: none !important;
}

.topmenu--legacy .meig-legacy-brand,
.topmenu:has(.menu.menumain) .meig-legacy-brand {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
}

.topmenu--legacy .menu.menumain,
.topmenu:has(.menu.menumain) .menu.menumain {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.topmenu--legacy .menu_im,
.topmenu:has(.menu.menumain) .menu_im {
    display: none !important;
}

.topmenu--legacy .language,
.topmenu:has(.menu.menumain) .language {
    margin-left: auto;
    padding-right: 8px;
}

.topmenu--legacy .language a,
.topmenu:has(.menu.menumain) .language a {
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.topmenu--legacy .menu > li > a,
.topmenu:has(.menu.menumain) .menu > li > a {
    color: rgba(255, 255, 255, 0.88) !important;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.topmenu--legacy .menu > li > a:hover,
.topmenu:has(.menu.menumain) .menu > li > a:hover {
    color: #fff !important;
}

/* 内页顶部装饰条（非首页） */
body.meig-site .middle_div,
body.meig-site .mainmodule {
    background: var(--meig-bg, #f5f6f8);
}

body.meig-site .developer-title {
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.06), rgba(255, 255, 255, 0.9));
    border: 1px solid var(--meig-border, #e6e8ec);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

body.meig-site .developer-title a {
    color: var(--meig-red, #c8102e) !important;
    font-weight: 500;
}

body.meig-site .developer-title a:hover {
    color: var(--meig-red-dark, #a40d24) !important;
}

@media (max-width: 992px) {
    .topmenu--legacy,
    .topmenu:has(.menu.menumain) {
        padding-left: 16px !important;
        padding-top: 52px !important;
        flex-wrap: wrap;
    }
    .topmenu--legacy .meig-legacy-brand,
    .topmenu:has(.menu.menumain) .meig-legacy-brand {
        left: 16px;
        top: 14px;
        transform: none;
    }
}
