/* Trang chi tiết tin (/new/{slug}): bố cục 2 cột, mục lục, và các khối định dạng dùng trong nội dung CKEditor.
   Cũng được nạp vào khung soạn thảo CKEditor (bodyClass "news-content") để admin thấy gần giống trang thật. */

/* ===== Bố cục trang ===== */
.news-crumbs { font-size: 14px; color: #6c757d; margin: 0 0 12px; }
.news-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.news-crumbs li + li::before { content: "›"; margin-right: 4px; }
.news-crumbs a { color: #6c757d; text-decoration: none; }
.news-crumbs a:hover { color: #29B852; }

.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.news-main { min-width: 0; }
.news-aside { display: grid; gap: 16px; position: sticky; top: 136px; }
.news-box { background: #fff; border: 1px solid #e6e6e6; border-radius: 4px; padding: 16px 18px; }
.news-box h2 { font-size: 17px; font-weight: 500; margin: 0 0 8px; color: #212529; }
.news-box ol, .news-box ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 15px; }
.news-box ol { list-style: decimal; }
.news-box ul { list-style: disc; }
.news-box a { color: #1a6fb5; text-decoration: none; }
.news-box a:hover { text-decoration: underline; }
.news-box.tools a { font-weight: 500; }
.news-toc-m { display: none; background: #fff; border: 1px solid #e6e6e6; border-radius: 4px; padding: 12px 16px; margin: 0 0 20px; }
.news-toc-m summary { font-weight: 500; cursor: pointer; }
.news-toc-m ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; list-style: decimal; }
.news-toc-m a { color: #1a6fb5; text-decoration: none; }

@media (max-width: 991px) {
  .news-layout { grid-template-columns: minmax(0, 1fr); }
  .news-aside { position: static; }
  .news-box.toc { display: none; }
  .news-toc-m { display: block; }
}

/* ===== Nội dung bài (CKEditor) ===== */
.news-content h2 { font-size: 26px; font-weight: 500; line-height: 1.3; color: #212529; margin: 40px 0 12px; scroll-margin-top: 136px; }
.news-content h3 { font-size: 19px; font-weight: 500; line-height: 1.35; color: #212529; margin: 0 0 6px; }
.news-content a { color: #1a6fb5; }
/* style.css bỏ dấu đầu dòng của mọi ul/ol; danh sách tạo bằng nút của CKEditor cần hiện lại */
.news-content ul:not([class]) { list-style: disc; padding-left: 24px; }
.news-content ol:not([class]) { list-style: decimal; padding-left: 24px; }
.news-content .lead { font-size: 19px; color: #333; margin: 0 0 20px; }

/* Khung tóm tắt */
.news-content .quick { background: #effaf2; border: 1px solid #29B852; border-radius: 4px; padding: 16px 20px; margin: 0 0 24px; color: #212529; }
.news-content .quick .quick-title { font-size: 17px; font-weight: 500; margin: 0 0 6px; }
.news-content .quick ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; list-style: disc; }

/* Chú thích màu */
.news-content .legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: #555; margin: 0 0 14px; }
.news-content .legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.news-content .legend .lg::before { content: ""; width: 14px; height: 14px; border-radius: 3px; display: inline-block; box-sizing: border-box; }
.news-content .legend .lg-central::before { background: #29B852; }
.news-content .legend .lg-local::before { background: #3F55B5; }
.news-content .legend .lg-draft::before { background: #fff; border: 2px dashed #F39C33; }

/* Dòng thời gian */
.news-content .timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.news-content .tl { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 0 18px; position: relative; padding-bottom: 22px; margin: 0; }
.news-content .tl::before { content: ""; position: absolute; left: 47px; top: 34px; bottom: 0; width: 2px; background: #dcdcdc; }
.news-content .tl:last-child::before { display: none; }
.news-content .tl-date { display: block; font-weight: 700; font-size: 13px; line-height: 1.3; text-align: center; background: #29B852; color: #fff; border-radius: 4px; padding: 6px 4px; align-self: start; position: relative; z-index: 1; }
.news-content .tl.local .tl-date { background: #3F55B5; }
.news-content .tl.draft .tl-date { background: #fff; color: #9A5A0A; border: 2px dashed #F39C33; }
.news-content .tl-body { background: #fff; border: 1px solid #e6e6e6; border-radius: 4px; padding: 14px 18px; min-width: 0; color: #212529; }
.news-content .tl-body p { margin: 0 0 8px; font-size: 16px; line-height: 1.65; }
.news-content .chip { display: inline-block; font-size: 12px; line-height: 1.5; border: 1px solid #D4D4D4; border-radius: 3px; padding: 1px 8px; color: #555; background: #fafafa; margin: 0 6px 8px 0; }
.news-content .chip.ok { color: #1c8a3c; border-color: #29B852; background: #effaf2; }
.news-content .chip.old { color: #777; }
.news-content .chip.warn { color: #9A5A0A; border-color: #F39C33; background: #FFF6EA; }
.news-content .tl-body p.for-you { font-size: 15px; color: #333; background: #f6f7f8; border-radius: 4px; padding: 8px 12px; margin: 8px 0; }
.news-content .tl-body p.src { font-size: 13px; color: #6c757d; margin: 0; }

/* So sánh 20% và 50% */
.news-content .fig { margin: 20px 0 8px; border: 1px solid #eee; border-radius: 4px; padding: 14px 16px; background: #fcfcfc; }
.news-content .fig figcaption { font-size: 14px; color: #6c757d; margin-top: 8px; }
.news-content .bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: 15px; margin: 6px 0; }
.news-content .bar-track { height: 20px; background: #eee; border-radius: 3px; overflow: hidden; }
.news-content .bar { height: 100%; border-radius: 3px; }
.news-content .bar.old { background: #9aa3ab; }
.news-content .bar.new { background: #29B852; }
.news-content .bar-val { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }

/* Hỏi đáp, ô báo giá, nguồn */
.news-content .faq h3 { margin-top: 18px; }
.news-content .cta { margin: 36px 0 0; background: #fff; border: 2px solid #F39C33; border-radius: 4px; padding: 20px 22px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; color: #212529; }
.news-content .cta h3 { margin: 0 0 4px; font-size: 21px; }
.news-content .cta p { margin: 0; color: #555; max-width: 56ch; }
.news-content .cta .contact { font-size: 14px; margin-top: 8px; }
.news-content .btn { display: inline-block; border: 1px solid transparent; border-radius: 8px; padding: 10px 20px; font-weight: 500; text-decoration: none; text-align: center; line-height: 1.4; background: #F39C33; color: #fff; font-size: 17px; }
.news-content .btn:hover { filter: brightness(.95); color: #fff; }
.news-content .sources { font-size: 15px; }
.news-content .sources ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; list-style: disc; }
.news-content .disclaimer { font-size: 14px; color: #6c757d; border-left: 3px solid #F39C33; padding-left: 12px; margin-top: 20px; }

@media (max-width: 560px) {
  .news-content .tl { grid-template-columns: 1fr; gap: 6px; }
  .news-content .tl::before { display: none; }
  .news-content .tl-date { justify-self: start; padding: 4px 10px; }
  .news-content .bar-row { grid-template-columns: 120px minmax(0, 1fr) 44px; }
}
