/* ============================================================
   News (/News, /News/Detail) — public news list + article.
   Scoped under .nw so it can't affect other pages.
   ============================================================ */

.nw {
    --nw-brand: #3f51b5;
    --nw-brand-d: #2c3a91;
    --nw-brand-l: #5c6bc0;
    --nw-accent: #ff7a59;
    --nw-ink: #16225a;
    --nw-body: #4d5468;
    --nw-muted: #8a90a2;
    --nw-line: #e4e7f2;
    --nw-bg-soft: #f6f7fb;
    --nw-radius: 16px;
    --nw-shadow: 0 18px 40px -20px rgba(22, 27, 51, .3);
    --nw-shadow-sm: 0 10px 24px -16px rgba(22, 27, 51, .26);

    font-family: 'Roboto', 'Segoe UI', system-ui, sans-serif;
    color: var(--nw-body);
    padding-bottom: 80px;
}
.nw * { box-sizing: border-box; }
.nw h1, .nw h2, .nw h3, .nw h4 { font-family: 'Montserrat', 'Roboto', sans-serif; color: var(--nw-ink); margin: 0; }
.nw__wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px; }
.nw__wrap--article { max-width: 820px; }

/* ---------- Hero ---------- */
.nw-hero {
    text-align: center;
    padding: 50px 22px 40px;
    background: linear-gradient(180deg, #eef1fb 0%, #ffffff 100%);
    border-bottom: 1px solid var(--nw-line);
    margin-bottom: 36px;
}
.nw-hero__eyebrow {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
    color: var(--nw-brand); background: rgba(63, 81, 181, .1);
    padding: 6px 15px; border-radius: 999px; margin-bottom: 14px;
}
.nw-hero h1 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; margin-bottom: 10px; }
.nw-hero p { max-width: 560px; margin: 0 auto; font-size: 16px; color: var(--nw-body); }

/* ---------- List grid ---------- */
.nw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 26px;
}
.nw-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--nw-line);
    border-radius: var(--nw-radius);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--nw-shadow-sm);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.nw-card:hover { transform: translateY(-6px); box-shadow: var(--nw-shadow); border-color: transparent; text-decoration: none; }
.nw-card__media {
    position: relative;
    width: 100%;
    padding-top: 56%;
    background: var(--nw-bg-soft);
    overflow: hidden;
}
.nw-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.nw-card:hover .nw-card__media img { transform: scale(1.05); }
.nw-card__noimg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; color: var(--nw-line); }
.nw-card__body { flex: 1; display: flex; flex-direction: column; padding: 20px 22px 22px; }
.nw-card__title {
    font-size: 18px; font-weight: 700; color: var(--nw-ink); line-height: 1.35; margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nw-card__summary {
    font-size: 14.5px; color: var(--nw-body); line-height: 1.6; margin-bottom: 16px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.nw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: auto; font-size: 13px; color: var(--nw-muted); }
.nw-meta span { display: inline-flex; align-items: center; gap: 6px; }
.nw-meta i { color: var(--nw-brand); }
.nw-card__read {
    display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
    font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 600; color: var(--nw-accent);
    transition: gap .2s ease;
}
.nw-card:hover .nw-card__read { gap: 10px; }

/* ---------- Empty state ---------- */
.nw-empty {
    grid-column: 1 / -1; text-align: center;
    background: #fff; border: 1px solid var(--nw-line); border-radius: var(--nw-radius);
    box-shadow: var(--nw-shadow-sm); padding: 60px 28px;
}
.nw-empty__icon { width: 72px; height: 72px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; font-size: 30px; color: var(--nw-brand); background: rgba(63, 81, 181, .1); }
.nw-empty h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.nw-empty p { margin: 0; color: var(--nw-body); font-size: 15.5px; }

/* ============================================================
   ARTICLE
   ============================================================ */
.nw-article { padding-top: 34px; }
.nw-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--nw-brand); text-decoration: none; margin-bottom: 22px; }
.nw-back:hover { text-decoration: underline; }
.nw-article h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; line-height: 1.25; margin-bottom: 16px; }
.nw-article__meta { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 24px; font-size: 14px; color: var(--nw-muted); }
.nw-article__meta span { display: inline-flex; align-items: center; gap: 7px; }
.nw-article__meta i { color: var(--nw-brand); }
.nw-article__cover { width: 100%; border-radius: var(--nw-radius); overflow: hidden; margin-bottom: 30px; box-shadow: var(--nw-shadow); }
.nw-article__cover img { width: 100%; height: auto; display: block; }

