/* Trang archive (thiết kế Figma, khung 1280px) — cùng bộ màu/font với trang chủ */

body.tht-archive,
body.tht-archive #wrapper,
body.tht-archive #main {
	background-color: #fbf9f5;
}

.th-archive {
	--th-serif: 'Merriweather', Georgia, serif;
	--th-sans: 'Be Vietnam Pro', system-ui, sans-serif;
	--th-primary: #9d0318;
	--th-ink: #1b1c1a;
	--th-muted: #5a403e;
	--th-meta: #545f73;
	--th-placeholder: #efeeea;
	--th-soft: #f5f3ef;
	font-family: var(--th-sans);
	color: var(--th-ink);
}

.th-archive h1,
.th-archive h2,
.th-archive p,
.th-archive ol {
	margin: 0;
	padding: 0;
	letter-spacing: 0;
	text-transform: none;
}

.th-archive a {
	text-decoration: none;
}

.th-stretched::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* ---------- Banner chuyên mục ---------- */

.ta-banner {
	position: relative;
	overflow: hidden;
	padding: 40px 24px;
	background: var(--th-soft);
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
}

.ta-banner__mark {
	position: absolute;
	top: -48px;
	right: -48px;
	display: block;
	opacity: .05;
	pointer-events: none;
}

.ta-banner__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 1280px;
	margin: 0 auto;
}

/* Breadcrumb của Rank Math: <nav class="rank-math-breadcrumb"><p><a>…</a><span class="separator"> / </span><span class="last">…</span></p></nav> */
.th-archive .ta-crumbs p {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 4px;
	margin: 0;
	font-weight: 500;
	font-size: 11px;
	line-height: 14px;
	letter-spacing: .22px;
	color: var(--th-meta);
}

.ta-crumbs a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--th-meta);
}

.ta-crumbs a:hover {
	color: var(--th-primary);
}

/* Icon ngôi nhà trước "Trang chủ" như thiết kế */
.ta-crumbs a:first-child::before {
	content: '';
	width: 13.75px;
	height: 12.5px;
	background: url('../img/icon-home.svg') no-repeat center / contain;
}

.ta-crumbs .separator {
	color: #e3bebb;
}

.ta-crumbs .last {
	font-weight: 600;
	color: var(--th-primary);
}

.ta-banner__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
	/* 8/12 cột của khung 1280 */
	max-width: calc((100% - 11 * 24px) / 12 * 8 + 7 * 24px);
}

.th-archive .ta-title {
	font-family: var(--th-serif);
	font-style: italic;
	font-weight: 700;
	font-size: 48px;
	line-height: 60px;
	letter-spacing: -1.2px;
	color: var(--th-primary);
}

.th-archive .ta-desc {
	max-width: 768px;
	font-size: 18px;
	line-height: 29.25px;
	color: var(--th-muted);
}

/* ---------- Lưới bài ---------- */

.ta-main {
	display: flex;
	flex-direction: column;
	gap: 40px;
	max-width: 1280px;
	margin: 0 auto;
	padding: 64px 24px 40px;
}

.ta-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

.ta-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
}

.ta-card__media {
	position: relative;
	aspect-ratio: 390 / 246.66; /* tỉ lệ ảnh của thiết kế, co theo bề rộng thẻ */
	overflow: hidden;
	background: var(--th-placeholder);
}

.ta-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s;
}

.ta-card:hover .ta-card__img {
	transform: scale(1.03);
}

.ta-card__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, .2) 50%, rgba(0, 0, 0, 0) 100%);
}

.ta-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 16px 8px;
}

.th-archive .ta-card__title {
	overflow: hidden;
	font-family: var(--th-serif);
	font-weight: 700;
	font-size: 20px;
	line-height: 28px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.th-archive .ta-card__title a {
	color: var(--th-ink);
}

.th-archive .ta-card:hover .ta-card__title a {
	color: var(--th-primary);
}

.th-archive .ta-card__excerpt {
	display: -webkit-box;
	height: 48.75px;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	font-size: 15px;
	line-height: 24.38px;
	color: var(--th-muted);
}

.ta-card__foot {
	display: flex;
	justify-content: flex-end;
	margin-top: auto;
	padding: 8px 16px;
	background: var(--th-soft);
}

.ta-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 16px;
	background: var(--th-primary);
	border-radius: 8px;
	font-weight: 600;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: .48px;
	color: #fff;
	transition: background-color .15s;
}

.ta-card:hover .ta-btn {
	background: #7f0213;
}

.ta-btn img {
	display: block;
	margin: 0;
}

/* ---------- Thanh phân trang ---------- */

.ta-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px;
	background: #fff;
	border-radius: 12px;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .05));
}

.th-archive .ta-count {
	font-weight: 600;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: .48px;
	color: var(--th-meta);
}

.ta-count strong {
	font-weight: 700;
	color: var(--th-ink);
}

.ta-pages {
	display: flex;
	align-items: center;
	gap: 4px;
}

.ta-pages .page-numbers,
.ta-pages .th-page {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	margin: 0;
	padding: 0 4px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: .48px;
	color: var(--th-muted);
	transition: background-color .15s;
}

.ta-pages a.page-numbers:hover,
.ta-pages a.th-page:hover {
	background: var(--th-soft);
	color: var(--th-primary);
}

.ta-pages .page-numbers.current {
	background: var(--th-primary);
	font-weight: 700;
	color: #fff;
}

.ta-pages .page-numbers.dots {
	min-width: 24px;
	padding: 0;
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;
	color: var(--th-meta);
}

.ta-pages .th-page img {
	display: block;
	margin: 0;
}

.ta-pages .is-disabled {
	opacity: .3;
}

.th-archive .ta-empty {
	font-size: 16px;
	color: var(--th-muted);
}

/* ---------- Tablet / mobile ---------- */

@media (max-width: 1023px) {
	.ta-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ta-banner__text {
		max-width: none;
	}
}

@media (max-width: 849px) {
	.ta-banner {
		padding: 28px 16px;
	}

	.ta-banner__mark {
		width: 220px;
		height: 220px;
		top: -32px;
		right: -32px;
	}

	.th-archive .ta-title {
		font-size: 34px;
		line-height: 44px;
		letter-spacing: -.8px;
	}

	.th-archive .ta-desc {
		font-size: 16px;
		line-height: 26px;
	}

	.ta-main {
		gap: 24px;
		padding: 32px 16px;
	}

	.ta-grid {
		gap: 16px;
	}
}

@media (max-width: 549px) {
	.ta-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.ta-card__media {
		aspect-ratio: 16 / 10;
	}

	.ta-toolbar {
		justify-content: center;
	}
}
