

/* =============================================== */
/* 新聞列表頁面樣式 */
/* =============================================== */

.news-list-container {
    width: 80%;
    margin: 0 auto !important;
    padding: 0 0px 20px 20px;
    
}


/* 新聞列表網格 - 每列三個項目 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px auto 0 auto;
    /* max-width: 950px; */
    width: 100%;
}

/* 新聞卡片 - 參照 bk_c_list_img.css */
.news-card {
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 1000px;
    position: relative;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: none;
}

.news-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* 圖片區塊 - 參照 bk_c_list_img.css */
.news-image {
    width: 100%;
    height: 230px;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
    border-radius: 12px;
}

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

.new-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff4757;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    z-index: 2;
}

/* 文字內容 - 參照 bk_c_list_img.css */
.news-content {
    padding: 12px 16px;
    background: transparent;
}

.news-meta {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.meta-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.arrow-circle {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #000000 !important;
    color: white !important;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 10px;
    transition: all 0.3s ease;
    opacity: 0.8;
    font-weight: bold;
}

.news-card:hover .arrow-circle {
    opacity: 1 !important;
    background: #c0bcdd !important;
    transform: scale(1.1);
}

.category-label {
    background: #999999;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
}

.news-date {
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
}

.news-title {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    line-height: 1.6;
    letter-spacing: 0.05em;
    margin: 0 0 15px 0;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 移除箭頭圓圈，改用更簡潔的設計 */
.news-arrow {
    display: none;
}

/* 新聞分類選擇器 */
.news-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto 20px auto;
    gap: 20px;
    flex-wrap: wrap;
    /* max-width: 950px; */
    width: 100%;
}



.news-search-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-icon-btn-outside {
    background: transparent;
    border: none;
    padding: 0;
    color: #b0b0b0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.search-icon-btn-outside:hover {
    color: #808080;
}

.search-icon-btn-outside i {
    font-size: 20px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    overflow: hidden;
    height: 35px;
}

.news-search-input {
    border: none;
    padding: 0 12px;
    font-size: 13px;
    outline: none;
    background: transparent;
    min-width: 150px;
    width: 150px;
    color: #333;
    height: 100%;
}

.news-search-input::placeholder {
    color: #d0d0d0;
    font-weight: 400;
}

.filter-toggle-btn-outside {
    background: transparent;
    border: none;
    padding: 0;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 400;
}

.filter-toggle-btn-outside:hover {
    color: #333;
}

.filter-toggle-btn-outside span {
    color: inherit;
}

.filter-toggle-btn-outside i {
    font-size: 18px;
    color: #808080;
}

/* 條件篩選面板 */
.filter-panel {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0 auto 20px auto;
    width: 100%;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.filter-select {
    padding: 8px 35px 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 13px;
    color: #999;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    outline: none;
    cursor: pointer;
    min-width: 150px;
    height: 35px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.filter-select:focus {
    border-color: #999;
}

.filter-select option {
    color: #333;
}

.filter-select option:first-child {
    color: #999;
}

/* 新聞標題區域 */
.news-header {
    padding: 0 0 20px 0;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 30px;
}

.news-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: nowrap;
}

.news-meta .left-items {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
    flex-shrink: 1;
}

.news-category {
    background: #f5f5f5;
    color: #555;
    padding: 4px 12px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid #ddd;
}

.news-category[data-category="news"] {
    background: #f5f5f5;
    color: #555;
}

.news-category[data-category="activity"] {
    background: #f5f5f5;
    color: #555;
}

.news-category[data-category="performance"] {
    background: #f5f5f5;
    color: #555;
}


.news-new-badge {
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

/* 主要圖片 */
.news-main-image {
    margin: 30px 0;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
}

.news-main-image img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 600px;
    object-fit: cover;
}



/* 圖片畫廊 */
.news-gallery {
    margin: 40px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
}

.news-gallery h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
    border-left: 4px solid #28a745;
    padding-left: 15px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: none;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* 檔案下載區域 */
.news-downloads {
    margin: 40px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.download-buttons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.download-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #6f42c1;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.download-action-btn:hover {
    background: #5a3696;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3);
}

.download-action-btn i {
    font-size: 16px;
}

.file-list {
    display: none;
}

/* 底部操作按鈕 */
.news-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
    background: none;
}

.action-btn.back-btn {
    border-color: #6c757d;
    color: #6c757d;
}

.action-btn.back-btn:hover {
    background: #6c757d;
    color: white;
}

.action-btn.print-btn {
    border-color: #007bff;
    color: #007bff;
}

.action-btn.print-btn:hover {
    background: #007bff;
    color: white;
}

/* 燈箱 */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    margin: auto;
    display: block;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #ccc;
}

