/* BSD Infotech blog — builds on the site design system (site.css tokens). */

.blog-hero { background: linear-gradient(180deg, var(--surface-2), var(--bg)); border-bottom: 1px solid var(--border); padding: 36px 0 28px; }
.blog-hero h1 { margin-bottom: .35em; }
.blog-hero .eyebrow { margin-bottom: 8px; }
.blog-hero-intro { max-width: 760px; color: var(--muted); font-size: 1.075rem; }
.blog-search { display: flex; gap: 10px; max-width: 560px; margin-top: 18px; }
.blog-search input { flex: 1; min-width: 0; min-height: 46px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; background: #fff; color: var(--text); }
.blog-search input:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }

.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; padding-top: 32px; padding-bottom: 48px; align-items: start; }
.blog-side { position: sticky; top: 96px; display: grid; gap: 20px; }
.blog-empty { padding: 24px; background: var(--surface); border-radius: var(--radius); color: var(--muted); }

/* cards */
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.post-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.post-card-img { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-ph { display: flex; align-items: center; justify-content: center; height: 100%; padding: 16px; text-align: center; font-weight: 800; font-size: 1.15rem; color: #fff; background: linear-gradient(135deg, var(--ink), var(--teal)); }
.post-card-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; }
.post-card-cat { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); }
.post-card h2, .post-card h3 { font-size: 1.1rem; line-height: 1.35; margin: 0; }
.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--accent-strong); text-decoration: underline; }
.post-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.post-card .post-card-meta { margin-top: auto; padding-top: 8px; font-size: .82rem; }

.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 32px; flex-wrap: wrap; }
.pager a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; background: #fff; }
.pager a:hover { border-color: var(--ink); }
.pager span { color: var(--muted); font-size: .9rem; }

/* sidebar */
.side-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.side-card h2 { font-size: 1.05rem; margin-bottom: 10px; }
.side-quote { background: var(--ink); border-color: var(--ink); color: #dfe7f2; }
.side-quote h2 { color: #fff; }
.side-quote p { color: #c6d3e4; font-size: .93rem; }
.side-call { display: block; margin-top: 10px; color: #fff; font-size: .9rem; }
.side-call:hover { color: var(--accent); }
.side-cats { list-style: none; margin: 0; padding: 0; }
.side-cats li + li { border-top: 1px solid var(--border); }
.side-cats a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; text-decoration: none; font-size: .93rem; }
.side-cats a[aria-current] { font-weight: 700; color: var(--accent-strong); }
.side-cats span { color: var(--muted); font-size: .82rem; }

/* article */
.post { min-width: 0; }
.post-head .eyebrow { text-decoration: none; }
.post-head h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
.post-meta { color: var(--muted); font-size: .92rem; }
.post-summary { background: var(--surface-2); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 16px 20px; margin: 20px 0 24px; }
.post-summary p { margin: 0; font-size: 1.05rem; color: var(--text); }
.post-summary .post-summary-label { font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-strong); margin-bottom: 4px; }
.post-hero-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin: 8px 0 24px; background: var(--surface-2); }
.post-toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 28px; }
.post-toc summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.post-toc ol { margin: 10px 0 0; padding-left: 20px; }
.post-toc li { margin: 4px 0; }
.post-body { font-size: 1.065rem; line-height: 1.75; }
.post-body h2 { font-size: 1.55rem; margin-top: 1.8em; scroll-margin-top: 96px; }
.post-body h3 { font-size: 1.2rem; margin-top: 1.5em; scroll-margin-top: 96px; }
.post-body ul, .post-body ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.post-body li { margin: .3em 0; }
.post-body img { border-radius: var(--radius-sm); margin: 1em auto; }
.post-body figure { margin: 1.4em 0; }
.post-body figcaption { font-size: .88rem; color: var(--muted); text-align: center; }
.post-body blockquote { margin: 1.4em 0; padding: 12px 20px; border-left: 4px solid var(--teal); background: var(--surface); color: var(--text); }
.post-body iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius-sm); }
.post-body .table-scroll { overflow-x: auto; margin: 1.2em 0; }
.post-body table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.post-body th { background: var(--surface-2); }
.post-body pre { overflow-x: auto; background: var(--surface); padding: 12px; border-radius: var(--radius-sm); }
.post-faq { margin-top: 36px; }
.post-faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; background: #fff; }
.post-faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--ink); }
.post-faq details p { padding: 0 16px 14px; margin: 0; }
.post-links { margin-top: 32px; }
.post-links ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.post-links a { display: inline-block; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .92rem; background: #fff; }
.post-links a:hover { border-color: var(--accent-strong); }
.post-inline-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.post-inline-cta p { margin: 0; flex: 1 1 280px; }
.post-share { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 24px; font-size: .92rem; color: var(--muted); }
.related { background: var(--surface); padding: 44px 0 52px; border-top: 1px solid var(--border); }
.preview-bar { background: #fff4d6; color: #5c3b00; border-bottom: 1px solid #f0d58a; padding: 10px 20px; text-align: center; font-weight: 600; }

.blog-error { padding-top: 40px; padding-bottom: 56px; }
.blog-error .post-grid { margin-top: 28px; }

@media (max-width: 1000px) {
  .blog-layout { grid-template-columns: minmax(0, 1fr); }
  .blog-side { position: static; }
  .post-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .post-grid, .post-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .blog-search { flex-direction: column; }
  .blog-layout { padding-top: 24px; gap: 28px; }
  .post-body { font-size: 1.02rem; }
}
