/* --- 导航栏 Navigation --- */
.nav-bar {
    background-color: #0056b3;
    /* 效果图深蓝色 */
    border-top: 1px solid #004494;
}

.nav-list {
    display: flex;
    justify-content: space-between;
}

.nav-list li {
    flex: 1;
    text-align: center;
}

.nav-list a {
    display: block;
    color: #fff;
    padding: 15px 0;
    font-size: 16px;
}

.nav-list .active {
    background-color: #006FBA;
}

.nav-list a:hover {
    background-color: #004494;
}

/* --- 响应式适配 --- */
@media (max-width: 768px) {
    /* 移动端：把现有导航变成右侧抽屉（复用原来的 ul.nav-list，不新增 DOM） */
    .nav-bar {
        position: fixed;
        right: 0;
        top: 0; /* 与 header.css 中移动端 header 高度保持一致 */
        width: min(78vw, 320px);
        height: 100vh;
        background-color: #ffffff;
        border-top: none;
        box-shadow: -2px 0 12px rgba(0, 0, 0, 0.18);
        transform: translateX(110%); /* 默认隐藏在右侧 */
        transition: transform 0.25s ease;
        z-index: 999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 打开抽屉 */
    .nav-bar.is-open {
        transform: translateX(0);
    }

    /* 抽屉内的 container 不要受 max-width 影响 */
    .nav-bar .container {
        max-width: none;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .nav-list {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .nav-list li {
        flex: none;
        text-align: left;
    }

    .nav-list a {
        color: #333;
        padding: 14px 18px;
        font-size: 16px;
        border-bottom: 1px solid #f0f0f0;
        /* background-color: #ffffff; */
    }

    .nav-list li.active,
    .nav-list .active {
        background-color: #0056b3; /* 高亮项背景 */
    }

    .nav-list li.active a,
    .nav-list .active a {
        color: #fff;
    }

    .nav-list a:hover {
        background-color: #f5f7fb;
    }
}

