/* ==========================================================================
   Blog pages (/blog, /blog/{post}, /blog/category/..., /blog/tag/...)
   Uses the same colour variables as the rest of the site (vs-site.css).
   ========================================================================== */

/* ---------- Breadcrumbs & list header ---------- */
.vbg-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; list-style: none; margin: 0 0 14px; padding: 0; font-size: 13px; color: var(--vs-muted); }
.vbg-crumbs li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.vbg-crumbs li + li:before { content: "›"; opacity: .6; }
.vbg-crumbs a { color: var(--vs-muted); }
.vbg-crumbs a:hover { color: var(--vs-primary); }
.vbg-crumbs [aria-current] { color: var(--vs-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

.vbg-hero { padding: 28px 0 8px; }
.vbg-h1 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; margin: 0 0 8px; line-height: 1.15; }
.vbg-intro { color: var(--vs-muted); font-size: clamp(14px, 1.3vw, 16px); max-width: 720px; margin: 0 0 18px; line-height: 1.6; }

.vbg-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.vbg-chips::-webkit-scrollbar { display: none; }
.vbg-chips a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--vs-surface); border: 1px solid var(--vs-border); color: var(--vs-text); font-size: 13px; font-weight: 500; white-space: nowrap; }
.vbg-chips a span { font-size: 11px; color: var(--vs-muted); }
.vbg-chips a:hover { border-color: rgba(var(--vs-primary-rgb), .6); color: var(--vs-text); }
.vbg-chips a.active { background: var(--vs-primary); border-color: var(--vs-primary); color: #fff; }
.vbg-chips a.active span { color: rgba(255, 255, 255, .8); }

/* ---------- Cards ---------- */
.vbg-list { padding: 10px 0 40px; }
.vbg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.vbg-card { display: flex; flex-direction: column; background: var(--vs-surface); border: 1px solid var(--vs-border); border-radius: var(--vs-radius); overflow: hidden; transition: transform .25s var(--vs-ease), border-color .25s var(--vs-ease), box-shadow .25s var(--vs-ease); }
.vbg-card:hover { transform: translateY(-3px); border-color: rgba(var(--vs-primary-rgb), .45); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.vbg-card-img { display: block; position: relative; aspect-ratio: 16 / 9; background: var(--vs-surface-2); overflow: hidden; }
.vbg-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--vs-ease); }
.vbg-card:hover .vbg-card-img img { transform: scale(1.04); }
.vbg-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--vs-muted); opacity: .35; background: linear-gradient(135deg, var(--vs-surface-2), rgba(var(--vs-primary-rgb), .08)); }
.vbg-card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.vbg-cat { align-self: flex-start; display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(var(--vs-primary-rgb), .14); color: var(--vs-primary) !important; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.vbg-cat:hover { background: var(--vs-primary); color: #fff !important; }
.vbg-card-title { font-size: 18px !important; line-height: 1.35; font-weight: 700; margin: 0; }
.vbg-card-title a { color: var(--vs-text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vbg-card-title a:hover { color: var(--vs-primary); }
.vbg-card-excerpt { margin: 0; color: var(--vs-muted); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vbg-meta { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--vs-muted); }
.vbg-meta > * + *:before { content: "•"; margin-right: 12px; opacity: .5; }

/* Featured (first) post on /blog */
.vbg-card.is-big { margin-bottom: 22px; }
@media (min-width: 900px) {
  .vbg-card.is-big { flex-direction: row; }
  .vbg-card.is-big .vbg-card-img { flex: 0 0 58%; aspect-ratio: auto; min-height: 340px; }
  .vbg-card.is-big .vbg-card-body { padding: 30px 32px; justify-content: center; gap: 12px; }
  .vbg-card.is-big .vbg-card-title { font-size: clamp(24px, 2.3vw, 32px) !important; line-height: 1.2; }
  .vbg-card.is-big .vbg-card-excerpt { font-size: 15px; -webkit-line-clamp: 4; }
  .vbg-card.is-big .vbg-meta { margin-top: 6px; }
}

.vbg-pagination { margin-top: 26px; }
.vbg-empty { text-align: center; padding: 60px 16px; color: var(--vs-muted); }
.vbg-empty i { font-size: 44px; color: var(--vs-border); margin-bottom: 14px; }
.vbg-empty p { margin: 0 0 18px; }
.vbg-btn, .vbg-empty .vs-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; background: var(--vs-primary); color: #fff !important; font-weight: 600; font-size: 14px; }
.vbg-btn:hover, .vbg-empty .vs-btn:hover { background: var(--vs-primary-dark); }

/* ---------- Article ---------- */
.vbg-preview-bar { position: sticky; top: 0; z-index: 1000; padding: 10px 16px; background: #f5a524; color: #1a1300; font-size: 14px; font-weight: 600; text-align: center; }
.vbg-article-head { padding: 26px 0 18px; }
.vbg-article-head .container-fluid, .vbg-article > .container-fluid { max-width: 1200px; margin: 0 auto; }
.vbg-title { font-size: clamp(26px, 3.6vw, 44px); line-height: 1.15; font-weight: 800; margin: 12px 0 12px; max-width: 900px; overflow-wrap: anywhere; }
.vbg-lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--vs-muted); line-height: 1.6; margin: 0 0 18px; max-width: 820px; }
.vbg-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; color: var(--vs-muted); }
.vbg-byline b { color: var(--vs-text); font-weight: 600; }
.vbg-byline i { margin-right: 4px; }
.vbg-avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--vs-primary), var(--vs-accent)); color: #fff; font-weight: 700; font-size: 14px; flex: none; }
.vbg-avatar.is-lg { width: 52px; height: 52px; font-size: 20px; }

