/* ==========================================================================
   TECHCOM Blog Filter — front-end styles
   Palette: graphite #1B2027, steel #2E3742, fog #F4F6F8, amber #E28A2B, ink #4A5460
   ========================================================================== */

.tbf-blog-listing,
.tbf-related {
	--tbf-graphite: #1B2027;
	--tbf-steel: #2E3742;
	--tbf-fog: #F4F6F8;
	--tbf-amber: #E28A2B;
	--tbf-ink: #4A5460;
	--tbf-line: #E1E5E9;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--tbf-graphite);
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ---- Hero / heading block ---- */
.tbf-blog-hero {
	text-align: center;
	max-width: 640px;
	margin: 0 auto 36px;
}
.tbf-eyebrow {
	text-transform: uppercase;
	letter-spacing: .14em;
	font-size: 12px;
	font-weight: 700;
	color: var(--tbf-amber);
	margin: 0 0 10px;
}
.tbf-heading {
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.15;
	font-weight: 800;
	margin: 0 0 12px;
	color: var(--tbf-graphite);
}
.tbf-heading--sm { font-size: clamp(22px, 3vw, 28px); }
.tbf-subtitle {
	font-size: 16px;
	line-height: 1.6;
	color: var(--tbf-ink);
	margin: 0;
}

/* ---- Filter pills ---- */
.tbf-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 0 0 34px;
}
.tbf-filter-btn {
	appearance: none;
	border: 1px solid var(--tbf-line);
	background: #fff;
	color: var(--tbf-ink);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .01em;
	padding: 9px 18px;
	border-radius: 999px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.tbf-filter-btn:hover {
	border-color: var(--tbf-amber);
	color: var(--tbf-graphite);
}
.tbf-filter-btn:active { transform: scale(.97); }
.tbf-filter-btn.is-active {
	background: var(--tbf-graphite);
	border-color: var(--tbf-graphite);
	color: #fff;
}
.tbf-filter-btn.is-active:hover { color: #fff; }

/* ---- Results / grid ---- */
.tbf-results { min-height: 120px; position: relative; }
.tbf-results.is-loading { opacity: .45; pointer-events: none; transition: opacity .15s ease; }

.tbf-grid {
	display: grid;
	gap: 28px;
	grid-template-columns: repeat(3, 1fr);
}
.tbf-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.tbf-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Card ---- */
.tbf-card {
	background: #fff;
	border: 1px solid var(--tbf-line);
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow .18s ease, transform .18s ease;
}
.tbf-card:hover {
	box-shadow: 0 10px 28px rgba(27, 32, 39, .09);
	transform: translateY(-2px);
}
.tbf-card-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	background: var(--tbf-fog);
	overflow: hidden;
}
.tbf-card-media--placeholder { display: block; width: 100%; height: 100%; background: var(--tbf-fog); }
.tbf-card-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.tbf-card:hover .tbf-card-img { transform: scale(1.04); }
.tbf-card-tag {
	position: absolute;
	top: 12px;
	left: 12px;
	background: var(--tbf-amber);
	color: #1B2027;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	padding: 5px 10px;
	border-radius: 5px;
}
.tbf-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.tbf-card-meta { font-size: 12px; color: var(--tbf-ink); margin: 0 0 8px; }
.tbf-card-title { font-size: 18px; line-height: 1.35; font-weight: 700; margin: 0 0 8px; }
.tbf-card-title a { color: var(--tbf-graphite); text-decoration: none; }
.tbf-card-title a:hover { color: var(--tbf-amber); }
.tbf-card-excerpt { font-size: 14px; line-height: 1.6; color: var(--tbf-ink); margin: 0 0 16px; flex: 1; }
.tbf-card-link { font-size: 13px; font-weight: 700; color: var(--tbf-graphite); text-decoration: none; margin-top: auto; }
.tbf-card-link:hover { color: var(--tbf-amber); }

/* Featured card (first item in the "All" view) spans full width on desktop */
.tbf-card--featured {
	grid-column: 1 / -1;
	flex-direction: row;
}
.tbf-card--featured .tbf-card-media { aspect-ratio: auto; width: 46%; }
.tbf-card--featured .tbf-card-body { width: 54%; justify-content: center; }
.tbf-card--featured .tbf-card-title { font-size: 24px; }

/* ---- Load more ---- */
.tbf-loadmore-wrap { text-align: center; margin-top: 32px; }
.tbf-loadmore {
	appearance: none;
	border: 1px solid var(--tbf-graphite);
	background: transparent;
	color: var(--tbf-graphite);
	font-weight: 700;
	font-size: 13px;
	padding: 11px 26px;
	border-radius: 999px;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.tbf-loadmore:hover { background: var(--tbf-graphite); color: #fff; }
.tbf-loadmore[disabled] { opacity: .5; cursor: default; }

/* ---- Empty state ---- */
.tbf-empty { text-align: center; padding: 60px 20px; border: 1px dashed var(--tbf-line); border-radius: 10px; }
.tbf-empty-title { font-weight: 700; font-size: 16px; margin: 0 0 6px; color: var(--tbf-graphite); }
.tbf-empty-sub { font-size: 14px; color: var(--tbf-ink); margin: 0; }

/* ---- Detail page filter tabs variant ---- */
.tbf-filters--detail { margin-bottom: 26px; }

/* ---- Related posts ---- */
.tbf-related { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--tbf-line); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.tbf-grid--cols-3, .tbf-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
	.tbf-card--featured { flex-direction: column; }
	.tbf-card--featured .tbf-card-media,
	.tbf-card--featured .tbf-card-body { width: 100%; }
	.tbf-card--featured .tbf-card-media { aspect-ratio: 16 / 9; }
}
@media (max-width: 600px) {
	.tbf-grid, .tbf-grid--cols-2, .tbf-grid--cols-3, .tbf-grid--cols-4 { grid-template-columns: 1fr; }
	.tbf-filters { gap: 8px; }
	.tbf-filter-btn { padding: 8px 14px; font-size: 12px; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
	.tbf-card, .tbf-card-img, .tbf-filter-btn, .tbf-loadmore { transition: none; }
}
