﻿/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* transition: padding-top 0.4s ease; */
}

body {
    margin: 0;
    padding-top: 80px;
    font-family: 'Averta', 'Segoe UI', 'Roboto', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
    background-color: #fafbfc;
    transition: padding-top 0.4s ease;
    /* 移到 body 上 */
}

/* navbar 整体风格 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 32px;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
}

.navbar.scrolled {
    padding: 0px 32px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

/* LOGO 区域 */
.logo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #1e3c72, #2b4c7c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    cursor: default;
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

/* 桌面端菜单容器 - 使用 flex 实现居中布局 */
.desktop-menu {
    display: flex;
    align-items: center;
    /*gap: 36px;*/
    margin: 0 auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol
}

/* 为保证 LOGO 和右侧图标组不挤压居中菜单，调整左右区域宽度一致 */
.navbar-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.navbar-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 24px;
    align-items: center;
}

/* 菜单项基础样式 */
.menu-item {
    position: relative;
    cursor: pointer;
    font-size: 16px;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    transition: color 0.3s;
    padding: 8px 18px;
    /*font-family: -apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol*/
}

.menu-item:hover {
    color: #409EFF;
    font-weight:600;
    border-top:solid 2px;
}

/* 带下拉的容器 - 增加透明桥接层 */
.has-dropdown {
    position: relative;
    font-size: 15px;
    font-weight: 600;
}

/* 创建透明桥接层，覆盖一级菜单到二级菜单之间的间隙 */
.has-dropdown::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
    pointer-events: auto;
    z-index: 1998;
}

/* 下拉面板 (二级菜单) */
.dropdown {
    position: absolute;
    top: calc(100% - 2px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #ffffff;
    padding: 18px 28px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.25s ease, transform 0.35s ease;
    min-width: 300px;
    width: max-content;
    z-index: 1999;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    margin-top: 0;
}

/* 为下拉菜单添加一个透明的顶部区域，作为鼠标移动的桥梁 */
.dropdown::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
    pointer-events: auto;
}

/* 鼠标悬停在一级菜单或下拉菜单上时，都显示下拉菜单 */
.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* 当下拉菜单本身被悬停时也保持显示 */
.dropdown:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 下拉内容布局 - 支持动态数量的二级菜单 */
.dropdown-row {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    min-width: 200px;
}

.dropdown-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 100px;
    transition: transform 0.3s;
    cursor: pointer;
    padding: 8px;
}

.dropdown-col:hover {
    transform: translateY(-5px);
}

/* 如果没有图片，显示纯文字样式 */
.dropdown-col.no-image {
    min-width: 120px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s;
}

.dropdown-col.no-image:hover {
    background: #409EFF;
    color: white;
}

.dropdown-col.no-image:hover div {
    color: white;
}

.dropdown-col img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    margin-bottom: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background-color: #f5f7fa;
}

.dropdown-col div {
    font-size: 14px;
    font-weight: 500;
    color: #1f2f3d;
}

/* 右侧按钮及图标 */
.menu-item.primary {
    background: #409EFF;
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
}

.menu-item.primary:hover {
    background: #2c6b9e;
    color: white;
    transform: translateY(-1px);
}

.menu-item.search,
.menu-item.login {
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 汉堡菜单按钮 (移动端) */
.hamburger {
    font-size: 28px;
    cursor: pointer;
    color: #2c3e50;
    transition: color 0.3s;
    line-height: 1;
    display: none;
}

.hamburger:hover {
    color: #409EFF;
}



/* menu.css - 专为 Master 设计 */

/* 全局重置与基础样式（不影响子页面） */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-top: 60px;
    font-family: 'Segoe UI', 'Roboto', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
    background-color: #fafbfc;
    transition: padding-top 0.4s ease;
}

/* navbar 等其他全局样式保持不变... */


/* 抽屉菜单样式 */
.drawer-content {
    padding: 20px 16px 32px;
}

.drawer-header {
    padding-bottom: 16px;
    border-bottom: 1px solid #eef2f6;
    margin-bottom: 12px;
}

.drawer-header .logo {
    font-size: 24px;
}

.drawer-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;

}

.drawer-item {
    padding: 14px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 17px;
    font-weight: 500;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    color: #1e2a3a;
}

.drawer-item.primary {
    background: #409EFF;
    color: white;
    padding: 12px 16px;
    border-radius: 20px;
    justify-content: center;
    margin-top: 8px;
    border: none;
}

.drawer-item.has-children {
    font-weight: 600;
}

.el-drawer__container .el-drawer {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sub-menu {
    padding-left: 20px;
    margin-top: 6px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sub-item {
    padding: 8px 0;
    font-size: 15px;
    color: #546e7a;
    border-bottom: 1px dashed #e9ecef;
    cursor: pointer;
    transition: color 0.3s;
}

.sub-item:hover {
    color: #409EFF;
    padding-left: 8px;
}

.arrow {
    font-size: 18px;
    font-weight: 400;
    color: #8c9aa8;
}

/* 页面内容区 */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px;
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e4e;
}

.hero-banner {
    background: linear-gradient(120deg, #eef5ff, #ffffff);
    border-radius: 16px;
    padding: 48px 36px;
    margin-bottom: 48px;
    text-align: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.02);
}

/* 响应式 */
@media (max-width: 767px) {
    body {
        padding-top: 70px;
    }

    .desktop-menu {
        display: none !important;
    }

    .navbar-right {
        display: none;
    }

    .navbar-left {
        flex: auto;
    }

    .navbar {
        padding: 12px 20px;
    }

    .page-content {
        padding: 24px 20px;
    }

    .hamburger {
        display: block;
    }
}

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }

    .navbar-right {
        display: flex;
    }
}

@media (max-width: 1024px) {
    .dropdown {
        min-width: 400px;
        padding: 20px;
    }

    .dropdown-col img {
        width: 70px;
        height: 70px;
    }
}

/* 数据展示卡片 */
.demo-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 32px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    flex: 1 1 200px;
    text-align: center;
    border: 1px solid #edf2f7;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* 确保下拉菜单在所有浏览器中都能正确显示 */
.has-dropdown {
    z-index: 1;
}

.dropdown {
    z-index: 1000;
}

/* 为没有子菜单的一级菜单提供不同样式 */
.menu-item.no-children {
    cursor: pointer;
}

/* 动态菜单加载动画 */
.menu-loading {
    text-align: center;
    padding: 20px;
    color: #999;
}