ul {
    list-style: none;
}

.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    height: 90px;
    background: hsla(0, 0%, 100%, .4);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}



.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
}

.head-container {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    justify-content: space-between;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1;
    height: 64px;
    width: 442px;

}

.logo img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    align-items: center;
    width: 1000px;
    justify-content: space-between;
    margin-left: 200px;
    margin-right: 50px;
}

.nav-menu>ul {
    position: relative;
}

.nav-menu>ul>a {
    color: #333;
    text-decoration: none;
    font-size: 20px;
    padding: 30px 0;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.nav-menu>ul>a:hover {
    color: #4a90e2;
}

/* 下拉菜单容器 */
.nav-menu>ul>ul {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 160px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    transition: all 0.3s;
    padding: 8px 0;
    z-index: 1000;
    display: none !important;
    /* 初始状态隐藏 */
}

/* 父级菜单项激活状态 */
.nav-menu>ul:hover>ul,
.nav-menu>ul:focus>ul,
.nav-menu>ul:focus-within>ul {
    display: block !important;
    /* 鼠标悬停或获得焦点时显示 */
}

/* 下拉菜单项样式 */
.nav-menu>ul>ul>li {
    padding: 0;
}

.nav-menu>ul>ul>li>a {
    color: #333;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    font-size: 16px;
    transition: all 0.3s;
    white-space: nowrap;
    text-align: center;
}

.nav-menu>ul>ul>li>a:hover {
    color: #4a90e2;
    background: #f5f5f5;
}

/* 带下拉菜单的项目样式 */
/* .nav-menu>ul:has(ul)>a {
    position: relative;
    padding-right: 20px;
}

.nav-menu>ul:has(ul)>a::after {
    content: '';
    position: absolute;
    right: 0;
    top: 52%;
    width: 5px;
    height: 6px;
    border-right: 1px solid #999;
    border-bottom: 1px solid #999;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.3s;
}

.nav-menu>ul:hover:has(ul)>a::after {
    transform: translateY(-30%) rotate(-135deg);
} */
.nav-menu>ul>a {
    color: #333;
    text-decoration: none;
    font-size: 20px;
    padding: 30px 0;
    display: flex;
    align-items: center;
    transition: color 0.3s;
    /* 文字和图标之间的间距 */
}


.nav-menu>ul>a .iconfont {
    font-size: 20px;
    /* color: #999;
    transition: all 0.3s;
    transform: rotate(0deg); */
}

/* 悬停时箭头旋转 */
.nav-menu>ul:hover>a .iconfont {
    transform: rotate(180deg);
    color: #4a90e2;
}

/* 激活状态的箭头样式 */
.nav-menu>ul.on>a .iconfont {
    color: #0e5ebe;
}

.search {
    display: flex;
    position: relative;
    align-items: center;
    width: 245px;
}

.search-input {
    width: 200px;
    /* 固定宽度，原来是 0 */
    height: 36px;
    border: #efefef;
    outline: none;
    padding: 0 15px;
    /* 固定内边距，原来是 0 */
    background-color: #fff;
    border-radius: 20px;
    transition: all 0.3s ease;
    opacity: 1;
    /* 固定显示，原来是 0 */
    margin-left: 5px;
}



.search-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #b550ab, #4169e1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.search-btn .iconfont {
    color: white;
    font-size: 18px;
}




/* 添加动画效果 */
.nav-menu>ul>ul {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(10px);
    transition: all 0.3s ease;
}

.nav-menu>ul:hover>ul {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 添加在文件末尾 */
.header-hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.nav-menu>ul.on>a {
    color: #0e5ebe !important;
}