/* ================= 基础重置 ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

body {
    padding-top: 116px; 
    background-color: #f4f4f4;
    transition: padding-top 0.3s ease;
}

/* ================= 导航栏外层背景 ================= */
.header-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 116px; 
    background-color: #0e5e5e;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: height 0.3s ease;
}

.container {
    max-width: 1260px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between; 
    transition: padding 0.3s ease;
}

/* ================= LOGO ================= */
.logo-container {
    display: flex;
    align-items: center;
    height: 100%;
    flex-shrink: 0;
}

.logo-container img {
    height: 85px; 
    width: auto;
    object-fit: contain;
    transition: height 0.3s ease;
}

/* ================= 导航菜单 ================= */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px; 
    height: 100%;
    align-items: center;
    transition: gap 0.3s ease;
}

.nav-menu > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-menu > li > a {
    text-decoration: none;
    color: #ffffff;
    font-size: 14px; 
    font-weight: 500;
    padding: 0 5px;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 35px; 
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: width 0.3s, bottom 0.3s;
}

.nav-menu > li:hover > a::after,
.nav-menu > li > a.active::after {
    width: 100%;
}

.arrow-icon {
    display: none; 
    font-size: 10px;
    margin-left: 6px;
    transition: transform 0.3s ease;
}

/* ================= 二级下拉菜单 ================= */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #0a4a4a;
    min-width: 160px;
    list-style: none;
    padding: 10px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-menu > li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    text-align: center;
    transition: background-color 0.3s;
}

.dropdown-menu li a:hover {
    background-color: #0e5e5e;
}

/* ================= 汉堡菜单按钮 ================= */
.menu-toggle {
    display: none; 
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 10000;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ================= 导航栏响应式 ================= */
@media screen and (max-width: 1024px) {
    .header-bg { height: 80px; }
    body { padding-top: 80px; }
    .logo-container img { height: 60px; }
    
    .menu-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        top: 80px; 
        right: -100%;
        width: 280px;
        height: calc(100vh - 80px);
        background-color: #0e5e5e;
        flex-direction: column;
        align-items: stretch; 
        padding: 0;
        gap: 0; 
        transition: right 0.4s ease;
        box-shadow: -4px 0 10px rgba(0,0,0,0.2);
        overflow-y: auto;
    }

    .nav-menu.active { right: 0; }

    .nav-menu > li { 
        display: block; 
        width: 100%; 
        height: auto; 
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-menu > li > a {
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center;
        padding: 15px 25px;
        font-size: 16px;
        height: auto;
        width: 100%;
    }

    .nav-menu > li > a::after {
        display: none !important;
        content: none !important;
    }

    .arrow-icon {
        display: inline-block;
        margin-left: 8px;
    }

    .nav-menu > li > a.active .arrow-icon {
        transform: rotate(180deg);
    }

    .dropdown-menu {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        background-color: #0a4a4a !important;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
        min-width: 100%;
        left: auto;
        top: auto;
    }

    .dropdown-menu.active { max-height: 500px; }

    .dropdown-menu li a { 
        text-align: left !important; 
        padding: 12px 40px; 
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}

@media screen and (max-width: 768px) {
    .header-bg { height: 64px; }
    body { padding-top: 64px; }
    .logo-container img { height: 46px; }
    .container { padding: 0 15px; }
    
    .nav-menu { top: 64px; height: calc(100vh - 64px); width: 100%; }
}