/**
 * News Article Detail — 2026 Editorial Design System (Desktop & Base)
 * CCT District 20 - Church of Christ in Thailand
 *
 * Principles:
 * 1. Text-First Editorial (No Hero Cover Image in Article View)
 * 2. Unified 820px Editorial Axis (.nws-shell) — Header, Body, Author, Pager & Related align 100%
 * 3. Harmonious with real Header (#header.header) & Footer (#footer.footer)
 * 4. ZERO forced-override anywhere (including @media print)
 */

/* ==========================================================
   LOẠI BỎ VIỀN VÀNG CỦA HEADER TRÊN TRANG BÀI VIẾT (ZERO !important)
   Dùng CSS specificity cao, chỉ áp dụng cho trang tin tức bài viết
   ========================================================== */
html body.page-news-article #header.header .branding,
html body.page-news-article .header .branding,
html body:has(.nws-page) #header.header .branding,
html body:has(.nws-page) .header .branding {
  border-bottom: none;
  position: relative;
}

.nws-page {
  --nws-ink:          #141a3e;
  --nws-ink-body:     #263042;
  --nws-ink-soft:     #475569;
  --nws-muted:        #64748b;
  --nws-line:         #e2e8f0;
  --nws-line-soft:    #f1f5f9;
  --nws-surface:      #ffffff;
  --nws-canvas:       #f8fafc;

  --nws-gold:         #d97706;
  --nws-gold-rich:    #f59e0b;
  --nws-gold-bright:  #fbbf24;
  --nws-gold-pale:    #fef3c7;
  --nws-gold-wash:    #fffbeb;

  --nws-blue:         #0284c7;
  --nws-blue-deep:    #0369a1;
  --nws-blue-pale:    #e0f2fe;
  --nws-pink:         #f472b6;

  --nws-radius:       14px;
  --nws-shell-max:    820px;
  --nws-body-size:    1.14rem;
  --nws-body-lh:      1.92;

  color: var(--nws-ink-body);
  background: var(--nws-surface);
  position: relative;
}

.nws-page[data-font-size="sm"] {
  --nws-body-size: 1.02rem;
  --nws-body-lh:   1.84;
}

.nws-page[data-font-size="md"] {
  --nws-body-size: 1.14rem;
  --nws-body-lh:   1.92;
}

.nws-page[data-font-size="lg"] {
  --nws-body-size: 1.28rem;
  --nws-body-lh:   1.98;
}

/* ==========================================================
   0. TOP READING PROGRESS BAR (delicate rose-pink #f472b6 / #ec4899, 2px)
========================================================== */
.cct-neon-progressbar,
.nws-progress-bar-branding {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.85) 0%, rgba(244, 114, 182, 0.95) 100%);
  box-shadow: 0 1px 3px rgba(236, 72, 153, 0.25);
  z-index: 999;
  pointer-events: none;
  transition: width 0.08s linear;
}

.nws-progress-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 9998;
  background: transparent;
  pointer-events: none;
}

.nws-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.85) 0%, rgba(244, 114, 182, 0.95) 100%);
  box-shadow: 0 1px 3px rgba(236, 72, 153, 0.25);
  transition: width 0.08s linear;
}

/* Mobile Native Sub-bar, Bottom Sheet & Toast: hidden on desktop >= 992px */
.nws-m-subbar,
.nws-sheet-backdrop,
.nws-sheet {
  display: none;
}

.nws-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(20, 26, 62, 0.94);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 9999;
}

.nws-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.nws-toast i {
  color: #34d399;
  font-size: 1.05rem;
}

/* Shared 820px Editorial Column Shell */
.nws-shell {
  max-width: var(--nws-shell-max);
  margin: 0 auto;
}

/* ==========================================================
   1. ARTICLE HEADER (.nws-head) — No Hero Cover Image
========================================================== */
.nws-head {
  padding: 30px 0 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--nws-line);
}

.nws-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 20px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--nws-muted);
}

.nws-crumbs a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--nws-blue-deep);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.18s ease;
}

