/* 分类页面核心样式 */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin: 2rem 0;
}

@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
}

.breadcrumb-section {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
}

.breadcrumb-item {
    margin-right: 10px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    margin-right: 10px;
    color: #6c757d;
}

.breadcrumb-item.active {
    color: #6c757d;
}

.category-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.category-title {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: #212529;
}

.category-description {
    margin: 0 0 15px 0;
    color: #6c757d;
    line-height: 1.6;
}

.category-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 0.9rem;
    color: #6c757d;
}

.filter-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.view-options {
    display: flex;
    gap: 10px;
}

.view-btn {
    background: #fff;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
}

.articles-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
}

/* 列表视图样式 */
.articles-container.list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 网格视图样式 */
.articles-container.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
}

/* 响应式网格布局 */
@media (max-width: 768px) {
    .articles-container.grid-view {
        grid-template-columns: 1fr;
    }
}

.article-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.article-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #6c757d;
    flex-wrap: wrap;
}

.article-status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-status.published {
    background-color: #e6f4ea;
    color: #0e7490;
}

.article-status.draft {
    background-color: #fef3c7;
    color: #d97706;
}

.industry-tag {
    background-color: #dbeafe !important;
    color: #1e40af !important;
    font-weight: 500;
}

.article-category {
    background: #0d6efd;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.article-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.article-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #0d6efd;
}

.article-excerpt {
    margin: 15px 0;
    line-height: 1.7;
    color: #495057;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.article-tag {
    color: #0d6efd;
    text-decoration: none;
    font-size: 0.85rem;
}

.read-more {
    background: #0d6efd;
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.read-more:hover {
    background: #0b5ed7;
}

.sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-title {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #212529;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.header-search {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.95rem;
}

.header-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 10px;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    position: relative;
    background: white;
    border: 1px solid #eaeaea;
    font-size: 1rem;
    font-weight: 500;
}

/* 确保所有状态下都没有下划线 */
.category-link:link,
.category-link:visited,
.category-link:hover,
.category-link:active {
    text-decoration: none !important;
}

.category-link:hover {
    background: #f8fbff;
    color: #0d6efd;
    border-color: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.15);
}

.category-link.active {
    background: linear-gradient(135deg, #0d6efd, #3b82f6);
    color: white;
    border-color: #0d6efd;
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    transform: translateY(-2px);
}

.category-link.active::before {
    content: '→';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    background: #0d6efd;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.3);
}

.category-count {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    background-color: #f0f7ff;
    border: 1px solid #e0efff;
    border-radius: 25px;
    margin-left: 10px;
    min-width: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.category-count:hover {
    transform: scale(1.15);
    background-color: #e0e8ff;
    border-color: #b0c4ff;
}

/* Remove link underlines from category links */
#categoriesList a, #categoriesList a:link, #categoriesList a:visited, #categoriesList a:hover, #categoriesList a:active {
    text-decoration: none !important;
    color: #333;
    display: block;
    padding: 15px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 1rem;
    font-weight: 500;
}

#categoriesList a:hover {
    background-color: #f8f9ff;
    border-color: #e0efff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

#categoriesList a.active {
    background-color: #e0f2fe;
    border-color: #0ea5e9;
    color: #0369a1;
    position: relative;
}

#categoriesList a.active::after {
    content: '→';
    position: absolute;
    right: 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

.category-link:hover .category-count {
    background: #0d6efd;
    color: white;
    transform: scale(1.15);
    border-color: #0d6efd;
}

.category-link.active .category-count {
    background: white;
    color: #0d6efd;
    font-weight: 800;
    border-color: #ffffff;
    box-shadow: 0 3px 8px rgba(255, 255, 255, 0.3);
    transform: scale(1.15);
}

/* 为分类列表添加整体样式 */
.categories-list {
    background: #fafafa;
    border-radius: 12px;
    padding: 10px;
    border: 1px solid #f0f0f0;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud-item {
    color: #0d6efd;
    text-decoration: none;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 15px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.tag-cloud-item:hover {
    background: #0d6efd;
    color: white;
}

.popular-articles {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-article {
    display: flex;
    gap: 12px;
}

.popular-article-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 5px 0;
}

.popular-article-title a {
    color: #212529;
    text-decoration: none;
}

.popular-article-title a:hover {
    color: #0d6efd;
}

.popular-article-meta {
    font-size: 0.8rem;
    color: #6c757d;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 5px;
}

.page-item {
    margin: 0 2px;
}

.page-link {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #0d6efd;
    transition: all 0.2s;
}

.page-link:hover {
    background: #f8f9fa;
}

.page-link.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.empty-state-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.empty-state-title {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #212529;
}

.empty-state-description {
    margin: 0 0 20px 0;
    color: #6c757d;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #0d6efd;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
}

.loading-state {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-excerpt {
    height: 20px;
    margin-bottom: 10px;
    border-radius: 4px;
}