@charset "UTF-8";

/*
 * header.css - 现代化头部导航样式
 * 重构版本，符合设计图效果
 */

/* ===================== 头部整体布局 ===================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 106px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999;
    transition: all 0.3s ease;
}

/* 头部容器 */
.header-container {
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    position: relative;
    z-index: 1001;
}

.content-container{
    min-width: 1300px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
}

/* ===================== LOGO区域 ===================== */
.header-logo {
    flex-shrink: 0;
    /* margin-left: 260px; */
}

.header-logo a {
    display: block;
    line-height: 1;
}

.header-logo img {
    height: 68px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

/* Logo显示控制 */
.logo-default {
    display: block;
}

.logo-scrolling {
    display: none;
}

/* ===================== 导航区域 ===================== */
.header-nav {
    flex: none;
    display: flex;
    justify-content: flex-start;
    /* margin-left: 360px; */
}

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

.nav-item {
    position: relative;
    padding: 0 5px;
    z-index: 1002;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff !important;
    font-size: 18px;
    font-weight: 500;
    line-height: 106px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    text-decoration: none;
}

/* 向下箭头样式 */
.dropdown-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    opacity: 0.8;
    color: inherit;
}

.dropdown-arrow svg {
    stroke: currentColor;
}

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

/* 导航链接悬停效果 */
.nav-link:hover,
.nav-item.active .nav-link {
    color: #ffffff !important;
    transform: translateY(-2px);
    text-decoration: none;
}

/* 下划线动画 */
.nav-link::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    width: 0;
    height: 3px;
    background: #D89335;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-item.active .nav-link::after {
    width: 80%;
}


.dropdown-item:hover .sub-arrow {
    opacity: 1;
    transform: translateX(2px);
}

/* 三级菜单 */
.sub-dropdown {
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 200px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-15px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1001;
    list-style: none;
    margin: 0;
    padding: 16px 0;
    margin-left: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

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

.sub-link {
    display: block;
    color: #333333;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    padding: 12px 20px;
    transition: all 0.3s ease;
    border-radius: 10px;
    margin: 0 12px;
}

.sub-link:hover {
    color: #D89335;
    background: linear-gradient(135deg, rgba(253, 208, 0, 0.08), rgba(253, 208, 0, 0.04));
    transform: translateX(4px);
}

/* ===================== 滚动状态 ===================== */
/* 
 * 滚动效果说明：
 * - 默认状态（顶部）: 黑色半透明背景 + 白色文字
 * - 向下滚动时: 白色半透明背景 + 深色文字 
 * - 回到顶部: 恢复黑色半透明背景 + 白色文字
 */

/* 向下滚动时的样式（不是在顶部时） */
.header.scrolling {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

/* 滚动时的文字颜色 - 确保可见性 */
.header.scrolling .nav-link {
    color: #333333 !important; /* 使用important确保优先级 */
}

/* .header.scrolling .nav-link:hover,
.header.scrolling .nav-item.active .nav-link {
    color: #1673FF !important; /* 悬停时使用蓝色 
} */

/* 滚动状态下的箭头颜色 */
.header.scrolling .dropdown-arrow,
.header.scrolling .sub-arrow {
    color: #333333 !important;
}

.header.scrolling .dropdown-arrow svg,
.header.scrolling .sub-arrow svg {
    stroke: #333333;
}

/* 滚动状态下的下划线颜色 */
.header.scrolling .nav-link:hover::after,
.header.scrolling .nav-item.active .nav-link::after {
    background: #D89335;
}

/* ===================== 滚动方向控制 ===================== */
/* 
 * 滚动方向效果说明：
 * - scroll-top: 向上滚动时显示header
 * - scroll-down: 向下滚动时隐藏header  
 */

/* 向上滚动时显示header */
.header.scroll-top {
    transform: translateY(0);
    transition: transform 0.3s ease;
}

/* 向下滚动时隐藏header */
.header.scroll-down {
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dropdown-menu {
    animation: fadeInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sub-dropdown {
    animation: fadeInRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 移除text-shadow效果，只保留下划线 */
/* .nav-item:hover .nav-link {
    text-shadow: 0 2px 8px rgba(253, 208, 0, 0.3);
} */

.dropdown-link:hover,
.sub-link:hover {
    box-shadow: 0 4px 16px rgba(253, 208, 0, 0.15);
}

/* ===================== 全宽度抽屉下拉菜单 - 细节优化版 ===================== */
.mega-dropdown {
    position: fixed;
    top: 106px;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 16px rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    max-height: 0;
    overflow: hidden;
    will-change: transform, opacity;
}

/* 显示状态 */
.nav-item:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 450px;
}

.mega-dropdown-wrapper {
    display: flex;
    width: 100%;
    min-height: 380px;
    background: #ffffff;
}

/* ===================== 左侧区域优化 ===================== */
.mega-left {
    flex: 0 0 460px;
    padding: 45px 70px 55px 280px;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-right: 1px solid rgba(0, 0, 0, 0.04);
}

.mega-category {
    margin-bottom: 32px;
    animation: slideIn 0.6s ease 0.1s both;
}

.category-title {
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #1a202c;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.category-desc {
    font-size: 15px;
    margin: 0;
    color: #1673FF;
    line-height: 1.5;
    max-width: 300px;
}

.mega-banner {
    width: 380px;
    height: 228px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    animation: slideIn 0.6s ease 0.2s both;
    transition: transform 0.3s ease;
}

.mega-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

.mega-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.mega-banner:hover img {
    transform: scale(1.05);
}

/* ===================== 中间区域优化 ===================== */
.mega-center {
    flex: 0 0 300px;
    padding: 45px 35px;
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.04);
}

.second-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.second-item {
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.25s ease;
    animation: slideIn 0.4s ease both;
}

.second-item:nth-child(1) { animation-delay: 0.1s; }
.second-item:nth-child(2) { animation-delay: 0.15s; }
.second-item:nth-child(3) { animation-delay: 0.2s; }
.second-item:nth-child(4) { animation-delay: 0.25s; }
.second-item:nth-child(5) { animation-delay: 0.3s; }
.second-item:nth-child(6) { animation-delay: 0.35s; }

.second-item.active,
.second-item:hover {
    background: #f0f8ff;
    transform: translateX(4px);
}

.second-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    text-decoration: none;
    color: #4a5568;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.25s ease;
    position: relative;
}

.second-item.active .second-link,
.second-item:hover .second-link {
    color: #1673FF;
}

.second-item.active .second-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #3182ce 0%, #2b6cb0 100%);
    border-radius: 0 2px 2px 0;
}

.has-sub-icon {
    opacity: 0.5;
    transition: all 0.25s ease;
    transform: translateX(0);
}

.second-item.active .has-sub-icon,
.second-item:hover .has-sub-icon {
    opacity: 1;
    color: #2b6cb0;
    transform: translateX(2px);
}

/* ===================== 右侧区域优化 ===================== */
.mega-right {
    flex: 1;
    padding: 45px 40px;
    background: #ffffff;
    min-height: 380px;
}

.third-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
    animation: slideIn 0.5s ease 0.3s both;
}

