/* Trang chủ (thiết kế Figma, khung 1280px) */

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

.th-home {
	--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-line: rgba(234, 232, 228, .6);
	--th-placeholder: #efeeea;
	max-width: 1280px;
	margin: 0 auto;
	padding-bottom: 40px;
	font-family: var(--th-sans);
	color: var(--th-ink);
}

.th-home h2,
.th-home h3,
.th-home p {
	margin: 0;
	padding: 0;
	letter-spacing: 0;
	text-transform: none;
}

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

.th-section {
	padding: 24px;
}

.th-clamp-2,
.th-clamp-3 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.th-clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.th-clamp-3 { -webkit-line-clamp: 3; line-clamp: 3; }

/* Cả thẻ bấm được: link tiêu đề phủ toàn thẻ */
.th-stretched::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

.th-meta {
	font-weight: 500;
	font-size: 11px;
	line-height: 14px;
	letter-spacing: .22px;
	color: var(--th-meta);
}

.th-link {
	font-weight: 600;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: .48px;
	white-space: nowrap;
	color: var(--th-primary);
}

.th-link--bold { font-weight: 700; }

.th-link--plain {
	font-weight: 400;
	font-size: 13px;
	line-height: 20px;
	letter-spacing: 0;
}

.th-link:hover {
	color: var(--th-primary);
	text-decoration: underline;
}

/* ---------- Hero: spotlight (8 cột) + đề cử (4 cột) ---------- */

.th-hero {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 24px;
	align-items: start;
}

.th-spotlight {
	grid-column: 1 / span 8;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
}

.th-spotlight__media {
	position: relative;
	/* Ảnh phủ kín cả thẻ (420 ảnh + 92 thanh nút của thiết kế gộp làm một) */
	height: 512px;
	overflow: hidden;
	background: var(--th-placeholder);
}

.th-spotlight__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.th-spotlight__overlay {
	position: absolute;
	inset: 0;
	/* Tối dần xuống đáy để chữ + thanh tác giả/nút đè trên ảnh vẫn đọc rõ */
	background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .55) 35%, rgba(0, 0, 0, .15) 65%, rgba(0, 0, 0, 0) 100%);
}

/* Con dấu đỏ: chữ Hán dọc (để trống nếu bài không có) */
.th-seal {
	position: absolute;
	top: 16px;
	right: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 56px;
	background: rgba(157, 3, 24, .9);
	border-radius: 2px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
	writing-mode: vertical-rl;
	font-family: 'Noto Serif SC', 'Microsoft YaHei', 'PingFang SC', serif;
	font-size: 11px;
	line-height: 1;
	letter-spacing: 1px;
	color: #fef3c7;
	overflow: hidden;
}

.th-spotlight__content {
	position: absolute;
	right: 24px;
	bottom: 24px;
	left: 24px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.th-spotlight__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.th-home .th-spotlight__title {
	font-family: var(--th-serif);
	font-weight: 700;
	font-size: 32px;
	line-height: 40px;
	letter-spacing: -.8px;
	color: #fff;
	text-shadow: 0 2px 1px rgba(0, 0, 0, .06), 0 4px 1.5px rgba(0, 0, 0, .07);
}

.th-home .th-spotlight__quote {
	max-width: 672px;
	font-style: italic;
	font-size: 15px;
	line-height: 24px;
	color: rgba(255, 255, 255, .95);
	text-shadow: 0 1px .5px rgba(0, 0, 0, .06), 0 1px 1px rgba(0, 0, 0, .1);
}

.th-spotlight__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, .2);
}

.th-spotlight__author {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}

.th-avatar {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: rgba(255, 255, 255, .15);
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 9999px;
	font-family: var(--th-serif);
	font-weight: 700;
	font-size: 18px;
	color: #fff;
}

.th-spotlight__author-name {
	font-weight: 600;
	font-size: 16px;
	line-height: 24px;
	color: #fff;
}

.th-home .th-btn {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 4px;
	padding: 8px 16px;
	background: var(--th-primary);
	border-radius: 8px;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .05));
	font-weight: 600;
	font-size: 16px;
	line-height: 24px;
	color: #fff;
	transition: background-color .15s;
}

.th-home .th-btn:hover {
	background: #7f0213;
	color: #fff;
}

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

