/* 
.news-category-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.category-tab {
    padding: 8px 16px;
    text-align: center;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}


.category-tab.active {
    background: #5B2A85;
    color: white;
    border-color: #5B2A85;
    box-shadow: 0 2px 6px rgba(0,123,255,0.3);
}


.category-tab i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.category-tab.active i {
    transform: none;
}


.category-tab:hover {
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
} */


.news-category-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-start;
}

.category-tab {
    padding: 8px 16px;
    text-align: center;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}


.category-tab.active {
    background: #4f8d37;
    color: white;
    border-color: #4f8d37;
    box-shadow: none;
}

/* 根據 URL hash 動態改變背景色和邊框色 */
body[data-hash="earth"] .category-tab {
    border-color: #4f8d37;
}

body[data-hash="earth"] .category-tab.active {
    background: #4f8d37;
    border-color: #4f8d37;
}

body[data-hash="equal"] .category-tab {
    border-color: #e1999d;
}

body[data-hash="equal"] .category-tab.active {
    background: #e1999d;
    border-color: #e1999d;
}

body[data-hash="honest"] .category-tab {
    border-color: #2180b0;
}

body[data-hash="honest"] .category-tab.active {
    background: #2180b0;
    border-color: #2180b0;
}

body[data-hash="culture"] .category-tab {
    border-color: #b7a960;
}

body[data-hash="culture"] .category-tab.active {
    background: #b7a960;
    border-color: #b7a960;
}


.category-tab i {
    font-size: 10px;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    line-height: 1;
    margin-top: 2px;
}

.category-tab.active i {
    transform: none;
}


.category-tab:hover {
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* BenQ content title previously inline-styled in cust_icons_benq.php */
.benq-content-title {
    letter-spacing: 0.45em;
    text-align: left;
    padding-left: 230px;
    font-size: 40px;
    font-weight: bold;
}

/* 響應式設計 - benq-content-title 與 news-list-container 對齊 */
@media (max-width: 768px) {
    .benq-content-title {
        padding-left: calc(10% + 15px);
        padding-right: 15px;
        font-size: 28px;
    }
    
    .category-tab {
        padding: 6px 12px;
        font-size: 11px;
        gap: 4px;
    }
    
    .category-tab i {
        font-size: 8px;
    }
}

@media (max-width: 480px) {
    .benq-content-title {
        padding-left: calc(10% + 10px);
        padding-right: 10px;
        font-size: 24px;
    }
    
    .category-tab {
        padding: 5px 10px;
        font-size: 10px;
        gap: 3px;
    }
    
    .category-tab i {
        font-size: 7px;
    }
}


/* 其他專案下拉選單樣式 */
.other-projects-tab {
    position: relative;
    cursor: pointer;
    z-index: 100; /* 確保父容器有正確的層級 */
}

.other-projects-dropdown {
    display: none;
    position: absolute;
    top: calc(100% - 1px);
    left: auto;
    right: 0;
    background: #4f8d37;
    border: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    min-width: 100%;
    width: max-content;
    max-width: calc(100vw - 30px);
    z-index: 150; /* 高於 banner(10) 和 news-header-controls(100),但低於導覽列(999) */
    margin-top: 0;
    padding: 15px 0;
    overflow: hidden;
}

/* 手機版下拉選單調整 - 子選單置中於主選單 */
@media (max-width: 768px) {
    .other-projects-dropdown {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: 90vw;
        width: auto;
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .other-projects-dropdown {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: 85vw;
        width: auto;
        min-width: 180px;
    }
}

/* 使用偽元素填補空隙，避免滑鼠移動時選單消失 */
.other-projects-dropdown::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    height: 5px;
    background: transparent;
}

.other-projects-tab:hover .other-projects-dropdown,
.other-projects-dropdown:hover {
    display: block;
}

.other-projects-dropdown .dropdown-item {
    display: block;
    padding: 6px 20px;
    color: white;
    text-decoration: none;
    border-bottom: none;
    transition: background-color 0.2s ease;
    font-size: 13px;
    font-weight: 400;
    text-align: left;
}

.other-projects-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.other-projects-dropdown .dropdown-item:hover {
    background-color: transparent;
    color: #ffd700;
}

.other-projects-dropdown .dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
    font-weight: 500;
}

/* 下拉選單根據 hash 動態改變背景色 */
body[data-hash="earth"] .other-projects-dropdown {
    background-color: #4f8d37;
}

body[data-hash="equal"] .other-projects-dropdown {
    background-color: #e1999d;
}

body[data-hash="honest"] .other-projects-dropdown {
    background-color: #2180b0;
}

body[data-hash="culture"] .other-projects-dropdown {
    background-color: #b7a960;
}

body[data-hash="earth"] .other-projects-dropdown .dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.25);
}

body[data-hash="equal"] .other-projects-dropdown .dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.25);
}

body[data-hash="honest"] .other-projects-dropdown .dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.25);
}

body[data-hash="culture"] .other-projects-dropdown .dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.25);
}
