/* 全局重置：确保顶部导航顶格显示 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    padding-top: 60px;
}

/* 顶部导航容器 */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* Logo 样式 */
.header-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-logo i {
    color: #2563eb;
}

/* PC端导航菜单 */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 10px 16px;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: #2563eb;
    background: #f3f4f6;
}

/* 下拉菜单（PC端 Hover 显示） */
.nav-dropdown-level-2 {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px 0;
    list-style: none;
    display: none;
    z-index: 10000;
}

.nav-item.has-dropdown > .nav-link {
    cursor: pointer;
}

.nav-item.active .nav-dropdown-level-2 {
    display: block;
}

.nav-item.active > .nav-link > .fa-chevron-right {
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

.nav-item > .nav-link > .fa-chevron-right {
    transition: transform 0.2s ease;
}

.dropdown-link {
    display: block;
    padding: 10px 20px;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    min-height: 44px;
}

.dropdown-link:hover {
    color: #2563eb;
    background: #f3f4f6;
}

/* 二级项带子菜单 */
.nav-dropdown-item.has-children {
    position: relative;
    width: 100%;
}

/* PC端三级菜单：hover 向左弹出 */
@media (min-width: 769px) {
    .nav-dropdown-level-3 {
        display: none;
        position: absolute;
        top: 0;
        right: 100%;
        margin-right: -2px;
        min-width: 180px;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        padding: 8px 0;
        list-style: none;
        margin: 0;
        z-index: 10000;
    }

    .nav-dropdown-item.has-children:hover > .nav-dropdown-level-3 {
        display: block;
    }
}

/* 移动端：三级菜单 active 展开 */
@media (max-width: 768px) {
    .nav-dropdown-level-3 {
        position: static;
        box-shadow: none;
        padding: 0 0 12px 16px;
        display: none;
        width: 100%;
        list-style: none !important;
        margin: 0;
    }

    .nav-dropdown-level-3.active {
        display: block !important;
    }

    .nav-dropdown-item.has-children .dropdown-link {
        display: flex;
        width: 100%;
        min-height: 44px;
        padding: 10px 20px;
        cursor: pointer;
        justify-content: space-between;
        align-items: center;
    }

    .nav-dropdown-item .dropdown-link .fa-chevron-right {
        transition: transform 0.2s ease;
    }

    .nav-dropdown-item.active > .dropdown-link > .fa-chevron-right {
        transform: rotate(90deg);
    }
}

/* 移动端汉堡按钮 */
.hamburger-btn {
    display: none;
    width: auto;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: #1a1a1a;
    min-width: 44px;
    min-height: 44px;
}

/* Logo 图片 */
.header-logo-img {
    height: 36px;
    width: auto;
    vertical-align: middle;
    margin-right: 10px;
}

/* ------------------------------ */
/* 响应式：移动端适配 */
/* ------------------------------ */
@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: 44px;
        padding: 0 12px;
        border: none;
        background: none;
        cursor: pointer;
        font-size: 0.95rem;
        color: #1a1a1a;
    }

    .nav-menu {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
        display: none;
        gap: 0;
        z-index: 9998;
        list-style: none;
    }

    .nav-menu.active {
        display: flex !important;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #f3f4f6;
        list-style: none;
    }

    .nav-link {
        padding: 14px 0;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
    }

    .nav-dropdown-level-2 {
        position: static;
        box-shadow: none;
        padding: 0 0 12px 16px;
        display: none;
        width: 100%;
        list-style: none !important;
        margin: 0;
    }

    .nav-dropdown-level-2.active {
        display: block !important;
    }

    .nav-dropdown-item {
        list-style: none !important;
        margin: 0;
        padding: 0;
    }

    .nav-dropdown-item .dropdown-link {
        display: flex;
        width: 100%;
        min-height: 44px;
        padding: 10px 20px;
        cursor: pointer;
        justify-content: space-between;
        align-items: center;
    }

    .nav-item .nav-link .fa-chevron-right {
        transform: rotate(0deg) !important;
        transition: transform 0.2s ease;
    }

    .nav-item.active > .nav-link > .fa-chevron-right {
        transform: rotate(90deg) !important;
        transition: transform 0.2s ease;
    }
}
