* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* 通用样式 */
.head_menu_container {
    width: 100%;
    position: relative;
}

/* 顶部条样式 */
.head_menu_topbar {
    background-color: #000;
    color: #fff;
    padding: 8px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.head_menu_top_left, .head_menu_top_right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.head_menu_top_item {
    display: flex;
    align-items: center;
    margin-right: 25px;
    color: #ddd;
    font-size: 14px;
}

.head_menu_top_item:last-child {
    margin-right: 0;
}

.head_menu_top_item i {
    margin-right: 8px;
    font-size: 16px;
}

.head_menu_top_item a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.head_menu_top_item a:hover {
    color: #fff;
}

/* 语言下拉框 */
.head_menu_lang_dropdown {
    position: relative;
    display: inline-block;
    margin-right: 0px;
}

.head_menu_lang_dropdown_content {
    display: none;
    position: absolute;
    background-color: #333;
    min-width: 140px;
    z-index: 1000;
    top: 100%;
    right: 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden;
}

.head_menu_lang_dropdown:hover .head_menu_lang_dropdown_content {
    display: block;
}

.head_menu_lang_item {
    padding: 12px 15px;
    display: block;
    color: #ddd;
    text-decoration: none;
    border-bottom: 1px solid #444;
    transition: background-color 0.3s;
}

.head_menu_lang_item:last-child {
    border-bottom: none;
}

.head_menu_lang_item:hover {
    background-color: #444;
    color: #fff;
}

/* 分享图标 */
.head_menu_social_icons {
    display: flex;
    align-items: center;
}

.head_menu_social_icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

.head_menu_social_icon:hover {
    background-color: #fff;
    color: #000;
    transform: translateY(-2px);
}

/* 主导航栏 */
.head_menu_main_nav {
    background-color: #fff;
    padding: 15px 5% 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
    transition: top 0.3s;
}

.head_menu_logo img {
    height: 60px;
    width: auto;
}

.head_menu_nav_items {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
}

/* 导航菜单 */
.head_menu_nav_list {
    display: flex;
    list-style: none;
    margin-right: 30px;
}

.head_menu_nav_item {
    position: relative;
    margin-left: 30px;
}

.head_menu_nav_link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 10px 0;
    position: relative;
    display: inline-block;
    transition: color 0.3s;
}

.head_menu_nav_link:hover {
    color: #cc0000;
}

.head_menu_nav_link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 0px;
    background-color: #cc0000;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.head_menu_nav_link:hover::after {
    width: 100%;
}

/* 二级菜单 */
.head_menu_submenu {
    position: absolute;
    top: calc(100% + 5px); /* 稍微向下移动 */
    left: 0;
    background-color: #fff;
    min-width: 220px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
    border-top: 3px solid #cc0000;
    border-radius: 0 0 6px 6px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* 移除 margin-top: 5px; */
}

/* 确保悬停区域覆盖正确 */
.head_menu_nav_item:hover .head_menu_submenu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: menuSlideIn 0.3s ease-out;
}

@keyframes menuSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 在小三角形和菜单之间创建连接 */
.head_menu_submenu::before {
    content: '';
    position: absolute;
    top: -10px; /* 向上延伸到链接 */
    left: 0;
    right: 0;
    height: 20px; /* 足够大的悬停区域 */
    background: transparent;
}
/* 调整小三角形位置 */
.head_menu_submenu::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 20px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #cc0000;
    display: block;
    z-index: 1001;
}

.head_menu_submenu_link {
    display: block;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}

.head_menu_submenu_link:last-child {
    border-bottom: none;
}

.head_menu_submenu_link:hover {
    background-color: #f8f9fa;
    color: #cc0000;
    padding-left: 25px;
}

.head_menu_submenu_link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background-color: #cc0000;
    transition: width 0.3s ease;
}

.head_menu_submenu_link:hover::before {
    width: 4px;
}
/* 确保链接和子菜单之间有悬停连续性 */
.head_menu_nav_link {
    position: relative;
    z-index: 1002; /* 确保链接在悬停区域上方 */
}
/* 搜索区域 */
.head_menu_search_container {
    position: relative;
    margin-right: 20px;
}