.nws-crumbs a:hover {
  color: var(--nws-gold);
}

.nws-crumbs i {
  font-size: 0.72rem;
  opacity: 0.55;
}

.nws-crumbs span {
  max-width: 46ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--nws-ink-soft);
}

/* Gold accent rule above category eyebrow */
.nws-head-col::before {
  content: "";
  display: block;
  width: 52px;
  height: 4px;
  margin-bottom: 16px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--nws-gold-bright) 0%, var(--nws-gold) 100%);
}

.nws-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.nws-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 13px;
  border: 1px solid rgba(217, 119, 6, 0.28);
  border-radius: 999px;
  background: var(--nws-gold-pale);
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.55;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.nws-chip:hover {
  background: #fde68a;
  border-color: rgba(217, 119, 6, 0.48);
  color: #78350f;
}

.nws-readtime-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--nws-muted);
}

.nws-readtime-pill i {
  color: var(--nws-blue);
}

.nws-draft {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 55, 255, 0.1);
  border: 1px solid rgba(255, 55, 255, 0.3);
  color: #a21caf;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.55;
}

.nws-title {
  margin: 0 0 22px;
  color: var(--nws-ink);
  font-size: clamp(1.72rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: 0;
  text-wrap: pretty;
}

/* Unified Byline & Quick Action Bar */
.nws-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 13px 16px;
  background: var(--nws-surface);
  border: 1px solid var(--nws-line);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(20, 26, 62, 0.04);
}

.nws-meta-author {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nws-meta-avatar,
.cct-author-avatar img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #f472b6;
  background: #ffffff;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 6px rgba(244, 114, 182, 0.25);
}

.nws-meta-info {
  min-width: 0;
}

.nws-meta-org {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--nws-ink);
  line-height: 1.4;
}

.nws-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--nws-muted);
  margin-top: 2px;
}

.nws-byline-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nws-byline-item i {
  font-size: 0.92em;
  color: var(--nws-blue);
}

.nws-byline-dot {
  color: #cbd5e1;
}

.nws-byline .nws-chip {
  padding: 2.5px 10px;
  font-size: 0.74rem;
  line-height: 1.45;
}

.nws-byline .nws-draft {
  padding: 2px 8px;
  font-size: 0.72rem;
  line-height: 1.45;
}

/* Quick Tools: Font Size + Share + Print */
.nws-meta-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nws-font-switch {
  display: inline-flex;
  align-items: center;
  background: var(--nws-line-soft);
  border: 1px solid var(--nws-line);
  border-radius: 10px;
  padding: 2px;
  margin-right: 4px;
}

.nws-font-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--nws-ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
}

.nws-font-btn:hover {
  color: var(--nws-ink);
}

.nws-font-btn.is-active {
  background: var(--nws-surface);
  color: var(--nws-blue-deep);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.nws-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--nws-line);
  border-radius: 10px;
  background: var(--nws-surface);
  color: var(--nws-ink-soft);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease,
              background 0.18s ease, transform 0.18s ease;
}

.nws-share-btn svg {
  display: block;
}

.nws-share-btn:hover {
  border-color: var(--nws-blue);
  background: var(--nws-blue-pale);
  color: var(--nws-blue-deep);
  transform: translateY(-1px);
}

.nws-share-btn.is-done {
  border-color: #059669;
  background: #ecfdf5;
  color: #059669;
}

/* ==========================================================
   2. ARTICLE READING SECTION (.nws-read)
========================================================== */
.nws-read {
  padding: 30px 0 24px;
  background: var(--nws-surface);
}

.nws-col {
  min-width: 0;
}

/* Lead / Summary Callout Box */
.nws-lead {
  margin: 0 0 30px;
  padding: 18px 22px;
  border-left: 4px solid var(--nws-gold);
  border-radius: 0 14px 14px 0;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #334155;
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.78;
}

/* ==========================================================
   3. ARTICLE BODY TYPOGRAPHY & IMAGE ENGINE (.nws-body)
========================================================== */
.nws-body {
  color: var(--nws-ink-body);
  font-size: var(--nws-body-size);
  line-height: var(--nws-body-lh);
  overflow-wrap: break-word;
  display: flow-root;
  transition: font-size 0.18s ease;
}

