/* ========== 标签页导航组件样式 ========== */

/* ========== 标签页导航 - 二级吸顶效果 ========== */
.tabs-container {
    width: 100vw;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
  
    position: -webkit-sticky; /* Safari支持 */
    position: sticky;
    top: 70px; /* 导航栏高度 */
    z-index: 998;
    margin-left: calc(-50vw + 50%); /* 使元素突破容器限制，实现全宽 */
    margin-right: calc(-50vw + 50%);
    padding: 0;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    /* 确保sticky效果正常工作 */
    will-change: transform;
    box-shadow: none;
}

.tabs-container.sticky {

    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: none;
}

.nav-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    gap: 0;
    height: 100%;
    align-items: center;
    max-width: 1200px; /* 内容区域最大宽度 */
    width: 100%;
    justify-content: center;
    border-bottom: none;
}

.nav-tab {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 32px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.nav-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--primary-green, #38a660);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-tab:hover {
    color: var(--primary-green, #38a660);
    background-color: #f8f9fa;
}

.nav-tab:hover::after {
    width: 80%;
}

.nav-tab.active {
    color: var(--primary-green, #38a660);
    border-bottom-color: transparent;
    background-color: #fff;
}

.nav-tab.active::after {
    width: 80%;
}

.nav-tab span {
    display: block;
    font-family:PingFangSC-regular;
    font-size: 16px;
}

/* ========== 平板端优化 ========== */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-tabs {
        max-width: 90%;
        gap: 10px;
    }
    
    .nav-tab {
        padding: 0 24px;
    }
    
    .nav-tab span {
        font-size: 14px;
    }
}

/* ========== 手机端优化 ========== */
@media (max-width: 768px) {
    .tabs-container {
        height: 50px;
        top: 60px; /* 移动端导航栏高度 */
        padding: 0 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .tabs-container::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .nav-tabs {
        justify-content: center;
        gap: 5px;
        min-width: max-content;
        padding: 0 5px;
    }
    
    .nav-tab {
        padding: 0 18px;
        font-size: 14px;
        flex-shrink: 0; /* 防止标签被压缩 */
        min-width: fit-content;
  
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .nav-tab:hover {
        background-color: rgba(56, 166, 96, 0.1);
    }
    
    .nav-tab.active {
        background-color: #fff;
        border-bottom-width: 2px;
        transform: translateY(-1px);
        /* box-shadow: 0 2px 8px rgba(56, 166, 96, 0.15); */
    }
    
    .nav-tab span {
        font-size: 14px;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .tabs-container {
        height: 48px;
        padding: 0 8px;
    }
    
    .nav-tab {
        padding: 0 15px;
        font-size: 13px;
    }
    
    .nav-tab span {
        font-size: 13px;
    }
}