.head_menu_search_icon {
    font-size: 20px;
    color: #555;
    cursor: pointer;
    transition: color 0.3s;
}

.head_menu_search_icon:hover {
    color: #cc0000;
}

.head_menu_search_box {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    padding: 15px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    display: none;
    width: 300px;
    z-index: 100;
}

.head_menu_search_container:hover .head_menu_search_box {
    display: block;
}

.head_menu_search_input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.head_menu_search_btn {
    position: absolute;
    right: 25px;
    top: 25px;
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s;
}

.head_menu_search_btn:hover {
    color: #cc0000;
}

/* 留言按钮 */
.head_menu_contact_btn {
    background-color: #cc0000;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.head_menu_contact_btn:hover {
    background-color: #dd0000;
}

/* 移动端菜单按钮 */
.head_menu_mobile_toggle {
    display: none;
    font-size: 24px;
    color: #cc0000;
    cursor: pointer;
    margin-left: 15px;
}

/* 移动端语言下拉框 */
.head_menu_mobile_lang {
    display: none;
    position: relative;
    margin-right: 15px;
}

.head_menu_mobile_lang_content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 100;
    border-radius: 4px;
    overflow: hidden;
}

.head_menu_mobile_lang_content.active {
    display: block;
}

.head_menu_mobile_lang_item {
    padding: 12px 15px;
    display: block;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.head_menu_mobile_lang_item:last-child {
    border-bottom: none;
}

.head_menu_mobile_lang_item:hover {
    background-color: #f9f9f9;
}

/* 移动端导航菜单 */
.head_menu_mobile_nav {
    display: none;
    background-color: #fff;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 998;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.head_menu_mobile_nav.active {
    display: block;
    max-height: 1000px;
}

.head_menu_mobile_nav_list {
    list-style: none;
    padding: 0;
}

.head_menu_mobile_nav_item {
    border-bottom: 1px solid #eee;
}

.head_menu_mobile_nav_link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
}

.head_menu_mobile_nav_link i {
    transition: transform 0.3s;
}

.head_menu_mobile_nav_link.active i {
    transform: rotate(180deg);
}

.head_menu_mobile_submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    background-color: #f9f9f9;
}

.head_menu_mobile_submenu.active {
    max-height: 500px;
}

.head_menu_mobile_submenu_item {
    border-bottom: 1px solid #eee;
}

.head_menu_mobile_submenu_link {
    display: block;
    padding: 12px 20px 12px 35px;
    color: #555;
    text-decoration: none;
    transition: background-color 0.3s;
}

.head_menu_mobile_submenu_link:hover {
    background-color: #f0f0f0;
}

/* 响应式设计 */
@media screen and (max-width: 1024px) {
    .head_menu_top_item {
        margin-right: 15px;
        font-size: 13px;
    }
    
    .head_menu_social_icon {
        width: 32px;
        height: 32px;
        margin-left: 8px;
    }
    
    .head_menu_nav_item {
        margin-left: 20px;
    }
    
    .head_menu_submenu {
        min-width: 200px;
    }
    
    .head_menu_submenu::before {
        left: 15px;
    }
}

@media screen and (max-width: 768px) {
    .head_menu_topbar, .head_menu_nav_list, 
    .head_menu_search_container, .head_menu_contact_btn {
        display: none;
    }
    
    .head_menu_mobile_lang, .head_menu_mobile_toggle {
        display: block;
    }
    
    .head_menu_main_nav {
        padding: 12px 5%;
    }
    
    .head_menu_logo img {
        height: 40px;
    }
    
    .head_menu_nav_items {
        justify-content: flex-end;
    }
    
    .head_menu_mobile_submenu.active {
        max-height: 500px;
    }
}

@media screen and (min-width: 769px) {
    .head_menu_mobile_nav {
        display: none !important;
    }
}

/* 页面滚动时隐藏顶部条 */
.head_menu_topbar.hidden {
    display: none;
}

.head_menu_main_nav.sticky {
    position: fixed;
    top: 0;
    width: 100%;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { top: -100px; }
    to { top: 0; }
}