.nws-body > *:first-child { margin-top: 0; }
.nws-body > *:last-child  { margin-bottom: 0; }

.nws-body p {
  margin: 0 0 22px;
}

.nws-body h2 {
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--nws-blue);
  color: var(--nws-ink);
  font-size: 1.42rem;
  font-weight: 700;
  line-height: 1.45;
  scroll-margin-top: 96px;
}

.nws-body h3 {
  margin: 30px 0 12px;
  color: var(--nws-ink);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.5;
  scroll-margin-top: 96px;
}

.nws-body h4 {
  margin: 24px 0 10px;
  color: var(--nws-ink);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.55;
}

.nws-body ul,
.nws-body ol {
  margin: 0 0 24px;
  padding-left: 1.5rem;
}

.nws-body li {
  margin-bottom: 10px;
}

.nws-body li::marker {
  color: var(--nws-gold);
}

/* Blockquote: non-italic to preserve Thai tone marks, soft pastel pink wash with elegant rose border */
.nws-body blockquote {
  margin: 30px 0;
  padding: 20px 24px;
  border-left: 4px solid #f472b6;
  border-radius: 0 14px 14px 0;
  background: linear-gradient(135deg, #fff1f2 0%, #fdf2f8 100%);
  color: #4c1d47;
  font-style: normal;
  font-size: 1.06em;
  line-height: 1.85;
  box-shadow: 0 2px 14px rgba(244, 114, 182, 0.08);
}

.nws-body blockquote > *:first-child { margin-top: 0; }
.nws-body blockquote > *:last-child  { margin-bottom: 0; }

.nws-body a {
  color: var(--nws-blue-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

.nws-body a:hover {
  color: var(--nws-gold);
}

.nws-body strong,
.nws-body b {
  color: var(--nws-ink);
  font-weight: 700;
}

/* ----------------------------------------------------------
   IMAGE & FIGURE ENGINE (100% constrained, handles RTE output)
---------------------------------------------------------- */
.nws-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px auto 26px;
  border-radius: 12px;
}

.nws-body figure {
  margin: 26px auto;
  max-width: 100%;
}

.nws-body figure img {
  margin: 0;
}

.nws-body figcaption {
  margin-top: 8px;
  color: var(--nws-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.nws-body .editorial-figure {
  position: relative;
  display: block;
  text-align: center;
  margin: 26px auto;
  max-width: 100%;
  box-sizing: border-box;
}

/* Hide empty resize handle divs saved by the admin RTE */
.nws-body .figure-image-container > div:empty {
  display: none;
}

.nws-body .figure-image-container {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}

.nws-body .editorial-image,
.nws-body .editorial-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(20, 26, 62, 0.08);
}

/* Center Alignment */
.nws-body .editorial-figure.image-align-center {
  display: block;
  text-align: center;
  margin: 26px auto;
  clear: both;
}

.nws-body .editorial-figure.image-align-center .figure-image-container {
  display: inline-block;
  max-width: 100%;
}

/* Left Alignment (Float left, allowing paragraph text to wrap naturally) */
.nws-body .editorial-figure.image-align-left {
  float: left;
  margin: 8px 24px 20px 0;
  max-width: 50%;
  text-align: left;
  clear: none;
}

/* Right Alignment (Float right, allowing paragraph text to wrap naturally) */
.nws-body .editorial-figure.image-align-right {
  float: right;
  margin: 8px 0 20px 24px;
  max-width: 50%;
  text-align: right;
  clear: none;
}

.nws-body .editorial-figure figcaption {
  margin-top: 8px;
  color: var(--nws-muted);
  font-size: 0.84rem;
  line-height: 1.55;
  display: block;
}

.nws-body .editorial-figure.image-align-center figcaption {
  text-align: center;
}

.nws-body .editorial-figure.image-align-left figcaption {
  text-align: left;
}

.nws-body .editorial-figure.image-align-right figcaption {
  text-align: right;
}

.nws-body .editorial-figure figcaption i {
  color: var(--nws-blue);
  font-size: 0.95rem;
  margin-right: 4px;
}

/* Section headings & rule breaks automatically clear floats so section boundaries stay crisp */
.nws-body h2,
.nws-body h3,
.nws-body h4,
.nws-body h5,
.nws-body h6,
.nws-body hr {
  clear: both;
}

.nws-body hr {
  height: 0;
  margin: 36px 0;
  border: 0;
  border-top: 1px solid var(--nws-line);
}

.nws-body iframe,
.nws-body video,
.nws-body embed,
.nws-body object {
  display: block;
  max-width: 100%;
  margin: 22px auto 26px;
  border: 0;
  border-radius: 12px;
}

.nws-body iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  background: #0f172a;
}

.nws-body .table-responsive-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 26px;
  border-radius: 12px;
}

.nws-body table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 26px;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.65;
}