.th-picks {
	grid-column: 9 / span 4;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-bottom: 4px;
}

.th-picks__head,
.th-block__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.th-home .th-picks__title {
	display: flex;
	align-items: center;
	gap: 4px;
	font-family: var(--th-serif);
	font-weight: 700;
	font-size: 20px;
	line-height: 28px;
	color: var(--th-ink);
}

.th-dot {
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	background: var(--th-primary);
	border-radius: 9999px;
}

.th-pick {
	position: relative;
	display: flex;
	gap: 16px;
	padding: 16px;
	background: #fff;
	border-radius: 12px;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .05));
}

.th-pick__cover {
	flex-shrink: 0;
	width: 80px;
	height: 112px;
	overflow: hidden;
	background: var(--th-placeholder);
	border-radius: 8px;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
}

.th-pick__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.th-pick__body {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
}

.th-home .th-pick__title {
	margin-bottom: 2px;
	font-family: var(--th-serif);
	font-weight: 700;
	font-size: 16px;
	line-height: 24px;
}

.th-home .th-pick__title a,
.th-home .th-card__title a {
	color: var(--th-ink);
}

.th-home .th-pick:hover .th-pick__title a,
.th-home .th-card:hover .th-card__title a {
	color: var(--th-primary);
}

.th-home .th-pick__excerpt,
.th-home .th-card__excerpt {
	font-size: 13px;
	line-height: 20px;
	color: var(--th-muted);
}

.th-pick__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding-top: 4px;
}

/* ---------- Khối lưới: Tóm tắt truyện / Thể loại ---------- */

.th-lists {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.th-block {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.th-block__head {
	padding-bottom: 4px;
}

.th-home .th-block__title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--th-serif);
	font-weight: 700;
	font-size: 24px;
	line-height: 34px;
	color: var(--th-ink);
}

.th-bar {
	flex-shrink: 0;
	width: 10px;
	height: 24px;
	background: var(--th-primary);
	border-radius: 9999px;
}

.th-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	align-items: stretch;
}

.th-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 16px;
	background: #fff;
	border-radius: 12px;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .05));
}

.th-card__media {
	position: relative;
	height: 176px;
	margin-bottom: 8px;
	overflow: hidden;
	background: var(--th-placeholder);
	border-radius: 8px;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
}

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

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

.th-badge {
	position: absolute;
	bottom: 8px;
	left: 8px;
	padding: 2px 8px;
	background: rgba(0, 0, 0, .75);
	border-radius: 4px;
	font-weight: 500;
	font-size: 11px;
	line-height: 14px;
	letter-spacing: .22px;
	color: #fff;
}

.th-home .th-card__title {
	padding-top: 4px;
	font-family: var(--th-serif);
	font-weight: 700;
	font-size: 16px;
	line-height: 24px;
}

.th-home .th-card__excerpt {
	padding-top: 6px;
	margin-bottom: 16px;
}

.th-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: auto;
	padding-top: 5px;
	border-top: 1px solid var(--th-line);
}

.th-card__read {
	margin-left: auto; /* vẫn nằm bên phải khi thẻ không có tên tác giả */
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 600;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: .48px;
	color: var(--th-primary);
}

.th-card__read img {
	display: block;
	margin: 0;
}

/* ---------- Tablet / mobile (breakpoint Flatsome) ---------- */

/* Lưới 4 cột quá hẹp dưới ~1024px: về 2 cột (8 bài chia đều 4 hàng) */
@media (max-width: 1023px) {
	.th-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 849px) {
	.th-section {
		padding: 16px;
	}

	.th-hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.th-spotlight,
	.th-picks {
		grid-column: 1;
	}

	.th-spotlight__media {
		height: 440px;
	}

	.th-spotlight__content {
		right: 16px;
		bottom: 16px;
		left: 16px;
		gap: 16px;
	}

	.th-home .th-spotlight__title {
		font-size: 26px;
		line-height: 32px;
	}

	.th-home .th-spotlight__quote {
		font-size: 14px;
		line-height: 22px;
	}

	.th-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 549px) {
	.th-spotlight__bar {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding-top: 12px;
	}

	.th-spotlight__bar > span:empty {
		display: none;
	}

	.th-home .th-btn {
		justify-content: center;
	}

	.th-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
