:root {
    --primary-color: #4D8061; /* 竹葉綠 */
    --secondary-color1: #F5F5DC; /* 米白色 */
    --accent-color: #D4AF37; /* 金色點綴 */
    --text-color: #333333;
    --light-text: #666666;
    --border-color: #E0E0E0;
    --hover-color: #3A614A;
    --light-color: #F2F2F2; /* 淺灰色 */
    --dark-color: #333333; /* 深灰色 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans TC', sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.page-title {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.page-title h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    font-weight: 600;
}

.page-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 10px auto;
}

.subtitle {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.2rem;
    color: var(--light-text);
}

/* 搜尋與分類區域 */
.filter-section {
    background-color: var(--secondary-color1);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.category-filter {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    padding: 8px 16px;
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover, .category-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* 部落格文章網格 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

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

.blog-image {
    height: 200px;
    overflow: hidden;
}

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

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 20px;
}

.blog-tag {
    display: inline-block;
    background-color: var(--secondary-color1);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.blog-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.blog-excerpt {
    color: var(--light-text);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--light-text);
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.read-more {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    display: inline-block;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--hover-color);
}

/* 特色文章區域 */
.featured-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--primary-color);
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 5px;
    background-color: var(--accent-color);
}

.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.featured-image {
    height: 400px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

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

.featured-excerpt {
    margin-bottom: 25px;
    color: var(--light-text);
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 分頁 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 10px;
}

.page-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-item:hover, .page-item.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 響應式設計 */
@media (max-width: 992px) {
    .featured-post {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 576px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}