/**
 * 导航栏美化样式
 * 现代化设计：渐变背景、圆角、平滑过渡、阴影效果
 * 兼容原有HTML结构
 */

/* ===== 导航栏容器 ===== */
.navBar {
    position: relative;
    z-index: 100;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 50%, #1565c0 100%);
    color: #fff;
    height: 48px;
    line-height: 48px;
    margin-bottom: 30px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

/* ===== 导航列表 ===== */
.nav {
    width: 980px;
    margin: 0 auto;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

.nav a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav a:hover {
    color: #fff;
}

/* ===== 一级菜单项 ===== */
.nav h3 {
    float: left;
    font-size: 100%;
    font-weight: normal;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.nav .m {
    float: left;
    position: relative;
}

.nav .s {
    float: left;
    width: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.25);
    font-size: 12px;
}

.nav h3 a {
    display: block;
    padding: 0 22px;
    border-radius: 4px 4px 0 0;
    position: relative;
}

.nav h3 a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ===== 当前激活菜单 ===== */
.nav .on a {
    background: linear-gradient(180deg, #ff6b35 0%, #e55a2b 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
    border-radius: 4px 4px 0 0;
}

.nav .on a:hover {
    background: linear-gradient(180deg, #ff7b45 0%, #e56a3b 100%);
}

/* ===== 下拉子菜单 ===== */
.nav .sub {
    display: none;
    position: absolute;
    left: 0;
    top: 48px;
    min-width: 160px;
    padding: 8px 0;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-top: 3px solid #ff6b35;
    z-index: 200;
    animation: subMenuFadeIn 0.25s ease;
}

@keyframes subMenuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav .sub li {
    float: none;
    display: block;
}

.nav .sub li a {
    display: block;
    padding: 8px 20px;
    margin: 0;
    color: #444;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav .sub li a:hover {
    background: #f0f7ff;
    color: #1a73e8;
    border-left: 3px solid #1a73e8;
    padding-left: 22px;
}

/* ===== 移动端响应式 ===== */
@media screen and (max-width: 1024px) {
    .nav {
        width: 100%;
        padding: 0 10px;
    }

    .nav h3 a {
        padding: 0 14px;
        font-size: 13px;
    }

    .nav .s {
        width: 12px;
    }
}

@media screen and (max-width: 768px) {
    .navBar {
        height: auto;
        line-height: normal;
    }

    .nav {
        width: 100%;
    }

    .nav .m {
        float: none;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav h3 a {
        padding: 12px 20px;
        border-radius: 0;
    }

    .nav .s {
        display: none;
    }

    .nav .sub {
        position: static;
        display: block;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0;
        animation: none;
    }

    .nav .sub li a {
        color: rgba(255, 255, 255, 0.85);
        padding: 8px 30px;
        border-left: none;
    }

    .nav .sub li a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        border-left: none;
    padding-left: 30px;
    }
}

/* ===== 汉堡菜单按钮 ===== */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 10px 15px;
    z-index: 300;
}

.hamburger-btn span {
    display: block;
    width: 30px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

@media screen and (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }

    .navBar .nav {
        display: none;
        width: 100%;
    }

    .navBar.menu-open .nav {
        display: block;
    }

    #header .welcome {
        font-size: 12px;
    }

    #header .login {
        margin-right: 10px;
    }

    #header a {
        margin-left: 10px;
        font-size: 12px;
    }

    #logo img {
        max-width: 50%;
    }
}

/* ===== 触摸目标最小尺寸 ===== */
@media screen and (max-width: 1024px) {
    .nav h3 a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .nav .sub li a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ===== 顶部header条美化 ===== */
#header {
    height: 32px;
    background: linear-gradient(90deg, #0d47a1 0%, #1a73e8 100%);
    color: #fff;
}

.welcome {
    height: 32px;
    line-height: 32px;
    margin-left: 15px;
    font-size: 13px;
}

#header a {
    color: rgba(255, 255, 255, 0.9);
    margin-left: 25px;
    font-size: 13px;
    transition: color 0.2s ease;
}

#header a:hover {
    color: #ffcc02;
}

.login {
    float: right;
    margin-right: 30px;
    margin-top: 4px;
    cursor: pointer;
}

/* ===== Logo区域美化 ===== */
#logo {
    margin: 0 auto;
    height: 110px;
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 50%, #1976d2 100%);
    box-shadow: inset 0 -2px 8px rgba(0, 0, 0, 0.1);
}
