/* 新聞詳細頁面樣式 */
.news-detail-container {
    /* max-width: 1200px; */
    margin: 0 auto !important;
    padding: 0px 0px 20px 60px;
    
    min-height: 100vh;
    width: 80%;
    /* border:1px solid red; */
}

/* 新聞內容區域 */
.news-detail {
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
}

/* 新聞分類選擇器容器 */
.news-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.news-search-container {
    flex-shrink: 0;
}

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

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

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

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

/* 分類標籤內的連結樣式 */
.news-category a {
    color: inherit;
    text-decoration: none;
    display: inline;
}

.news-category a:hover {
    color: inherit;
    text-decoration: none;
}

.news-category a:visited {
    color: inherit;
}

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

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

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

.news-date {
    color: #666;
    font-size: 12px;
    font-weight: 400;
}

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

/* 分享功能 */
.news-share {
    position: relative;
    margin-left: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-share .share-text {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.news-share .share-btn {
    width: auto;
    height: auto;
    border: none;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    background: none;
    color: #495057;
    padding: 4px;
}

.news-share .share-btn:hover {
    background: none;
    color: #212529;
    transform: scale(1.1);
    box-shadow: none;
}

.share-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.share-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 15px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.2s ease;
}

.share-option:hover {
    background: #f8f9fa;
}

.share-option:first-child {
    border-radius: 8px 8px 0 0;
}

.share-option:last-child {
    border-radius: 0 0 8px 8px;
}

.share-option.facebook {
    color: #1877f2;
}

.share-option.twitter {
    color: #1da1f2;
}

.share-option.line {
    color: #00c300;
}

.share-option.copy {
    color: #6c757d;
}

.news-title-wrapper {
    width: 100%;
    display: block;
    clear: both;
    margin-top: 10px;
}

.news-title {
    font-size: 22px !important;
    font-weight: bold;
    line-height: 1;
    color: #333;
    margin: 0px 0 25px 0 !important;
    display: block;
    width: 100%;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

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

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

/* 新聞內容 */
.news-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 50px;
    max-width: none;
}

.news-content p {
    margin-bottom: 20px;
}

.news-content h2,
.news-content h3,
.news-content h4 {
    margin: 30px 0 15px 0;
    color: #333;
}

.news-content h2 {
    font-size: 22px;
    border-left: 4px solid #007bff;
    padding-left: 15px;
}

.news-content h3 {
    font-size: 20px;
    color: #555;
}

.news-content ul,
.news-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.news-content li {
    margin-bottom: 8px;
}

/* 圖片畫廊 */
.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: #dedede;
    border-radius: 8px;
}

.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.file-item-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #6f42c1;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

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

.file-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.file-icon-wrapper i {
    font-size: 16px;
}

.file-title {
    font-size: 14px;
    font-weight: 500;
}

.external-link {
    display: inline-block;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    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;
    position: relative;
}

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

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

/* 手機版 link-btn 的圖示包裝器 */
@media (max-width: 768px) {
    .link-btn i {
        width: 45px;
        height: 45px;
        background: #6f42c1;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        color: white;
        flex-shrink: 0;
    }
    
    .link-btn:hover i {
        background: #5a3696;
    }
}

@media (max-width: 480px) {
    .link-btn i {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .news-downloads {
        margin: 30px 0;
        padding: 20px 15px;
        background: #dedede;
    }
    
    .file-list {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        justify-content: flex-start;
    }
    
    .file-item-link,
    .link-btn {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        padding: 0;
        background: transparent;
        color: #6f42c1;
        white-space: normal;
        text-align: left;
        word-break: break-word;
        font-size: 13px;
        gap: 12px;
        border-radius: 0;
    }
    
    .file-item-link:hover,
    .link-btn:hover {
        background: transparent;
        transform: none;
        box-shadow: none;
        color: #5a3696;
    }
    
    .file-icon-wrapper {
        width: 45px;
        height: 45px;
        background: #6f42c1;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .file-icon-wrapper i {
        font-size: 20px;
        color: white;
    }
    
    .file-item-link:hover .file-icon-wrapper,
    .link-btn:hover .file-icon-wrapper {
        background: #5a3696;
    }
    
    .link-btn i {
        width: 45px;
        height: 45px;
        background: #6f42c1;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        color: white;
        flex-shrink: 0;
    }
    
    .link-btn:hover i {
        background: #5a3696;
    }
    
    .file-title {
        font-size: 13px;
        word-break: break-word;
        overflow-wrap: break-word;
        line-height: 1.4;
        color: inherit;
        flex: 1;
    }
}

/* 底部操作按鈕 */
.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;
}

.news-content {
    padding: 20px;
}

