/* 导航栏样式 */
/* 顶部导航 */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    padding: 15px 0;
}

#header.scrolled {
    padding: 10px 0;
    background-color: #fff;
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    background-image: url(../images/logo.png);
    background-size: cover;
    background-position: center;
    width: 200px;
    height: 50px;
}

.navbar ul {
    display: flex;
}

.navbar ul li {
    margin-left: 20px;
}

.navbar ul li a {
    color: #333;
    padding: 8px 12px;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.navbar ul li a:hover,
.navbar ul li a.active {
    color: #1565c0;
    background-color: rgba(21, 101, 192, 0.1);
    border-radius: 4px;
}

/* 隐藏桌面视图下的关闭按钮 */
.navbar .close-btn {
    display: none;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: #1565c0;
    cursor: pointer;
}

/* 媒体查询 - 移动端适配 */
@media screen and (max-width: 768px) {
    .navbar {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background-color: #fff;
        z-index: 1001;
        padding: 60px 20px 30px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
    }

    .navbar.active {
        right: 0;
    }

    .navbar ul {
        flex-direction: column;
    }

    .navbar ul li {
        margin: 0 0 15px;
    }

    .navbar ul li a {
        display: block;
        padding: 10px 15px;
    }

    .navbar .close-btn {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 1.5rem;
        color: #1565c0;
        cursor: pointer;
    }

    .mobile-toggle {
        display: block;
    }
}