.vbg-feature { margin: 0 0 26px; border-radius: var(--vs-radius); overflow: hidden; background: var(--vs-surface-2); aspect-ratio: 16 / 9; }
.vbg-feature img { width: 100%; height: 100%; object-fit: cover; display: block; }

.vbg-layout { display: block; padding-bottom: 20px; }
@media (min-width: 1100px) {
  .vbg-layout.has-aside { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; }
  .vbg-toc-inline { display: none; }
}
.vbg-main { min-width: 0; max-width: 780px; }
.vbg-aside { display: none; }
@media (min-width: 1100px) { .vbg-aside { display: block; } }
.vbg-sticky { position: sticky; top: calc(var(--vs-header-h) + 16px); display: flex; flex-direction: column; gap: 22px; }
.vbg-aside-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--vs-muted); margin-bottom: 10px; }

/* Table of contents */
.vbg-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.vbg-toc li { margin: 0; }
.vbg-toc li a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--vs-border); color: var(--vs-muted); font-size: 14px; line-height: 1.4; }
.vbg-toc li.lvl-3 a { padding-left: 26px; font-size: 13px; }
.vbg-toc li a:hover, .vbg-toc li a.is-active { color: var(--vs-text); border-left-color: var(--vs-primary); }
.vbg-toc-inline { background: var(--vs-surface); border: 1px solid var(--vs-border); border-radius: var(--vs-radius); padding: 14px 18px; margin: 0 0 26px; }
.vbg-toc-inline summary { cursor: pointer; font-weight: 700; color: var(--vs-text); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.vbg-toc-inline summary::-webkit-details-marker { display: none; }
.vbg-toc-inline summary:after { content: "+"; font-size: 20px; color: var(--vs-muted); }
.vbg-toc-inline[open] summary:after { content: "–"; }
.vbg-toc-inline ol { margin-top: 10px; }

/* Article body */
.vbg-content { font-size: 17px; line-height: 1.8; color: #e7e7ea; overflow-wrap: break-word; }
.vbg-content > *:first-child { margin-top: 0; }
.vbg-content p { margin: 0 0 1.25em; }
.vbg-content h2, .vbg-content h3, .vbg-content h4 { scroll-margin-top: calc(var(--vs-header-h) + 20px); color: var(--vs-text); line-height: 1.3; font-weight: 700; }
.vbg-content h2 { font-size: clamp(22px, 2.2vw, 28px); margin: 1.8em 0 .6em; }
.vbg-content h3 { font-size: clamp(19px, 1.8vw, 22px); margin: 1.6em 0 .5em; }
.vbg-content h4 { font-size: 18px; margin: 1.4em 0 .5em; }
.vbg-content a { color: var(--vs-primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.vbg-content a:hover { color: var(--vs-accent); }
.vbg-content ul, .vbg-content ol { margin: 0 0 1.25em; padding-left: 1.4em; }
.vbg-content ul { list-style: disc outside; }
.vbg-content ol { list-style: decimal outside; }
.vbg-content ul ul { list-style-type: circle; }
.vbg-content li { display: list-item; }
.vbg-content li { margin: .35em 0; }
.vbg-content li::marker { color: var(--vs-primary); }
.vbg-content blockquote { margin: 1.6em 0; padding: 14px 22px; border-left: 4px solid var(--vs-primary); background: var(--vs-surface); border-radius: 0 var(--vs-radius) var(--vs-radius) 0; font-size: 18px; font-style: italic; color: var(--vs-text); }
.vbg-content blockquote p:last-child { margin-bottom: 0; }
.vbg-content img { height: auto; border-radius: 10px; display: block; margin: 1.4em auto; }
.vbg-content figure { margin: 1.6em 0; }
.vbg-content figure img { margin: 0 auto; }
.vbg-content figcaption { text-align: center; font-size: 13px; color: var(--vs-muted); margin-top: 8px; }
.vbg-content hr { border: 0; border-top: 1px solid var(--vs-border); margin: 2em 0; }
.vbg-content pre { background: var(--vs-surface); border: 1px solid var(--vs-border); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 14px; }
.vbg-content code { background: var(--vs-surface-2); border-radius: 5px; padding: 2px 6px; font-size: .9em; }
.vbg-content pre code { background: none; padding: 0; }
.vbg-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; display: block; overflow-x: auto; }
.vbg-content th, .vbg-content td { border: 1px solid var(--vs-border); padding: 10px 12px; text-align: left; vertical-align: top; }
.vbg-content th { background: var(--vs-surface); color: var(--vs-text); }
.vbg-content iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; margin: 1.4em 0; }
.vbg-content mark { background: rgba(var(--vs-primary-rgb), .3); color: inherit; padding: 0 3px; border-radius: 3px; }

/* FAQ */
.vbg-faq { margin: 34px 0 10px; }
.vbg-faq h2 { font-size: clamp(22px, 2.2vw, 26px); margin: 0 0 14px; }
.vbg-faq details { background: var(--vs-surface); border: 1px solid var(--vs-border); border-radius: var(--vs-radius); margin-bottom: 10px; }
.vbg-faq summary { cursor: pointer; padding: 14px 44px 14px 18px; font-weight: 600; position: relative; list-style: none; }
.vbg-faq summary::-webkit-details-marker { display: none; }
.vbg-faq summary:after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--vs-primary); }
.vbg-faq details[open] summary:after { content: "–"; }
.vbg-faq details > div { padding: 0 18px 16px; color: #d6d6db; line-height: 1.7; }

/* Tags, sharing, author */
.vbg-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; }
.vbg-tags a { padding: 6px 12px; border-radius: 999px; background: var(--vs-surface); border: 1px solid var(--vs-border); font-size: 13px; color: var(--vs-muted); }
.vbg-tags a:hover { color: var(--vs-text); border-color: var(--vs-primary); }

