/* css/recent_news.css */

.newsSwiper {
    width: 100%;
    position: relative;
    padding-bottom: 20px; /* 縮減底部間距，讓分頁點更靠近卡片 */
}

.news-single-layout {
    display: flex;
    gap: 60px;          /* 加大圖片與文字的間距 */
    background: #fff;
    padding: 60px 80px 30px 80px; /* ⭐ 縮減底部內距 (從 60/80 降至 30)，讓按鈕更往下靠 */
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    align-items: stretch;
    height: 100%;
    min-height: 480px;  /* 稍微下修最小高度，讓比例更緊湊 */
    box-sizing: border-box;
}

/* 確保 Swiper Slide 高度一致 */
.newsSwiper .swiper-slide {
    height: auto;
    display: flex;
}

/* 左側媒體區 */
.news-media-area {
    flex: 0 0 40%;      /* 稍微縮小圖片佔比 (從 45% 變 40%) */
    max-width: 600px;
    display: flex;
    align-items: center;
}

.media-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.media-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 右側文字區 */
.news-text-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px 0;    /* 增加一點上下內距 */
}

.news-detail-tag {
    background-color: #D9534F;
    color: #fff;
    padding: 6px 15px;  /* 稍微加大標籤 */
    font-size: 0.9rem;
    border-radius: 4px;
    align-self: flex-start;
    margin-bottom: 25px; /* 增加與標題的間距 */
}

.news-detail-title {
    font-size: 1.8rem;   /* 調小標題字體 (從 2.2rem 降至 1.8rem) */
    font-weight: 900;
    color: #333;
    margin: 0 0 20px 0;  /* 稍微縮減間距 */
    line-height: 1.4;
}

.news-detail-body {
    font-size: 1.1rem;   /* 稍微調小字體 */
    color: #555;
    line-height: 1.8;
    text-align: left;    /* 強制文字靠左 */
}

/* 移除段落最後的間距，避免撐開底部 */
.news-detail-body p:last-child {
    margin-bottom: 0;
}

.news-more-btn {
    margin-top: auto; /* ⭐ 關鍵：將按鈕推到底部 */
    margin-bottom: 0; /* 確保沒有額外下邊距 */
    padding: 12px 30px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    align-self: flex-start;
}

.news-more-btn:hover {
    background-color: #D9534F;
}

/* --- 左右切換按鈕 (透明灰色樣式) --- */
.news-next, .news-prev {
    width: 50px !important;
    height: 100% !important;
    top: 0 !important;
    margin-top: 0 !important;
    background: linear-gradient(to left, rgba(0,0,0,0.05), transparent);
    color: #999 !important;
    transition: all 0.3s;
    z-index: 10;
}

.news-prev {
    left: 0 !important;
    background: linear-gradient(to right, rgba(0,0,0,0.05), transparent);
}

.news-next {
    right: 0 !important;
}

.news-next:hover, .news-prev:hover {
    background: rgba(0,0,0,0.1) !important;
    color: #333 !important;
}

.news-next::after, .news-prev::after {
    font-size: 24px !important;
    font-weight: bold;
}

/* --- 下方分頁點 --- */
.news-pagination {
    bottom: 0 !important;
}

.news-pagination .swiper-pagination-bullet-active {
    background: #D9534F !important;
    width: 20px !important;
    border-radius: 4px !important;
}

/* 手機版適應 */
@media (max-width: 900px) {
    .news-single-layout {
        flex-direction: column;
        padding: 40px 20px;
    }
    .news-media-area {
        flex: none;
        width: 100%;
    }
    .news-next, .news-prev {
        width: 30px !important;
    }
}