/* 文章列表页专用样式 - 由list.css合并而来 */

.article-image {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9的比例 */
    position: relative;
    overflow: hidden;
}

.article-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-image:hover img {
    transform: scale(1.05);
}

/* 列表頁主體 */
.list-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 30px 0;
}

.list-main {
    flex: 1;
    min-width: 0;
}

.list-sidebar {
    width: 300px;
}

/* 文章列表頁特定樣式 */
.article-list-container {
    max-width: 100%;
    background-color: #f0f6f3 !important;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.article-card {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.article-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.article-title a {
    color: #1a4b8c;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #3a7bd5;
}

.article-description {
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.article-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: #1a4b8c;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.article-link:hover {
    background-color: #3a7bd5;
}

/* 分頁導航 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    background-color: #f0f6f3 !important;
    padding: 10px;
    border-radius: 10px;
}

/* 页码信息样式 */
.pagination .pageinfo,
.pagination li span.pageinfo {
    display: block;
    color: #333 !important;
    font-size: 14px;
    padding: 8px 15px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    font-weight: normal;
}

/* 修正HTML结构问题 */
.pagination > li {
    list-style: none;
    display: inline-block;
    margin: 0 4px;
}

/* 清除默认的列表样式 */
.pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

/* 分页项统一样式 */
.pagination a,
.pagination span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    margin: 0 4px;
    padding: 0 15px;
    background-color: #ffffff;
    color: #1a4b8c;
    border-radius: 5px;
    font-size: 14px;
    font-weight: normal;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: none;
}

/* 悬停效果 */
.pagination a:hover {
    background-color: #3a7bd5;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 设置当前页样式 - 蓝底白字 */
.pagination .thisclass,
.pagination .ahover,
.pagination li.thisclass a {
    background-color: #1a4b8c !important;
    color: #ffffff !important;
    font-weight: bold;
}

/* 确保当前页总是高亮显示 */
.pagination .thisclass a,
.pagination a.thisclass,
.pagination .current {
    background-color: #1a4b8c !important;
    color: #ffffff !important;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .article-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .article-list {
        grid-template-columns: 1fr;
    }
    
    .list-container {
        flex-direction: column;
    }
    
    .article-list-container {
        padding: 15px;
        border-radius: 10px;
        background-color: #f0f6f3 !important;
    }
    
    .pagination a,
    .pagination span {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
        padding: 0 8px;
    }
    
    .pagination ul {
        gap: 4px;
    }
}

/* =============================================
   BREADCRUMB (list page)
   ============================================= */
.breadcrumb {
    margin: 16px 0 8px;
    font-size: 13px;
    color: #888;
    padding: 8px 12px;
    background: #f5f7fa;
    border-radius: 6px;
}

.breadcrumb a {
    color: #1a4b8c;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-inner {
    display: inline;
}

/* =============================================
   PAGE TITLE (list page)
   ============================================= */
.page-title {
    margin: 16px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a4b8c;
}

.page-title h1 {
    font-size: 22px;
    color: #1a4b8c;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

/* =============================================
   ARTICLE CARD IMAGE — override common.css
   height: auto !important with higher specificity
   ============================================= */
.article-list-container .article-image img,
.article-card .article-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

/* =============================================
   LIST SIDEBAR — width + wrapper
   ============================================= */
.list-sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* =============================================
   SIDEBAR RECENT POST ITEMS (used in list sidebar)
   ============================================= */
.list-sidebar .recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.list-sidebar .recent-post-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #eef0f4;
}

.list-sidebar .recent-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.list-sidebar .recent-post-image {
    width: 72px;
    height: 54px !important;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
}

.list-sidebar .recent-post-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

.list-sidebar .recent-post-content {
    flex: 1;
    min-width: 0;
}

.list-sidebar .recent-post-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.35;
}

.list-sidebar .recent-post-title a {
    color: #1a4b8c;
    text-decoration: none;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-sidebar .recent-post-title a:hover {
    color: #3a7bd5;
}

.list-sidebar .recent-post-date {
    font-size: 11px;
    color: #aaa;
}

@media (max-width: 992px) {
    .list-sidebar {
        width: 100%;
    }
}
