/**
 * 统一的分类标签样式
 * 用于新闻页面和服务页面的分类筛选按钮
 */

/* 分类容器 */
.category-container,
.news-tabs,
.service-categories {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

/* 分类按钮组 */
.category-tabs,
.news-tabs .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
}

/* 分类按钮 - 统一样式 */
.category-tab,
.news-tabs .nav-link {
    /* 布局 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    /* 尺寸 */
    padding: 8px 16px;
    min-height: 36px;
    
    /* 样式 */
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    
    /* 文字 */
    color: var(--text-regular);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    white-space: nowrap;
    text-decoration: none;
    
    /* 动画 */
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 悬停状态 */
.category-tab:hover,
.news-tabs .nav-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* 激活状态 */
.category-tab.active,
.news-tabs .nav-link.active {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
}

/* 禁用状态 */
.category-tab.disabled,
.news-tabs .nav-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========================
   响应式适配
   ======================== */

/* 平板设备 */
@media (max-width: 768px) {
    .category-container,
    .news-tabs,
    .service-categories {
        padding: 15px 0;
    }
    
    .category-tab,
    .news-tabs .nav-link {
        padding: 6px 12px;
        min-height: 32px;
        font-size: 13px;
    }
    
    .category-tabs,
    .news-tabs .nav {
        gap: 6px;
    }
}

/* 手机设备 */
@media (max-width: 576px) {
    .category-container,
    .news-tabs,
    .service-categories {
        padding: 12px 0;
    }
    
    .category-tab,
    .news-tabs .nav-link {
        padding: 5px 10px;
        min-height: 30px;
        font-size: 12px;
    }
    
    .category-tabs,
    .news-tabs .nav {
        gap: 5px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 380px) {
    .category-tab,
    .news-tabs .nav-link {
        padding: 4px 8px;
        min-height: 28px;
        font-size: 11px;
    }
    
    .category-tabs,
    .news-tabs .nav {
        gap: 4px;
    }
}

/* 横屏模式 */
@media (max-width: 768px) and (orientation: landscape) {
    .category-container,
    .news-tabs,
    .service-categories {
        padding: 10px 0;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .category-tab,
    .news-tabs .nav-link {
        border: 1px solid var(--border-color);
    }
    
    .category-tab:hover,
    .news-tabs .nav-link:hover {
        border-color: var(--primary-color);
    }
    
    .category-tab.active,
    .news-tabs .nav-link.active {
        border-color: var(--primary-color);
    }
}

/* 暗色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    .category-container,
    .news-tabs,
    .service-categories {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .category-tab,
    .news-tabs .nav-link {
        color: #ccc;
    }
    
    .category-tab:hover,
    .news-tabs .nav-link:hover,
    .category-tab.active,
    .news-tabs .nav-link.active {
        background: var(--primary-color);
        color: white;
    }
}