.third-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #3182ce 0%, #2b6cb0 100%);
    border-radius: 1px;
}

.third-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    animation: slideIn 0.6s ease 0.4s both;
}

.third-link {
    display: block;
    padding: 14px 18px;
    text-decoration: none;
    color: #718096;
    font-size: 14px;
    font-weight: 500;
    background: #f7fafc;
    border-radius: 8px;
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.third-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(49, 130, 206, 0.1) 50%, transparent 100%);
    transition: left 0.5s ease;
}

.third-link:hover {
    color: #2b6cb0;
    background: #ebf8ff;
    border-color: #bee3f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.15);
}

.third-link:hover::before {
    left: 100%;
}

/* ===================== 动画关键帧 ===================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================== 性能优化 ===================== */
.mega-dropdown * {
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================== 当没有三级导航时 ===================== */
.mega-dropdown-wrapper.no-third-nav .mega-right {
    display: none;
}

.mega-dropdown-wrapper.no-third-nav .mega-center {
    flex: 1;
    border-right: none;
  }
  
  /* ===================== 移动端菜单切换按钮 ===================== */
  #menu-toggle {
      display: none;
      position: relative;
      width: 44px;
      height: 44px;
      cursor: pointer;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.2);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.3);
      transition: all 0.3s ease;
      z-index: 1003;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      padding: 10px;
  }
  
  #menu-toggle:hover {
      background: rgba(255, 255, 255, 0.3);
      transform: scale(1.05);
  }
  
  /* 汉堡菜单三条线 */
  #menu-toggle::before {
      content: '';
      position: absolute;
      width: 20px;
      height: 2px;
      background: #ffffff;
      border-radius: 1px;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      transition: all 0.3s ease;
      box-shadow: 0 -6px 0 #ffffff, 0 6px 0 #ffffff;
  }
  
  #menu-toggle::after {
      content: '';
      position: absolute;
      width: 20px;
      height: 2px;
      background: transparent;
      border-radius: 1px;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      transition: all 0.3s ease;
      opacity: 0;
  }
  
  /* 隐藏span元素 */
  #menu-toggle span {
      display: none;
  }
  
  /* 菜单打开时的图标变化 */
  #menu-toggle.menu-opened::before {
      transform: translate(-50%, -50%) rotate(45deg);
      box-shadow: none;
  }
  
  #menu-toggle.menu-opened::after {
      background: #ffffff;
      opacity: 1;
      transform: translate(-50%, -50%) rotate(-45deg);
  }
  
  /* 滚动状态下的按钮颜色 */
  .header.scrolling #menu-toggle {
      background: rgba(0, 0, 0, 0.08);
      border-color: rgba(0, 0, 0, 0.15);
  }
  
  .header.scrolling #menu-toggle::before {
      background: #333333;
      box-shadow: 0 -6px 0 #333333, 0 6px 0 #333333;
  }
  
  .header.scrolling #menu-toggle::after {
      background: #333333;
  }
  
  /* 滚动状态下菜单打开时的图标颜色 */
  .header.scrolling #menu-toggle.menu-opened::before {
      background: #333333;
      box-shadow: none;
  }
  
  .header.scrolling #menu-toggle.menu-opened::after {
      background: #333333;
  }
  
  /* ===================== 响应式优化 ===================== */