.nws-body .table-responsive-wrapper table {
  margin: 0;
}

.nws-body th,
.nws-body td {
  padding: 11px 14px;
  border: 1px solid var(--nws-line);
  text-align: left;
  vertical-align: top;
}

.nws-body th.text-right,
.nws-body td.text-right,
.nws-body th.cell-num,
.nws-body td.cell-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.nws-body th {
  background: var(--nws-line-soft);
  color: var(--nws-ink);
  font-weight: 700;
}

/* Bảng giữ đúng khổ người soạn đã chọn trong trình soạn thảo.
   Base rule ở trên đặt `display:block` để bảng rộng tự cuộn ngang; nhưng
   block khiến ô co theo nội dung nên khổ 85%/auto không hiển thị đúng.
   Các bảng do RTE sinh ra luôn nằm trong .table-responsive-wrapper nên
   trả về `display:table` vẫn an toàn — phần cuộn do wrapper đảm nhận. */
.nws-body table.table-layout-full,
.nws-body table.table-layout-center,
.nws-body table.table-layout-auto {
  display: table;
}

.nws-body table.table-layout-center {
  width: 85%;
  margin-left: auto;
  margin-right: auto;
}

.nws-body table.table-layout-auto {
  width: auto;
  margin-left: 0;
  margin-right: auto;
}

/* Gợi ý "kéo ngang" chỉ dành cho trình soạn thảo, không hiện trên trang công khai */
.nws-body .table-scroll-hint {
  display: none;
}

.nws-body-empty {
  padding: 26px 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: var(--nws-canvas);
  color: var(--nws-muted);
  font-size: 0.98rem;
  text-align: center;
}

/* ==========================================================
   4. ATTACHMENTS / DOWNLOADS (.nws-files)
========================================================== */
.nws-files {
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--nws-line);
  background: transparent;
  clear: both;
}

.nws-files h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: var(--nws-ink);
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.5;
}

.nws-files h2 i {
  color: var(--nws-gold);
  font-size: 1.1rem;
}

.nws-file-list {
  display: grid;
  gap: 10px;
}

.nws-file {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--nws-line);
  border-radius: 12px;
  background: var(--nws-surface);
  color: var(--nws-ink);
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease,
              box-shadow 0.18s ease, transform 0.18s ease;
}

.nws-file:hover {
  border-color: var(--nws-blue);
  background: #f8fbff;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.1);
  transform: translateY(-1px);
}

.nws-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--nws-line-soft);
  color: var(--nws-muted);
  font-size: 1.2rem;
}

