/* ==========================================================================
   BaseCloud — giao diện khung (header, footer, trang tin tức, trang bài viết).

   MỘT file duy nhất, đúng quy ước của Web.Cloudzone (cloudzone.css). Tiền tố
   class là "bc-"; bundle Emagazine của tòa soạn dùng tiền tố riêng nên không đè
   lên nhau. File này KHÔNG đặt style cho thẻ trần ở phạm vi toàn cục (header,
   footer, section, h1…) vì bundle sống chung tài liệu với khung — mọi style
   đều bám vào class "bc-".

   Sơ đồ file:
     1. Token        2. Nền tảng        3. Nút
     4. Header desktop / mobile         5. Footer
     6. Nút hỗ trợ (FAB)                7. Trang & chuyên mục
     8. Bài viết                        9. Trang rỗng, phân trang, tiện ích
   ========================================================================== */

/* ============ 1. TOKEN ============ */
:root {
  --bc-bg: #ffffff;
  --bc-bg-deep: #eef2f7;
  --bc-surface: rgba(15, 23, 42, 0.03);
  --bc-surface-hover: rgba(15, 23, 42, 0.06);
  --bc-fg: #0f172a;
  --bc-fg-muted: #5b6573;
  --bc-fg-subtle: rgba(15, 23, 42, 0.55);
  --bc-accent: #6670ff;
  --bc-accent-bright: #7a3ff2;
  --bc-cyan: #26baff;
  --bc-violet: #a626ff;
  --bc-border: rgba(15, 23, 42, 0.08);
  --bc-border-hover: rgba(15, 23, 42, 0.16);
  --bc-border-accent: rgba(102, 112, 255, 0.35);
  --bc-grad: linear-gradient(135deg, #26baff 0%, #a626ff 100%);
  --bc-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  --bc-shadow-hover: 0 14px 30px rgba(15, 23, 42, 0.12);
  --bc-r-sm: 8px;
  --bc-r-md: 12px;
  --bc-r-lg: 16px;
  --bc-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --bc-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bc-mono: "JetBrains Mono", ui-monospace, monospace;
  --bc-hdr-h: 68px;
}

/* ============ 2. NỀN TẢNG ============ */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--bc-font);
  color: var(--bc-fg);
  background: var(--bc-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bc-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.bc-page { padding-top: 32px; padding-bottom: 72px; }
.bc-main { display: block; min-height: 60vh; }

/* :where() = độ ưu tiên 0: link trong khung chỉ "kế thừa màu" khi không có class nào khác
   đặt màu. Không dùng :where thì quy tắc này thắng cả .bc-nbrand-btn (chữ trắng trên nền trắng). */
:where(.bc-hdr, .bc-footer, .bc-main, .bc-m-panel) a { color: inherit; text-decoration: none; }
.bc-hdr *, .bc-footer *, .bc-fab *, .bc-chatbox * { box-sizing: border-box; }

/* Bundle Emagazine nằm trong khung này. Không tô nền, không giới hạn bề ngang:
   bố cục là việc của bundle. */
.bc-emagazine { display: block; position: relative; }

/* ============ 3. NÚT ============ */
.bc-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--bc-r-sm);
  font: 500 15px/1.5 var(--bc-font); cursor: pointer; border: 0;
  transition: transform .25s var(--bc-ease), box-shadow .25s var(--bc-ease), filter .25s;
}
.bc-btn svg { width: 16px; height: 16px; }
.bc-main a.bc-btn, .bc-hdr a.bc-btn, .bc-m-panel a.bc-btn { color: #fff; }

.bc-btn-primary {
  background: var(--bc-grad); color: #fff;
  box-shadow: 0 4px 12px rgba(102, 112, 255, .3), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.bc-btn-primary:hover { transform: translateY(-2px); filter: brightness(1.07); }

.bc-btn-glossy {
  border: 2px solid transparent; border-radius: 18px; padding: 10px 18px; font-size: 14px; color: #fff;
  background: var(--bc-grad) padding-box, var(--bc-grad) border-box;
  box-shadow: 0 4px 10px rgba(102, 112, 255, .35), inset 0 1px 1px rgba(255, 255, 255, .35);
}
.bc-btn-glossy:hover { transform: translateY(-2px); filter: brightness(1.05); }

.bc-btn-ghost {
  display: inline-block; padding: 8px 14px; border-radius: var(--bc-r-sm);
  font: 400 16px/1.5 var(--bc-font); color: var(--bc-fg-muted); transition: background .2s, color .2s;
}
.bc-btn-ghost:hover { color: var(--bc-fg); background: var(--bc-surface); }

:focus-visible { outline: 2px solid var(--bc-accent); outline-offset: 2px; }

/* ============ 4. HEADER ============ */
.bc-hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bc-border);
}
.bc-hdr-in { display: flex; align-items: center; justify-content: space-between; height: var(--bc-hdr-h); gap: 16px; }
.bc-brand { display: inline-flex; align-items: center; }
.bc-brand img { display: block; height: 38px; width: auto; }

