/* 最新消息標題區塊 */
.news-header {
    background-color: white;
    width: 100%;
    text-align: center;
    padding: 40px 0 10px 0;
    margin: 0;
}

.news-header img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

/* 最新消息區塊樣式 */
.news-section {
    background: url('../images/benq/index_3.png') center center no-repeat;
    /* background-color: #ccc; */
    background-size: cover;
    background-attachment: scroll;
    min-height: 200px;
    width: 100%;
    /* max-width: 1200px; */
    margin: 0 auto !important;
    position: relative;
    padding: 383px 0 100px 0;
    margin-top: 0px !important; /* ✅ 移除上邊距 */
    overflow: visible;
}

.news-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto !important;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 導航按鈕 */
.news-nav-btn {
    background: rgba(200, 200, 200, 0.85);
    border: none;
    width: 35px;
    height: 70px;
    cursor: pointer;
    font-size: 28px;
    font-weight: normal;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateY(60px);
    z-index: 100;
}

/* 左箭頭按鈕 - 右半圓 */
.news-prev {
    border-radius: 0 70px 70px 0;
    left: 0;
    padding-left: 8px;
}

/* 右箭頭按鈕 - 左半圓 */
.news-next {
    border-radius: 70px 0 0 70px;
    right: 0;
    padding-right: 8px;
}

.news-nav-btn:hover {
    background: rgba(180, 180, 180, 0.95);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* 輪播容器 */
.news-carousel {
    flex: 1;
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
    display: flex;
    justify-content: center;
}

.news-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

/* 新聞卡片 

.news-card {
    min-width: calc(33.333% - 10px);
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    opacity: 0.3;
    flex-shrink: 0;
    transform: scale(0.95);
    position: relative;
    cursor: pointer;
}*/
.news-card {
    background: white;
    opacity: 0;
    display: none; /* 預設隱藏所有卡片 */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    width: 30%;
    min-width: 30%;
    max-width: 30%;
    flex-shrink: 0;
    position: relative;
}

.news-card.visible {
    opacity: 1;
    display: block; /* 只有 visible 的卡片才顯示 */
    transform: scale(1);
}

/* 新聞卡片覆蓋連結 */
.news-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    text-decoration: none;
    display: block;
}

/* 確保箭頭連結在覆蓋連結之上 */
.news-arrow {
    position: relative;
    z-index: 10;
}

/* 箭頭連結樣式 */
.arrow-circle {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: #333;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-size: 16px;
    font-weight: normal;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    z-index: 10;
}

/* 當箭頭是連結時的樣式 */
a.arrow-circle:hover {
    background: #000;
    transform: scale(1.1);
    color: white;
    text-decoration: none;
}

/* 當箭頭不是連結時的樣式 */
span.arrow-circle {
    cursor: default;
}

.news-card:hover .arrow-circle {
    background: #000;
    transform: scale(1.1);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 圖片區塊 - 參照 bk_c_list_img.css */
.news-image {
    width: calc(100% - 2px); /* 減去左右各1px */
    height: 250px;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    background: white; /* 白色背景 */
    margin: 1px 1px 0 1px; /* 上、右、下、左各1px的外邊距 */
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    border-radius: 11px; /* 配合margin調整圓角 */
}

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

.news-content {
    padding: 20px;
    position: relative;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 12px;
    gap: 10px;
}

.news-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.news-category {
    background: #eae8e7;
    color: #333;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 11px;
    white-space: nowrap;
}

.news-date {
    color: #999;
    font-weight: 400;
    font-size: 12px;
    white-space: nowrap;
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    margin: 0;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.news-arrow {
    text-align: right;
    flex-shrink: 0;
}

/* MORE 按鈕 */
.news-more {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-top: 80px;
}

.more-btn {
    background: #999999;
    color: white;
    border: none;
    padding: 8px 50px;
    width: auto;
    min-width: 140px;
    height: auto;
    cursor: pointer;
    text-indent: 0;
    overflow: visible;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px 10px 0px 0px;
    transition: all 0.3s ease;
    box-shadow: none;
    letter-spacing: 3px;
    margin-top:30px;
}

.more-btn:hover {
    background: #808080;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .news-section {
        background-size: cover;
        background-attachment: scroll;
        padding: 320px 0 100px 0;
    }
    
    .news-container {
        /* max-width: 800px; */
        gap: 20px;
    }
    
    .news-card {
        min-width: calc(50% - 8px);
    }
    
    .news-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .news-header {
        padding: 40px 0 0 0;
        margin-bottom: -20px;
    }
    
    .news-section {
        padding: 0;
        min-height: auto;
        background-size: 80%;
        background-attachment: scroll;
        background-position: center top;
        /* border:1px solid red; */
    }
    
    .news-container {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }
    
    .news-carousel {
        width: 100%;
        overflow: visible;
    }

    .news-track {
        flex-direction: column;
        gap: 20px;
        transform: none !important;
    }
    
    .news-card {
        width: 100%;
        min-width: 100%;
        opacity: 1;
        transform: none;
        display: block; /* 手機版預設顯示 */
    }

    /* 只顯示前三個新聞項目 */
    .news-card:nth-child(n+4) {
        display: none !important; /* 手機版強制隱藏第4張之後的 */
    }
    
    .news-nav-btn {
        display: none;
    }
    
    .news-title {
        font-size: 13px;
        min-height: 32px;
    }
    
    .news-content {
        padding: 12px;
    }
    
    .more-btn {
        padding: 8px 30px;
        font-size: 14px;
    }

    /* 手機版MORE按鈕緊貼下方邊界 */
    .news-more {
        position: absolute;
        bottom: 0px;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 0;
        z-index: 10;
    }
}


@media (max-width: 480px) {
    .news-section {
        padding: 160px 0 80px;
        min-height: 400px;
        background-size: cover;
        background-attachment: scroll;
        background-position: center center;
    }
    
    .news-container {
        padding: 0 10px;
    }
    
    .news-image {
         height: 220px; 
    }
    
    .news-title {
        font-size: 12px;
        min-height: 30px;
    }
    
    .news-content {
        padding: 25px 20px;
    }
    
    .news-category {
        font-size: 11px;
        padding: 2px 8px;
    }
    
    .news-date {
        font-size: 11px;
    }
    
    .arrow-circle {
        width: 22px;
        height: 22px;
        line-height: 22px;
        font-size: 11px;
    }
}
/* 

@media (max-width: 768px) {
    .news-section {
        max-width: 100%;
        margin: 0 auto !important;
        padding: 300px 0 80px;
        background-size: cover;
        background-attachment: scroll;
        background-position: center center;
    }
    
    .news-container {
        max-width: 100%;
        margin: 0 auto !important;
        padding: 0 15px;
        gap: 20px;
    }
    
    .news-carousel {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .news-section {
        padding: 250px 0 60px;
        margin: 0 auto !important;
        background-size: cover;
        background-attachment: scroll;
        background-position: center center;
    }
    
    .news-container {
        padding: 0 10px;
        margin: 0 auto !important;
    }
} */


/* @media (min-width: 1200px) {
    .news-section {
        width: 1200px;
        max-width: 1200px;
    }
    
    .news-container {
        max-width: 1100px;
    }
    
    .news-carousel {
        max-width: 900px;
    }
} */