/* 文章页面布局 */
.article-section {
    padding: 30px 0;
    background: #f8f9fa;
}

.article-container {
    display: flex;
    gap: 30px;
    position: relative;
    min-height: 500px; /* 确保容器有最小高度 */
}

/* 左侧导航样式 */
.article-nav {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
    height: fit-content; /* 根据内容自适应高度 */
}

.article-nav.fixed {
    position: fixed;
    top: 120px; /* 面包屑导航的高度 + 间距 */
    width: 280px;
}

.article-nav.absolute {
    position: absolute;
    bottom: 0;
    width: 280px;
}

.article-nav h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.article-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-nav li {
    margin-bottom: 12px;
}

.article-nav a {
    display: block;
    padding: 8px 12px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.article-nav a:hover,
.article-nav a.active {
    background: #f5f7fa;
    color: #1890ff;
}

/* 文章布局 */
.article-layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    gap: 30px;
}

.main-content {
    flex: 1;
    min-width: 0; /* 防止内容溢出 */
}

/* 文章列表样式 */
.article-list {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.article-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-image {
    width: 280px;
    flex-shrink: 0;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.article-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-content a {
    text-decoration: none;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.article-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #999;
    margin-bottom: 12px;
}

.article-meta i {
    margin-right: 5px;
    color: #ffa500;
}

.article-desc {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.article-tag {
    background: #fff2e5;
    color: #ff6b00;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    transition: background 0.3s ease;
    border: 1px solid #ffe0c0;
}

.article-tag:hover {
    background: #ffe0c0;
    color: #e65c00;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: #fff;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

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

.page-link.active {
    background: #1890ff;
    color: #fff;
}

/* 文章详情 */
.article-detail {
    background: #fff;
    border-radius: 8px;
    /*box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);*/
    padding: 30px;
}

.article-detail .article-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.article-detail .article-meta {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.article-detail .article-content h2 {
    font-size: 20px;
    margin: 30px 0 15px;
    color: #333;
}

.article-detail .article-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.article-detail .article-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-detail .article-content li {
    margin-bottom: 8px;
}

/* 响应式布局 */
@media (max-width: 992px) {
    .article-layout {
        flex-direction: column;
    }
    
    .article-item {
        flex-direction: column;
    }
    
    .article-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .article-list {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

/* 针对文章列表的桌面端布局 */
@media (min-width: 993px) {
    .article-list {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 30px;
    }
    
    .article-item {
        flex-direction: row;
        height: auto;
    }
    
    .article-image {
        width: 280px;
        height: 180px;
    }
    
    .article-content {
        padding: 0 20px;
        justify-content: flex-start;
    }
    
    .article-title {
        margin-top: 0;
        padding-top: 0;
    }
} 