@media (max-width: 1400px) {
    .mega-left {
        flex: 0 0 400px;
        padding: 40px 50px 50px 220px;
    }
    
    .mega-banner {
        width: 320px;
        height: 192px;
    }
    
    .mega-center {
        flex: 0 0 280px;
        padding: 40px 30px;
    }
}

@media (max-width: 1200px) {
    .mega-dropdown-wrapper {
        flex-direction: column;
        min-height: auto;
    }
    
    .mega-left {
        flex: none;
        padding: 30px 40px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    }
    
    .mega-center,
    .mega-right {
        padding: 25px 30px;
        border: none;
        border-top: 1px solid rgba(0, 0, 0, 0.04);
    }
    
    .third-content {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
}

/* 防止菜单打开时页面滚动 */
body.menu-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    /* 头部布局调整 */
    .header {
        height: 70px;
    }
    
    .header-container {
        padding: 0 20px;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 100%;
    }

    .content-container{
        width: 100%;
        min-width: 100%;
    }
    
    /* Logo左移 */
    .header-logo {
        margin-left: 0 !important;
        order: 1 !important;
        flex-shrink: 0;
    }
    
    .header-logo img {
        height: 45px !important;
        width: auto;
        display: block;
    }
    
    /* 显示菜单切换按钮 */
    #menu-toggle {
        display: flex;
        order: 3;
        margin-left: auto;
        flex-shrink: 0;
    }
    
    /* 隐藏桌面导航 */
    .header-nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        max-height: calc(100vh - 70px);
        background: #ffffff;
        margin: 0;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        order: 2;
        -webkit-overflow-scrolling: touch;
        padding: 0;
    }
    
    /* 菜单打开状态 */
    .header-nav.open {
        transform: translateX(0) !important;
        display: block !important;
    }
    
    /* 移动端导航列表 - 覆盖media.css样式 */
    .header-nav > ul,
    .nav-list {
        position: static !important;
        transform: none !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 20px 0 40px 0 !important;
        min-height: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        list-style: none !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: #ffffff !important;
        overflow: visible !important;
        right: auto !important;
        left: 0 !important;
        top: 0 !important;
    }
    
    .header-nav > ul > li,
    .nav-item {
        border-bottom: 1px solid #f0f0f0 !important;
        width: 100% !important;
        float: none !important;
        display: block !important;
        margin: 0 !important;
        height: auto !important;
    }
    
    .header-nav > ul > li > a,
    .nav-link {
        color: #333333 !important;
        font-size: 16px !important;
        line-height: 60px !important;
        padding: 0 25px !important;
        justify-content: space-between !important;
        display: flex !important;
        align-items: center !important;
        text-decoration: none !important;
        width: 100% !important;
        min-height: 60px !important;
        box-sizing: border-box !important;
        font-weight: 500 !important;
        background: transparent !important;
        height: 60px !important;
        z-index: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .header-nav > ul > li > a:hover,
    .nav-link:hover {
        background: #f8f9fa !important;
        color: #333333 !important;
        transform: none !important;
    }
    
    /* 移动端选中状态样式 */
    .header-nav > ul > li.active > a,
    .nav-item.active .nav-link {
        background: #1673FF !important;
        color: #ffffff !important;
        font-weight: 600 !important;
    }
    
    .header-nav > ul > li > a::after,
    .nav-link::after {
        display: none !important;
    }
    
    /* 移动端下拉箭头 */
    .dropdown-arrow,
    .dropdown-arrow svg {
        stroke: #333333 !important;
        width: 16px !important;
        height: 16px !important;
        display: inline-flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* 移动端下拉菜单 */
    .mega-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: none;
        overflow: visible;
        background: #f8f9fa;
        border: none;
        border-top: 1px solid #e9ecef;
        display: none;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .nav-item.has-dropdown.open .mega-dropdown {
        display: block !important;
    }
    
    .mega-dropdown-wrapper {
        flex-direction: column;
        min-height: auto;
        display: flex;
        width: 100%;
    }
    
    .mega-left {
        display: none;
    }
    
    .mega-center {
        flex: 1;
        padding: 15px 25px;
        background: transparent;
        border: none;
        width: 100%;
    }
    
    .mega-right {
        padding: 15px 25px;
        background: #ffffff;
        border-top: 1px solid #e9ecef;
    }
    
    .second-nav {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .second-item {
        animation: none;
        margin-bottom: 5px;
        width: 100%;
    }
    
    .second-link {
        padding: 12px 15px;
        font-size: 14px;
        border-radius: 6px;
        background: #ffffff;
        border: 1px solid #e9ecef;
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-decoration: none;
        color: #333333;
        width: 100%;
    }
    
    .third-content {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .third-link {
        font-size: 13px;
        padding: 10px 15px;
        text-align: left;
        margin-bottom: 8px;
    }
    
    .third-link:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    /* 最小屏幕优化 */
    .header {
        height: 60px;
    }
    
    .header-container {
        padding: 0 15px;
        height: 100%;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    /* Logo靠左 */
    .header-logo {
        margin-left: 0 !important;
        order: 1 !important;
    }
    
    .header-logo img {
        height: 36px !important;
    }
    
    /* 菜单按钮居中对齐 */
    #menu-toggle {
        width: 36px;
        height: 36px;
        order: 3;
        margin-left: auto;
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    #menu-toggle span {
        width: 16px;
    }
    
    .nav-open {
        box-shadow: 
            0 -4px 0 #ffffff,
            0 4px 0 #ffffff;
    }
    
    /* 滚动状态 */
    .header.scrolling #menu-toggle {
        background: rgba(0, 0, 0, 0.1);
        border-color: rgba(0, 0, 0, 0.2);
    }
    
    .header.scrolling #menu-toggle::before {
        background: #333333;
        box-shadow: 0 -6px 0 #333333, 0 6px 0 #333333;
    }
    
    .header.scrolling #menu-toggle::after {
        background: #333333;
    }
    
    /* 滚动状态下菜单打开时的图标颜色 */
    .header.scrolling #menu-toggle.menu-opened::before {
        background: #333333;
        box-shadow: none;
    }
    
    .header.scrolling #menu-toggle.menu-opened::after {
        background: #333333;
    }
    
    /* 菜单高度调整 */
    .header-nav {
        top: 60px;
        height: calc(100vh - 60px);
        max-height: calc(100vh - 60px);
    }
    
    .nav-link {
        font-size: 15px;
        line-height: 50px;
        padding: 0 20px;
    }
    
    /* 最小屏幕选中状态样式 */
    .nav-item.active .nav-link {
        background: #1673FF !important;
        color: #ffffff !important;
        font-weight: 600 !important;
    }
    
    .nav-list {
        padding: 15px 0 30px 0;
    }
    
    /* 确保菜单内容完全可见 */
    .mega-dropdown-wrapper {
        padding-bottom: 20px;
    }
}

/* 防止移动端菜单打开时页面滚动 */
html.no-touch {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ===================== 页面遮罩效果 ===================== */
/* 注释掉或删除这个遮罩效果 */
/*
.header::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.nav-item:hover ~ .header::before,
.header:has(.nav-item:hover)::before {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: all;
}
*/

/* ===================== 动画增强 ===================== */
.mega-dropdown-wrapper > * {
    animation: slideInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.mega-left {
    animation-delay: 0.1s;
}

.mega-center {
    animation-delay: 0.2s;
}

.second-item {
    opacity: 0;
    animation: fadeInUp 0.4s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.second-item:nth-child(1) { animation-delay: 0.3s; }
.second-item:nth-child(2) { animation-delay: 0.35s; }
.second-item:nth-child(3) { animation-delay: 0.4s; }
.second-item:nth-child(4) { animation-delay: 0.45s; }
.second-item:nth-child(5) { animation-delay: 0.5s; }
.second-item:nth-child(6) { animation-delay: 0.55s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================== 确保正确的层级关系 ===================== */
.header-container {
    position: relative;
    z-index: 1001;
}

.nav-item {
    position: relative;
    z-index: 1002;
}

.mega-dropdown {
    z-index: 1000;
}





