/* ============================================
   專題概覽頁面樣式
   ============================================ */

.topic-overview-page {
    background-color: #fff;
    padding: 20px 0 60px;
}
.topic-overview-page .block-header{
    margin-bottom: 30px;
}
.page-title {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 40px;
    /* font-family: 'GovWF_FZ', "Microsoft YaHei", "SimHei", Arial, sans-serif; */
}

/* 專題網格 */
.topic-grid-section {
    margin-bottom: 50px;
    overflow: hidden;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap:20px 46px;
}

.topic-item {
    background-color: #fff;
    position: relative;
}
.topic-item::after{
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: calc(100% + 46px);
    height: 1px;
    background-color: #e0e0e0;
}
.topic-item:nth-child(4n)::after{
    width: 100%;
}
.topic-item:hover .topic-subtitle{
    color: #115A94;
}

.topic-link {
    display: block;
    text-decoration: none;
    color: #333;
}

.topic-image-wrapper {
    width: 100%;
    height: 260px;
    overflow: hidden;
    background-color: #f5f5f5;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    position: relative;
}

.topic-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* .topic-item:hover .topic-image {
    transform: scale(1.05);
} */

.topic-info {
    padding: 14px 0 15px;
    /* text-align: center; */
}

.topic-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.topic-subtitle {
    font-size: 20px;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.topic-date {
    font-size: 18px;
    color: #333;
    margin: 0;
}

.topic-item:hover .topic-title {
    color: #115A94;
}

/* 分頁 */
.pagination-section {
    margin-top: 50px;
}

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

.page-btn,
.page-number {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid #d2d2d2;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.page-btn:hover,
.page-number:hover {
    background-color: #f5f5f5;
    border-color: #115A94;
    color: #115A94;
}

.page-number.active {
    background-color: #115A94;
    border-color: #115A94;
    color: #fff;
}

.page-number.active:hover {
    background-color: #0066cc;
    border-color: #0066cc;
}

.mobile-topic-grid{
    display: none;
}
/* 響應式設計 - 平板 */
@media screen and (max-width: 1024px) {
    .topic-grid {
        grid-template-columns: repeat(3, 1fr);
        /* gap: 20px; */
    }
}

/* 響應式設計 - 移動端 */
@media screen and (max-width: 768px) {
    .topic-overview-page {
        padding: 20px 0 0;
    }

    .page-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .topic-grid {
        grid-template-columns: 1fr;
        /* gap: 15px; */
    }

    .topic-image-wrapper {
        height: auto;
    }
    .topic-image-wrapper img{
        width: 100%;
    }
    .topic-info {
        display: flex;
        justify-content: space-between;
        padding: 15px;
    }

    .topic-title {
        font-size: 18px;
    }

    .topic-subtitle {
        font-size: 16px;
    }

    .topic-date {
        font-size: 12px;
    }

    .pagination {
        gap: 5px;
    }

    .page-btn,
    .page-number {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 35px;
    }
    .mobile-topic-grid{
        display: block;
    }
    .topic-item{
        margin-bottom: 15px;
    }
    .desktop-topic-grid,.pagination-section{
        display: none;
    }
    .topic-grid-section{
        margin-bottom: 0;
    }
}