/* Blog index + article pages (generated by scripts/build-blog.js).
   Layout modelled on vistrow.com/blog, in PropHunt colours.
   Every blog image uses one ratio: 1200 x 630 (1.91:1), the social-share
   size, so covers with text on them are never cropped. */

:root {
  --bl-ratio: 1200 / 630;
  --bl-ink: #0f1b2d;
  --bl-muted: #5b6474;
  --bl-line: #e7e3de;
  --bl-soft: #f8f6f3;
}

.bl-page { padding-top: calc(var(--nav-h, 72px) + 28px); background: var(--white); color: var(--bl-ink); }
.bl-wrap { max-width: var(--container, 1240px); margin: 0 auto; padding: 0 24px; }

/* Breadcrumbs */
.bl-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--bl-muted); margin-bottom: 22px; }
.bl-crumbs a { color: var(--bl-muted); text-decoration: none; }
.bl-crumbs a:hover { color: var(--red); }
.bl-crumbs .sep { color: #c9c3bb; }
.bl-crumbs [aria-current] { color: var(--bl-ink); font-weight: 500; }

/* Shared bits */
.bl-eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 12px/1 var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.bl-eyebrow i { width: 30px; height: 30px; border-radius: 50%; background: var(--red-light); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.bl-pill { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; background: var(--red-light); color: var(--red); font: 700 11px/1.2 var(--font-head); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.bl-section-head { margin: 0 0 22px; }
.bl-section-head .bl-eyebrow { margin-bottom: 10px; }
.bl-section-head h2 { font: 800 clamp(24px, 3vw, 32px)/1.2 var(--font-head); margin: 0; color: var(--bl-ink); }
.bl-section-head p { margin: 8px 0 0; color: var(--bl-muted); }
.bl-media { display: block; aspect-ratio: var(--bl-ratio); width: 100%; border-radius: 14px; overflow: hidden; background: var(--bl-soft); }
.bl-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.bl-media-empty { display: flex; align-items: center; justify-content: center; color: rgba(200, 54, 43, .35); font-size: 42px; background: linear-gradient(135deg, #1a1a1a, #2d1a1a); }

/* ── Blog index ─────────────────────────────── */
.bl-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 48px; align-items: end; padding-bottom: 36px; }
.bl-hero h1 { font: 800 clamp(38px, 6vw, 72px)/1.02 var(--font-head); letter-spacing: -.02em; margin: 18px 0 18px; color: var(--bl-ink); }
.bl-hero h1 em { font-style: normal; color: var(--red); }
.bl-hero p { font-size: 18px; line-height: 1.6; color: var(--bl-muted); max-width: 620px; margin: 0; }
.bl-search-card { border: 1px solid var(--bl-line); border-radius: 18px; padding: 24px; background: var(--white); box-shadow: var(--shadow-sm); }
.bl-search-card label { display: block; font: 700 16px var(--font-head); margin-bottom: 12px; }
.bl-search { position: relative; }
.bl-search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--bl-muted); }
.bl-search input { width: 100%; padding: 14px 16px 14px 44px; border: 1px solid var(--bl-line); border-radius: 12px; font: inherit; font-size: 15px; background: var(--bl-soft); }
.bl-search input:focus { outline: 2px solid var(--red); outline-offset: 1px; background: var(--white); }
.bl-stats { display: grid; grid-template-columns: 1fr 1fr; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--bl-line); }
.bl-stats div + div { border-left: 1px solid var(--bl-line); padding-left: 20px; }
.bl-stats strong { display: block; font: 800 30px/1 var(--font-head); color: var(--bl-ink); }
.bl-stats span { font-size: 13px; color: var(--bl-muted); }

.bl-chips-bar { position: sticky; top: var(--nav-h, 72px); z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-top: 1px solid var(--bl-line); border-bottom: 1px solid var(--bl-line); }
.bl-chips { display: flex; align-items: center; gap: 10px; overflow-x: auto; padding: 14px 0; scrollbar-width: none; }
.bl-chips::-webkit-scrollbar { display: none; }
.bl-chips-label { font: 700 12px var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--bl-muted); margin-right: 6px; flex: none; }
.bl-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--bl-line); background: var(--white); color: var(--bl-ink); font: 600 14px var(--font-head); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.bl-chip:hover { border-color: var(--red); }
.bl-chip.active { background: var(--red); border-color: var(--red); color: var(--white); }
.bl-chip .n { min-width: 22px; padding: 2px 7px; border-radius: 999px; background: var(--bl-soft); color: var(--bl-muted); font-size: 12px; text-align: center; }
.bl-chip.active .n { background: rgba(255, 255, 255, .22); color: var(--white); }