.bc-nav { display: flex; align-items: center; gap: 4px; }
.bc-nav-link, .bc-nav-trigger {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--bc-r-sm);
  font: 500 15px/1.5 var(--bc-font); color: var(--bc-fg-muted); white-space: nowrap;
  background: none; border: 0; cursor: pointer; transition: color .2s, background .2s;
}
.bc-nav-link:hover, .bc-nav-trigger:hover, .bc-nav-item:focus-within > .bc-nav-trigger {
  color: var(--bc-fg); background: var(--bc-surface);
}
.bc-nav-link::after, .bc-nav-trigger::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px;
  border-radius: 2px; background: var(--bc-grad);
  transform: scaleX(0); transform-origin: left center; transition: transform .3s var(--bc-ease);
}
.bc-nav-link:hover::after, .bc-nav-trigger:hover::after { transform: scaleX(.55); }
.is-active { color: var(--bc-fg); background: linear-gradient(135deg, rgba(38, 186, 255, .13), rgba(166, 38, 255, .13)); }
.bc-nav-link.is-active::after, .bc-nav-trigger.is-active::after { transform: scaleX(1); }

.bc-caret {
  width: 7px; height: 7px; margin-top: -3px;
  border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg);
  opacity: .7; transition: transform .25s;
}
.bc-nav-item { position: relative; }
.bc-nav-item::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 14px; }
.bc-nav-item:hover .bc-caret { transform: rotate(225deg) translate(-2px, -2px); }

.bc-dropdown {
  position: absolute; top: calc(100% + 12px); left: 0; min-width: 240px; padding: 8px;
  border-radius: 14px; border: 1px solid var(--bc-border); background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .14);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s; z-index: 60;
}
.bc-nav-item:hover .bc-dropdown, .bc-nav-item:focus-within .bc-dropdown {
  opacity: 1; visibility: visible; transform: none;
}
.bc-dropdown a {
  display: block; padding: 10px 12px; border-radius: var(--bc-r-sm);
  font-size: 14px; color: var(--bc-fg-muted); white-space: nowrap; transition: background .16s, color .16s;
}
.bc-dropdown a:hover { background: var(--bc-surface); color: var(--bc-accent-bright); }
.bc-dropdown a.on { color: var(--bc-accent-bright); background: var(--bc-surface); font-weight: 600; }

.bc-hdr-right { display: flex; align-items: center; gap: 8px; }

/* Mobile: menu mở bằng ô checkbox (không cần JavaScript) */
.bc-m-toggle { position: absolute; left: -9999px; opacity: 0; }
.bc-burger {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--bc-r-sm); cursor: pointer;
}
.bc-burger:hover { background: var(--bc-surface); }
.bc-burger span { display: grid; gap: 5px; width: 20px; }
.bc-burger i { display: block; height: 2px; border-radius: 2px; background: var(--bc-fg); transition: transform .25s, opacity .2s; }
.bc-m-toggle:checked ~ .bc-hdr .bc-burger i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.bc-m-toggle:checked ~ .bc-hdr .bc-burger i:nth-child(2) { opacity: 0; }
.bc-m-toggle:checked ~ .bc-hdr .bc-burger i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.bc-m-toggle:focus-visible ~ .bc-hdr .bc-burger { outline: 2px solid var(--bc-accent); }

