/* 文章列表页面样式 - 版本 20250831_003040 */

/* 强制移除所有留白 */
.article-card * {
    box-sizing: border-box !important;
}

.article-card,
.article-image-container,
.article-image-container a,
.article-img {
    margin: 0 !important;
    padding: 0 !important;
}

/* 容器和布局 */
.article-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.article-list-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

/* 分类筛选 */
.category-filter {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: white;
    color: #6c757d;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.category-btn:hover {
    color: #495057;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    text-decoration: none;
}

.category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(74, 77, 72, 0.3);
}

/* 面包屑和排序按钮容器 */
.breadcrumb-sort-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.breadcrumb-sort-container nav {
    margin-bottom: 0 !important;
    flex: 1;
    padding-left: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.breadcrumb-sort-container .breadcrumb {
    margin-bottom: 0 !important;
    padding-left: 0 !important;
    background: transparent !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}

/* 内联排序选项 */
.sort-options-inline {
    display: flex;
    align-items: center;
    margin-top: -2px;
}

.sort-buttons-small {
    display: flex;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.sort-btn-small {
    padding: 0.5rem 1rem;
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    border-right: 1px solid #e9ecef;
}

.sort-btn-small:last-child {
    border-right: none;
}

.sort-btn-small:hover {
    color: #495057;
    background: #f8f9fa;
    text-decoration: none;
}

.sort-btn-small.active {
    background: var(--primary-color);
    color: white;
}


/* 搜索结果页面标签限制 */
.search-results .article-tags > *:nth-child(n+7) {
    display: none;
}

/* 文章列表 */
.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 3rem;
}

/* 文章卡片 - 左图右文布局 */
.article-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    margin-bottom: 1.5rem !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 0 1.5rem 0 !important;
    min-height: 150px !important;
    max-height: 170px !important;
    will-change: transform, box-shadow;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

    .article-image-container {
        position: relative !important;
        width: 25% !important;
        min-width: 120px !important;
        max-width: 180px !important;
        aspect-ratio: 3/2 !important;
        flex-shrink: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0.5% !important;
        border-radius: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

.article-image-container a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    z-index: 2 !important;
    position: relative !important;
}

.article-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    transition: transform 0.3s ease !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
}

.article-card:hover .article-img {
    transform: scale(1.05);
}

.article-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #adb5bd;
    font-size: 3rem;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    letter-spacing: 0.5px;
}


.article-content {
    padding: 1.2rem !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    margin: 0 !important;
    min-height: 150px !important;
    max-height: 170px !important;
    position: relative;
    overflow: visible !important;
}

.article-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 0 !important;
    font-size: 0.85rem !important;
    color: #6c757d !important;
    margin-top: auto !important;
    flex-wrap: nowrap !important;
    gap: 1rem !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
}

.article-views {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-category {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-category:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    text-decoration: none;
    transform: scale(1.05);
}

.article-stats {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.article-date {
    font-weight: 500;
    font-size: 0.8rem;
    color: #999;
}

.article-title {
    margin-bottom: 0.5rem;
    margin-top: 0.2rem;
}

.article-title a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.0rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    line-clamp: 1;
    overflow: hidden;
}

.article-title a:hover {
    color: #007bff;
    text-decoration: none;
}

.article-excerpt {
    color: #6c757d;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    font-size: 0.8rem;
}

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

.article-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    align-items: center !important;
    flex: 1 !important;
    min-width: 0 !important;
}

.article-tag {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1976d2;
    padding: 0.25rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-tag:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    transform: scale(1.05);
}

