/* =============================================
   Blog Posts — taubenloft/blog-posts
   Figma 81:7824. Filter tabs + sort, cards (image left / text right).
   ============================================= */

.tl-blog-posts {
	background: #eaebe6;
	color: #333a42;
	font-family: 'Nunito Sans', 'Nunito Sans Fallback', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	padding: 96px 24px 96px;
}
.tl-blog-posts__container { max-width: 1200px; margin: 0 auto; }

/* ── Filter bar ─────────────────────────────── */
.tl-blog-posts__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-bottom: 24px;
	border-bottom: 0.5px solid rgba(51, 58, 66, 0.5);
	margin-bottom: 8px;
}
.tl-blog-posts__bar--no-tabs { justify-content: flex-end; }
.tl-blog-posts__tabs { display: flex; flex-wrap: wrap; gap: 48px; }
.tl-blog-posts__tab {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	font-size: 16px;
	font-weight: 400;
	color: #333a42;
	cursor: pointer;
	opacity: .6;
	transition: opacity .15s ease;
}
.tl-blog-posts__tab:hover { opacity: .9; }
.tl-blog-posts__tab.is-active { opacity: 1; font-weight: 600; }
.tl-blog-posts__sort {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: none;
	padding: 6px 12px;
	border-radius: 999px;
	font: inherit;
	font-size: 16px;
	text-transform: uppercase;
	color: #231f20;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color .15s ease, color .15s ease;
}
.tl-blog-posts__sort:hover,
.tl-blog-posts__sort:focus-visible { background: rgba(51, 58, 66, 0.08); color: #002244; outline: none; }
/* active direction word is the clear signal */
.tl-blog-posts__sort-dir { font-weight: 700; }
.tl-blog-posts__sort[data-dir="asc"] { color: #002244; }
.tl-blog-posts__sort[data-dir="asc"] .tl-blog-posts__sort-dir { text-decoration: underline; text-underline-offset: 3px; }
/* icon flips with direction + animates */
.tl-blog-posts__sort-icon { transition: transform .2s ease; }
.tl-blog-posts__sort[data-dir="asc"] .tl-blog-posts__sort-icon { transform: rotate(180deg); }
/* brief tap feedback */
.tl-blog-posts__sort.is-flash { animation: tl-sort-flash .25s ease; }
@keyframes tl-sort-flash { 0% { background: rgba(51,58,66,0.20); } 100% { background: rgba(51,58,66,0); } }
.tl-blog-posts__sort:active { transform: scale(0.97); }

/* ── Card list ──────────────────────────────── */
.tl-blog-posts__card {
	display: grid;
	grid-template-columns: 373px 1fr;
	gap: 48px;
	align-items: start;
	padding: 48px 0;
	border-bottom: 0.5px solid rgba(51, 58, 66, 0.5);
}
.tl-blog-posts__media {
	display: block;
	width: 373px;
	aspect-ratio: 373 / 280;
	overflow: hidden;
	border-radius: 4px;
}
.tl-blog-posts__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tl-blog-posts__body { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.tl-blog-posts__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
	color: #809595;
	letter-spacing: .02em;
}
.tl-blog-posts__sep { opacity: .6; }
.tl-blog-posts__cat { color: inherit; text-decoration: none; }
.tl-blog-posts__cat:hover { text-decoration: underline; }
.tl-blog-posts__title { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 600; color: #002244; }
.tl-blog-posts__title a { color: inherit; text-decoration: none; }
.tl-blog-posts__title a:hover { text-decoration: underline; }
.tl-blog-posts__excerpt { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 400; color: #002244; }
.tl-blog-posts__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	font-size: 16px;
	font-weight: 500;
	text-transform: uppercase;
	color: #333a42;
	text-decoration: none;
}
.tl-blog-posts__more span { text-decoration: underline; }
.tl-blog-posts__more svg { transition: transform .15s ease; }
.tl-blog-posts__more:hover svg { transform: translate(2px, 2px); }
.tl-blog-posts__card.is-hidden { display: none; }

/* ── Blog header (archive templates) ────────── */
.tl-blog { background: #eaebe6; }
.tl-blog-head {
	background: #eaebe6;
	color: #333a42;
	font-family: 'Nunito Sans', 'Nunito Sans Fallback', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	padding: 96px 24px 16px;
}
.tl-blog-head__container { max-width: 1200px; margin: 0 auto; }
.tl-blog-head__eyebrow {
	display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
	font-size: 16px; line-height: 22px; font-weight: 500;
	text-transform: uppercase; color: #333a42;
}
.tl-blog-head__dot { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; background: #333a42; }
.tl-blog-head__title { margin: 0; font-size: 36px; line-height: 1.2; font-weight: 500; color: #333a42; }
.tl-blog-head__sub { margin: 12px 0 0; font-size: 16px; line-height: 1.5; color: #333a42; }

/* ── Pagination ─────────────────────────────── */
.tl-blog-posts__pagination { padding-top: 40px; }
.tl-blog-posts__pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 8px; margin: 0 4px;
	border: 0.5px solid rgba(51, 58, 66, 0.4);
	color: #333a42; text-decoration: none; font-size: 15px; border-radius: 4px;
}
.tl-blog-posts__pagination .page-numbers.current { background: #333a42; color: #eaebe6; border-color: #333a42; }
.tl-blog-posts__pagination .page-numbers:hover { background: rgba(51,58,66,.08); }
.tl-blog-posts__pagination .screen-reader-text { position: absolute; left: -9999px; }

/* ── Mobile ≤767 ────────────────────────────── */
@media (max-width: 767px) {
	.tl-blog-head { padding: 56px 20px 12px; }
	.tl-blog-head__title { font-size: 28px; }
	.tl-blog-head__eyebrow { font-size: 14px; }
	.tl-blog-posts { padding: 24px 20px 64px; }
	.tl-blog-posts__bar { flex-direction: column; align-items: flex-start; gap: 16px; }
	.tl-blog-posts__tabs { gap: 20px; }
	.tl-blog-posts__card {
		grid-template-columns: 1fr;
		gap: 20px;
		padding: 32px 0;
	}
	.tl-blog-posts__media { width: 100%; }
	.tl-blog-posts__title { font-size: 18px; }
}
