﻿.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;
}

/* 列表頁標題 */
.list-header {
    margin-bottom: 30px;
}

.list-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #ffcc00;
}

.list-description {
    font-size: 16px;
    color: #b0b0b0;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 文章列表 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.article-item {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

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

.article-item-image {
    width: 250px;
    height: 180px;
    object-fit: cover;
}

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

.article-item-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

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

.article-item-title a:hover {
    color: #ffcc00;
}

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

.article-item-meta-item {
    display: flex;
    align-items: center;
}

.article-item-meta-icon {
    margin-right: 5px;
}

.article-item-excerpt {
    font-size: 14px;
    color: #b0b0b0;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

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

.read-more {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--bg-secondary);
    color: #1a4b8c;
    text-decoration: none;
    border-radius: 15px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.read-more:hover {
    background-color: #1a4b8c;
    color: #fff;
}

/* 分頁導航 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    background-color: transparent;
    padding: 10px;
    border-radius: 10px;
}

/* 清除默认的列表样式 */
.pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

/* 清除所有可能的小圆点 */
.pagination *:before,
.pagination *:after {
    display: none !important;
    content: none !important;
}

/* 统一分页元素样式 */
.pagination li {
    list-style: none;
    display: inline-block;
    margin: 0 2px;
}

/* 分页项统一样式 */
.pagination a,
.pagination span {
    color: var(--text-primary);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    margin: 0 4px;
    padding: 0 15px;
    background-color: var(--bg-secondary);
    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 .thisclass,
.pagination .ahover,
.pagination li.thisclass a {
    background-color: var(--primary-color) !important;
    color: var(--text-primary) !important;
    font-weight: bold;
}

/* 处理首页+当前页的情况 */
.pagination li:first-child {
    display: flex;
    align-items: center;
}

/* 页码信息样式 */
.pagination .pageinfo,
.pagination .pageinfo span,
.pagination .pageinfo strong {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
    color: #ffffff;
    padding: 0 10px;
    border-radius: 5px;
    margin-left: 5px;
}

/* 确保移动端显示正常 */
@media (max-width: 768px) {
    .pagination a,
    .pagination span {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
        padding: 0 8px;
    }
    
    .pagination ul {
        gap: 4px;
    }
    
    /* 修复移动端布局问题 */
    .article-list-container {
        padding: 15px;
        border-radius: 10px;
        background-color: #f0f6f3 !important;
    }
    
    .list-container {
        flex-direction: column;
    }
    
    .article-list {
        display: flex;
        flex-direction: column;
    }
    
    .article-card {
        flex-direction: column;
        margin-bottom: 20px;
    }
    
    .article-image {
        width: 100%;
        height: auto;
    }
    
    .article-content {
        padding: 15px;
    }
    
    .article-title {
        font-size: 18px;
    }
    
    .article-description {
        -webkit-line-clamp: 3;
        margin-bottom: 10px;
    }
    
    .sidebar {
        width: 100%;
        margin-top: 30px;
        padding-left: 0;
    }
    
    .article-card {
        width: 100% !important;
        display: block !important;
        margin-right: 0 !important;
    }
    
    .article-list {
        display: block !important;
        column-count: 1 !important;
        column-gap: 0 !important;
    }
    
    .features-grid {
        display: block !important;
        grid-template-columns: 1fr !important;
    }
    
    .feature-card {
        width: 100% !important;
        margin-bottom: 20px !important;
    }
    
    /* 防止任何元素在移动端显示为多列 */
    [class*="grid"],
    [class*="features"],
    [class*="list"],
    [class*="container"] > div {
        display: flex!important;
        grid-template-columns: 1fr !important;
        column-count: 1 !important;
    }
}

/* 側邊欄 */
.sidebar {
    margin-top: 30px;
}

.recent-posts {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.sidebar-title {
    font-size: 20px;
    color: #1a4b8c;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background-color: #ff9d2f;
}

/* 熱門文章 */
.popular-articles {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.popular-article-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.popular-article-content {
    flex: 1;
}

.popular-article-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.popular-article-title a {
    color: var(--text-primary)333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-article-title a:hover {
    color: #1a4b8c;
}

.popular-article-meta {
    font-size: 12px;
    color: var(--text-muted)666;
}

/* 標籤雲 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--bg-secondary);
    color: var(--text-muted)666;
    text-decoration: none;
    border-radius: 15px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: #1a4b8c;
    color: #ffffff;
}

/* 文章列表页面样式 */
body {
    background-color: var(--bg-secondary);
    min-height: 100vh;
}

/* 内容布局 */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 20px;
}

.main-column {
    width: 100%;
}

/* 侧边栏 */
.sidebar {
    width: 300px;
}

/* 移动端底部注册登录按钮 */
.mobile-footer-buttons {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background-color: var(--bg-secondary);
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    justify-content: space-between;
}

.mobile-footer-buttons .auth-button {
    width: 48%;
    text-align: center;
    padding: 12px 0;
    font-weight: 500;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .mobile-footer-buttons {
        display: flex;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 100%;
        margin-top: 30px;
    }

    main.main-content {
        padding-bottom: 70px;
    }
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    list-style: none;
    margin: 20px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--accent-color);
}

/* 页面标题 */
.page-title {
    font-size: 28px;
    color: #1a4b8c;
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: #ff9d2f;
}

/* 文章列表容器 */
.article-list-container {
    background-color: transparent;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
}

/* 文章网格布局 */
.article-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 40px;
}

/* 网格项样式 */
.grid-item {
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    height: 350px;
    display: flex !important;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.grid-item-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.grid-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.grid-item-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.grid-item-title {
    font-size: 18px;
    margin: 0 0 10px;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
}

.grid-item-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grid-item-title a:hover {
    color: var(--accent-color);
}

.grid-item-meta {
    font-size: 14px;
    color: var(--text-muted)666;
    margin-bottom: 10px;
}

.grid-item-meta span {
    margin-right: 15px;
}

.grid-item-excerpt {
    font-size: 14px;
    color: var(--text-muted)666;
    line-height: 1.5;
    height: 63px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    background-color: transparent;
    padding: 10px;
    border-radius: 10px;
}

.pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.pagination a,
.pagination span {
    color: var(--text-primary);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    margin: 0 4px;
    padding: 0 15px;
    background-color: var(--bg-secondary);
    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 .thisclass,
.pagination .ahover,
.pagination li.thisclass a {
    background-color: var(--primary-color) !important;
    color: var(--text-primary) !important;
    font-weight: bold;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 响应式布局 */
@media (max-width: 992px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .page-title {
        font-size: 24px;
        margin: 20px 0;
    }

    .article-list-container {
        padding: 15px;
    }

    .article-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
}

    .grid-item {
        height: auto;
        min-height: 350px;
    }

    .pagination a,
    .pagination span {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
        padding: 0 8px;
    }
}

