/* 现代简洁横屏下拉导航样式 */

/* 导航容器重置 */
.head-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    padding: 0 40px;
    height: 70px;
    transition: all 0.3s ease;
}

.head-nav.scrollhead {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.15);
}

/* 导航列表样式 */
.nav-ul {
    display: flex;
    align-items: center;
    height: 70px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-ul > li,
.nav-item {
    position: relative;
    margin: 0 5px;
    padding: 0;
    background-color: #f0f7ff;
    border-radius: 4px;
}

/* 一级菜单链接 */
.nav-ul > li > .nav-link,
.nav-item > .nav-link {
    display: flex;
    align-items: center;
    height: 70px;
    padding: 0 20px;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

/* 为有子栏目的导航添加箭头 */
.nav-item.has-dropdown > .nav-link:after {
    content: "\e6b9";
    font-family: "iconfont";
    margin-left: 5px;
    font-size: 12px;
    color: #666;
    transition: all 0.2s ease;
}

/* 悬停效果 */
.nav-ul > li > .nav-link:hover {
    color: var(--color, #007bff);
}

/* 激活状态下划线 */
.nav-ul > li > .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--color, #007bff);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-ul > li:hover > .nav-link::after,
.nav-ul > li.active > .nav-link::after {
    width: 80%;
}

/* 下拉菜单容器 - 只对有子栏目的菜单项生效 */
.nav-ul > li.has-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 15px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 显示下拉菜单 - 只对有子栏目的菜单项生效 */
.nav-ul > li.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 二级菜单项 */
.dropdown-item {
    position: relative;
    margin: 0;
}

.dropdown-link {
    display: block;
    padding: 12px 25px;
    color: #555;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 0 10px;
    position: relative;
}

.dropdown-link:hover {
    background: #f8f9fa;
    color: var(--color, #007bff);
    transform: translateX(5px);
}

/* 三级菜单 */
.has-sub-dropdown {
    position: relative;
}

.has-sub-dropdown > .dropdown-link::after {
    content: '›';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #999;
    transition: all 0.3s ease;
}

.has-sub-dropdown:hover > .dropdown-link::after {
    color: var(--color, #007bff);
    transform: translateY(-50%) translateX(3px);
}

.sub-dropdown-menu {
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    padding: 10px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.has-sub-dropdown:hover .sub-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.sub-dropdown-link {
    display: block;
    padding: 10px 20px;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 0 8px;
}

.sub-dropdown-link:hover {
    background: #f8f9fa;
    color: var(--color, #007bff);
    transform: translateX(3px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .head-nav {
        padding: 0 20px;
        height: 60px;
    }
    
    .nav-ul {
        height: 60px;
    }
    
    .nav-ul > li > .nav-link {
        height: 60px;
        padding: 0 15px;
        font-size: 15px;
    }
    
    .dropdown-menu {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    /* 移动端保持原有的移动菜单样式 */
    .dropdown-menu,
    .sub-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        padding: 0;
        border: none;
    }
    
    .dropdown-link,
    .sub-dropdown-link {
        padding: 8px 0;
        margin: 0;
        border-radius: 0;
        border-bottom: 1px solid #eee;
    }
    
    .dropdown-link:hover,
    .sub-dropdown-link:hover {
        background: transparent;
        transform: none;
    }
}

/* 动画增强 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-ul > li.has-dropdown:hover .dropdown-menu {
    animation: fadeInUp 0.3s ease;
}

/* 美化滚动条 */
.dropdown-menu::-webkit-scrollbar,
.sub-dropdown-menu::-webkit-scrollbar {
    width: 4px;
}

.dropdown-menu::-webkit-scrollbar-track,
.sub-dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.dropdown-menu::-webkit-scrollbar-thumb,
.sub-dropdown-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover,
.sub-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}