/* ============================================================
   Bài viết — /bai-viet và /blog/{slug}
   Chỉ style khung trang (prefix bv-). Nội dung bài dùng
   style-ck-content.css (.article-content) — file chung với v2.
   ============================================================ */

.bv-wrap {
  --bv-primary: #b45309;
  --bv-accent: #f59e0b;
  --bv-text: #1c1917;
  --bv-text-2: #57534e;
  --bv-muted: #78716c;
  --bv-border: #e7e5e4;
  --bv-border-warm: #e1b59c;
  --bv-bg-warm: #fffbeb;
  --bv-radius: 14px;
  --bv-shadow: 0 4px 16px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .04);

  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 16px 64px;
  color: var(--bv-text);
}

/* ---- Breadcrumb ---- */
.bv-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: .85rem;
  color: var(--bv-muted);
  margin-bottom: 16px;
}
.bv-breadcrumb a { color: var(--bv-muted); text-decoration: none; }
.bv-breadcrumb a:hover { color: var(--bv-primary); }

/* ---- Hero ---- */
.bv-hero {
  background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 60%, #fafaf9 100%);
  border: 1px solid var(--bv-border-warm);
  border-radius: var(--bv-radius);
  padding: 32px 28px;
  margin-bottom: 32px;
}
.bv-hero--center { text-align: center; }
.bv-hero-title {
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--bv-text);
  margin: 12px 0;
  text-wrap: balance;
}
.bv-hero-desc { color: var(--bv-text-2); margin: 0 auto; max-width: 760px; line-height: 1.7; }
.bv-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: .88rem;
  color: var(--bv-muted);
  margin-bottom: 12px;
}
.bv-hero--center .bv-hero-meta,
.bv-hero--center .bv-tags { justify-content: center; }

/* ---- Tags ---- */
.bv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bv-tag {
  font-size: .78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--bv-border);
  color: var(--bv-text-2);
}
.bv-tag--main { background: var(--bv-primary); border-color: var(--bv-primary); color: #fff; }

/* ---- Layout chi tiết ---- */
.bv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  align-items: start;
}
.bv-layout--no-toc { grid-template-columns: minmax(0, 1fr); max-width: 860px; margin: 0 auto; }
.bv-article {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--bv-border);
  border-radius: var(--bv-radius);
  padding: 24px 16px;
}
@media (min-width: 576px) { .bv-article { padding: 32px; } }
.bv-article .article-content { padding-inline: 0; }

/* ---- Mục lục ---- */
.bv-toc {
  position: sticky;
  top: 96px;
  background: var(--bv-bg-warm);
  border: 1px solid var(--bv-border-warm);
  border-radius: var(--bv-radius);
  padding: 18px 20px;
  font-size: .9rem;
}
.bv-toc-title { font-weight: 700; margin-bottom: 10px; color: var(--bv-text); }
.bv-toc ol { list-style: none; padding: 0; margin: 0; }
.bv-toc li + li { margin-top: 8px; }
.bv-toc a { color: var(--bv-text-2); text-decoration: none; line-height: 1.45; display: block; }
.bv-toc a:hover { color: var(--bv-primary); }
.bv-toc-mobile { display: none; margin-bottom: 20px; }
.bv-toc-mobile summary { cursor: pointer; font-weight: 700; }
.bv-toc-mobile[open] summary { margin-bottom: 10px; }

@media (max-width: 991.98px) {
  .bv-layout { grid-template-columns: minmax(0, 1fr); }
  .bv-layout > aside { display: none; }
  .bv-toc-mobile { display: block; position: static; }
}

/* ---- FAQ ---- */
.bv-faq { border-top: 1px solid var(--bv-border); margin-top: 32px; padding-top: 28px; }
.bv-faq-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.bv-faq-sub { color: var(--bv-muted); font-size: .88rem; margin-bottom: 16px; }
.bv-faq details {
  border: 1px solid var(--bv-border);
  border-radius: 10px;
  padding: 12px 16px;
  background: #fff;
}
.bv-faq details + details { margin-top: 10px; }
.bv-faq details[open] { border-color: var(--bv-border-warm); background: var(--bv-bg-warm); }
.bv-faq summary { cursor: pointer; font-weight: 600; color: var(--bv-text); }
.bv-faq details p { margin: 10px 0 0; color: var(--bv-text-2); line-height: 1.7; }

/* ---- Thẻ bài viết ---- */
.bv-section-title { font-size: 1.35rem; font-weight: 700; margin: 40px 0 16px; }
.bv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.bv-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--bv-border);
  border-radius: var(--bv-radius);
  padding: 20px;
  color: inherit;
  text-decoration: none;
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.bv-card:hover { border-color: var(--bv-border-warm); box-shadow: var(--bv-shadow); transform: translateY(-2px); color: inherit; }
.bv-card-title { font-size: 1.05rem; font-weight: 700; line-height: 1.4; color: var(--bv-text); margin: 0; }
.bv-card-desc { font-size: .9rem; color: var(--bv-text-2); line-height: 1.6; margin: 0; flex: 1; }
.bv-card-foot { display: flex; justify-content: space-between; font-size: .82rem; color: var(--bv-muted); }
.bv-card-more { color: var(--bv-primary); font-weight: 600; }
