/* ========================================
   Expertise Page Styles
   ======================================== */

/* Expertise Hero（套用共通 .page-hero.hero-fullbleed，此處僅覆寫背景圖） */
.expertise .page-hero.hero-fullbleed::before {
    background-image: url('../images/expertise/expertise_hero.jpg');
}

/* Intro Section */
.expertise .expertise_intro {
    padding: 100px 0;
    background-color: #fff;
    text-align: center;
}

.expertise .expertise_intro h2 {
    font-size: 2rem;
    color: var(--primary-teal);
    font-weight: 700;
    margin-bottom: 40px;
    line-height: 1.5;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.expertise .expertise_intro p {
    font-size: 1.1rem;
    line-height: 2;
    color: #333;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* News Section */
.expertise .expertise_news {
    padding: 100px 0;
    background-color: #F9F7F2;
}

.expertise .news_item {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background-color: #fff;
    min-height: 350px;
    margin-bottom: 15px;
}

.expertise .news_content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}

.expertise .news_image {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.expertise .news_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

@media (hover: hover) {
    .expertise .news_item:hover .news_image img {
        transform: scale(1.05);
    }
}

.expertise .news_title {
    font-family: var(--font-family-chinese);
    font-size: 2rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
    line-height: 1.3;
    letter-spacing: 1px;
}

.expertise .news_date {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.expertise .news_desc {
    font-family: var(--font-family-chinese);
    font-size: var(--font-size-body);
    line-height: 1.8;
    color: #666;
    margin-bottom: 40px;
    max-width: 90%;
}

/* News Read More Button - Uses common.css .btn-more with specific positioning */
.expertise .news_read_more {
    margin-top: 20px;
}

.expertise .news_arrow_btn {
    display: none;
}

/* Category Tabs */
.expertise .project_tabs {
    display: flex;
    /* safe center：分類少時置中；多到溢出時自動靠左並可水平滑動，不會切掉開頭 */
    justify-content: safe center;
    flex-wrap: nowrap;
    gap: 80px;
    margin-bottom: 50px;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.expertise .project_tabs::-webkit-scrollbar {
    display: none;
}

.expertise .tab_btn {
    background: none;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    color: #999;
    cursor: pointer;
    position: relative;
    font-family: var(--font-family-chinese);
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.expertise .tab_btn.active {
    color: var(--primary-teal);
    font-weight: 700;
}

.expertise .tab_btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-teal);
}

.expertise .tab_btn:hover {
    color: var(--primary-teal);
}

.expertise .tab_btn br {
    display: none;
}

/* ========================================
   Pagination Styles
   ======================================== */

.pagination_container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 80px;
}

.pagination_numbers {
    display: flex;
    gap: 15px;
    align-items: center;
}

.pagination_numbers a {
    display: inline-block;
    padding: 10px 8px;
    border: none;
    color: #666666;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Chivo', sans-serif;
    font-weight: 400;
}

.pagination_numbers a.active {
    background-color: var(--primary-teal);
    color: #fff;
    padding: 10px 16px;
}

.pagination_numbers a:hover:not(.active) {
    color: var(--hover-green);
}

.pagination_btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid #666666;
    color: #666666;
    text-decoration: none;
    font-family: 'Chivo', sans-serif;
    font-weight: 400;
    transition: all 0.3s ease;
}

.pagination_btn:hover {
    border-color: var(--hover-green);
    color: var(--hover-green);
}

.mobile-page-counter {
    display: none;
}

/* ========================================
   Responsive Design
   ======================================== */

/* 平板以下：分類標籤改單列、不換行，超出時可左右滑動（隱藏捲軸）。
   桌機 80px 間距在 ~1024px 以下會擠到中文斷行，故在此切換為左對齊單列。 */
@media (max-width: 1024px) {
    .expertise .project_tabs {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 36px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .expertise .project_tabs::-webkit-scrollbar {
        display: none;
    }

    .expertise .tab_btn {
        flex: 0 0 auto;
        line-height: 1.2;
        padding: 14px 8px;
        min-width: 0;
    }
}

@media (max-width: 900px) {
    .expertise .news_item {
        flex-direction: column-reverse;
    }

    .expertise .news_image {
        width: 100%;
        height: 300px;
    }

    .expertise .news_content {
        padding: 40px 20px;
    }
}

@media (max-width: 768px) {

    .pagination_container {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 50px;
        width: calc(100% + 40px);
        max-width: none;
        margin: 80px -20px 0;
        padding: 0 20px;
    }

    .pagination_numbers {
        display: flex;
        width: 100%;
        justify-content: space-between;
        order: -1;
        margin-bottom: 0;
        padding: 0;
    }

    .pagination_btn {
        width: 120px;
        justify-content: center;
    }

    .mobile-page-counter {
        display: none;
    }
}