/* 輪播區塊主設計 */
.post-carousel-section {
    margin-bottom: 50px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
}

.carousel-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.carousel-title:before,
.carousel-title:after {
    content: "";
    height: 1px;
    background: #333;
    width: 30px;
    flex: none;
    margin: 0 15px;
}

.post-carousel {
    position: relative;
    padding: 10px 0 30px;
}

/* Swiper 容器設定 */
.post-carousel .swiper {
    padding: 0 60px;
    overflow: hidden;
}

/* 確保每排只顯示4個 */
.post-carousel .swiper-slide {
    width: 25%;
    padding: 10px;
    box-sizing: border-box;
}

/* 文章卡片設計 */
.post-card {
    text-align: center;
    transition: all 0.3s ease;
    background: transparent;
    box-shadow: none;
    position: relative;
    padding: 15px;
    width: 300px;
    margin: 0 auto;
}

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

/* 文章圖片容器 */
.post-image-wrapper {
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
    width: 300px;
    aspect-ratio: 16/9;
}

/* 日期顯示 */
.post-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #000000;
    color: #fff;
    padding: 8px 12px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    z-index: 2;
}

.post-card .post-image {
    display: block;
    transition: transform 0.4s ease;
    height: 100%;
    width: 300px;
}

.post-card .post-image img {
    width: 300px;
    height: 169px; /* 16:9 比例 */
    border-radius: 10px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

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

/* 文章標題 */
.post-card .post-title {
    margin: 15px 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-card .post-title a {
    color: #333;
    text-decoration: none;
}

.post-card .post-title a:hover {
    color: #666;
}

/* 導航按鈕設計 */
.post-carousel .swiper-button-next,
.post-carousel .swiper-button-prev {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.post-carousel .swiper-button-next:hover,
.post-carousel .swiper-button-prev:hover {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.post-carousel .swiper-button-next:after,
.post-carousel .swiper-button-prev:after {
    font-size: 18px;
    color: #333;
}

.post-carousel .swiper-button-disabled {
    opacity: 0;
    cursor: default;
}

/* 查看更多按鈕 */
.view-more-wrapper {
    text-align: center;
    margin-top: 30px;
}

.view-more-button {
    display: inline-block;
    padding: 10px 30px;
    background-color: #f8f8f8;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}

.view-more-button:hover {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

/* 響應式設計 */
@media screen and (max-width: 1400px) {
    .post-carousel .swiper-slide {
        display: flex;
        justify-content: center;
    }
}

@media screen and (max-width: 1200px) {
    .post-carousel .swiper-slide {
        width: 33.333%;
    }
}

@media screen and (max-width: 768px) {
    .post-card,
    .post-image-wrapper,
    .post-card .post-image,
    .post-card .post-image img {
        width: 280px;
    }
    
    .post-card .post-image img {
        height: 158px;
    }
    
    .post-carousel .swiper {
        padding: 0 40px;
    }
    
    .post-carousel .swiper-button-next,
    .post-carousel .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
    
    .post-carousel .swiper-button-next:after,
    .post-carousel .swiper-button-prev:after {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .post-card,
    .post-image-wrapper,
    .post-card .post-image,
    .post-card .post-image img {
        width: 260px;
    }
    
    .post-card .post-image img {
        height: 146px;
    }
    
    .post-carousel .swiper-slide {
        width: 50%;
        padding: 2px;
    }
    
    .post-carousel .swiper {
        padding: 0 30px;
    }
    
    .post-carousel .swiper-button-next,
    .post-carousel .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    
    .post-carousel .swiper-button-next:after,
    .post-carousel .swiper-button-prev:after {
        font-size: 14px;
    }
    
    .post-card .post-title {
        font-size: 14px;
        height: 40px;
    }
}
