/* 面板外觀＝components.css .page-panel 共用配方；本頁只給差異值（寬＋內距，零外觀變更）。 */
.news-page {
    --page-panel-max: 960px;
    --page-panel-pad: 48px 32px 72px;
}

.news-page__title {
    margin: 0 0 28px;
    color: var(--ink-site);
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    line-height: 1.35;
    text-align: center;
}

.news-index {
    display: grid;
    gap: 18px;
}

.news-card {
    display: block;
    padding: 20px 22px;
    color: inherit;
    border: 1px solid var(--gold-line);
    border-radius: var(--radius-md);
    background: var(--cream);
    box-shadow: var(--shadow-sm);
}

.news-card:hover {
    border-color: var(--gold-primary);
}

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

.news-card__link:hover {
    color: var(--gold-deep);
}

.news-card__date,
.news-detail__date {
    color: var(--gold-deep);
    font-size: 0.92rem;
    font-weight: 700;
}

.news-card__title {
    margin: 6px 0 8px;
    color: var(--ink-site);
    font-size: 1.25rem;
}

.news-card__excerpt,
.news-empty {
    color: var(--ink-soft);
    line-height: 1.8;
}

.news-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}

.news-pagination a,
.news-pagination span {
    min-width: 72px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-deep);
    text-decoration: none;
    font-weight: 700;
}

/* 停用的上一頁／下一頁：--ink-soft(#584635) 淡到 46%。原本硬編 rgba(88,70,53,0.46)＝
   同色同透明度，改走 token＋opacity（此 span 純文字無底無框，合成結果逐像素相同），
   清掉本檔最後一處硬編色（color ratchet news 1→0）。 */
.news-pagination span[aria-disabled="true"] {
    color: var(--ink-soft);
    opacity: 0.46;
}

/* D58（2026-10-20）：原本 padding: 24px 0 0 蓋掉共用面板的左右內距（components.css 先載、本檔後載），內文貼齊面板邊緣；
   改成只調面板內距變數（手機仍由下方 .news-page 的 @media 覆寫）。 */
.news-detail {
    --page-panel-pad: 40px 32px 64px;
}

/* D58（2026-10-20）：本文保留作者的換行、空白行與空格（pre-wrap；原 pre-line 會吃掉行首空白）。 */
.news-detail__content {
    margin-top: 28px;
    color: var(--ink-site);
    font-size: 1.06rem;
    line-height: 2;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.news-detail__content img {
    max-width: 100%;
    height: auto;
}

/* 分享 CTA：複製連結＋LINE 分享（每則公告） */
.news-share {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.news-share--detail {
    margin-top: 30px;
}

.news-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 6px 18px;
    border: 1px solid var(--gold-line);
    border-radius: var(--radius-8);
    background: transparent;
    color: var(--gold-deep);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.news-share__btn:hover {
    border-color: var(--gold-primary);
    background: var(--gold-wash);
}

.news-share__btn.is-copied {
    border-color: var(--gold-primary);
}

.news-back-link {
    display: inline-flex;
    margin-top: 32px;
    color: var(--gold-deep);
    font-weight: 700;
    text-decoration: none;
}

/* X4：公告封面圖／法會投影詳情（日期・地點）／外部報名（ycbot）CTA。只用 token，不引入硬編色。 */
.news-card__cover,
.news-detail__cover {
    display: block;
    width: 100%;
    border-radius: var(--radius-md);
    object-fit: cover;
}
.news-card__cover {
    aspect-ratio: 16 / 9;
    margin-bottom: 12px;
}
/* D58：內頁封面完整比例（不裁切海報文字）；圖說在下方。 */
.news-detail__cover {
    margin: 0;
    height: auto;
    object-fit: contain;
}
.news-article__cover {
    margin: 18px 0 8px;
}
.news-article__cover figcaption {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 0.9rem;
    text-align: center;
}
.news-detail__event-meta {
    margin: 8px 0 0;
    color: var(--gold-deep);
    font-weight: 700;
    letter-spacing: 0.04em;
}
.news-detail__cta {
    margin-top: 24px;
}

@media (max-width: 600px) {
    .news-page {
        margin: 12px;
        --page-panel-pad: 32px 16px 48px;
    }
    .news-card { padding: 18px 16px; }
}

/* ============ D58／D60（2026-10-20）：公告內頁資訊與列表精簡 ============ */
.news-article__date {
    margin: 0 0 6px;
    color: var(--gold-deep);
    font-size: 0.92rem;
    font-weight: 700;
    text-align: center;
}
.news-article__title { margin-bottom: 18px; }
/* 已填的活動日期／時間／地點（本文前；沒填的不出現）。 */
.news-article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 32px;
    margin: 22px 0 0;
    padding: 16px 0;
    border-top: 1px solid var(--gold-line);
    border-bottom: 1px solid var(--gold-line);
}
.news-article__meta div { min-width: 0; }
.news-article__meta dt {
    color: var(--gold-deep);
    font-size: 0.85rem;
    font-weight: 700;
}
.news-article__meta dd {
    margin: 4px 0 0;
    color: var(--ink-site);
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

/* D60 列表：日期、大標題、一行摘要、細箭頭；整列是一個連結；沒有封面。桌機日期在左、手機在標題上方。 */
.news-rows {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--gold-line);
}
.news-rows > li { border-bottom: 1px solid var(--gold-line); }
.news-row {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr) auto;
    gap: 20px;
    align-items: baseline;
    min-height: 44px;
    padding: 22px 8px;
    color: inherit;
    text-decoration: none;
}
.news-row:hover .news-row__title,
.news-row:focus-visible .news-row__title { color: var(--gold-deep); }
.news-row:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.news-row__date {
    color: var(--gold-deep);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}
.news-row__body { display: grid; gap: 6px; min-width: 0; }
.news-row__title {
    color: var(--ink-site);
    font-size: 1.3rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.news-row__summary {
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.news-row__arrow { color: var(--gold-deep); font-size: 1rem; }
@media (max-width: 600px) {
    .news-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 18px 4px; }
    .news-row__date { grid-column: 1 / -1; }
    .news-row__title { font-size: 1.1rem; }
}