#lightbox-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 錯誤訊息 */
.error-message {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    font-size: 18px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}




/* 無資料訊息樣式 */
.no-news-message {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
    border: 2px dashed #e9ecef;
}

.no-news-content {
    text-align: center;
    padding: 40px 0px;
    /* max-width: 500px; */
}

.no-news-content h3 {
    color: #6c757d;
    font-size: 24px;
    margin-bottom: 16px;
    font-weight: 600;
}

.no-news-content p {
    color: #868e96;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 0;
}

.debug-info {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 6px !important;
    padding: 15px !important;
    margin-top: 20px !important;
    font-family: 'Courier New', monospace !important;
    font-size: 12px !important;
    color: #495057 !important;
    text-align: left !important;
    white-space: pre-line;
}

.debug-info strong {
    color: #212529 !important;
    display: block;
    margin-bottom: 8px;
}

/* =============================================== */
/* 分頁導覽樣式 */
/* =============================================== */

.pagination-container {
    display: flex;
    justify-content: center;
    margin: 40px 0 20px 0;
    width: 100%;
}

.pagination {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: #999;
    text-decoration: none;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 400;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-link:hover {
    background: #f0f0f0;
    color: #333;
}

.page-link.active {
    background: #5B2A85;
    color: white;
    cursor: default;
    font-weight: 600;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .news-detail-container {
        max-width: 90%;
        padding: 30px;
    }
    
    .news-header-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .news-category-selector {
        flex-wrap: wrap;
        gap: 2px;
        justify-content: center;
    }
    
    .news-search-container {
        align-self: center;
    }
    
    .search-filter-wrapper {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .news-filter-select {
        min-width: 160px;
    }
    
    .news-search-input {
        width: 200px;
    }
    
    .category-tab {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .filter-row {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .filter-select {
        min-width: 120px;
        flex: 1;
    }
}

@media (max-width: 768px) {
    .news-detail-container {
        padding: 20px;
    }
    
    .news-header-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .news-category-selector {
        gap: 6px;
        justify-content: flex-start;
    }
    
    .news-search-container {
        align-self: center;
    }
    
    .search-filter-wrapper {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        width: 100%;
        max-width: 280px;
    }
    
    .news-filter-select {
        min-width: auto;
        width: 100%;
        padding: 8px 30px 8px 12px;
        font-size: 13px;
    }
    
    .filter-arrow {
        right: 10px;
        font-size: 11px;
    }
    
    .news-search-input {
        width: 100%;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .search-btn {
        padding: 8px 12px;
    }
    
    .search-btn i {
        font-size: 13px;
    }
    
    .category-tab {
        padding: 10px 14px;
        font-size: 12px;
        gap: 5px;
    }
    
    .category-tab i {
        font-size: 9px;
    }
    
    
    .category-tab i {
        font-size: 10px;
    }
    
    .news-title {
        font-size: 26px;
    }
    
    .news-content {
        font-size: 16px;
    }
    
    .news-meta {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap !important;
    }
    
    .news-meta .left-items {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        width: auto;
        flex-wrap: nowrap !important;
        flex-shrink: 1;
        min-width: 0;
    }
    
    .news-share {
        margin-left: 12px;
        margin-top: 0;
        gap: 4px;
    }
    
    .news-share .share-text {
        font-size: 11px;
    }
    
    .news-share .share-btn {
        font-size: 12px;
        padding: 3px;
    }
    
    .share-dropdown {
        right: 0;
        min-width: 140px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .download-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .download-info {
        width: 100%;
    }
    
    .download-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .download-action-btn {
        justify-content: center;
        padding: 14px 20px;
    }
    
    .news-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .breadcrumb {
        flex-wrap: wrap;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .news-detail-container {
        padding: 15px;
    }
    
    .news-category-selector {
        gap: 4px;
        margin-bottom: 10px;
        justify-content: flex-start;
    }
    
    .category-tab {
        padding: 8px 12px;
        font-size: 11px;
        gap: 4px;
    }
    
    .category-tab i {
        font-size: 8px;
    }
    
    .news-meta {
        flex-direction: row;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap !important;
    }
    
    .news-meta .left-items {
        flex-direction: row;
        align-items: center;
        gap: 6px;
        width: auto;
        flex-wrap: nowrap !important;
        flex-shrink: 1;
        min-width: 0;
    }
    
    .news-share {
        margin-left: 10px;
        margin-top: 0;
        gap: 3px;
    }
    
    .news-share .share-text {
        font-size: 10px;
    }
    
    .news-share .share-btn {
        font-size: 11px;
        padding: 2px;
    }
    
    .news-title {
        font-size: 22px;
    }
    
    .news-content {
        font-size: 15px;
    }
    
    .share-dropdown {
        min-width: 130px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .download-buttons {
        gap: 10px;
    }
    
    .download-action-btn {
        font-size: 13px;
        padding: 12px 16px;
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .news-detail-container {
        max-width: 100%;
        margin: 0 auto !important;
        padding: 20px;
        background: url('../images/benq/news_bg.png') repeat;
    }
}

@media (max-width: 480px) {
    .news-detail-container {
        padding: 15px;
        margin: 0 auto !important;
        background: url('../images/benq/news_bg.png') repeat;
    }
}

/* Desktop Enhancement */
@media (min-width: 1200px) {
    .news-detail-container {
        width: 1200px;
        max-width: 1200px;
        background: url('../images/benq/news_bg.png') repeat;
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .news-list-section {
        max-width: 100%;
        margin: 0 auto !important;
        padding: 20px 0;
    }
    
    .news-list-container {
        max-width: 100%;
        margin: 0 auto !important;
        padding: 0 15px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-image {
        height: 200px;
    }
    
    .news-title {
        font-size: 15px;
        min-height: 40px;
    }
    
    .news-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .news-list-section {
        padding: 15px 0;
        margin: 0 auto !important;
    }
    
    .news-list-container {
        padding: 0 10px;
        margin: 0 auto !important;
    }
    
    .news-image {
        height: 200px;
    }
    
    .news-title {
        font-size: 14px;
        min-height: 36px;
    }
    
    .category-label {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .news-date {
        font-size: 12px;
    }
    
    .arrow-circle {
        width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 12px;
        background: #000000 !important;
        color: white !important;
    }
}

/* 平板和中等螢幕 */
@media (min-width: 768px) and (max-width: 1199px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}


/* 響應式設計 - 參照 bk_c_list_img.css */
@media (max-width: 768px) {
    .news-list-section {
        max-width: 100%;
        margin: 0 auto !important;
        padding: 20px 0;
    }
    
    .news-list-container {
        max-width: 100%;
        margin: 0 auto !important;
        padding: 0 15px;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .news-image {
        height: 200px;
    }
    
    .news-content {
        padding: 12px 16px;
    }
    
    .news-title {
        font-size: 0.85em;
        min-height: 2.5em;
    }
}

@media (max-width: 576px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .news-image {
        height: 200px;
    }
    
    .category-label {
        font-size: 0.7em;
        padding: 2px 6px;
    }
    
    .news-date {
        font-size: 0.8em;
    }
    
    .news-title {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .news-list-section {
        padding: 15px 0;
        margin: 0 auto !important;
    }
    
    .news-list-container {
        padding: 0 10px;
        margin: 0 auto !important;
    }
    
    .news-image {
        height: 200px;
    }
    
    .news-content {
        padding: 10px 14px;
    }
}


/* 響應式設計 - 無資料訊息 */
@media (max-width: 768px) {
    .no-news-message {
        min-height: 300px;
        margin: 15px 0;
    }
    
    .no-news-content {
        padding: 30px 0px;
    }
    
    .no-news-content h3 {
        font-size: 20px;
    }
    
    .no-news-content p {
        font-size: 14px;
    }
}

/* 響應式設計 - 分頁 */
@media (max-width: 768px) {
    .pagination-container {
        margin: 30px 0 15px 0;
    }
    
    .pagination {
        gap: 6px;
    }
    
    .page-link {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pagination-container {
        margin: 25px 0 10px 0;
    }
    
    .pagination {
        gap: 4px;
    }
    
    .page-link {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
}
