/* ===== 最新消息頁 ===== */

.news-page-wrapper {
    max-width: 900px;
    margin: 16px auto;
    padding: 0 12px;
    font-size: 14px;
    color: #333;
}

.news-page-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-page-title i {
    color: #f39c12;
}

/* ── 清單 ─────────────────────────────────────────────── */

.news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #ebeef5;
}

.news-item {
    padding: 16px 14px;
    border-bottom: 1px solid #ebeef5;
    transition: background-color 0.15s ease;
    border-radius: 0;
}

.news-item:hover {
    background-color: #fafbff;
}

/* 滾動錨點 */
.news-anchor {
    position: relative;
    top: -80px;
    visibility: hidden;
    display: block;
}

/* ── 標題列 ───────────────────────────────────────────── */

.news-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.news-title-block {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

/* 優先級徽章（從標題解析：重要公告、緊急公告…） */
.news-priority-badge {
    display: inline-block;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
    line-height: 1.6;
}

.news-priority--urgent {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.news-priority--important {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.news-priority--notice {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.news-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
    word-break: break-word;
}

/* 日期 */
.news-date {
    flex-shrink: 0;
    font-size: 12px;
    color: #9ca3af;
    padding-top: 2px;
    white-space: nowrap;
}

/* ── 內容區 ───────────────────────────────────────────── */

.news-content-wrapper {
    margin-top: 2px;
}

.news-content {
    font-size: 13px;
    line-height: 1.8;
    color: #4b5563;
    white-space: pre-wrap;
    word-break: break-word;
    text-indent: 0;
    padding: 0;
}

.news-content--collapsed {
    max-height: 3.6em;
    overflow: hidden;
    position: relative;
}

.news-content--collapsed::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1.4em;
    background: linear-gradient(to bottom, transparent, #fff 85%);
    pointer-events: none;
}

.news-item:hover .news-content--collapsed::after {
    background: linear-gradient(to bottom, transparent, #fafbff 85%);
}

/* ── 展開按鈕 ─────────────────────────────────────────── */

.news-toggle-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 0;
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 600;
    color: #3b82f6;
    cursor: pointer;
    user-select: none;
    line-height: 1.6;
}

.news-toggle-btn:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ── 空狀態 ───────────────────────────────────────────── */

.news-empty {
    text-align: center;
    margin: 48px 0;
    color: #9ca3af;
    font-size: 13px;
}

/* ── 分頁 ─────────────────────────────────────────────── */

.news-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

/* ── RWD ──────────────────────────────────────────────── */

@media (max-width: 576px) {
    .news-page-wrapper {
        margin-top: 8px;
        padding: 0 8px;
    }

    .news-item {
        padding: 14px 10px;
    }

    .news-header {
        flex-direction: column;
        gap: 6px;
    }

    .news-date {
        font-size: 11px;
    }

    .news-title {
        font-size: 14px;
    }

    .news-content {
        font-size: 12px;
    }
}