.bl-block { padding: 56px 0; }
.bl-featured { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 0; border: 1px solid var(--bl-line); border-radius: 22px; overflow: hidden; background: var(--white); text-decoration: none; color: inherit; transition: box-shadow .2s; }
.bl-featured:hover { box-shadow: var(--shadow-md); }
.bl-featured:hover .bl-media img { transform: scale(1.03); }
.bl-featured-body { padding: 40px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.bl-featured-body h3 { font: 800 clamp(26px, 3.2vw, 40px)/1.12 var(--font-head); margin: 0; color: var(--bl-ink); }
.bl-featured-body p { color: var(--bl-muted); font-size: 16px; line-height: 1.65; margin: 0; }
.bl-featured .bl-media { border-radius: 0; height: 100%; aspect-ratio: auto; min-height: 100%; }
.bl-featured-media { position: relative; display: flex; align-items: center; background: var(--bl-soft); }
.bl-featured-media .bl-media { aspect-ratio: var(--bl-ratio); height: auto; }
.bl-featured-tag { position: absolute; left: 18px; bottom: 18px; padding: 6px 12px; border-radius: 999px; background: rgba(15, 27, 45, .82); color: var(--white); font: 700 11px var(--font-head); letter-spacing: .14em; text-transform: uppercase; }
.bl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--bl-muted); }
.bl-more { font: 700 14px var(--font-head); color: var(--red); margin-top: 4px; }

.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.bl-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--bl-line); border-radius: 18px; overflow: hidden; background: var(--white); text-decoration: none; color: inherit; transition: transform .2s var(--ease), box-shadow .2s; }
.bl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.bl-card:hover .bl-media img { transform: scale(1.04); }
.bl-card .bl-media { border-radius: 0; }
.bl-card-num { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; background: rgba(15, 27, 45, .82); color: var(--white); font: 700 12px/34px var(--font-head); text-align: center; }
.bl-card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.bl-card-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.bl-card-cat { font: 700 12px var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.bl-card-read { color: var(--bl-muted); }
.bl-card h3 { font: 700 19px/1.35 var(--font-head); margin: 0; color: var(--bl-ink); }
.bl-card p { font-size: 14.5px; line-height: 1.6; color: var(--bl-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bl-card-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--bl-line); display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--bl-muted); }
.bl-card-foot .bl-more { margin: 0; }
.bl-empty { grid-column: 1 / -1; text-align: center; padding: 48px 0; color: var(--bl-muted); }

