.news-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.news-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8f9fa;
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-item {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.news-link {
    color: #333;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-link:hover {
    color: #007bff;
}


.featured-news-card {
    position: relative;
    border-radius: 8px;
    /* 重新啟用圓角 */
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 97.5%;
    width: 100%;

    aspect-ratio: 16/9;

}

.featured-news-card .position-relative {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    /* 確保內部元素沒有圓角 */
}

.featured-news-card img {
    width: 100%;
    height: 70%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    /* 確保圖片沒有圓角 */
}

/* 添加漸變背景遮罩 */
.featured-news-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.8) 100%);
    pointer-events: none;
}

.featured-news-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    z-index: 1;

}

/* 添加 badge 樣式 */
.badge.bg-primary {
    font-size: 1rem;
    /* 調整文字大小 */
    /* padding: 0.5rem 1rem;  調整內邊距 */
    /* border-radius: 4px;  可選：調整圓角 */
    font-weight: 500;
    /* 可選：調整文字粗細 */
}

/* 調整文字大小和間距 */
.featured-news-content h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);

}

.featured-news-content p {
    font-size: 1rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 響應式調整 */
@media (max-width: 768px) {
    .featured-news-card {
        aspect-ratio: 4/3;
    }

    /* 調整漸變背景遮罩 */
    .featured-news-card::after {
        height: 100%;
        /* 增加漸層高度 */
        background: linear-gradient(to bottom,
                rgba(255, 255, 255, 0) 0%,
                rgba(255, 255, 255, 0.9) 40%,
                rgba(255, 255, 255, 1) 100%);
    }

    .featured-news-content {
        bottom: 0px;
        /* 調整內容位置，往下移動 */
        padding: 1rem;
        減少內邊距
    }
}



/* 響應式調整 */
@media (max-width: 768px) {

    .featured-news-card .position-relative {
        position: absolute;
        min-height: 205px;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        /* 確保內部元素沒有圓角 */
    }

    .featured-news-card {
        position: relative;
        border-radius: 8px;
        /* 重新啟用圓角 */
        overflow: hidden;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        height: 100%;
        width: 100%;


    }

    .featured-news-content h1 {
        font-size: 1.3rem;

    }
}



/* 改進側邊新聞卡片樣式 */
/* 改進側邊新聞卡片樣式 */
.side-news-card {
    height: 100%;
    /* 改為 100% 以適應容器高度 */

    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    overflow: hidden;
    margin-bottom: 0;
    /* 移除底部邊距 */
}

.side-news-card .img-container {
    height: 160px;
    /* 減少圖片容器高度 */
    overflow: hidden;
    border-radius: 0;
}

.side-news-card .card-body {
    padding: 0.75rem;
    /* 減少內邊距 */
    flex-grow: 1;
    font-size: 1.15rem;
    /* 減小字體大小 */
    flex-direction: column;
    border-radius: 8px;
}

.side-news-card .card-title {
    font-size: 1.15rem;
    /* 減小標題字體大小 */
    line-height: 1.3;
    margin: 0.25rem 0;
    /* 減少標題邊距 */
    height: 2.6em;
}

/* 調整側邊新聞容器的間距 */
.side-news-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0.5rem;
    /* 控制上下間距 */
    column-gap: 0.05rem;
    /* 控制左右間距 */
    height: 100%;
}

/* .side-news-container > a {
    margin-bottom: 0 !important; 
} */

/* 響應式調整 */
@media (max-width: 768px) {
    .side-news-card .img-container {
        height: 120px;
        /* 在手機上進一步減少圖片高度 */
    }

    .side-news-card .card-title {
        font-size: 0.9rem;
    }

    .side-news-card .card-body {
        padding: 0.5rem;
    }

    .side-news-card {
        min-height: 160px;
        /* 在手機上減少高度 */
    }

    .side-news-card .text-muted {
        font-size: 0.7rem;
        margin-top: 20px;
        display: block;
        /* 確保日期單獨佔一行 */
    }

}