/* 導航按鈕樣式 */
.news-navigation {
    margin: 40px 0 20px 0;
    padding: 20px 40px;
    display: flex;
    justify-content: center; /* 改為置中對齊 */
    align-items: center;
    position: relative; /* 為絕對定位的子元素提供參考點 */
}

.nav-back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #000; /* 文字改為黑色 */
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    position: absolute; /* 使返回列表獨立定位 */
    left: 40px; /* 固定在左側 */
}

.nav-back-link:hover {
    color: #333;
    text-decoration: none;
}

.nav-back-link i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #000; /* 圓圈背景改為黑色 */
    border-radius: 50%;
    font-size: 12px;
    color: #fff; /* 箭頭圖示改為白色 */
    transition: all 0.3s ease;
}

.nav-back-link:hover i {
    background: #333; /* 懸停時變為深灰色 */
    color: #fff;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

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

.nav-btn:hover:not(.disabled) {
    background: #8a8a8a;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.nav-btn.disabled {
    background: #d0d0d0;
    color: #888;
    cursor: not-allowed;
    opacity: 0.7;
}
/* 響應式設計 */
/* @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: flex-start;
    }
    
    .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;
    }
} */

@media (max-width: 768px) {
    /* .benq-content-title {
        display: none !important;
    } */
    
    .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-wrapper {
        width: 100%;
        clear: both;
        margin-top: 25px;
    }
    
    .news-title {
        font-size: 32px;
    }
    
    .news-content {
        font-size: 16px;
    }
    
    .news-meta {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .news-meta .left-items {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        width: auto;
        flex-wrap: nowrap;
    }
    
    .news-share {
        margin-left: 8px;
        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) {
    /* .benq-content-title {
        display: none !important;
    } */
    
    .news-detail-container {
        padding: 15px;
    }
    
    .news-downloads {
        margin: 25px 0;
        padding: 15px 10px;
        background: #dedede;
    }
    
    .file-list {
        gap: 10px;
        justify-content: flex-start;
    }
    
    .file-item-link,
    .link-btn {
        flex-direction: row;
        align-items: center;
        width: 100%;
        padding: 0;
        background: transparent;
        color: #6f42c1;
        font-size: 12px;
        gap: 10px;
    }
    
    .file-item-link:hover,
    .link-btn:hover {
        color: #5a3696;
    }
    
    .file-icon-wrapper {
        width: 40px;
        height: 40px;
    }
    
    .file-icon-wrapper i {
        font-size: 18px;
    }
    
    .link-btn i {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .file-title {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .news-category-selector {
        gap: 4px;
        margin-bottom: 10px;
    }
    
    .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: 10px;
        flex-wrap: wrap;
    }
    
    .news-meta .left-items {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        width: auto;
        flex-wrap: nowrap;
    }
    
    .news-share {
        margin-left: 6px;
        margin-top: 0;
        gap: 3px;
    }
    
    .news-share .share-text {
        font-size: 10px;
    }
    
    .news-share .share-btn {
        font-size: 11px;
        padding: 2px;
    }
    
    .news-title-wrapper {
        width: 100%;
        clear: both;
        margin-top: 20px;
    }
    
    .news-title {
        font-size: 28px;
    }
    
    .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;
    }
}

@media (max-width: 480px) {
    .news-detail-container {
        padding: 15px;
        margin: 0 auto !important;
    }
}

/* Desktop Enhancement */
@media (min-width: 1200px) {
    .news-detail-container {
        width: 1200px;
        max-width: 1200px;
    }
}


/* 響應式設計 */
@media (max-width: 768px) {
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-image {
        height: 180px;
    }
    
    .news-title {
        font-size: 15px;
        min-height: 40px;
    }
    
    .news-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    
    .news-image {
        height: 160px;
    }
    
    .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;
    }
}

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

/* Desktop Enhancement for News List */
@media (min-width: 1200px) {
    
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
}

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



/* 響應式設計 */
@media (max-width: 768px) {
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-image {
        height: 180px;
    }
    
    .news-content {
        padding: 15px;
    }
    
    .news-title {
        font-size: 15px;
        min-height: 40px;
        letter-spacing: 0.1em;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    
    .news-image {
        height: 160px;
    }
    
    .category-label {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .news-date {
        font-size: 12px;
    }
    
    .news-title {
        font-size: 14px;
        letter-spacing: 0.1em;
        line-height: 1.6;
    }
    
    .arrow-circle {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 12px;
    }
}


/* 響應式設計 */
@media (max-width: 768px) {
    .news-navigation {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        align-items: center; /* 手機版也置中 */
    }
    
    .nav-back-link {
        position: static; /* 手機版取消絕對定位 */
        margin-bottom: 10px; /* 增加與下方的間距 */
    }
    
    .nav-buttons {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .news-navigation {
        margin: 30px 0 15px 0;
        padding: 15px;
    }
    
    .nav-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .nav-back-link {
        font-size: 13px;
    }
}