.nws-file-pdf  { background: #fef2f2; color: #dc2626; }
.nws-file-doc  { background: #eff6ff; color: #2563eb; }
.nws-file-xls  { background: #ecfdf5; color: #059669; }
.nws-file-img  { background: var(--nws-blue-pale); color: var(--nws-blue); }
.nws-file-file { background: #f1f5f9; color: #64748b; }

.nws-file-main {
  min-width: 0;
}

.nws-file-main b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--nws-ink);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.5;
  word-break: break-word;
}

.nws-file-meta {
  display: block;
  margin-top: 2px;
  color: var(--nws-muted);
  font-size: 0.78rem;
}

.nws-file-dl {
  color: #94a3b8;
  font-size: 1.15rem;
  transition: color 0.18s ease;
}

.nws-file:hover .nws-file-dl {
  color: var(--nws-blue);
}

/* ==========================================================
   4.5. BOTTOM SOCIAL SHARE (.cct-bottom-share) — Facebook, LINE, Copy Link
========================================================== */
.cct-bottom-share {
  margin-top: 24px;
  padding: 13px 18px;
  background: var(--nws-canvas);
  border: 1px solid var(--nws-line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  clear: both;
}

.cct-bottom-share-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--nws-ink);
}

.cct-bottom-share-label i {
  font-size: 1.15rem;
  color: var(--nws-blue-deep);
}

.cct-bottom-share-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cct-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.cct-share-fb {
  background: #1877f2;
  color: #ffffff;
}

.cct-share-fb:hover {
  background: #1464cc;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
  transform: translateY(-1px);
}

.cct-share-line {
  background: #06c755;
  color: #ffffff;
}

.cct-share-line:hover {
  background: #05aa48;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
  transform: translateY(-1px);
}

.cct-share-copy {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}

.cct-share-copy:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-1px);
}

.cct-share-copy.is-done {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857;
}

/* ==========================================================
   5. ARTICLE FOOTER (.nws-foot) — Pager & Related (Optimized Compact)
========================================================== */
.nws-foot {
  padding: 24px 0 36px;
  background: var(--nws-canvas);
  border-top: 1px solid var(--nws-line);
}

/* Newer / Older Article Pager: Tinh gọn, tối ưu khoảng trắng */
.nws-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.nws-pager-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border: 1px solid var(--nws-line);
  border-radius: 10px;
  background: var(--nws-surface);
  color: var(--nws-ink);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
              transform 0.18s ease;
}

.nws-pager-item:hover {
  border-color: var(--nws-blue);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.08);
  transform: translateY(-1px);
}

.nws-pager-item.is-next {
  text-align: right;
  align-items: flex-end;
}

.nws-pager-item:only-child {
  grid-column: 1 / -1;
}

.nws-pager-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--nws-blue-deep);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

.nws-pager-label i {
  font-size: 0.8rem;
  transition: transform 0.18s ease;
}

.nws-pager-item:hover .nws-pager-label i {
  transform: translateX(-2px);
}

.nws-pager-item.is-next:hover .nws-pager-label i {
  transform: translateX(2px);
}

.nws-pager-item b {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--nws-ink);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Related News Section: Tinh gọn, hiện đại, khoảng cách cân đối */
.nws-related {
  margin: 0;
  background: transparent;
}

.nws-related-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--nws-line);
}

.nws-related-head h2 {
  position: relative;
  margin: 0;
  padding-left: 10px;
  border-left: 3px solid var(--nws-blue);
  color: var(--nws-ink);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}

.nws-related-head h2::before {
  display: none;
}

.nws-related-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--nws-blue-deep);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s ease;
}

.nws-related-all:hover {
  color: var(--nws-gold);
}

.nws-related-all i {
  font-size: 0.78rem;
  transition: transform 0.18s ease;
}

.nws-related-all:hover i {
  transform: translateX(3px);
}

.nws-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.nws-related-grid.is-sparse {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nws-related-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.nws-related-grid.is-single .nws-rcard {
  flex-direction: row;
  align-items: stretch;
}

.nws-related-grid.is-single .nws-rcard-thumb {
  flex: 0 0 200px;
  aspect-ratio: auto;
  min-height: 110px;
}

.nws-related-grid.is-single .nws-rcard-body {
  justify-content: center;
  padding: 12px 18px;
}

.nws-rcard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--nws-line);
  border-radius: 10px;
  background: var(--nws-surface);
  color: var(--nws-ink);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
              transform 0.2s ease;
}

