/* 头部样式 - 默认（其他页面） */
.header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-wrapper {
    background: transparent;
    border-radius: 0;

}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 20px;
    gap: 20px;
    /*background: linear-gradient(to right, transparent 0%, transparent 75%, #3b7dd6 75%, #3b7dd6 100%);*/
}

/* 首页头部样式 - 绝对定位，覆盖在轮播图上 */
.header.header-absolute {
    position: absolute;
    top: 0;
    padding: 20px 0;
    background-color: transparent;
    box-shadow: none;
}

.header.header-absolute .header-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Logo 区域 */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 45px;
    width: auto;
}

/* 导航菜单 */
.nav {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 20px 15px;
    font-size: 15px;
    font-weight: 400;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-item > a:hover {
    color: #3b7dd6;
}

.nav-item.active > a {
    color: #3b7dd6;
}

.dropdown-icon {
    margin-left: 2px;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.nav-item:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* 子菜单 */
.nav-item.has-children:hover .sub-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-nav {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    margin: 0;
    padding: 8px 0;
    list-style: none;
}

.sub-nav li a {
    display: block;
    padding: 10px 20px;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sub-nav li a:hover {
    background-color: #f8f9fa;
    color: #3b7dd6;
    padding-left: 25px;
}

/* 右侧工具栏 */
.header-tools {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    background: #3b7dd6;
    border-radius: 0 50px 50px 0;
}

/* 搜索按钮 */
.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.search-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* 语言切换 */
.language-switch {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: transparent;
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: 70px;
    border-radius: 0 50px 50px 0;
}

.language-btn:hover {
    background-color: #2d6bc4;
}

.language-btn .globe-icon {
    flex-shrink: 0;
}

.language-btn .dropdown-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.language-switch:hover .language-btn .dropdown-icon {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 140px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    margin: 0;
    padding: 6px 0;
    list-style: none;
}

.language-switch:hover .language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-menu li {
    margin: 0;
}

.language-menu li a {
    display: block;
    padding: 8px 16px;
    color: #666;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.language-menu li a:hover {
    background-color: #f5f5f5;
    color: #333;
}

.language-menu li a.active {
    color: #3b7dd6;
    background-color: #f0f7ff;
}

/* 响应式 */
@media (max-width: 1200px) {
    .header-content {
        gap: 20px;
        padding: 0 20px;
    }

    .nav-item > a {
        padding: 20px 15px;
        font-size: 14px;
    }

    .logo {
        padding-right: 20px;
    }
}

@media (max-width: 1024px) {
    .nav-item > a {
        padding: 20px 12px;
        font-size: 14px;
    }

    .header-wrapper {
        border-radius: 35px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0;
    }

    .header.header-absolute {
        padding: 15px 0;
    }

    .header-wrapper {
        background: rgba(255, 255, 255, 0.98);
        border-radius: 0;
    }

    .header.header-absolute .header-wrapper {
        border-radius: 20px;
    }

    .header-content {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        align-items: center;
        padding: 15px 20px;
        gap: 0 20px;
        background: none;
    }

    /* 移动端菜单按钮 - 左侧 */
    .mobile-menu-btn {
        display: flex;
        grid-column: 1;
        grid-row: 1;
        margin-right: 10px;
    }

    .mobile-menu-btn span {
        background-color: #333;
    }

    .header.header-absolute .mobile-menu-btn span {
        background-color: #333;
    }

    /* Logo - 中间 */
    .logo {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        padding: 0;
    }

    .logo img {
        height: 40px;
    }

    /* 语言切换 - 右侧 */
    .header-tools {
        grid-column: 3;
        grid-row: 1;
        background: transparent;
        border-radius: 0;
        gap: 0;
        margin-left: 10px;
    }

    .search-btn {
        display: none;
    }

    .language-switch {
        position: static;
    }

    .language-btn {
        height: auto;
        padding: 8px 12px;
        border-radius: 20px;
        background-color: #3b7dd6;
        box-shadow: 0 2px 8px rgba(59, 125, 214, 0.3);
        font-size: 13px;
    }

    .language-btn .globe-icon {
        width: 16px;
        height: 16px;
    }

    .language-menu {
        right: 0;
    }

    /* 导航菜单 - 占据整行，默认隐藏 */
    .nav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav.active {
        max-height: 500px;
        margin-top: 15px;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
        border-top: 1px solid #eee;
        padding-top: 10px;
    }

    .nav-item {
        width: 100%;
    }

    .nav-item > a {
        padding: 12px 0;
        justify-content: space-between;
    }

    .sub-nav {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-left: 20px;
        display: none;
        background: transparent;
    }

    .nav-item.has-children.active .sub-nav {
        display: block;
    }

    .sub-nav li a {
        padding: 8px 0;
    }

    .sub-nav li a:hover {
        background: transparent;
        padding-left: 0;
    }
}