/* CTA band */
.bl-cta { margin: 24px 0 72px; border-radius: 26px; padding: 52px 48px; color: var(--white); background: radial-gradient(circle at 85% 20%, rgba(200, 54, 43, .45), transparent 45%), linear-gradient(135deg, #111 0%, #1e2a3d 100%); display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 32px; align-items: center; }
.bl-cta h2 { font: 800 clamp(26px, 3.4vw, 42px)/1.12 var(--font-head); margin: 0 0 12px; color: var(--white); }
.bl-cta p { margin: 0; color: rgba(255, 255, 255, .72); font-size: 16px; line-height: 1.6; max-width: 620px; }
.bl-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.bl-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 10px; font: 700 14px var(--font-head); text-decoration: none !important; transition: background .15s, color .15s, border-color .15s; }
.bl-btn-primary { background: var(--red); color: var(--white); }
.bl-btn-primary:hover { background: var(--red-dark); color: var(--white); }
.bl-btn-ghost { border: 1px solid rgba(255, 255, 255, .35); color: var(--white); }
.bl-btn-ghost:hover { border-color: var(--white); color: var(--white); }

/* ── Article page ───────────────────────────── */
.bl-post { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; padding-bottom: 40px; }
.bl-post-main { min-width: 0; max-width: 780px; }
.bl-post h1 { font: 800 clamp(30px, 4.2vw, 50px)/1.1 var(--font-head); letter-spacing: -.01em; margin: 16px 0 22px; color: var(--bl-ink); }
.bl-byline { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--bl-line); border-bottom: 1px solid var(--bl-line); }
.bl-author { display: flex; align-items: center; gap: 12px; }
.bl-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--red); color: var(--white); display: flex; align-items: center; justify-content: center; font: 800 14px var(--font-head); flex: none; }
.bl-author strong { display: block; font: 700 15px var(--font-head); }
.bl-author span { font-size: 13px; color: var(--bl-muted); }
.bl-share { display: flex; gap: 8px; }
.bl-share a, .bl-share button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--bl-line); background: var(--white); color: var(--bl-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; cursor: pointer; text-decoration: none; transition: border-color .15s, color .15s; }
.bl-share a:hover, .bl-share button:hover { border-color: var(--red); color: var(--red); }
.bl-lead { margin: 26px 0; padding-left: 18px; border-left: 3px solid var(--red); font-size: 18px; line-height: 1.65; color: #37404f; }
.bl-hero-img { margin: 0 0 34px; }
.bl-hero-img .bl-media { border-radius: 18px; box-shadow: var(--shadow-sm); }

.bl-body { font-size: 17px; line-height: 1.8; color: #2c3442; counter-reset: bl-h2; }
.bl-body > :first-child { margin-top: 0; }
.bl-body p { margin: 0 0 1.25rem; }
.bl-body h2 { counter-increment: bl-h2; font: 800 26px/1.3 var(--font-head); color: var(--bl-ink); margin: 2.6rem 0 1rem; padding-top: 2rem; border-top: 1px solid var(--bl-line); scroll-margin-top: calc(var(--nav-h, 72px) + 20px); }
.bl-body h2::before { content: counter(bl-h2, decimal-leading-zero); color: var(--red); font-size: 15px; font-weight: 700; margin-right: 12px; vertical-align: middle; }
.bl-body h3 { font: 700 20px/1.35 var(--font-head); color: var(--bl-ink); margin: 2rem 0 .75rem; }
.bl-body h4 { font: 700 17px/1.4 var(--font-head); margin: 1.6rem 0 .6rem; }
.bl-body a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.bl-body ul, .bl-body ol { margin: 0 0 1.4rem; padding-left: 1.4rem; }
.bl-body ul { list-style: disc; }
.bl-body ol { list-style: decimal; }
.bl-body li { margin-bottom: .5rem; }
.bl-body li::marker { color: var(--red); }
.bl-body blockquote { margin: 1.8rem 0; padding: 18px 22px; background: var(--bl-soft); border-left: 3px solid var(--red); border-radius: 0 12px 12px 0; font-style: italic; }
.bl-body hr { border: 0; border-top: 1px solid var(--bl-line); margin: 2.2rem 0; }
.bl-body img { max-width: 100%; height: auto; }
.bl-body code { background: var(--bl-soft); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.bl-body .bp-table-wrap { overflow-x: auto; margin: 1.6rem 0; border: 1px solid var(--bl-line); border-radius: 12px; }
.bl-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.bl-body th, .bl-body td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--bl-line); vertical-align: top; }
.bl-body th { background: var(--bl-soft); font-family: var(--font-head); font-weight: 700; }
.bl-body tr:last-child td { border-bottom: 0; }
.bl-body .bp-figure { margin: 2rem 0; }
.bl-body .bp-figure img { aspect-ratio: var(--bl-ratio); width: 100%; object-fit: cover; border-radius: 14px; display: block; }
.bl-body figcaption { font-size: 13px; color: var(--bl-muted); text-align: center; margin-top: 8px; }

.bl-faqs, .bl-projects, .bl-tags, .bl-author-box { margin-top: 44px; }
.bl-faqs h2, .bl-projects h2 { font: 800 24px var(--font-head); margin: 0 0 16px; color: var(--bl-ink); }
.bl-faq { border: 1px solid var(--bl-line); border-radius: 12px; margin-bottom: 10px; background: var(--white); }
.bl-faq summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font: 700 16px/1.4 var(--font-head); position: relative; }
.bl-faq summary::-webkit-details-marker { display: none; }
.bl-faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--red); }
.bl-faq[open] summary::after { content: '\2212'; }
.bl-faq p { margin: 0; padding: 0 18px 16px; color: #37404f; line-height: 1.7; }
.bl-proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.bl-proj { display: flex; flex-direction: column; border: 1px solid var(--bl-line); border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s; }
.bl-proj:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.bl-proj .bl-media { border-radius: 0; }
.bl-proj-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.bl-proj-body strong { font: 700 16px var(--font-head); color: var(--bl-ink); }
.bl-proj-body span { font-size: 13px; color: var(--bl-muted); }
.bl-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bl-tags span { padding: 6px 12px; border-radius: 999px; background: var(--bl-soft); font-size: 13px; color: #37404f; }
.bl-author-box { display: flex; gap: 16px; padding: 22px; border: 1px solid var(--bl-line); border-radius: 16px; background: var(--bl-soft); }
.bl-author-box strong { display: block; font: 700 16px var(--font-head); margin-bottom: 6px; }
.bl-author-box p { margin: 0; font-size: 14.5px; line-height: 1.65; color: #37404f; }

/* Sidebar */
.bl-side { position: sticky; top: calc(var(--nav-h, 72px) + 20px); display: flex; flex-direction: column; gap: 18px; }
.bl-side-card { border: 1px solid var(--bl-line); border-radius: 18px; padding: 20px; background: var(--white); }
.bl-side-card h2, .bl-side-title { font: 700 12px var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 0 0 14px; }
.bl-side-sub { font: 700 13px var(--font-head); color: var(--bl-ink); margin: 18px 0 10px; }
.bl-side select { width: 100%; padding: 12px 14px; border: 1px solid var(--bl-line); border-radius: 10px; font: inherit; font-size: 14px; background: var(--white); }
.bl-toc { list-style: none; margin: 0; padding: 0; }
.bl-toc li { display: flex; gap: 10px; padding: 7px 0; font-size: 14px; line-height: 1.4; }
.bl-toc li span { color: var(--red); font: 700 13px var(--font-head); flex: none; }
.bl-toc a { color: #37404f; text-decoration: none; }
.bl-toc a:hover, .bl-toc a.active { color: var(--red); }
.bl-side-list a { display: block; padding: 12px 0; border-top: 1px solid var(--bl-line); text-decoration: none; color: inherit; }
.bl-side-list a:first-child { border-top: 0; padding-top: 0; }
.bl-side-list small { display: block; font: 700 11px var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }
.bl-side-list strong { display: block; font: 600 14px/1.4 var(--font-head); color: var(--bl-ink); }
.bl-side-list a:hover strong { color: var(--red); }
.bl-side-list em { font-style: normal; font-size: 12px; color: var(--bl-muted); }
.bl-side-form .bp-enq-field { margin-bottom: 10px; }
.bl-side-form input, .bl-side-form select { width: 100%; padding: 12px 14px; border: 1px solid var(--bl-line); border-radius: 10px; font: inherit; font-size: 14px; background: var(--white); }
.bl-side-form .bp-enq-submit { width: 100%; padding: 13px; border: 0; border-radius: 10px; background: var(--red); color: var(--white); font: 700 14px var(--font-head); cursor: pointer; }
.bl-side-form .bp-enq-submit:hover { background: var(--red-dark); }
.bl-side-form .bp-enq-note { margin: 10px 0 0; font-size: 12px; color: var(--bl-muted); text-align: center; }

.bl-related { padding: 48px 0 8px; border-top: 1px solid var(--bl-line); }

/* Responsive */
@media (max-width: 1080px) {
  .bl-post { grid-template-columns: minmax(0, 1fr); }
  .bl-side { position: static; }
  .bl-post-main { max-width: none; }
}
@media (max-width: 960px) {
  .bl-hero { grid-template-columns: 1fr; gap: 28px; }
  .bl-featured { grid-template-columns: 1fr; }
  .bl-featured-media { order: -1; }
  .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bl-cta { grid-template-columns: 1fr; padding: 40px 28px; }
}
@media (max-width: 640px) {
  .bl-wrap { padding: 0 16px; }
  .bl-grid { grid-template-columns: 1fr; }
  .bl-featured-body { padding: 24px; }
  .bl-block { padding: 40px 0; }
  .bl-body { font-size: 16px; }
  .bl-body h2 { font-size: 22px; }
}
.bl-author .bl-avatar { color: var(--white); font-size: 14px; }
/* A divider right before a section heading would double its top rule. */
.bl-body hr + h2 { border-top: 0; padding-top: 0; margin-top: 0; }
