/* ── News & Notice – Client Page ── */

.news-notice-page {
    --news-accent: #2d4d8a;
    --news-accent-soft: rgba(45, 77, 138, 0.08);
    --news-notice-color: #2d4d8a;
    --news-news-color: #637264;
}

/* ── Category Badge ── */

.news-cat-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 6px;
    white-space: nowrap;
}

.news-cat-badge--notice {
    background: rgba(45, 77, 138, 0.1);
    color: var(--news-notice-color);
}

.news-cat-badge--news {
    background: rgba(99, 114, 100, 0.1);
    color: var(--news-news-color);
}

/* ══════════════════════════════════════════════════════════════
   Filter Tabs
   ══════════════════════════════════════════════════════════════ */

.news-filter-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}

.news-filter-tab {
    display: inline-flex;
    align-items: center;
    padding: 7px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.18s;
}

.news-filter-tab:hover {
    border-color: var(--line-strong);
    color: var(--text);
}

.news-filter-tab.is-active {
    background: var(--news-accent);
    border-color: var(--news-accent);
    color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   List View
   ══════════════════════════════════════════════════════════════ */

.news-list {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}

.news-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--line);
    transition: background 0.15s;
}

.news-list-item:last-child {
    border-bottom: none;
}

.news-list-item:hover {
    background: var(--surface-muted);
}

.news-list-num {
    flex-shrink: 0;
    width: 36px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}

.news-list-title {
    flex: 1;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-list-date {
    flex-shrink: 0;
    font-size: 0.82rem;
    color: var(--muted);
    white-space: nowrap;
}

.news-list-views {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--muted);
    min-width: 48px;
}

.news-list-views svg {
    opacity: 0.6;
}

.news-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
    font-size: 0.95rem;
}

/* ══════════════════════════════════════════════════════════════
   Pagination
   ══════════════════════════════════════════════════════════════ */

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

.news-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.15s;
}

.news-page-link:hover {
    background: var(--surface-muted);
    color: var(--text);
}

.news-page-link.is-active {
    background: var(--news-accent);
    color: #fff;
    font-weight: 700;
    pointer-events: none;
}

.news-page-arrow {
    font-size: 1rem;
}

/* ══════════════════════════════════════════════════════════════
   Detail View
   ══════════════════════════════════════════════════════════════ */

.news-detail {
    padding: 32px 28px;
}

.news-detail-header {
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.news-detail-title {
    margin-top: 10px;
    font-size: clamp(1.3rem, 2.4vw, 1.75rem);
    line-height: 1.35;
    color: var(--text);
}

.news-detail-meta {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.news-detail-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: var(--muted);
}

.news-detail-meta-item svg {
    opacity: 0.55;
}

/* Body content */
.news-detail-body {
    line-height: 1.8;
    font-size: 0.98rem;
    color: var(--text);
    word-break: break-word;
}

.news-detail-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.news-detail-body p {
    margin-bottom: 1em;
}

.news-detail-body h2,
.news-detail-body h3,
.news-detail-body h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.news-detail-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.news-detail-body table th,
.news-detail-body table td {
    border: 1px solid var(--line);
    padding: 8px 12px;
}

.news-detail-body table th {
    background: var(--surface-muted);
    font-weight: 600;
}

/* ── Attachments ── */

.news-attachments {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.news-attachments-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.news-attachments-title svg {
    stroke: var(--muted);
}

.news-attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    margin-bottom: 6px;
    transition: border-color 0.15s;
}

.news-attachment-item:hover {
    border-color: var(--news-accent);
}

.news-attachment-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.88rem;
    word-break: break-all;
}

.news-attachment-size {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.news-attachment-item svg {
    flex-shrink: 0;
    stroke: var(--news-accent);
}

/* ── Prev / Next Navigation ── */

.news-nav {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.news-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, background 0.15s;
}

.news-nav-link:hover {
    border-color: var(--news-accent);
    background: var(--surface-muted);
}

.news-nav-link--next {
    text-align: right;
}

.news-nav-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--news-accent);
}

.news-nav-title {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Back to list button ── */

.news-back-wrap {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.news-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.15s;
}

.news-back-btn:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

/* ══════════════════════════════════════════════════════════════
   Mobile
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .news-list-item {
        flex-wrap: wrap;
        gap: 6px 10px;
        padding: 14px 16px;
    }

    .news-list-num {
        width: auto;
    }

    .news-list-title {
        flex-basis: 100%;
        order: 5;
        white-space: normal;
    }

    .news-list-date,
    .news-list-views {
        font-size: 0.75rem;
    }

    .news-detail {
        padding: 22px 16px;
    }

    .news-nav {
        flex-direction: column;
    }
}
