/* ===== Trang bài viết (tin-tuc/*.html) & trang Tin tức (news.html) — sinh bởi scripts/articles-render.mjs ===== */
:root { --ar-ink: #0f172a; --ar-text: #334155; --ar-muted: #64748b; --ar-line: #e2e8f0; --ar-accent: #047857; }

/* Nhãn chuyên mục + ảnh đại diện tác giả (dùng chung) */
.ar-chip { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: .74rem; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; padding: 5px 12px; border-radius: 100px; text-decoration: none; }
.ar-chip-red { background: #fee2e2; color: #991b1b; }
.ar-chip-green { background: #dcfce7; color: #166534; }
.ar-chip-blue { background: #dbeafe; color: #1e40af; }
.ar-chip-violet { background: #ede9fe; color: #5b21b6; }
.ar-chip-amber { background: #fef3c7; color: #92400e; }
.ar-avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #10b981, #047857); color: #fff; font-size: .75rem; font-weight: 800; flex: none; }
.ar-avatar-lg { width: 44px; height: 44px; font-size: 1rem; }
.nw-dot { color: #cbd5e1; }
.ar-side-h { margin: 0 0 12px; font-size: .78rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--ar-accent); }

/* ---------- Trang bài viết ---------- */
.ar-main { padding-top: 0; }
.ar-hero { background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%); border-bottom: 1px solid #ecfdf5; padding: 18px 0 44px; margin-bottom: 40px; }
.ar-hero .pg-crumbs { margin-bottom: 22px; }
.ar-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.ar-hero-text { display: grid; gap: 16px; }
.ar-hero h1 { margin: 0; font-family: var(--font-heading, 'Space Grotesk', sans-serif); font-size: clamp(1.75rem, 3.4vw, 2.75rem); line-height: 1.18; letter-spacing: -.5px; color: var(--ar-ink); }
.ar-lead { margin: 0; font-size: 1.12rem; line-height: 1.65; color: #475569; }
.ar-byline { display: flex; align-items: center; gap: 12px; padding-top: 6px; }
.ar-byline b { display: block; color: var(--ar-ink); font-size: .95rem; }
.ar-byline small { display: inline-flex; align-items: center; gap: 6px; color: var(--ar-muted); font-size: .84rem; margin-top: 2px; }
.ar-cover { margin: 0; border-radius: 26px; overflow: hidden; box-shadow: 0 30px 60px rgba(15, 23, 42, .14); aspect-ratio: 16 / 9; background: #f1f5f9; }
.ar-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.ar-content { max-width: 760px; font-size: 1.06rem; line-height: 1.8; color: var(--ar-text); }
.ar-content > *:first-child { margin-top: 0; }
.ar-content p { margin: 0 0 1.15em; }
.ar-content h2 { position: relative; font-family: var(--font-heading, inherit); font-size: 1.55rem; line-height: 1.3; color: var(--ar-ink); margin: 2em 0 .7em; padding-top: 6px; scroll-margin-top: 96px; }
.ar-content h2::before { content: ''; position: absolute; left: 0; top: -6px; width: 40px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #10b981, #047857); }
.ar-content h3 { font-size: 1.2rem; color: var(--ar-ink); margin: 1.6em 0 .5em; scroll-margin-top: 96px; }
.ar-content b, .ar-content strong { color: var(--ar-ink); }
.ar-content a { color: var(--ar-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ar-content ul, .ar-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.ar-content ul { list-style: disc; }
.ar-content ol { list-style: decimal; }
.ar-content li { margin: .4em 0; }
.ar-content li::marker { color: #10b981; font-weight: 700; }
.ar-content blockquote { margin: 1.5em 0; padding: 16px 22px; border-left: 4px solid #10b981; background: #f0fdf4; border-radius: 0 14px 14px 0; font-style: italic; color: #065f46; }
.ar-content figure, .ar-content .article-figure { margin: 1.8em 0; }
.ar-content img { max-width: 100%; height: auto; display: block; border-radius: 18px; margin: 0 auto; box-shadow: 0 14px 34px rgba(15, 23, 42, .1); }
.ar-content figcaption { margin-top: 10px; text-align: center; font-size: .86rem; color: var(--ar-muted); font-style: italic; }
.ar-tip, .ar-warn { position: relative; margin: 1.5em 0; padding: 16px 20px 16px 52px; border-radius: 16px; font-size: .98rem; line-height: 1.65; }
.ar-tip { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.ar-warn { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.ar-tip::before, .ar-warn::before { position: absolute; left: 18px; top: 16px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 900; color: #fff; font-style: normal; }
.ar-tip::before { content: '✓'; background: #10b981; }
.ar-warn::before { content: '!'; background: #ef4444; }
.ar-content table, .ar-content .ar-table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .94rem; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--ar-line); }
.ar-content th, .ar-content td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; text-align: left; vertical-align: top; }
.ar-content th { background: #f0fdf4; color: #065f46; font-weight: 800; }
.ar-content tr:last-child td { border-bottom: 0; }
.ar-content code { background: #f1f5f9; padding: 2px 6px; border-radius: 6px; font-size: .9em; }

.ar-endnote { margin-top: 2.5em; padding: 22px 24px; border-radius: 20px; background: #f8fafc; border: 1px solid var(--ar-line); }
.ar-endnote p { margin: 0 0 14px; font-size: .95rem; }
.ar-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; color: var(--ar-muted); }
.ar-share a, .ar-share button { text-decoration: none !important; border: 1px solid var(--ar-line); background: #fff; color: var(--ar-ink) !important; font: inherit; font-weight: 700; padding: 7px 14px; border-radius: 100px; cursor: pointer; transition: all .2s; }
.ar-share a:hover, .ar-share button:hover { border-color: #10b981; color: var(--ar-accent) !important; }
.ar-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.ar-pn a { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--ar-line); border-radius: 16px; text-decoration: none !important; transition: border-color .2s, transform .2s; }
.ar-pn a:hover { border-color: #10b981; transform: translateY(-2px); }
.ar-pn small { color: var(--ar-muted); font-weight: 600; }
.ar-pn b { color: var(--ar-ink); font-size: .95rem; line-height: 1.4; }
.ar-pn-next { text-align: right; }

.ar-side { position: sticky; top: 96px; display: grid; gap: 18px; }
.ar-toc { padding: 20px; border: 1px solid var(--ar-line); border-radius: 20px; background: #fff; }
.ar-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: grid; gap: 2px; max-height: 50vh; overflow: auto; }
.ar-toc li { counter-increment: toc; }
.ar-toc a { display: grid; grid-template-columns: 24px 1fr; gap: 6px; padding: 7px 8px; border-radius: 10px; font-size: .88rem; line-height: 1.45; color: #475569; text-decoration: none; transition: background .2s, color .2s; }
.ar-toc a::before { content: counter(toc, decimal-leading-zero); font-weight: 800; color: #94a3b8; font-size: .78rem; padding-top: 2px; }
.ar-toc a:hover { background: #f8fafc; color: var(--ar-ink); }
.ar-toc a.is-active { background: #ecfdf5; color: #065f46; font-weight: 700; }
.ar-toc a.is-active::before { color: #10b981; }
.ar-help { padding: 22px; border-radius: 20px; background: radial-gradient(120% 140% at 0% 0%, #10b981, #047857 50%, #064e3b); color: #fff; display: grid; gap: 10px; box-shadow: 0 18px 40px rgba(4, 120, 87, .22); }
.ar-help .ar-side-h { color: #a7f3d0; margin: 0; }
.ar-help p { margin: 0; color: #d1fae5; font-size: .9rem; line-height: 1.55; }
.ar-help .btn { justify-content: center; background: #fff !important; color: #065f46 !important; border: 0; min-height: 44px; border-radius: 100px; font-weight: 800; }
.ar-help-call { text-align: center; color: #fff !important; font-weight: 700; font-size: .9rem; text-decoration: none; }

.ar-related { margin-top: 64px; }
.ar-related-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.ar-related-head h2 { margin: 0; font-size: 1.6rem; color: var(--ar-ink); }
.ar-related-head a { display: inline-flex; align-items: center; gap: 6px; color: var(--ar-accent); font-weight: 700; text-decoration: none; }

/* ---------- Thẻ bài viết (trang Tin tức + bài liên quan) ---------- */
.nw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.nw-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ar-line); border-radius: 22px; overflow: hidden; transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s, border-color .3s; }
.nw-card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(15, 23, 42, .1); border-color: #a7f3d0; }
.nw-card[hidden] { display: none; }
.nw-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #f1f5f9; }
.nw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
.nw-card:hover .nw-thumb img { transform: scale(1.05); }
.nw-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.nw-body h3 { margin: 0; font-size: 1.08rem; line-height: 1.4; }
.nw-body h3 a { color: var(--ar-ink); text-decoration: none; }
.nw-body h3 a::after { content: ''; position: absolute; inset: 0; }
.nw-card { position: relative; }
.nw-body p { margin: 0; color: var(--ar-muted); font-size: .9rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; font-size: .8rem; color: var(--ar-muted); }

/* ---------- Trang Tin tức ---------- */
.nw-head { padding-top: 18px; margin-bottom: 28px; }
.nw-head-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-top: 14px; }
.nw-head h1 { margin: 6px 0 8px; font-family: var(--font-heading, inherit); font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: var(--ar-ink); line-height: 1.15; }
.nw-head p { margin: 0; max-width: 620px; color: var(--ar-muted); line-height: 1.6; }
.nw-search { display: flex; align-items: center; gap: 10px; min-width: min(360px, 100%); padding: 0 16px; border: 1.5px solid var(--ar-line); border-radius: 100px; background: #fff; color: #94a3b8; transition: border-color .2s, box-shadow .2s; }
.nw-search:focus-within { border-color: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .12); }
.nw-search input { border: 0; outline: 0; background: transparent; font: inherit; padding: 13px 0; width: 100%; color: var(--ar-ink); }

.nw-featured { margin-bottom: 36px; }
.nw-feat { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); border-radius: 28px; overflow: hidden; text-decoration: none; background: linear-gradient(135deg, #022c22, #064e3b 55%, #047857); box-shadow: 0 28px 60px rgba(4, 120, 87, .22); transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.nw-feat:hover { transform: translateY(-4px); }
.nw-feat-img { min-height: 100%; aspect-ratio: 16 / 10; overflow: hidden; }
.nw-feat-img img { width: 100%; height: 100%; min-height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.22, 1, .36, 1); }
.nw-feat:hover .nw-feat-img img { transform: scale(1.04); }
.nw-feat-body { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 36px 40px; }
.nw-feat-body .ar-chip { background: rgba(255, 255, 255, .14); color: #a7f3d0; }
.nw-feat-body strong { color: #fff; font-family: var(--font-heading, inherit); font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.25; }
.nw-feat-ex { color: #d1fae5; line-height: 1.6; }
.nw-feat-body .nw-meta { color: #a7f3d0; }
.nw-feat-body .nw-dot { color: rgba(255, 255, 255, .35); }
.nw-feat-body .ar-avatar { background: #fff; color: #047857; }
.nw-feat-go { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin-top: 4px; padding: 11px 20px; border-radius: 100px; background: #fff; color: #065f46; font-weight: 800; font-size: .92rem; }

.nw-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; margin-bottom: 24px; }
.nw-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.nw-filter { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--ar-line); background: #fff; color: #475569; font: inherit; font-weight: 700; font-size: .88rem; padding: 9px 16px; border-radius: 100px; cursor: pointer; transition: all .2s; }
.nw-filter span { background: #f1f5f9; color: var(--ar-muted); font-size: .74rem; padding: 2px 8px; border-radius: 100px; }
.nw-filter:hover { border-color: #10b981; color: var(--ar-accent); }
.nw-filter.is-on { background: #047857; border-color: #047857; color: #fff; }
.nw-filter.is-on span { background: rgba(255, 255, 255, .2); color: #fff; }
.nw-empty { padding: 40px 20px; text-align: center; color: var(--ar-muted); border: 1.5px dashed var(--ar-line); border-radius: 20px; }
.nw-side { position: sticky; top: 96px; display: grid; gap: 18px; }
.nw-box { padding: 20px; border: 1px solid var(--ar-line); border-radius: 20px; background: #fff; }
.nw-pop { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.nw-pop li { display: grid; grid-template-columns: 34px 1fr; gap: 6px; align-items: start; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.nw-pop li:last-child { border-bottom: 0; }
.nw-pop-n { font-family: var(--font-heading, inherit); font-weight: 800; font-size: 1.2rem; color: #a7f3d0; line-height: 1.2; }
.nw-pop li:nth-child(-n+3) .nw-pop-n { color: #10b981; }
.nw-pop a { color: var(--ar-ink); font-weight: 600; font-size: .9rem; line-height: 1.45; text-decoration: none; }
.nw-pop a:hover { color: var(--ar-accent); }

/* ---------- Hiệu ứng: hiện dần khi cuộn tới (js/articles.js thêm .is-in) ---------- */
.ar-anim { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1); }
.ar-anim.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ar-anim { opacity: 1; transform: none; transition: none; } .nw-card, .nw-thumb img, .nw-feat, .nw-feat-img img { transition: none; } }

/* ---------- Máy tính bảng / điện thoại ---------- */
@media (max-width: 1024px) {
  .ar-layout, .nw-layout { grid-template-columns: 1fr; gap: 32px; }
  .ar-side, .nw-side { position: static; }
  .ar-toc { display: none; }
  .ar-content { max-width: none; }
}
@media (max-width: 860px) {
  .ar-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .ar-cover { order: -1; border-radius: 20px; }
  .nw-feat { grid-template-columns: 1fr; }
  .nw-feat-body { padding: 24px 22px 26px; }
}
@media (max-width: 640px) {
  .ar-hero { padding: 12px 0 28px; margin-bottom: 24px; }
  .ar-lead { font-size: 1rem; }
  .ar-content { font-size: 1rem; line-height: 1.75; }
  .ar-content h2 { font-size: 1.3rem; }
  .ar-content table { display: block; overflow-x: auto; }
  .ar-pn { grid-template-columns: 1fr; }
  .ar-pn-next { text-align: left; }
  .nw-grid { grid-template-columns: 1fr; gap: 16px; }
  .nw-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 0 16px 4px; }
  .nw-filters::-webkit-scrollbar { display: none; }
  .nw-filter { flex: none; }
  .nw-search { min-width: 0; width: 100%; }
  .ar-related { margin-top: 40px; }
}
/* Cột trong lưới không được nở theo hàng nút chuyên mục (không xuống dòng trên điện thoại) */
.nw-layout > *, .ar-layout > * { min-width: 0; }

/* ===================== Tin tức: đầu trang mới (nền công nghệ, ảnh bài nổi 3D, ô tìm lớn, thống kê) ===================== */
.nw-hero { position: relative; max-width: none; margin: 0 0 34px; padding: 26px max(20px, calc(50% - 620px)) 60px; overflow: hidden; isolation: isolate;
  background: radial-gradient(40% 70% at 82% 40%, rgba(110, 231, 183, .45), transparent 70%), radial-gradient(35% 60% at 0% 100%, rgba(186, 230, 253, .55), transparent 70%), url(../public/images/hero-bg.webp) center / cover no-repeat, #f4fbf8; }
.nw-hero::after { content: ''; position: absolute; inset: auto 0 0; height: 110px; z-index: -1; background: linear-gradient(transparent, var(--ar-bg, #f8fafc)); }
.nw-hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.nw-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 9px 18px; border-radius: 999px; background: rgba(236, 253, 245, .92); color: #047857; font-weight: 800; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; box-shadow: 0 10px 26px -10px rgba(16, 185, 129, .45), inset 0 0 0 1px #d1fae5; }
.nw-hero h1 { margin: 18px 0 14px; font: 800 clamp(2.1rem, 4.4vw, 3.6rem)/1.08 'Space Grotesk', sans-serif; letter-spacing: -.025em; color: #0f172a; }
.nw-hero h1 span { display: block; background: linear-gradient(90deg, #047857, #10b981 55%, #0ea5e9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nw-hero h1::after { display: none !important; }
.nw-hero-copy > p { max-width: 540px; margin: 0 0 24px; color: #475569; font-size: 1.05rem; line-height: 1.7; }
.nw-hero .nw-search { min-width: 0; max-width: 540px; padding: 4px 8px 4px 20px; border: 1px solid #fff; background: rgba(255, 255, 255, .9); box-shadow: 0 20px 40px -24px rgba(15, 23, 42, .35); }
.nw-hero .nw-search input { padding: 14px 0; font-size: 1rem; }
.nw-search kbd { padding: 8px 12px; border-radius: 999px; background: linear-gradient(135deg, #10b981, #047857); color: #fff; font: 700 .78rem 'Manrope', sans-serif; }
.nw-stats { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.nw-stats li { display: flex; align-items: baseline; gap: 8px; padding: 10px 16px; border-radius: 14px; background: rgba(255, 255, 255, .78); border: 1px solid #fff; box-shadow: 0 12px 26px -20px rgba(15, 23, 42, .4); }
.nw-stats b { font: 800 1.2rem 'Space Grotesk', sans-serif; color: #047857; }
.nw-stats span { color: #64748b; font-size: .85rem; }
.nw-hero-art { position: relative; height: 420px; perspective: 1200px; }
.nw-float { position: absolute; display: block; overflow: hidden; border-radius: 22px; border: 5px solid #fff; background: #e2e8f0; box-shadow: 0 34px 60px -28px rgba(15, 23, 42, .5); }
.nw-float img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nw-float em { position: absolute; left: 12px; bottom: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #047857; font: 800 .72rem 'Manrope', sans-serif; font-style: normal; }
.nw-float.f1 { left: 6%; top: 18%; width: 72%; aspect-ratio: 16 / 9; z-index: 2; transform: rotateY(-14deg) rotateX(5deg); animation: hb-f1 9s ease-in-out infinite; }
.nw-float.f2 { right: 0; top: 0; width: 46%; aspect-ratio: 16 / 9; z-index: 1; transform: rotateY(-22deg) rotateZ(4deg); animation: hb-f2 11s ease-in-out infinite; }
.nw-float.f3 { left: 0; bottom: 2%; width: 46%; aspect-ratio: 16 / 9; z-index: 3; transform: rotateY(12deg) rotateZ(-5deg); animation: hb-f3 10s ease-in-out infinite; }
@keyframes hb-f1 { 50% { transform: rotateY(-8deg) rotateX(3deg) translateY(-12px); } }
@keyframes hb-f2 { 50% { transform: rotateY(-26deg) rotateZ(6deg) translateY(10px); } }
@keyframes hb-f3 { 50% { transform: rotateY(16deg) rotateZ(-3deg) translateY(-10px); } }
.nw-orb { position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .95), rgba(167, 243, 208, .35) 45%, transparent 70%); animation: ti-orb 12s ease-in-out infinite; }
.nw-orb.o1 { width: 130px; height: 130px; right: 6%; bottom: 6%; }
.nw-orb.o2 { width: 70px; height: 70px; left: 46%; top: 2%; animation-delay: -5s; }
@keyframes ti-orb { 50% { transform: translate(-14px, 16px) scale(1.05); } }
/* thẻ bài: tác giả 1 dòng, ngày đọc dòng dưới */
.nw-meta-t { display: grid; min-width: 0; line-height: 1.35; }
.nw-meta-t b { font-weight: 700; color: #334155; font-size: .82rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nw-meta-t small { font-size: .76rem; color: #94a3b8; }
.nw-meta { flex-wrap: nowrap; gap: 10px; padding-top: 14px; border-top: 1px dashed #e2e8f0; }
.nw-meta .ar-avatar { flex-shrink: 0; }
.nw-card .nw-thumb img { transition: transform .8s cubic-bezier(.22, 1, .36, 1); }
.nw-card:hover .nw-thumb img { transform: scale(1.07); }
@media (max-width: 1000px) { .nw-hero-in { grid-template-columns: minmax(0, 1fr); } .nw-hero-art { height: 340px; } }
@media (max-width: 640px) {
  .nw-hero { padding: 14px 16px 36px; }
  .nw-hero-art { height: 220px; }
  .nw-search kbd { display: none; }
  .nw-stats li { flex: 1 1 30%; flex-direction: column; align-items: center; gap: 0; padding: 8px; }
  .nw-stats span { font-size: .72rem; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .nw-float, .nw-orb { animation: none; } }

/* Thang kích thước chung (gọn) */
.nw-hero { padding-bottom: 40px !important; }
.nw-hero h1 { font-size: clamp(1.75rem, 3.2vw, 2.4rem) !important; }
.nw-head h1, .ar-hero h1 { font-size: clamp(1.6rem, 3vw, 2.2rem) !important; }
.nw-hero .nw-search input { padding: 11px 0 !important; }
@media (min-width: 1001px) { .nw-hero-art { height: 340px !important; } }

/* Điện thoại: đầu trang Tin tức gọn, 1 ảnh bài mới nhất; dòng tác giả bài nổi bật không bị bóp */
@media (max-width: 640px) {
  .nw-hero-art { height: 200px !important; perspective: none; }
  .nw-float.f2, .nw-float.f3, .nw-orb { display: none; }
  .nw-float.f1 { left: 4%; right: 4%; top: 10px; width: auto; transform: none; animation: none; }
  .nw-stats { gap: 8px; }
  .nw-feat-body .nw-meta { flex-wrap: wrap; row-gap: 4px; }
  .nw-feat-body .nw-meta > span { white-space: nowrap; }
}
/* Bộ lọc chuyên mục vuốt ngang: mờ mép phải báo còn mục phía sau */
@media (max-width: 768px) {
  .nw-filters { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
}