/* rendered HTML content from the rich-text editor */
.nw-content { font-size: 17px; line-height: 1.8; color: var(--nw-body); }
.nw-content > *:first-child { margin-top: 0; }
.nw-content h1, .nw-content h2, .nw-content h3, .nw-content h4 { margin: 1.6em 0 .6em; line-height: 1.3; }
.nw-content h2 { font-size: 24px; }
.nw-content h3 { font-size: 20px; }
.nw-content p { margin: 0 0 1.1em; }
.nw-content a { color: var(--nw-brand); text-decoration: underline; }
.nw-content img, .nw-content iframe { max-width: 100%; height: auto; border-radius: 12px; margin: 1.2em 0; }
.nw-content ul, .nw-content ol { margin: 0 0 1.1em; padding-left: 1.5em; }
.nw-content li { margin-bottom: .4em; }
.nw-content blockquote { margin: 1.2em 0; padding: 8px 20px; border-left: 4px solid var(--nw-brand-l); background: var(--nw-bg-soft); border-radius: 0 12px 12px 0; color: var(--nw-ink); }
.nw-content table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.nw-content th, .nw-content td { border: 1px solid var(--nw-line); padding: 8px 12px; }

/* ============================================================
   COMMENTS
   ============================================================ */
.nw-comments { margin-top: 50px; padding-top: 34px; border-top: 1px solid var(--nw-line); }
.nw-comments__head { font-size: 22px; font-weight: 800; color: var(--nw-ink); margin-bottom: 24px; }
.nw-comment { display: flex; gap: 14px; padding: 18px 0; border-top: 1px solid var(--nw-line); }
.nw-comment:first-of-type { border-top: 0; }
.nw-comment__avatar { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 16px; color: #fff; background: linear-gradient(135deg, var(--nw-brand-l), var(--nw-brand)); }
.nw-comment__body { flex: 1; min-width: 0; }
.nw-comment__top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 5px; }
.nw-comment__name { font-weight: 700; color: var(--nw-ink); font-size: 15px; }
.nw-comment__date { font-size: 12.5px; color: var(--nw-muted); }
.nw-comment__text { font-size: 15px; color: var(--nw-body); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.nw-comments__none { color: var(--nw-muted); font-size: 15px; padding: 6px 0 18px; }

/* comment form */
.nw-form { margin-top: 30px; background: var(--nw-bg-soft); border: 1px solid var(--nw-line); border-radius: var(--nw-radius); padding: 26px; }
.nw-form h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.nw-form__note { font-size: 13.5px; color: var(--nw-muted); margin-bottom: 18px; }
.nw-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.nw-form label { display: block; font-size: 12.5px; font-weight: 600; color: var(--nw-ink); margin-bottom: 6px; }
.nw-form input, .nw-form textarea {
    width: 100%; border: 1.5px solid var(--nw-line); border-radius: 11px; padding: 11px 14px;
    font-size: 15px; color: var(--nw-ink); background: #fff; font-family: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.nw-form textarea { min-height: 110px; resize: vertical; }
.nw-form input:focus, .nw-form textarea:focus { outline: none; border-color: var(--nw-brand); box-shadow: 0 0 0 3px rgba(63, 81, 181, .14); }
.nw-form__btn {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
    font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 15px; color: #fff;
    background: linear-gradient(135deg, var(--nw-brand-l), var(--nw-brand)); border: 0; border-radius: 999px;
    padding: 13px 28px; cursor: pointer; box-shadow: 0 12px 24px -12px rgba(63, 81, 181, .8);
    transition: transform .2s ease;
}
.nw-form__btn:hover { transform: translateY(-2px); color: #fff; }
.nw-flash {
    display: flex; align-items: center; gap: 10px; margin-bottom: 22px;
    background: rgba(31, 158, 135, .1); border: 1px solid rgba(31, 158, 135, .3); border-radius: 12px;
    padding: 14px 18px; color: #1f9e87; font-size: 14.5px; font-weight: 500;
}

@media (max-width: 560px) {
    .nw-form__row { grid-template-columns: 1fr; }
}