.bc-m-panel {
  display: none; position: fixed; inset: var(--bc-hdr-h) 0 0 0; z-index: 45;
  flex-direction: column; padding: 16px 24px 32px; overflow-y: auto;
  background: rgba(255, 255, 255, .98); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.bc-m-toggle:checked ~ .bc-m-panel { display: flex; }
.bc-m-link {
  display: block; padding: 15px 8px; font-size: 18px; font-weight: 500; color: var(--bc-fg);
  border-bottom: 1px solid var(--bc-border); text-decoration: none;
}
.bc-m-link.is-active { color: var(--bc-accent-bright); background: none; }
.bc-m-group { color: var(--bc-fg-muted); font-size: 15px; text-transform: uppercase; letter-spacing: .08em; }
.bc-m-child { padding: 11px 8px 11px 28px; font-size: 16px; color: var(--bc-fg-muted); }
.bc-m-cta { margin-top: 24px; display: grid; gap: 12px; }
.bc-m-cta .bc-btn { justify-content: center; }

/* ============ 5. FOOTER ============ */
.bc-footer { background: var(--bc-bg-deep); border-top: 1px solid var(--bc-border); padding-top: 64px; }
.bc-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.bc-footer-legal { margin: 16px 0 8px; font-size: 14px; line-height: 1.7; color: var(--bc-fg-muted); }
.bc-footer-contact, .bc-footer-links { list-style: none; margin: 0; padding: 0; }
.bc-footer-contact { font-size: 14px; line-height: 1.9; color: var(--bc-fg-muted); }
.bc-footer-contact a:hover, .bc-footer-links a:hover { color: var(--bc-fg); }
.bc-footer-title { margin: 0 0 16px; font-size: 14px; font-weight: 600; }
.bc-footer-links { display: flex; flex-direction: column; gap: 10px; }
.bc-footer-links a { font-size: 14px; color: var(--bc-fg-muted); transition: color .2s; }

.bc-socials { display: flex; gap: 10px; margin-top: 18px; }
.bc-socials a {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  color: var(--bc-fg-muted); border: 1px solid var(--bc-border); transition: all .2s;
}
.bc-socials a:hover { color: var(--bc-fg); border-color: var(--bc-border-hover); background: var(--bc-surface); }
.bc-socials svg { width: 18px; height: 18px; }

.bc-footer-bottom { margin-top: 48px; padding: 24px 0 32px; border-top: 1px solid var(--bc-border); }
.bc-footer-bottom span { font-size: 13px; color: var(--bc-fg-muted); }

/* Footer mobile: nhóm liên kết gập bằng <details> */
.bc-footer-m .bc-footer-brand { padding-bottom: 20px; }
.bc-footer-acc { border-top: 1px solid var(--bc-border); }
.bc-footer-acc summary {
  list-style: none; cursor: pointer; padding: 16px 0; font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
}
.bc-footer-acc summary::-webkit-details-marker { display: none; }
.bc-footer-acc summary::after {
  content: ""; width: 8px; height: 8px;
  border: solid var(--bc-fg-muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s;
}
.bc-footer-acc[open] summary::after { transform: rotate(225deg); }
.bc-footer-acc .bc-footer-links { padding-bottom: 16px; }

/* ============ 6. NÚT HỖ TRỢ (FAB) ============ */
.bc-fab { position: fixed; right: 20px; bottom: 24px; z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.bc-fab-btn {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  border: 0; cursor: pointer; background: #fff; color: #6b2fd6;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18); transition: transform .2s, box-shadow .2s;
}
.bc-fab-btn:hover { transform: translateY(-2px) scale(1.06); box-shadow: 0 10px 26px rgba(0, 0, 0, .26); }
.bc-fab-btn svg { width: 26px; height: 26px; }
.bc-fab-top { display: none; }
.bc-fab-top.show { display: grid; }
.bc-fab-chat { background: linear-gradient(145deg, #26baff, #6b2fd6); color: #fff; }

.bc-chatbox {
  position: fixed; right: 20px; bottom: 92px; z-index: 301; width: 320px; max-width: calc(100vw - 40px);
  background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.98); transform-origin: bottom right;
  transition: opacity .25s var(--bc-ease), transform .25s var(--bc-ease), visibility .25s;
}
.bc-chatbox.open { opacity: 1; visibility: visible; transform: none; }
.bc-chatbox-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 15px 16px; color: #fff; background: var(--bc-grad);
}
.bc-chatbox-head b { display: block; font-size: 15px; line-height: 1.2; }
.bc-chatbox-head small { font-size: 12px; opacity: .85; }
.bc-chatbox-close {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--bc-r-sm);
  border: 0; background: none; color: #fff; cursor: pointer;
}
.bc-chatbox-close:hover { background: rgba(255, 255, 255, .16); }
.bc-chatbox-close svg { width: 20px; height: 20px; }
.bc-chatbox-body { padding: 18px; }
.bc-chatbox-bot { margin: 0; padding: 12px 14px; border-radius: var(--bc-r-md); background: #f1f5f9; font-size: 14px; line-height: 1.55; }
.bc-chatbox-quick { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.bc-chatbox-quick a {
  padding: 11px 14px; border-radius: 10px; border: 1px solid #e2e8f0;
  font-size: 14px; font-weight: 500; color: var(--bc-fg); text-decoration: none; transition: all .18s;
}
.bc-chatbox-quick a:hover { border-color: var(--bc-accent); background: #f6f3ff; color: #6b2fd6; }

/* ============ 7. KHU TIN TỨC (chuyên mục) ============ */
.bc-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--bc-fg-muted); margin: 26px 0 8px; }
.bc-crumb a:hover { color: var(--bc-accent-bright); }
.bc-crumb .sep { color: var(--bc-border-hover); }
.bc-crumb .cur { color: var(--bc-fg); font-weight: 500; }

.bc-chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font: 500 11px/1.5 var(--bc-mono); letter-spacing: .02em;
  color: var(--bc-accent-bright); background: rgba(102, 112, 255, .1); border: 1px solid var(--bc-border-accent);
}

/* Khung khu tin tức: cùng bề ngang .bc-wrap (1200px) với header, footer và các trang bundle,
   để lề trái/phải thẳng hàng khi chuyển giữa các trang. (Bản thiết kế gốc để 1280px riêng
   cho khu tin nên lệch ~40px so với header.) */
.bc-news { padding-bottom: 80px; }

/* Dải đầu: tên khu ở giữa */
.bc-nmast { border-bottom: 1px solid #e7e7e7; background: #fff; }
.bc-nmast-in { display: flex; align-items: center; justify-content: center; height: 73px; }
.bc-nmast-title {
  font-size: 24px; font-weight: 700; letter-spacing: -.015em; white-space: nowrap;
  background: linear-gradient(135deg, #26baff 0%, #6670ff 50%, #a626ff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #6670ff;
}

.bc-ntitle { margin: 18px 0 0; font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.bc-ndesc { margin: 10px 0 0; max-width: 720px; font-size: 16px; line-height: 1.7; color: var(--bc-fg-muted); }

/* Slide bài nổi bật */
.bc-nhero { margin-top: 24px; padding-bottom: 24px; }
.bc-nslide { display: none; grid-template-columns: 1fr 1fr; align-items: center; }
.bc-nslide.active { display: grid; animation: bcNfade .45s ease; }
.bc-nslide-img {
  position: relative; display: block; aspect-ratio: 616 / 323; border-radius: 6px; overflow: hidden;
  background: var(--bc-grad);
}
.bc-nslide-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bc-nslide-txt { text-align: center; padding: 0 36px; }
.bc-nslide-txt h2 { margin: 0 0 12px; font-size: clamp(24px, 2.4vw, 31px); line-height: 1.3; font-weight: 700; letter-spacing: -.015em; }
.bc-nslide-txt h2 a:hover { color: var(--bc-accent-bright); }
.bc-nslide-txt p {
  margin: 0 auto; font-size: 16px; line-height: 1.5; color: #2b2b2b;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bc-nmeta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 11.5px; line-height: 1.3; color: #777; text-transform: uppercase; letter-spacing: .015em;
}
.bc-nslide-txt .bc-nmeta { justify-content: center; margin-top: 16px; }
.bc-nhero-ctrl { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; }
.bc-narrow {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; padding: 0;
  border: 1px solid #d9d9d9; background: #fff; color: #333; cursor: pointer; transition: all .2s ease;
}
.bc-narrow:hover { background: var(--bc-grad); color: #fff; border-color: transparent; }
.bc-narrow svg { width: 16px; height: 16px; }
.bc-ndots { display: flex; gap: 7px; }
.bc-ndots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; background: #d0d0d0; cursor: pointer; transition: all .25s ease; }
.bc-ndots button.active { width: 20px; background: var(--bc-grad); }
@keyframes bcNfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Hàng "Mới nhất" */
.bc-nhead { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.bc-nhead h2 { margin: 0; font-size: 17px; font-weight: 700; }
.bc-nhead-top { border-top: 1px solid #e7e7e7; padding-top: 26px; margin-bottom: 20px; }
.bc-nlatest { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 38px; }
.bc-nrow { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 0 16px; border-left: 1px solid #e7e7e7; min-width: 0; }
.bc-nrow:first-child { padding-left: 0; border-left: 0; }
.bc-nrow:last-child { padding-right: 0; }
.bc-nrow-txt { min-width: 0; }
.bc-nrow h3 {
  margin: 0 0 8px; font-size: 15px; line-height: 1.35; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bc-nrow:hover h3 { color: var(--bc-accent-bright); }
.bc-nrow-thumb { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 4px; overflow: hidden; background: var(--bc-grad); }
.bc-nrow-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Hai cột: nội dung + cột phải */
.bc-nlayout {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; align-items: start;
  border-top: 1px solid #e7e7e7; padding-top: 30px; margin-top: 18px;
}
.bc-nmain { grid-column: span 3; min-width: 0; }

.bc-ncat + .bc-ncat { margin-top: 44px; }
.bc-ncat-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.bc-ncat-h h2 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.bc-ncat-h h2 a:hover { color: var(--bc-accent-bright); }
.bc-ncat-more { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #333; white-space: nowrap; }
.bc-ncat-more:hover { color: var(--bc-accent-bright); }

/* Khối chuyên mục con (một chuyên mục = một khối riêng): thanh gradient + tên + "Xem thêm" */
.bc-nsub { display: flex; justify-content: space-between; align-items: baseline; margin: 24px 0 14px; }
.bc-nsub h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; font-weight: 700; }
.bc-nsub h3::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--bc-grad); }
.bc-nsub h3 a:hover { color: var(--bc-accent-bright); }
.bc-nsub-more { font-size: 13px; color: #666; white-space: nowrap; }
.bc-nsub-more:hover { color: var(--bc-accent-bright); }
.bc-nsubblk + .bc-nsubblk { margin-top: 8px; }

/* Lưới thẻ bài viết: 3 cột trong phần nội dung */
.bc-ngrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.bc-ncard {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 16px; border: 1px solid rgba(15, 23, 42, .1); background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .05);
  transition: transform .3s var(--bc-ease), box-shadow .3s var(--bc-ease), border-color .3s var(--bc-ease);
}
.bc-ncard:hover { transform: translateY(-4px); border-color: var(--bc-border-accent); box-shadow: 0 2px 6px rgba(15, 23, 42, .06), 0 18px 40px rgba(102, 112, 255, .16); }
/* Bài GHIM trong khối chuyên mục: viền tím đậm + quầng sáng + tiêu đề tô màu, nổi hẳn so với
   các bài mới đứng sau (cùng ý tưởng viền cam của Cloudzone, đổi sang màu thương hiệu). */
.bc-ncard-pinned { border-color: var(--bc-accent); box-shadow: 0 0 0 1px var(--bc-accent), 0 14px 34px rgba(102, 112, 255, .26); }
.bc-ncard-pinned:hover { border-color: var(--bc-accent-bright); box-shadow: 0 0 0 1px var(--bc-accent-bright), 0 18px 40px rgba(122, 63, 242, .32); }
.bc-ncard.bc-ncard-pinned h3 { color: var(--bc-accent-bright); }
.bc-ncard-img { position: relative; display: block; aspect-ratio: 2.1 / 1; background: var(--bc-grad); overflow: hidden; }
.bc-ncard-img::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .28), transparent 55%); }
.bc-ncard-img.has-img::before { display: none; }
.bc-ncard-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bc-nchip {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  padding: 5px 12px; border-radius: 999px; font: 500 11.5px/1.3 var(--bc-mono); color: #0f172a;
  background: rgba(255, 255, 255, .96); border: 1px solid rgba(15, 23, 42, .08); box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}
.bc-ncard-body { display: flex; flex-direction: column; padding: 18px 20px 20px; }
.bc-ncard-date { font: 500 12px/1 var(--bc-mono); color: var(--bc-fg-subtle); margin-bottom: 10px; }
.bc-ncard h3 {
  margin: 0 0 8px; font-size: 17px; line-height: 1.4; font-weight: 700; color: #0f172a;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bc-ncard p {
  margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--bc-fg-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Bài ghim: ảnh lớn bên trái, chữ bên phải */
.bc-pin {
  display: grid; grid-template-columns: 1.05fr 1fr; margin-bottom: 28px; overflow: hidden;
  border-radius: 20px; border: 1px solid var(--bc-border-accent); background: #fff;
  box-shadow: 0 14px 40px rgba(102, 112, 255, .14); transition: transform .3s var(--bc-ease);
}
.bc-pin:hover { transform: translateY(-3px); }
.bc-pin-thumb { display: block; min-height: 240px; background: var(--bc-grad); }
.bc-pin-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bc-pin-body { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 28px 30px; }
.bc-pin-title { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
.bc-pin-excerpt { color: var(--bc-fg-muted); line-height: 1.65; }
.bc-pin-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 500 12px/1 var(--bc-mono); color: var(--bc-fg-subtle); }
.bc-pin-more { color: var(--bc-accent-bright); font-family: var(--bc-font); font-size: 14px; font-weight: 600; }

/* Cột phải: chuyên mục + thẻ giới thiệu */
.bc-nside { grid-column: span 1; position: sticky; top: 132px; padding-top: 4px; }
.bc-nside-nav h4 { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #8a8a99; }
.bc-nside-nav a {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin: 2px 0; padding: 9px 12px; border-radius: 10px; font-size: 14.5px; color: #333;
  transition: background .15s ease, color .15s ease;
}
.bc-nside-nav a:hover { background: #f4f4fa; color: #000; }
.bc-nside-nav a em { font: 500 12px/1 var(--bc-mono); font-style: normal; color: #8a8a99; }
.bc-nside-nav a.on { background: rgba(102, 112, 255, .12); color: #3b2bb8; font-weight: 600; }
.bc-nside-nav a.on em { color: #3b2bb8; }
.bc-nside-nav a.on::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, #26baff, #a626ff); }
.bc-nside-nav a.open:not(.on) { font-weight: 600; color: #111; }
.bc-nn-sub { display: none; margin: 2px 0 6px 14px; padding-left: 10px; border-left: 1px solid #e2e2ea; }
.bc-nn-sub.show { display: block; animation: bcNnOpen .25s ease; }
@keyframes bcNnOpen { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.bc-nn-sub a { padding: 7px 10px; font-size: 13.5px; }

.bc-nbrand {
  position: relative; overflow: hidden; margin-top: 28px; padding: 24px 22px 22px; border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, #26baff 0%, #6670ff 55%, #a626ff 100%);
  box-shadow: 0 20px 44px rgba(102, 112, 255, .3);
}
.bc-nbrand::before { content: ""; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 68%); }
.bc-nbrand > * { position: relative; z-index: 1; }
.bc-nbrand-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bc-nbrand-logo { flex: 0 0 46px; width: 46px; height: 46px; }
.bc-nbrand-logo img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 4px 8px rgba(20, 20, 80, .28)); }
.bc-nbrand h3 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; color: #fff; }
.bc-nbrand p { margin: 0 0 20px; font-size: 14px; line-height: 1.55; font-weight: 500; color: #fff; }
.bc-nbrand-btn {
  display: flex; align-items: center; gap: 8px; width: fit-content; margin-left: auto;
  padding: 11px 18px; border-radius: 10px; background: #fff; color: #3b2bb8; font-size: 14px; font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease;
}
.bc-nbrand-btn svg { width: 16px; height: 16px; transition: transform .2s ease; }
.bc-nbrand-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(20, 20, 80, .28); }
.bc-nbrand-btn:hover svg { transform: translateX(3px); }
.bc-nbrand-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ============ 8. BÀI VIẾT ============ */
.bc-article { min-width: 0; }
.bc-article-single { max-width: 820px; margin: 0 auto; }
.bc-article-head h1 { margin: 12px 0 0; font-size: clamp(28px, 4vw, 40px); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.bc-article-meta { display: flex; gap: 8px; margin-top: 14px; font: 500 13px/1 var(--bc-mono); color: var(--bc-fg-subtle); }
.bc-article-cover { margin: 24px 0 0; }
.bc-article-cover img { display: block; width: 100%; height: auto; border-radius: 14px; }
.bc-sapo { margin: 24px 0 0; font-size: 18px; line-height: 1.7; font-weight: 500; color: var(--bc-fg); }
.bc-article-body { margin-top: 24px; font-size: 17px; line-height: 1.8; color: #1f2937; overflow-wrap: anywhere; }
.bc-article-body img { max-width: 100%; height: auto; border-radius: var(--bc-r-md); }
.bc-article-body h2, .bc-article-body h3 { margin: 1.6em 0 .5em; line-height: 1.3; letter-spacing: -.02em; }
.bc-article-body a { color: var(--bc-accent-bright); text-decoration: underline; text-underline-offset: 3px; }
.bc-article-body table { max-width: 100%; border-collapse: collapse; }
.bc-article-body td, .bc-article-body th { border: 1px solid var(--bc-border-hover); padding: 8px 12px; }
.bc-article-body pre { overflow-x: auto; padding: 16px; border-radius: var(--bc-r-md); background: #0f172a; color: #e2e8f0; }

.bc-share { display: flex; align-items: center; gap: 10px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--bc-border); }
.bc-share-label { font-size: 14px; color: var(--bc-fg-muted); }
.bc-share-btn { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--bc-border); font-size: 13px; font-weight: 500; transition: all .2s; }
.bc-share-btn:hover { border-color: var(--bc-border-accent); color: var(--bc-accent-bright); background: var(--bc-surface); }

.bc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.bc-tag { padding: 5px 12px; border-radius: 999px; background: var(--bc-surface); border: 1px solid var(--bc-border); font-size: 13px; color: var(--bc-fg-muted); }
.bc-tag:hover { color: var(--bc-accent-bright); border-color: var(--bc-border-accent); }
.bc-related { margin-top: 48px; padding-top: 30px; border-top: 1px solid #e7e7e7; }
.bc-slide-h { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.bc-slide-h h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.bc-slide-nav { display: flex; gap: 8px; }

/* Slide: cuộn ngang bằng scroll-snap, ba thẻ một lượt trên màn rộng. Đệm trên/dưới để thẻ nhấc
   lên khi rê chuột và bóng đổ không bị overflow cắt mất. */
.bc-slide-track {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 8px 4px 22px; margin: -8px -4px -22px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.bc-slide-track::-webkit-scrollbar { display: none; }
.bc-slide-track > .bc-ncard { flex: 0 0 calc((100% - 48px) / 3); scroll-snap-align: start; }
.bc-slide-track:focus-visible { outline: 2px solid var(--bc-accent); outline-offset: 4px; border-radius: 12px; }

/* ============ 9. TRANG RỖNG, PHÂN TRANG, TIỆN ÍCH ============ */
.bc-empty { padding: 72px 16px; text-align: center; color: var(--bc-fg-muted); }
.bc-empty h1 { margin: 0 0 12px; color: var(--bc-fg); font-size: clamp(26px, 4vw, 36px); letter-spacing: -.03em; }
.bc-empty p { margin: 8px 0; line-height: 1.7; }
.bc-empty a:not(.bc-btn) { color: var(--bc-accent-bright); }

.bc-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.bc-pager a, .bc-pager .cur, .bc-pager .gap {
  min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--bc-r-sm); font-size: 14px; font-weight: 500;
}
.bc-pager a { border: 1px solid var(--bc-border); background: #fff; transition: all .2s; }
.bc-pager a:hover { border-color: var(--bc-border-accent); color: var(--bc-accent-bright); }
.bc-pager .cur { color: #fff; background: var(--bc-grad); }
.bc-pager .gap { color: var(--bc-fg-subtle); }

.bc-xem-truoc { padding: 10px 16px; text-align: center; font-size: 13px; font-weight: 600; color: #7c2d12; background: #ffedd5; border-bottom: 1px solid #fdba74; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .bc-nlayout { grid-template-columns: 1fr; }
  .bc-nmain { grid-column: auto; }
  .bc-nside { position: static; }
  .bc-nlatest { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .bc-nrow:nth-child(odd) { padding-left: 0; border-left: 0; }
  .bc-nrow:nth-child(even) { padding-right: 0; }
}
@media (max-width: 900px) {
  .bc-pin { grid-template-columns: 1fr; }
  .bc-pin-thumb { min-height: 200px; }
  .bc-nslide.active { grid-template-columns: 1fr; gap: 22px; }
  .bc-nslide-txt { padding: 0; }
  .bc-ngrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bc-slide-track > .bc-ncard { flex-basis: calc((100% - 24px) / 2); }
  .bc-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .bc-wrap { padding: 0 16px; }
  .bc-page { padding-top: 20px; padding-bottom: 48px; }
  .bc-ngrid { grid-template-columns: 1fr; }
  .bc-slide-track > .bc-ncard { flex-basis: 84%; }
  .bc-nlatest { grid-template-columns: 1fr; }
  .bc-nrow, .bc-nrow:nth-child(even), .bc-nrow:nth-child(odd) { padding: 0; border-left: 0; }
  .bc-nmast-title { font-size: 19px; }
  .bc-nmast-in { height: 58px; }
  .bc-ncat-h h2 { font-size: 22px; }
  .bc-brand img { height: 32px; }
  .bc-fab { right: 14px; bottom: 16px; }
  .bc-chatbox { right: 14px; bottom: 84px; }
  .bc-article-body { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bc-btn, .bc-ncard, .bc-pin, .bc-dropdown, .bc-chatbox, .bc-fab-btn, .bc-nbrand-btn, .bc-nbrand-btn svg { transition: none; }
  .bc-btn:hover, .bc-ncard:hover, .bc-pin:hover, .bc-fab-btn:hover, .bc-nbrand-btn:hover { transform: none; }
  .bc-nslide.active, .bc-nn-sub.show { animation: none; }
  .bc-slide-track { scroll-behavior: auto; }
}
