/*
Theme Name: MyTheme
Author: Kui Ra
Version: 1.0.0
*/
.logo {
    display: inline-block;
    text-decoration: none;
    font-weight: 700;
}

.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

.menu a {
    text-decoration: none;
    color: #777;
}

.nav.is-open {
    display: block;
}

.phone_nav {
    background: none;
    border: 0;
    cursor: pointer;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

@media (max-width: 992px) {
    .nav {
        display: none;
    }

    .nav.is-open {
        display: block;
    }

    .menu {
        flex-direction: column;
    }
}

/* 讓結構接近舊站 */
.header_02 {
    background-color: rgba(0, 0, 0, 0.1);
}

.header_02 .h_c_box02 {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header_02 .logo img {
    display: block;
    height: auto;
}

/* 讓 .nav 內的 ul 橫向排列、無圓點 */
.header_02 .nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 32px;
}

.header_02 .nav ul li {
    margin: 0;
}

.header_02 .nav ul li a {
    text-decoration: none;
    color: #777;
    display: block;
    padding: 12px 16px;
}

/* WP 目前頁面的預設 class：current-menu-item / current_page_item */
.header_02 .nav ul li.current-menu-item>a,
.header_02 .nav ul li.current_page_item>a {
    background: #F4C33A;
    color: #333;
    border-radius: 6px;
}

/* 行動版（可依舊站調整） */
@media (max-width: 992px) {
    .header_02 .h_c_box02 {
        flex-wrap: wrap;
    }

    .header_02 .nav {
        display: none;
        width: 100%;
    }

    .header_02 .nav.is-open {
        display: block;
    }

    .header_02 .nav ul {
        flex-direction: column;
        gap: 0;
    }

    .header_02 .nav ul li a {
        padding: 12px 0;
        border-bottom: 1px solid rgba(0, 0, 0, .06);
    }
}

/* 無障礙：隱藏用於朗讀器的文字 */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

/* 讓 Gutenberg 表格回到預期外觀 */
.entry-content .wp-block-table table {
    width: auto;
    /* 取消被撐滿 */
    border-collapse: collapse;
    /* 讓邊框貼齊 */
    border-spacing: 0;
}

.entry-content .wp-block-table th,
.entry-content .wp-block-table td {
    border: 2px solid #222;
    /* 依你的設計調整 */
    padding: 10px 16px;
    text-align: center;
}

.entry-content .wp-block-table thead th {
    background: #f5f5f5;
    /* 表頭底色（可改） */
    font-weight: 700;
}

/* 讓整張表置中、不吃滿 */
.entry-content .wp-block-table {
    width: fit-content;
    margin: 0 auto 1.5rem;
}
/* 版心 */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 標題 */
.news-title {
    font-size: 28px;
    margin: 32px 0 16px;
    font-weight: 800;
}

/* 卡片格線 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* 卡片本體 */
.card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
    transition: .25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .08);
}

.card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* 縮圖：固定 16:10 比例 */
.card__thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f3f4f6;
}

.card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.card:hover .card__thumb img {
    transform: scale(1.03);
}

/* 標題：多行截斷 + 省略號 */
.card__title {
    margin: 14px 16px 6px;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 日期 / 分類 */
.card__meta {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #6b7280;
    margin: 0 16px 16px;
    font-size: 14px;
}

.card__meta .dot {
    opacity: .6;
}

.card__cat {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}