.blog-header {
    text-align: center;
    padding: 100px 20px;
    background-color: #f5f7fa;
    margin-top: 90px;
}

.blog-title {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.blog-description {
    font-size: 18px;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0 auto;
}

.blog-search {
    margin-bottom: 40px;
}

.search-input {
    width: 90%;
    height: 40px;
    padding: 12px 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    background-image: url('path-to-search-icon.svg');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.blog-grid {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 100px;
    display: grid;
    grid-template-columns: 0.8fr 0.4fr;
    gap: 60px;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.blog-post {
    display: flex;
    gap: 30px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    align-items: center;
}

.blog-post:hover {
    transform: translateY(-5px);
}

.post-thumbnail {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-category {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.post-title {
    font-size: 24px;
    margin: 0 0 12px 0;
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--secondary-color);
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
}

.sidebar {
    height: fit-content;
}

.sidebar-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-post {
    display: flex;
    gap: 20px;
    text-decoration: none;
    padding: 10px 0;
    align-items: center;
}

.recent-post img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.recent-post-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: var(--primary-color);
}

.category-tags {
    max-width: 1100px;
    margin: 100px auto 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.category-tag {
    padding: 8px 20px;
    border-radius: 20px;
    background-color: #f5f7fa;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background-color: #e0e5ea;
}

.category-tag.active {
    background-color: var(--primary-color);
    color: white;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 20px 70px 20px;
}

.page-number {
    color: var(--secondary-color);
    font-size: 14px;
}

.page-controls {
    display: flex;
    gap: 10px;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f5f7fa;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.page-btn svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-post {
        flex-direction: column;
        align-items: stretch;
    }

    .post-thumbnail {
        width: 100%;
        height: 200px;
    }

    .post-content {
        justify-content: flex-start;
    }

    .sidebar {
        display: none;
    }

    .category-tags {
        margin: 20px auto;
        justify-content: center;
    }

    .category-tag {
        padding: 6px 16px;
        font-size: 13px;
    }

    .pagination {
        margin-top: 30px;
        padding-top: 30px;
    }

    .page-btn {
        width: 36px;
        height: 36px;
    }

    .page-btn svg {
        width: 18px;
        height: 18px;
    }

    .recent-post img {
        width: 100px;
        height: 100px;
    }
}

/* 添加分頁相關樣式 */
.posts-container {
    position: relative;
}

.posts-page {
    display: none;
}

.posts-page.active {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 搜索框樣式 */
.blog-search {
    margin-bottom: 40px;
}

.search-input {
    width: 90%;
    height: 40px;
    padding: 12px 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    background-image: url('path-to-search-icon.svg');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

/* 熱門文章區塊 */
.sidebar-section {
    margin-bottom: 40px;
}

.sidebar-section-title {
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* 特色文章 */
.featured-post {
    position: relative;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 350px;
}

.featured-post img {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 8px;
    z-index: 1;
}

.featured-post::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 350px;
    background: linear-gradient(
        45deg,
        rgba(0,0,0,0.8) 0%,
        rgba(0,0,0,0.4) 50%,
        transparent 100%
    );
    border-radius: 8px;
    z-index: 2;
}

.featured-post .post-content {
    position: relative;
    z-index: 3;
    padding: 30px;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}

.featured-post .post-category {
    display: inline-block;
    font-size: 14px;
    color: #fff;
    margin-bottom: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 4px;
}

.featured-post .post-title {
    font-size: 20px;
    line-height: 1.4;
    margin: 0;
    color: #fff;
    max-width: 80%;
}

/* 最新文章列表 */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-post {
    display: flex;
    gap: 20px;
    text-decoration: none;
    padding: 10px 0;
    align-items: center;
}

.recent-post img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.recent-post-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: var(--primary-color);
}