.vbg-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 0; padding: 16px 0; border-top: 1px solid var(--vs-border); border-bottom: 1px solid var(--vs-border); }
.vbg-share > span { font-weight: 700; margin-right: 6px; }
.vbg-share a, .vbg-share button, .vbg-aside-share a, .vbg-aside-share button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; background: var(--vs-surface); border: 1px solid var(--vs-border); color: var(--vs-text); font-size: 15px; cursor: pointer; font-family: inherit; }
.vbg-share button span { font-size: 13px; font-weight: 600; }
.vbg-share a:hover, .vbg-share button:hover, .vbg-aside-share a:hover, .vbg-aside-share button:hover { border-color: var(--vs-primary); color: #fff; background: var(--vs-primary); }
.vbg-share .is-fb:hover { background: #1877f2; border-color: #1877f2; }
.vbg-share .is-x:hover { background: #000; border-color: #444; }
.vbg-share .is-wa:hover { background: #25d366; border-color: #25d366; }
.vbg-share .is-tg:hover { background: #229ed9; border-color: #229ed9; }
.vbg-share .is-in:hover { background: #0a66c2; border-color: #0a66c2; }
.vbg-copy.is-done { background: #16a34a !important; border-color: #16a34a !important; color: #fff !important; }
.vbg-aside-share { display: flex; flex-wrap: wrap; gap: 8px; }
.vbg-aside-share .vbg-aside-title { flex: 0 0 100%; margin-bottom: 2px; }
.vbg-aside-share a, .vbg-aside-share button { padding: 0; width: 40px; }

.vbg-author-box { display: flex; align-items: center; gap: 16px; margin: 26px 0 0; padding: 18px 20px; background: var(--vs-surface); border: 1px solid var(--vs-border); border-radius: var(--vs-radius); }
.vbg-author-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--vs-muted); }
.vbg-author-name { font-size: 18px; font-weight: 700; color: var(--vs-text); }
.vbg-author-site { font-size: 13px; color: var(--vs-muted); }

/* Related articles & "Watch now" */
.vbg-section { padding: 26px 0 10px; }
.vbg-section > .container-fluid { max-width: 1200px; margin: 0 auto; }
.vbg-section-title { position: relative; padding-left: 14px; font-size: clamp(20px, 2vw, 24px) !important; font-weight: 700; margin: 0 0 18px; }
.vbg-section-title:before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 4px; background: linear-gradient(var(--vs-primary), var(--vs-accent)); }
.vbg-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.vbg-media-grid .video-img { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--vs-radius); }
.vbg-media-grid .video-img img { width: 100%; height: 100%; object-fit: cover; }
.vbg-section .vbg-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Comments block under articles keeps the article width */
.vbg-article ~ .vsc-wrap, .vbg-article ~ section .vsc-wrap { max-width: 1200px; }

/* ---------- Phones ---------- */
@media (max-width: 575px) {
  .vbg-hero { padding-top: 18px; }
  .vbg-grid { grid-template-columns: 1fr; gap: 16px; }
  .vbg-card-body { padding: 14px 16px 16px; }
  .vbg-card-title { font-size: 17px !important; }
  .vbg-article-head { padding-top: 18px; }
  .vbg-feature { border-radius: 10px; margin-bottom: 20px; }
  .vbg-content { font-size: 16px; line-height: 1.75; }
  .vbg-content blockquote { padding: 12px 16px; font-size: 16px; }
  .vbg-share { gap: 6px; }
  .vbg-share a, .vbg-share button { min-width: 38px; height: 38px; padding: 0 10px; }
  .vbg-media-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
