/* 头部导航样式 */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: auto;
}

.STYLE1 {
    font-size: 15px;
    font-weight: 600;
    position: relative;
    padding-left: 10px;
    border-left: 2px solid #eee;
    max-width: 200px;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    left: 0px;
}

.nav-menu li {
    margin: 0 12px;
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
    font-size: 16px;
    padding: 10px 5px;
    display: block;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a:active {
    transform: scale(0.98);
}

/* 下拉菜单样式 */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1;
    top: 100%;
    left: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #f1f1f1;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: #f8f9fa;
    /*color: #1a6fc4;*/
    color: var(--primary);
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 汉堡菜单 - 纯CSS实现 */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: green;
    font-size: 1.5rem;
    position: relative;
    z-index: 1001;
}

#menu-toggle {
    display: none;
}

/* 响应式设计 */
@media screen and (max-width: 980px) {
    .STYLE1 {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: -100%;
        flex-direction: column;
        background-color: white;
        width: 100%;
        height: calc(100vh - 82px);
        transition: all 0.4s ease;
        padding-top: 10px;
        overflow-y: auto;

    }

    #menu-toggle:checked~.nav-menu {
        left: 0;
        top: 82px;
    }

    .nav-menu li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        padding: 15px 20px;
        border-radius: 0;
    }

    .dropdown-content {
        position: static;
        display: none;
        opacity: 1;
        transform: none;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        background-color: rgba(240, 240, 240, 0.3);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .dropdown-content a {
        color: black;
        border-bottom-color: rgba(255, 255, 255, 0.1);
        padding-left: 40px;
    }

    /* 使用:focus-within和:target实现移动端下拉菜单 */
    .dropdown:focus-within .dropdown-content,
    .dropdown:target .dropdown-content {
        display: block;
        max-height: 500px;
    }
}

@media screen and (max-width: 480px) {
    .logo {
        font-size: 1.4rem;
    }

    .nav-menu a {
        padding: 12px 20px;
    }
}