/* 基础重置与全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--theme-font);
}

/* 下拉菜单基础样式 */
.header .nav-item .dropdown-menu {
    transition: all 0.5s ease;
    border: none; /* 移除默认边框 */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* 增加阴影提升质感 */
}

.header .nav-item .dropdown-menu .dropdown-item {
    font-size: 15px;
    border: none; /* 移除默认边框 */
}

.header .nav-item .dropdown-menu .dropdown-item:focus {
    background: none;
    color: inherit;
    outline: none; /* 移除聚焦轮廓 */
}

/* 巨型菜单核心样式 */
.header .menubar .dropdown-menu.mega-menu {
    width: max-content;
    padding: 0;
    margin: 0;
    border-radius: 0.375rem; /* 统一圆角 */
}

/* 响应式 - 小屏幕适配 */
@media (max-width: 992px) {
    .header .menubar .dropdown-menu.mega-menu {
        width: 100% !important; /* 强制占满宽度 */
        right: 0 !important; /* 重置定位 */
        left: 0 !important;
    }
    
    .header .menubar .dropdown-menu.mega-menu.show {
        display: block !important; /* 小屏幕改为块级显示 */
        position: relative !important; /* 重置定位 */
        right: 0 !important;
    }
}

/* 标题样式 */
.header .menubar .dropdown-menu.mega-menu .heading1 {
    padding: 0;
    margin-bottom: 15px !important; /* 增加间距 */
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    text-transform: uppercase; /* 标题大写 */
}

/* Platform和Products通用内边距 */
.header .menubar .dropdown-menu.mega-menu .platform,
.header .menubar .dropdown-menu.mega-menu .products {
    padding: 15px 20px; /* 优化内边距 */
}

/* Platform和Products下的下拉项基础样式 */
.header .menubar .dropdown-menu.mega-menu .platform .dropdown-item,
.header .menubar .dropdown-menu.mega-menu .products .dropdown-item {
    transition: all 0.3s ease; /* 优化过渡时间 */
    padding: 5px 0 !important;
    margin-bottom: 8px !important; /* 统一间距 */
    font-weight: 500 !important;
    color: #3266bf !important;
    text-decoration: none; /* 移除默认下划线 */
    display: block; /* 确保块级显示 */
}

/* 鼠标悬浮效果 */
.platform .dropdown-item:hover{
    text-decoration: underline !important;
    background: none !important;
    color: #2155b8 !important; /* 悬浮加深颜色 */
}

/* AI平台特殊样式 */
.platform.ai {
    padding: 18px 30px 50px!important;
    background: linear-gradient(0deg, #09365d, #2abcc2);
    color: #fff;
}

.heading1{
    color: #fff !important;
}

.platform.ai .dropdown-item {
    padding: 5px 15px !important;
    text-decoration: underline !important;
    margin-bottom: 8px !important;
}
.platform.ai .dropdown-item{
    color: #fff !important; 
}
.platform.ai .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
}

/* AI平台分割线样式修复 */
.platform.ai hr {
    border-color: rgba(255, 255, 255, 0.5) !important;
    margin: 15px 0 !important;
    opacity: 1;
}

/* Products区域样式 */
.header .menubar .dropdown-menu.mega-menu .products {
    border-radius: 0 0.375rem 0.375rem 0;
    background-color: #f8f9fa; /* 增加背景色区分 */
}

/* Products下的描述文本 */
.header .menubar .dropdown-menu.mega-menu .products .dropdown-item span {
    display: block;
    text-wrap: balance;
    width: 200px;
    font-size: 10px;
    font-style: italic;
    color: #5f5f5f;
    margin-top: 3px; /* 增加与标题的间距 */
}

/* 响应式 - 小屏幕描述文本适配 */
@media (max-width: 992px) {
    .header .menubar .dropdown-menu.mega-menu .products .dropdown-item span {
        width: auto;
    }
}

/* 巨型菜单显示状态样式 */
.header .menubar .dropdown-menu.mega-menu.show {
    display: flex !important; /* 强制flex布局 */
    padding-bottom: 0;
    right: -100%;
    left: auto;
    top: 100% !important; /* 确保在导航下方 */
}

/* EWQIMS Logo样式 */
.header .menubar .dropdown-menu.mega-menu .dropdown-item .ewqims-logo {
    width: 150px;
    display: block;
    margin-top: 10px;
    margin-bottom: 5px; /* 增加底部间距 */
}

/* 超小屏幕适配 */
@media (max-width: 768px) {
    .header .menubar .dropdown-menu.mega-menu .dropdown-item {
        text-wrap: wrap;
        word-break: break-word; /* 强制换行 */
    }
}

/* 修复Products下的row布局 */
.header .menubar .dropdown-menu.mega-menu .products .row {
    margin: 0 -10px; /* 抵消col的padding */
    width: 100%;
}

.header .menubar .dropdown-menu.mega-menu .products .col-6 {
    padding: 0 10px;
    width: 50%;
    float: left; /* 确保两列布局 */
}

@media (max-width: 768px) {
    .header .menubar .dropdown-menu.mega-menu .products .col-6 {
        width: 100%; /* 小屏幕单列显示 */
        float: none;
    }
}