/* ==========================================================================
   Blog (home.php list, single.php article). Square ERP look: white, hairlines, corner marks, blue accents.
   Loaded only on the blog list, articles and categories (inc/blog.php).
   ========================================================================== */

/* corner marks, same as the service and project cards */
.post__img > div, .post__author { position: relative; }
.bc--big::after, .post__img > div::after {
	content: ""; position: absolute; inset: -6px; pointer-events: none; z-index: 1; --m: rgba(29, 31, 32, .55);
	background:
		linear-gradient(var(--m), var(--m)) 5px 0 / 1px 11px no-repeat, linear-gradient(var(--m), var(--m)) 0 5px / 11px 1px no-repeat,
		linear-gradient(var(--m), var(--m)) calc(100% - 5px) 0 / 1px 11px no-repeat, linear-gradient(var(--m), var(--m)) 100% 5px / 11px 1px no-repeat,
		linear-gradient(var(--m), var(--m)) 5px 100% / 1px 11px no-repeat, linear-gradient(var(--m), var(--m)) 0 calc(100% - 5px) / 11px 1px no-repeat,
		linear-gradient(var(--m), var(--m)) calc(100% - 5px) 100% / 1px 11px no-repeat, linear-gradient(var(--m), var(--m)) 100% calc(100% - 5px) / 11px 1px no-repeat;
}

