/* LED24H - trang nội dung: trang đích từ khóa, mục Hướng dẫn, bài viết.
   Cùng bảng màu và chiều rộng với trang chủ (style.css). */

.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 20; background: linear-gradient(90deg, var(--brand), #ffb08f); transition: width .1s linear; }

/* Dải tiêu đề */
.doc-hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden;
  background:
    radial-gradient(900px 340px at 85% -10%, rgba(242, 106, 60, .16), transparent 70%),
    radial-gradient(700px 300px at 0% 120%, rgba(159, 211, 255, .07), transparent 70%),
    var(--bg); }
.doc-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 85%); mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 85%); }
.doc-hero .container { position: relative; padding-top: 34px; padding-bottom: 42px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs .sep { color: var(--line2); }
.crumbs .cur { color: var(--soft); }
.doc-badge { display: inline-flex; margin-top: 22px; background: var(--brand-bg); border: 1px solid var(--brand-line); color: #ffb08f; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 20px; }
.doc-hero h1 { max-width: 980px; margin: 14px 0 0; font-size: 46px; line-height: 1.15; font-weight: 800; letter-spacing: -.5px; }
.doc-lead { max-width: 860px; margin: 16px 0 0; color: var(--soft); font-size: 19px; line-height: 1.65; }
.doc-lead b { color: #fff; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.doc-meta li::before { content: "•"; color: var(--brand); margin-right: 8px; }
.doc-meta li:first-child::before { content: none; }

/* Bố cục 2 cột */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 56px; align-items: start; padding-top: 44px; padding-bottom: 30px; }
.doc-layout.wide { grid-template-columns: minmax(0, 1fr); }

/* Nội dung bài */
.prose { font-size: 17.5px; line-height: 1.8; color: var(--soft); min-width: 0; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 18px; }
.prose b, .prose strong { color: #fff; }
.prose a { color: #9fd3ff; text-underline-offset: 3px; }
.prose h2 { position: relative; font-size: 29px; line-height: 1.3; color: #fff; margin: 54px 0 16px; padding-top: 26px; border-top: 1px solid var(--line); scroll-margin-top: 84px; }
.prose h2::before { content: ""; position: absolute; top: -1px; left: 0; width: 56px; height: 3px; border-radius: 2px; background: var(--brand); }
.prose h3 { font-size: 21px; color: #fff; margin: 32px 0 8px; scroll-margin-top: 84px; }
.prose h3::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--brand); margin-right: 10px; vertical-align: middle; transform: translateY(-2px); }

/* Danh sách: gạch đầu dòng = dấu tích, đánh số = các bước */
.prose ul { list-style: none; padding: 0; margin: 0 0 22px; }
.prose ul > li { position: relative; padding-left: 30px; margin: 10px 0; }
.prose ul > li::before { content: "✓"; position: absolute; left: 4px; top: 0; color: var(--ok); font-weight: 800; }
.prose ol { list-style: none; counter-reset: step; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.prose ol > li { counter-increment: step; position: relative; padding: 16px 20px 16px 66px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.prose ol > li::before { content: counter(step); position: absolute; left: 18px; top: 15px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-bg); border: 1px solid var(--brand-line); color: #ffb08f; font-weight: 800; font-size: 15px; line-height: 1; }

/* Hình, video */
.prose figure { margin: 30px 0; }
.prose figure img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line2); box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.prose figcaption { color: var(--muted); font-size: 14px; text-align: center; margin-top: 10px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); background: #000; margin: 0 0 32px; box-shadow: 0 24px 80px rgba(242, 106, 60, .12), 0 20px 60px rgba(0, 0, 0, .5); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Bảng */
.table-wrap { overflow-x: auto; margin: 22px 0 28px; border: 1px solid var(--line2); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.55; min-width: 560px; }
.prose th, .prose td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--panel2); color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .4px; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:last-child { color: #d9f7e2; background: rgba(31, 143, 47, .07); }
.prose td:first-child { color: #fff; font-weight: 600; }

/* Hộp ghi chú, khối tóm tắt */
.note { display: flex; gap: 12px; background: var(--brand-bg); border: 1px solid var(--brand-line); border-radius: 14px; padding: 16px 20px; margin: 22px 0; color: var(--soft); }
.note::before { content: "i"; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font: 800 14px/1 Georgia, serif; margin-top: 3px; }
.key-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 34px; padding: 0 !important; }
.key-points > li { margin: 0 !important; padding: 18px 18px 18px 18px !important; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; font-size: 15.5px; line-height: 1.55; }
.key-points > li::before { content: none !important; }
.key-points b { display: block; color: var(--brand) !important; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }

/* FAQ trong bài */
.prose .faq { max-width: none; }
.prose .faq summary { color: #fff; }

/* Khối kêu gọi cuối bài */
.doc-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px 28px; flex-wrap: wrap; margin: 52px 0 10px; padding: 28px 30px; border-radius: 18px; border: 1px solid var(--brand-line);
  background: radial-gradient(500px 200px at 100% 0%, rgba(242, 106, 60, .18), transparent 70%), var(--panel); }
.doc-cta h2 { margin: 0 0 4px !important; padding: 0 !important; border: 0 !important; font-size: 24px !important; }
.doc-cta h2::before { content: none !important; }
.doc-cta p { margin: 0 !important; color: var(--muted); }
.doc-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Cột phải */
.doc-side { position: sticky; top: 84px; display: grid; gap: 16px; }
.side-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.side-title { display: block; font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.side-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line2); }
.side-toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 14.5px; line-height: 1.45; }
.side-toc a:hover { color: #fff; }
.side-toc a.on { color: #fff; border-left-color: var(--brand); }
.side-cta { text-align: center; border-color: var(--brand-line); background: radial-gradient(300px 160px at 50% 0%, rgba(242, 106, 60, .16), transparent 70%), var(--panel); }
.side-cta img { display: block; margin: 0 auto 8px; border-radius: 10px; }
.side-cta b { display: block; color: var(--brand); font-size: 18px; letter-spacing: .5px; }
.side-cta p { color: var(--muted); font-size: 14px; margin: 6px 0 14px; }
.side-cta .btn { width: 100%; font-size: 15px; padding: 11px 16px; }
.side-cta .btn + .btn { margin-top: 8px; }
.side-links { list-style: none; margin: 0; padding: 0; }
.side-links li + li { border-top: 1px solid var(--line); }
.side-links a { display: block; padding: 10px 0; color: var(--soft); text-decoration: none; font-size: 14.5px; line-height: 1.45; }
.side-links a:hover { color: #fff; }

/* Trang liên hệ */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 0 0 30px; }
.contact-card { display: flex; flex-direction: column; gap: 6px; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; color: var(--text) !important; text-decoration: none; transition: border-color .15s, transform .15s; }
a.contact-card:hover { border-color: var(--brand-line); transform: translateY(-2px); }
.contact-card .ic { font-size: 26px; }
.contact-card small { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.contact-card b { color: #fff; font-size: 19px; overflow-wrap: anywhere; }
.contact-card span { color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* Danh sách bài (trang /tin-tuc và cuối bài) */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin: 0 0 30px; padding: 0 !important; list-style: none; }
.post-grid > li { margin: 0 !important; padding: 0 !important; }
.post-grid > li::before { content: none !important; }
.post-card { display: flex; flex-direction: column; height: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: var(--text) !important; text-decoration: none; transition: border-color .15s, transform .15s; }
.post-card:hover { border-color: var(--brand-line); transform: translateY(-2px); }
.post-thumb { position: relative; aspect-ratio: 16 / 9; background: #0e1016; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.post-card:hover .post-thumb img { transform: scale(1.04); }
.post-thumb .play { position: absolute; left: 14px; bottom: 12px; background: rgba(11, 13, 18, .85); border: 1px solid var(--line2); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.post-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.post-tag { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.post-body b { color: #fff; font-size: 19px; line-height: 1.35; }
.post-body span.desc { color: var(--muted); font-size: 15px; line-height: 1.55; }
.post-body .more { margin-top: auto; padding-top: 8px; color: #9fd3ff; font-size: 14px; font-weight: 700; }
.post-card.featured { border-color: var(--brand-line); }
/* Trang danh sách: 3 cột, bài nổi bật chiếm 2 cột và nằm ngang */
.wide .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wide .post-grid > li:has(.featured) { grid-column: 1 / -1; }
/* Ảnh luôn đúng 16:9 (không cắt); chữ bên phải căn giữa theo chiều cao ảnh */
.wide .post-card.featured { flex-direction: row; align-items: center; }
.wide .post-card.featured .post-thumb { flex: 0 0 58%; aspect-ratio: 16 / 9; }
.wide .post-card.featured .post-body { padding: 30px 36px; }
.wide .post-card.featured .post-body { justify-content: center; padding: 26px 28px; }
.wide .post-card.featured b { font-size: 24px; }
@media (max-width: 1000px) {
  .wide .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .wide .post-grid { grid-template-columns: minmax(0, 1fr); }
  .wide .post-grid > li:has(.featured) { grid-column: auto; }
  .wide .post-card.featured { flex-direction: column; }
  .wide .post-card.featured .post-thumb { flex: none; aspect-ratio: 16 / 9; }
  .wide .post-card.featured b { font-size: 19px; }
}
.related h2 { margin-top: 60px; }

@media (max-width: 1100px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 36px; }
}
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .doc-side { position: static; }
  .side-toc { display: none; }
  .key-points { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .doc-hero .container { padding-top: 22px; padding-bottom: 28px; }
  .doc-hero h1 { font-size: 31px; }
  .doc-lead { font-size: 17px; }
  .doc-layout { padding-top: 28px; }
  .prose { font-size: 16.5px; }
  .prose h2 { font-size: 24px; margin-top: 42px; }
  .prose ol > li { padding: 14px 16px 14px 58px; }
  .prose ol > li::before { left: 14px; }
  .doc-cta { padding: 22px; }
  .doc-cta-actions, .doc-cta-actions .btn { width: 100%; }
}
