/* ==========================================================================
   Target Lines Theme - Blog Index, Category Archive & Search Styles (blog.css)
   Matches Figma "Blogs" (#29:648)
   ========================================================================== */

.tl-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.blog-page__section {
	padding-block-end: var(--tl-space-10);
}

/* 1. Filter Tabs Bar
   -------------------------------------------------------------------------- */
.blog-page__filterbar {
	margin-block: var(--tl-space-6);
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

/* 2. Top Split: Featured Card + Scrollable Most Read Panel (matches 429px)
   -------------------------------------------------------------------------- */
.blog-page__split {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--tl-space-6);
	align-items: stretch;
}

.blog-page__featured {
	min-width: 0;
	display: flex;
}

.blog-page__featured .post-card-large {
	width: 100%;
	height: auto;
	min-height: 490px;
}

.blog-page__most {
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	height: auto;
	max-height: 510px;
}

.blog-page__most-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tl-space-4);
	margin-block-end: var(--tl-space-5);
	flex-shrink: 0;
}

.blog-page__most-title {
	font-size: var(--tl-fs-base);
	font-weight: var(--tl-fw-medium);
	line-height: 1.25;
	color: var(--tl-color-white-80);
	margin: 0;
}

.blog-page__count {
	display: inline-flex;
	align-items: center;
	gap: var(--tl-space-1);
	font-size: var(--tl-fs-base);
	font-weight: var(--tl-fw-medium);
	color: var(--tl-color-white-80);
}

.blog-page__most-list {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	max-height: 444px;
	overflow-y: auto;
	overflow-x: hidden;
	padding-inline-end: 0;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.blog-page__most-list::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.blog-page__most-list .most-read-item.is-hidden {
	display: none;
}

/* 3. Bottom 3-Column Posts Grid
   -------------------------------------------------------------------------- */
.blog-page__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--tl-space-6);
	margin-block-start: var(--tl-space-10);
}

.blog-page__empty {
	margin-block-start: var(--tl-space-8);
	padding: var(--tl-space-7);
	border-radius: var(--tl-radius-md);
	background-color: var(--tl-color-glass);
	border: var(--tl-border-width) solid var(--tl-color-white-20);
	text-align: center;
	font-size: var(--tl-fs-lg);
	color: var(--tl-color-white-80);
}

.blog-page__empty.is-hidden {
	display: none;
}

/* 4. Inline Search Page Form & Empty State
   -------------------------------------------------------------------------- */
.tl-search-inline {
	margin-block: var(--tl-space-7);
	display: flex;
	align-items: stretch;
	gap: var(--tl-space-3);
	max-width: 680px;
}

.tl-search-inline__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 48px;
	padding-inline: var(--tl-space-5);
	background-color: var(--tl-color-white-20);
	border: var(--tl-border-width) solid var(--tl-color-white-30);
	border-radius: var(--tl-radius-md);
	font-family: var(--tl-font-primary);
	font-size: var(--tl-fs-base);
	color: var(--tl-color-white);
	text-align: start;
	transition: border-color var(--tl-transition-fast);
}

.tl-search-inline__input::placeholder {
	color: var(--tl-color-white-50);
}

.tl-search-inline__input:focus {
	outline: none;
	border-color: var(--tl-color-accent-orange);
}

.tl-search-inline__submit {
	display: inline-flex;
	align-items: center;
	gap: var(--tl-space-2);
	min-height: 48px;
	padding-inline: var(--tl-space-6);
}

.tl-empty-state {
	margin-block-start: var(--tl-space-8);
	padding: var(--tl-space-9) var(--tl-space-6);
	border-radius: var(--tl-radius-md);
	background-color: var(--tl-color-glass);
	border: var(--tl-border-width) solid var(--tl-color-white-20);
	text-align: center;
}

.tl-empty-state__title {
	font-size: var(--tl-fs-xl);
	font-weight: var(--tl-fw-bold);
	color: var(--tl-color-white);
	margin-block-end: var(--tl-space-3);
}

.tl-empty-state__desc {
	font-size: var(--tl-fs-base);
	color: var(--tl-color-white-80);
	margin-block-end: var(--tl-space-6);
}

/* 5. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
	.blog-page__section {
		padding-block-end: var(--tl-space-8);
	}

	.blog-page__split {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--tl-space-7);
	}

	.blog-page__featured .post-card-large {
		height: auto;
		min-height: 380px;
	}

	.blog-page__most {
		height: auto;
		max-height: none;
	}

	.blog-page__most-list {
		max-height: 320px;
	}

	.blog-page__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		margin-block-start: var(--tl-space-8);
	}
}

@media (max-width: 767px) {
	.blog-page__filterbar {
		margin-block: var(--tl-space-5);
	}

	.blog-page__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--tl-space-5);
		margin-block-start: var(--tl-space-7);
	}

	.tl-search-inline {
		flex-direction: column;
	}

	.tl-search-inline__submit {
		justify-content: center;
	}
}

