﻿.article-image {
    width: 100%;
    height: 200px; /* 可以根據需要調整高度 */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.article-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    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: #1e1e1e;
    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.2);
}

.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: #252525;
    color: #ffcc00;
    text-decoration: none;
    border-radius: 15px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.read-more:hover {
    background-color: #333;
    color: #fff;
}

/* 分頁導航 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination-list {
    display: flex;
    list-style: none;
    gap: 5px;
}

.pagination-item a, .pagination-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #1e1e1e;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination-item a:hover {
    background-color: #252525;
    color: #ffcc00;
}

.pagination-item.active span {
    background-color: #e60000;
    color: #fff;
}

.pagination-prev a, .pagination-next a {
    width: auto;
    padding: 0 15px;
}

/* 側邊欄 */
.sidebar-section {
    background-color: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.sidebar-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #ffcc00;
    position: relative;
    padding-bottom: 10px;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: #e60000;
}

/* 熱門文章 */
.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: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-article-title a:hover {
    color: #ffcc00;
}

.popular-article-meta {
    font-size: 12px;
    color: #b0b0b0;
}

/* 標籤雲 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 5px 10px;
    background-color: #252525;
    color: #b0b0b0;
    text-decoration: none;
    border-radius: 15px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: #333;
    color: #ffcc00;
}

/* 移動端適配 */
@media (max-width: 768px) {
    .list-container {
        flex-direction: column;
    }
    
    .list-sidebar {
        width: 100%;
    }
    
    .article-item {
        flex-direction: column;
    }
    
    .article-item-image {
        width: 100%;
        height: 200px;
    }
}
/* 文章列表頁特定樣式 */

/* 文章卡片樣式 */
.article-list-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 30px 0;
}

.article-list {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.article-card {
    background-color: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #ffcc00;
}

.article-description {
    font-size: 14px;
    color: #b0b0b0;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.article-link {
    align-self: flex-start;
    display: inline-block;
    padding: 8px 15px;
    background-color: #252525;
    color: #ffcc00;
    text-decoration: none;
    border-radius: 15px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.article-link:hover {
    background-color: #333;
    color: #fff;
}

/* 側邊欄樣式 */
.sidebar {
    width: 300px;
}

.recent-posts {
    background-color: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.sidebar-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #ffcc00;
    position: relative;
    padding-bottom: 10px;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: #e60000;
}

.recent-post-item {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #252525;
}

.recent-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-post-image {
    width: 80px;
    height: 60px;
    border-radius: 5px;
    overflow: hidden;
}

.recent-post-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.recent-post-title a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recent-post-title a:hover {
    color: #ffcc00;
}

.recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-content {
    flex: 1;
}

.recent-post-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.4;
}

.recent-post-title a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recent-post-title a:hover {
    color: #ffcc00;
}

.recent-post-date {
    font-size: 12px;
    color: #b0b0b0;
}

/* 分頁導航 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: nowrap; /* 防止換行 */
    overflow-x: auto; /* 如果空間不夠，允許水平滾動 */
    padding: 5px 0; /* 添加一些內邊距以便於滾動 */
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px; /* 使用最小寬度而不是固定寬度 */
    height: 40px;
    background-color: #1e1e1e;
    color: #e0e0e0;
    text-decoration: none;
    margin: 0 3px; /* 減少左右間距 */
    border-radius: 5px;
    transition: all 0.3s ease;
    padding: 0 10px; /* 為文字內容添加內邊距 */
    white-space: nowrap; /* 防止文字換行 */
}

.pagination-item:hover {
    background-color: #252525;
    color: #ffcc00;
}

.pagination-item.active {
    background-color: #e60000;
    color: #fff;
}

/* 頁面標題 */
.page-title {
    background-color: #1a1a1a;
    padding: 20px 0;
    margin-top: 15px;
    margin-bottom: 10px;
}

.page-title h1 {
    font-size: 24px;
    color: #ffcc00;
    margin: 0;
}

/* 移動端適配 */
@media (max-width: 768px) {
    .article-list-container {
        flex-direction: column;
    }
    
    .article-list {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        width: 100%;
    }
}
/* 文章標題鏈接樣式 */
.article-title a {
    color: #ffcc00;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #e60000;
}

/* 文章圖片鏈接樣式 */
.article-image a {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}