/* ---------- List ---------- */
.blog { background: #F3F6FA; padding-bottom: clamp(56px, 6vw, 96px); }
.blog__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 40px; padding-block: clamp(36px, 4vw, 60px) 24px; }
.blog__crumbs { display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 3px solid var(--blue); font-size: 14px; font-weight: 700; color: var(--muted); }
.blog__crumbs a { color: var(--blue); }
.blog__crumbs a:hover { text-decoration: underline; }
.blog__t { margin-top: 14px; font-size: clamp(36px, 4.4vw, 60px); line-height: 1; letter-spacing: -.025em; }
.blog__t .hl { color: var(--blue); }
.blog__lead { margin-top: 12px; font-size: 17px; color: var(--muted); max-width: 60ch; }
.blog__search { position: relative; width: min(340px, 100%); }
.blog__search .ico { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.blog__search input { width: 100%; height: 46px; padding: 0 14px 0 42px; background: #fff; border: 1px solid var(--line-strong); font: inherit; font-size: 15px; color: var(--navy); }
.blog__search input:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }

.blog__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.blog__tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; background: #fff; border: 1px solid var(--line-strong); font-size: 14.5px; font-weight: 600; color: var(--navy); transition: border-color .2s, color .2s; }
.blog__tabs a:hover { border-color: var(--blue); color: var(--blue); }
.blog__tabs a[aria-current] { background: var(--blue); border-color: var(--blue); color: #fff; }

.bc { position: relative; display: grid; grid-template-rows: auto 1fr; background: #fff; border: 1px solid var(--line); color: inherit; transition: border-color .2s, box-shadow .3s; }
.bc:hover { border-color: var(--line-strong); box-shadow: 0 24px 50px -30px rgba(10, 37, 64, .35); }
.bc:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.bc__img { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-tint); color: var(--blue); border-bottom: 1px solid var(--line); }
.bc__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s var(--ease); }
.bc:hover .bc__img img { transform: scale(1.03); }
.bc__img .ico { width: 40px; height: 40px; }
.bc__body { display: grid; align-content: start; gap: 8px; padding: 16px 18px 18px; }
.bc__cat { font-size: 13px; font-weight: 700; color: var(--blue); }
.bc__t { font: 600 19px/1.25 var(--font-h); color: var(--navy); letter-spacing: -.01em; text-wrap: pretty; }
.bc__ex { color: var(--muted); font-size: 16px; line-height: 1.6; }
.bc__meta { display: flex; flex-wrap: wrap; white-space: nowrap; align-items: center; gap: 4px 0; margin-top: 4px; color: var(--muted); font-size: 13px; }
.bc__meta > span:not(.bc__go) + span:not(.bc__go)::before { content: ""; display: inline-block; width: 1px; height: 12px; margin: 0 10px; vertical-align: -1px; background: var(--line-strong); }
.bc__go { display: grid; place-items: center; width: 42px; height: 42px; margin-left: auto; background: var(--blue); color: #fff; transition: background .2s; }
.bc__go .ico { width: 18px; height: 18px; transition: transform .2s; }
.bc:hover .bc__go { background: var(--navy); }
.bc:hover .bc__go .ico { transform: translateX(3px); }
.bc--big { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; }
.bc--big .bc__img { aspect-ratio: auto; min-height: 320px; border-bottom: 0; border-right: 1px solid var(--line); }
.bc--big .bc__body { align-content: center; gap: 12px; padding: clamp(22px, 2.6vw, 36px); }
.bc--big .bc__cat { justify-self: start; padding: 4px 9px; background: var(--blue); color: #fff; font-size: 12.5px; }
.bc--big .bc__t { font-size: clamp(24px, 2.3vw, 32px); line-height: 1.12; }
.bc--big .bc__meta { margin-top: 10px; }

.blog__top { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.blog__top > .bc:only-child { grid-column: 1 / -1; }
.blog__pop { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--blue); padding: 18px 18px 8px; }
.blog__pop h2 { font-size: 21px; }
.blog__pop ol { list-style: none; margin: 10px 0 0; padding: 0; }
.blog__pop li + li { border-top: 1px solid var(--line); }
.blog__pop a { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 12px 0; color: inherit; }
.blog__pop-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-tint); border: 1px solid var(--line); }
.blog__pop-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.blog__pop b { display: block; font-size: 14.5px; line-height: 1.35; color: var(--navy); transition: color .2s; }
.blog__pop a:hover b { color: var(--blue); }
.blog__pop small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.blog__pop em { font-style: normal; font-weight: 700; color: var(--blue); }

.blog__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.blog__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.blog__empty { padding: 40px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.blog__pages .nav-links { display: flex; gap: 6px; margin-top: 28px; }
.blog__pages .page-numbers { display: grid; place-items: center; min-width: 40px; height: 40px; border: 1px solid var(--line-strong); background: #fff; font-weight: 600; }
.blog__pages .page-numbers.current { background: var(--blue); border-color: var(--blue); color: #fff; }

.blog__cta { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: clamp(48px, 6vw, 80px); }
.blog__cta h2 { font-size: clamp(28px, 3vw, 40px); }
.blog__cta p { margin-top: 10px; color: var(--muted); font-size: 18px; }
.blog__cta .fd-cta-wrap { margin-top: 0; width: 100%; justify-items: stretch; }
.blog__cta .fd-cta { width: 100%; }
.blog__cta .fd-cta-arrow { display: none !important; }

/* ---------- Article ---------- */
.post { background: #fff; padding-bottom: clamp(56px, 6vw, 96px); }
.post__head { max-width: 900px; padding-block: clamp(36px, 4vw, 64px) clamp(24px, 3vw, 36px); }
.post__crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--muted); }
.post__crumbs a { color: var(--blue); font-weight: 600; }
.post__crumbs a:hover { text-decoration: underline; }
.post__t { margin-top: 14px; font-size: clamp(36px, 4.6vw, 62px); line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 22px; color: var(--muted); font-size: 15px; }
.post__meta b { color: var(--navy); }
.post__av { display: grid; place-items: center; width: 34px; height: 34px; background: var(--blue); color: #fff; font-weight: 700; }
.post__img { margin-block: 0 clamp(32px, 4vw, 56px); }
.post__img > div { border: 1px solid var(--line); background: var(--bg-alt); }
.post__img img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; object-position: top; }

.post__body { display: grid; grid-template-columns: 220px minmax(0, 700px); gap: clamp(32px, 5vw, 72px); justify-content: center; }
.post__side { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; display: grid; gap: 28px; }
.post__toc { border-top: 2px solid var(--navy); padding-top: 14px; }
.post__ask { display: grid; gap: 10px; padding: 20px 18px; background: var(--navy); color: #fff; }
.post__ask b { font: 700 19px/1.2 var(--font-h); }
.post__ask p { margin: 0; font-size: 14px; line-height: 1.5; color: #B9C9E4; }
.post__ask .btn { justify-self: start; margin-top: 4px; padding: 10px 14px; background: #fff; color: var(--navy); font-size: 14px; }
.post__ask .btn:hover { background: var(--bg-tint); }
.post__by { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-block: 14px; border-block: 1px solid var(--line); }
.post__by .post__meta { margin: 0; }
.post__share { display: flex; align-items: center; gap: 8px; }
.post__share > span { margin-right: 4px; font-size: 14px; color: var(--muted); }
.post__share a, .post__share button { position: relative; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; background: #fff; border: 1px solid var(--line); color: var(--navy); cursor: pointer; transition: border-color .2s, color .2s; }
.post__share a:hover, .post__share button:hover { border-color: var(--blue); color: var(--blue); }
.post__share svg { width: 18px; height: 18px; }
.post__share em { position: absolute; bottom: calc(100% + 6px); left: 50%; translate: -50% 0; padding: 4px 8px; background: var(--navy); color: #fff; font: 600 12px/1.2 var(--font-b); font-style: normal; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s; }
.post__share em:not(:empty) { opacity: 1; }
.post__toc p { font-weight: 700; color: var(--navy); font-size: 14px; }
.post__toc ol { position: relative; list-style: none; margin: 12px 0 0; padding: 0 0 0 16px; display: grid; gap: 2px; counter-reset: toc; }
.post__toc ol::before, .post__fill { content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 100%; background: var(--line); }
.post__fill { height: var(--fill, 0px); background: var(--blue); }
.post__fill::after { content: ""; position: absolute; left: -2px; bottom: -3px; width: 6px; height: 6px; background: var(--blue); opacity: var(--tip, 0); transition: opacity .2s; }
.post__toc li { counter-increment: toc; }
.post__toc a { display: grid; grid-template-columns: 26px 1fr; padding: 6px 0; font-size: 14.5px; line-height: 1.4; color: var(--muted); transition: color .2s; }
.post__toc a::before { content: counter(toc, decimal-leading-zero); color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; transition: color .2s; }
.post__toc a.is-read { color: var(--text); }
.post__toc a.is-read::before, .post__toc a[aria-current]::before { color: var(--blue); }
.post__toc a[aria-current] { color: var(--navy); font-weight: 600; }
.post__toc a:hover { color: var(--navy); }
.post__left { display: none; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.post__left b { color: var(--navy); margin-right: 6px; }
.js .post__left { display: block; }
.post__bar { display: none; }
.post__text { font-size: 18px; line-height: 1.75; }
.post__text h2 { scroll-margin-top: calc(var(--header-h) + 24px); }
.post__text blockquote { margin: 1.6em 0; padding: 18px 22px; background: var(--bg-tint); border-left: 4px solid var(--blue); color: var(--navy); font-weight: 500; }
.post__text blockquote p { margin: 0; }
.post__text table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 16px; }
.post__text th, .post__text td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.post__text th { background: var(--bg-alt); color: var(--navy); }

.post__end { max-width: 1012px; display: grid; gap: 32px; margin-top: clamp(48px, 6vw, 72px); padding-top: 32px; border-top: 1px solid var(--line); }
.post__author { display: flex; align-items: center; gap: 16px; }
.post__author img { width: 64px; height: 64px; object-fit: cover; background: var(--bg-tint); }
.post__author b { display: block; color: var(--navy); font-size: 17px; }
.post__author span { color: var(--muted); font-size: 15px; }
.post__cta .fd-cta-wrap { margin-top: 0; width: 100%; justify-items: stretch; }
.post__cta .fd-cta { width: 100%; }
.post__cta .fd-cta-arrow { display: none !important; }
.post__more { margin-top: clamp(56px, 6vw, 88px); }
.post__more h2 { font-size: clamp(26px, 2.6vw, 34px); }

/* ---------- Phones / tablets ---------- */
@media (max-width: 980px) {
	.blog__top { grid-template-columns: 1fr; }
	.bc--big { grid-template-columns: 1fr; }
	.bc--big .bc__img { min-height: 0; aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1px solid var(--line); }
	.blog__grid { grid-template-columns: 1fr 1fr; }
	.blog__cta { grid-template-columns: 1fr; }
	.post__body { grid-template-columns: minmax(0, 1fr); }
	.post__side { position: static; }
	.post__ask { display: none; }
	.post__toc ol::before, .post__fill, .post__left { display: none !important; }
	.post__toc ol { padding-left: 0; }
	.js .post__bar { display: block; position: fixed; z-index: 899; left: 0; right: 0; top: var(--header-h); height: 3px; background: var(--blue); transform: scaleX(var(--p, 0)); transform-origin: left; }
}
@media (max-width: 600px) {
	.blog__grid, .blog__grid--2 { grid-template-columns: 1fr; }
	.post__text table { display: block; overflow-x: auto; font-size: 15px; }
	.post__text table.table--fit { display: table; font-size: 14.5px; }
	.post__text .table--fit th, .post__text .table--fit td { padding: 8px 6px; }
	.post__text .table--fit th:nth-child(2), .post__text .table--fit td:nth-child(2) { display: none; } /* the sentence above says what each metric is */
	.post__text { font-size: 17px; }
	.post__img img { aspect-ratio: 16 / 10; }
}

/* ---------- Simpler list: white page, plain category links, cards without frames ---------- */
.blog { background: #fff; }
.blog__head { display: block; }
.blog__t { margin-top: 0; }
.blog__tabs { gap: 4px 22px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.blog__tabs a { min-height: 44px; margin-bottom: -1px; padding: 0; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); }
.blog__tabs a:hover { color: var(--navy); }
.blog__tabs a[aria-current] { background: none; border-color: var(--blue); color: var(--navy); }
.bc, .bc:hover { background: none; border: 0; box-shadow: none; }
.bc__img { border: 0; background: var(--bg-alt); }
.bc__body { padding: 16px 0 0; }
.bc__meta > span { display: none; }
.bc__meta > span:nth-child(2) { display: inline; }
.bc__meta > span:nth-child(2)::before { display: none !important; }
.bc.bc::before, .bc.bc::after { display: none; }
.bc:hover .bc__t { color: var(--blue); }
.bc__t { transition: color .2s; }
.blog__grid { gap: 40px 28px; margin-top: 48px; }
.bc--big { gap: clamp(24px, 3vw, 48px); }
.bc--big .bc__img { border: 0; min-height: 360px; }
.bc--big .bc__body { padding: 0; }
.bc--big .bc__cat { padding: 0; background: none; color: var(--blue); font-size: 14px; }
.bc--big .bc__t { font-size: clamp(26px, 2.8vw, 38px); }
@media (max-width: 980px) { .bc--big .bc__img { min-height: 0; border: 0; } }
.blog__hero { padding-bottom: 0; }
.blog__hero .blog__tabs { margin: clamp(24px, 3vw, 36px) 0 0; border-bottom: 0; }
.blog__list { padding-top: clamp(32px, 4vw, 48px); }
.blog__hero:not(:has(.blog__tabs)) { padding-bottom: clamp(32px, 4vw, 48px); }
.blog__empty { padding: 0; background: none; border: 0; font-size: 18px; }
.blog__cta .fd-cta__art { display: none; } /* narrow column: card without its drawing */
.bc--big { align-items: center; }
.bc--big .bc__img { aspect-ratio: 16 / 9; min-height: 0; } /* show the whole article image */
.post__text pre { margin: 1.4em 0; padding: 18px 20px; overflow-x: auto; background: var(--navy); color: #fff; font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.post__text :not(pre) > code { padding: 1px 5px; background: var(--bg-alt); color: var(--navy); font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