.nws-rcard:hover {
  border-color: var(--nws-blue);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.1);
  transform: translateY(-2px);
}

.nws-rcard-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #141a3e 0%, #1e295e 100%);
}

.nws-rcard-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.nws-rcard:hover .nws-rcard-thumb img {
  transform: scale(1.04);
}

.nws-rcard-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 0 12px;
  color: var(--nws-gold-bright);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.4;
  text-align: center;
}

.nws-rcard-fallback i {
  font-size: 1.3rem;
  opacity: 0.85;
}

.nws-rcard-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 12px;
  flex: 1;
}

.nws-rcard-date {
  color: var(--nws-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.nws-rcard-body b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--nws-ink);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.42;
}

/* ==========================================================
   6. FOCUS STATES
========================================================== */
.nws-page a:focus-visible,
.nws-page button:focus-visible {
  outline: 2px solid var(--nws-blue);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ==========================================================
   7. PRINT STYLESHEET (ZERO forced-override — specificity via html body)
========================================================== */
@media print {
  @page {
    margin: 16mm;
  }

  html body #header.header,
  html body #footer.footer,
  html body #scroll-top,
  html body .cct-preview-banner,
  html body .cct-preview-controlbar,
  html body .nws-progress-fixed,
  html body .nws-m-subbar,
  html body .nws-sheet-backdrop,
  html body .nws-sheet,
  html body .nws-toast,
  html body .nws-page .nws-crumbs,
  html body .nws-page .nws-meta-tools,
  html body .nws-page .nws-pager,
  html body .nws-page .nws-related,
  html body .nws-page .nws-files .nws-file-dl {
    display: none;
  }

  html body .nws-page,
  html body .nws-page .nws-head,
  html body .nws-page .nws-read,
  html body .nws-page .nws-foot {
    background: #ffffff;
    border: 0;
    padding: 0;
    margin: 0;
  }

  html body .nws-page .nws-head-col::before {
    display: none;
  }

  html body .nws-page .container,
  html body .nws-page .nws-shell {
    width: auto;
    max-width: none;
    padding: 0;
  }

  html body .nws-page .nws-title {
    font-size: 20pt;
    line-height: 1.4;
    color: #000000;
  }

  html body .nws-page .nws-body {
    font-size: 11.5pt;
    line-height: 1.65;
    color: #000000;
  }

  html body .nws-page .nws-body p {
    margin-bottom: 9pt;
  }

  html body .nws-page .nws-body a {
    color: #000000;
    text-decoration: none;
  }

  html body .nws-page .nws-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555555;
  }

  html body .nws-page .nws-author,
  html body .nws-page .nws-files,
  html body .nws-page .editorial-figure {
    break-inside: avoid;
  }
}

/* ==========================================================================
   ARTICLE IMAGE LIGHTBOX (Pure Vanilla, Zero Dependencies, Zero !important)
   ========================================================================== */
.nws-body img,
.cct-body-text img {
  cursor: zoom-in;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.nws-body img:hover,
.cct-body-text img:hover {
  filter: brightness(1.02);
}

body.cct-lightbox-locked {
  overflow: hidden;
}

.cct-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

.cct-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.cct-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 30, 0.88);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.cct-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cct-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.08);
}

.cct-lightbox-close:active {
  transform: scale(0.94);
}

.cct-lightbox-wrap {
  position: relative;
  z-index: 5;
  max-width: 94vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.cct-lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
}

.cct-lightbox-img {
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.2);
  transform: scale(0.92);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
}

.cct-lightbox.is-open .cct-lightbox-img {
  transform: scale(1);
}

.cct-lightbox-caption {
  margin-top: 14px;
  color: #f1f5f9;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  max-width: 720px;
  padding: 0 16px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.cct-lightbox-caption:empty {
  display: none;
}

@media (max-width: 768px) {
  .cct-lightbox-close {
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
  .cct-lightbox-img {
    max-width: 94vw;
    max-height: 78vh;
    border-radius: 8px;
  }
  .cct-lightbox-caption {
    font-size: 13px;
    margin-top: 10px;
  }
}