.read-more-btn {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.read-more-btn:hover {
    background: var(--primary-color-hover);
    transform: scale(1.05);
    text-decoration: none;
    color: white;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 0;
}

/* 分类介绍 */
.category-description {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    margin-top: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.category-description-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.category-description-text {
    color: #6c757d;
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .article-list-container {
        padding: 1rem 0.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .articles-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .article-card {
        background: white;
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        overflow: hidden;
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        position: relative !important;
        padding: 0 !important;
        margin: 0 !important;
        min-height: 130px !important;
        max-height: 150px !important;
    }
    
    .article-image-container {
        width: 30% !important;
        min-width: 120px !important;
        max-width: 160px !important;
        aspect-ratio: 1/1 !important;
        margin: 0 !important;
        padding: 2% !important;
        border-radius: 0 !important;
        position: relative;
        flex-shrink: 0;
        overflow: hidden;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }
    
    .article-image-container a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .article-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 6px !important;
    }
    
    .article-placeholder {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        color: #adb5bd;
        font-size: 2rem;
    }
    
    .article-badge {
        position: absolute;
        top: 8px;
        left: 8px;
        z-index: 2;
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
        border-radius: 8px;
    }
    
    .article-views {
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(4px);
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
        border-radius: 8px;
        color: white;
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }
    
    .article-sales {
        background: rgba(220, 53, 69, 0.9);
        backdrop-filter: blur(4px);
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
        border-radius: 8px;
        color: white;
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }
    
    .article-stats {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    
    .article-content {
        padding: 0.8rem !important;
        flex: 1;
        min-width: 0;
        margin: 0 !important;
        min-height: 130px;
        max-height: 150px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
        overflow: visible !important;
    }
    
    .article-title {
        margin: 0 0 0.5rem 0;
        line-height: 1.3;
    }
    
    .article-title a {
        font-size: 0.9rem;
        line-height: 1.4;
        font-weight: 600;
        color: #2c3e50;
        text-decoration: none;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        line-clamp: 1;
        overflow: hidden;
    }
    
    .article-title a:hover {
        color: #007bff;
    }
    
    .article-excerpt {
        font-size: 0.75rem;
        line-height: 1.3;
        margin-bottom: 0.4rem;
        color: #666;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-clamp: 2;
        overflow: hidden;
    }
    
    .article-meta {
        margin-top: auto !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
        margin-bottom: 0 !important;
        font-size: 0.8rem !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    .article-tags {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.25rem !important;
        align-items: center !important;
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    /* 移动端标签数量限制 */
    .article-tags > *:nth-child(n+3) {
        display: none;
    }
    
    .article-tag {
        font-size: 0.65rem;
        padding: 0.1rem 0.3rem;
        background: linear-gradient(135deg, #e3f2fd, #bbdefb);
        color: #1976d2;
        border-radius: 6px;
        text-decoration: none;
        font-weight: 500;
    }
    
    .article-category {
        font-size: 0.65rem;
        padding: 0.1rem 0.3rem;
        background: linear-gradient(135deg, #e3f2fd, #bbdefb);
        color: #1976d2;
        border-radius: 6px;
        text-decoration: none;
        font-weight: 500;
    }
    
    .category-label {
        font-size: 0.65rem;
        color: #999;
        margin-right: 0.2rem;
    }
    
    .article-date {
        font-size: 0.65rem;
        color: #999;
        font-weight: 500;
        white-space: nowrap;
    }
    
    .category-buttons {
        justify-content: center;
    }
    
    .category-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    /* 移动端面包屑和排序按钮 */
    .breadcrumb-sort-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .breadcrumb-sort-container nav {
        width: 100%;
    }
    
    .sort-options-inline {
        align-self: flex-end;
    }
    
    .sort-btn-small {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}

/* 性能优化 */
.article-card {
    contain: layout style paint;
}

.article-img {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-img:hover {
    transform: scale(1.02);
}

/* 骨架屏加载效果 */
.article-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-image-container.loading::before {
    opacity: 1;
}

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

@media (max-width: 480px) {
    .article-list-container {
        padding: 0.5rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .category-filter {
        padding: 1rem;
    }
    
    .article-card {
        height: 120px !important;
    }
    
    .article-image-container {
        width: 120px !important;
        height: 120px !important;
        display: block !important;
    }
    
    .article-image-container a {
        line-height: 0 !important;
    }
    
    .article-img {
        vertical-align: top !important;
    }
    
    .article-content {
        padding: 0.6rem !important;
        height: 120px;
    }
    
    .article-title {
        margin: 0 0 0.3rem 0;
    }
    
    .article-title a {
        font-size: 0.9rem;
        line-height: 1.2;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .article-excerpt {
        font-size: 0.75rem;
        line-height: 1.25;
        margin-bottom: 0.3rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    /* 小屏幕标签数量进一步限制 */
    .article-tags > *:nth-child(n+3) {
        display: none;
    }
    
    .article-tag,
    .article-category {
        font-size: 0.6rem;
        padding: 0.08rem 0.25rem;
    }
    
    .category-label {
        font-size: 0.6rem;
    }
    
    .article-meta {
        gap: 0.25rem;
    }
    
    .article-date {
        font-size: 0.6rem;
    }
    
    .article-views {
        font-size: 0.6rem;
        padding: 0.1rem 0.25rem;
        margin-left: 0.5rem;
    }
    
    .article-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
        top: 6px;
        left: 6px;
    }
}
