/**
 * Giao diện blog VCE — Lớp 4.
 * Mọi giá trị thị giác lấy từ biến trong vce-theme.css.
 * Tiền tố vv- và khai báo tường minh để RealHome/BetterDocs không đá vào.
 */

/* ================= Archive ================= */

.vv-archive {
	background: var(--vv-surface-alt);
	padding: var(--vv-gap-xl) var(--vv-gap);
}

.vv-archive__inner {
	max-width: var(--vv-maxw);
	margin: 0 auto;
}

.vv-archive__head {
	margin: 0 0 var(--vv-gap-lg);
}

.vv-archive__title {
	font-size: var(--vv-fs-xl) !important;
	line-height: var(--vv-lh-tight) !important;
	font-weight: 800 !important;
	color: var(--vv-ink) !important;
	margin: 0 !important;
	padding: 0 !important;
	text-transform: none !important;
}

.vv-archive__desc {
	font-size: var(--vv-fs-base);
	line-height: var(--vv-lh);
	color: var(--vv-ink-soft);
	margin-top: var(--vv-gap-sm);
	max-width: 72ch;
}

/* ================= Hero ================= */

.vv-hero {
	margin: 0 0 var(--vv-gap-lg);
}

.vv-hero__link {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	background: var(--vv-surface);
	border: 1px solid var(--vv-line);
	border-radius: var(--vv-radius-lg);
	overflow: hidden;
	text-decoration: none !important;
	box-shadow: var(--vv-shadow);
}

.vv-hero__img {
	display: block;
	min-height: 280px;
	background-size: cover;
	background-position: center;
	background-color: var(--vv-surface-alt);
}

.vv-hero__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--vv-gap-xs);
	padding: var(--vv-gap-lg);
}

.vv-hero__eyebrow {
	display: inline-block;
	align-self: flex-start;
	font-size: var(--vv-fs-xs);
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--vv-accent);
	background: var(--vv-accent-soft);
	border-radius: var(--vv-radius-pill);
	padding: 3px 10px;
}

.vv-hero__title {
	font-size: var(--vv-fs-lg);
	line-height: var(--vv-lh-tight);
	font-weight: 800;
	color: var(--vv-ink);
}

.vv-hero__excerpt {
	font-size: var(--vv-fs-base);
	line-height: var(--vv-lh);
	color: var(--vv-ink-soft);
}

.vv-hero__meta {
	font-size: var(--vv-fs-sm);
	color: var(--vv-ink-mute);
	margin-top: var(--vv-gap-xs);
}

/* ================= Filter ================= */

.vv-filter {
	display: flex;
	flex-direction: column;
	gap: var(--vv-gap-sm);
	margin: 0 0 var(--vv-gap-lg);
}

.vv-filter__row {
	display: flex;
	align-items: baseline;
	gap: var(--vv-gap-sm);
	flex-wrap: wrap;
}

.vv-filter__label {
	flex: 0 0 auto;
	font-size: var(--vv-fs-xs);
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--vv-ink-mute);
	min-width: 68px;
}

.vv-filter__chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--vv-gap-xs);
}

.vv-chip {
	display: inline-block;
	font-size: var(--vv-fs-sm) !important;
	line-height: 1.2 !important;
	padding: 6px 12px;
	border-radius: var(--vv-radius-pill);
	border: 1px solid var(--vv-line);
	background: var(--vv-surface);
	color: var(--vv-ink-soft) !important;
	text-decoration: none !important;
}

.vv-chip:hover {
	border-color: var(--vv-line-strong);
}

.vv-chip.is-active {
	background: var(--vv-accent);
	border-color: var(--vv-accent);
	color: var(--vv-accent-ink) !important;
}

/* ================= Grid ================= */

.vv-grid {
	display: grid;
	grid-template-columns: repeat(var(--vv-cols), minmax(0, 1fr));
	gap: var(--vv-gap);
}

.vv-card {
	display: flex;
	flex-direction: column;
	background: var(--vv-surface);
	border: 1px solid var(--vv-line);
	border-radius: var(--vv-radius);
	overflow: hidden;
	text-decoration: none !important;
	color: var(--vv-ink) !important;
}

.vv-card:hover {
	border-color: var(--vv-line-strong);
	box-shadow: var(--vv-shadow);
}

.vv-card__img {
	display: block;
	width: 100%;
	padding-top: 56%;
	background-size: cover;
	background-position: center;
	background-color: var(--vv-surface-alt);
}

.vv-card__img.is-empty {
	background-image: linear-gradient(135deg, var(--vv-surface-alt), var(--vv-line));
}

.vv-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--vv-gap-xs);
	padding: var(--vv-gap);
	flex: 1 1 auto;
}

.vv-card__title {
	font-size: var(--vv-fs-md);
	line-height: var(--vv-lh-tight);
	font-weight: 700;
}

.vv-card__excerpt {
	font-size: var(--vv-fs-sm);
	line-height: var(--vv-lh);
	color: var(--vv-ink-soft);
}

.vv-card__meta {
	font-size: var(--vv-fs-xs);
	color: var(--vv-ink-mute);
	margin-top: auto;
	padding-top: var(--vv-gap-xs);
}

.vv-empty {
	font-size: var(--vv-fs-base) !important;
	color: var(--vv-ink-mute) !important;
	padding: var(--vv-gap-lg);
	text-align: center;
	border: 1px dashed var(--vv-line);
	border-radius: var(--vv-radius);
}

/* ================= TOC ================= */

.vv-toc {
	background: var(--vv-surface-alt);
	border: 1px solid var(--vv-line);
	border-radius: var(--vv-radius);
	padding: var(--vv-gap) var(--vv-gap-lg);
	margin: 0 0 var(--vv-gap-lg);
}

.vv-toc__head {
	font-size: var(--vv-fs-xs);
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--vv-ink-mute);
	margin-bottom: var(--vv-gap-sm);
}

.vv-toc__list {
	list-style: none !important;
	counter-reset: vvtoc;
	margin: 0 !important;
	padding: 0 !important;
}

.vv-toc__item {
	list-style: none !important;
	margin: 0 0 var(--vv-gap-xs) !important;
	padding: 0 !important;
	font-size: var(--vv-fs-base) !important;
	line-height: 1.45 !important;
}

.vv-toc__item--h3 {
	padding-left: var(--vv-gap) !important;
	font-size: var(--vv-fs-sm) !important;
}

.vv-toc__item a {
	color: var(--vv-ink-soft) !important;
	text-decoration: none !important;
}

.vv-toc__item a:hover,
.vv-toc__item.is-current a {
	color: var(--vv-accent) !important;
}

.vv-toc__item.is-current a {
	font-weight: 700 !important;
}

/* ================= Thanh tiến độ đọc ================= */

.vv-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--vv-progress-h);
	background: transparent;
	z-index: 9999;
	pointer-events: none;
}

.vv-progress__bar {
	display: block;
	height: 100%;
	width: 0;
	background: var(--vv-accent);
	transition: width .08s linear;
}

/* ================= Share ================= */

.vv-share {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--vv-gap-sm);
	margin: var(--vv-gap-lg) 0 0;
	padding-top: var(--vv-gap);
	border-top: 1px solid var(--vv-line);
}

.vv-share__label {
	font-size: var(--vv-fs-xs);
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--vv-ink-mute);
}

.vv-share__btn {
	font-size: var(--vv-fs-sm) !important;
	line-height: 1.2 !important;
	padding: 7px 14px;
	border-radius: var(--vv-radius-pill);
	border: 1px solid var(--vv-line);
	background: var(--vv-surface);
	color: var(--vv-ink-soft) !important;
	text-decoration: none !important;
	cursor: pointer;
}

.vv-share__btn:hover {
	border-color: var(--vv-line-strong);
}

.vv-share__btn--zalo {
	border-color: #0068ff;
	color: #0068ff !important;
}

.vv-share__btn--fb {
	border-color: #1877f2;
	color: #1877f2 !important;
}

/* ================= Hub ================= */

.vv-hub {
	margin: 0 0 var(--vv-gap-lg);
	background: var(--vv-surface);
	border: 1px solid var(--vv-line);
	border-radius: var(--vv-radius);
	padding: var(--vv-gap) var(--vv-gap-lg) var(--vv-gap-lg);
}

.vv-hub__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--vv-gap-sm);
	margin-bottom: var(--vv-gap-sm);
}

.vv-hub__title {
	font-size: var(--vv-fs-lg) !important;
	line-height: var(--vv-lh-tight) !important;
	font-weight: 800 !important;
	color: var(--vv-ink) !important;
	margin: 0 !important;
	padding: 0 !important;
	text-transform: none !important;
}

.vv-hub__count {
	font-size: var(--vv-fs-xs);
	color: var(--vv-ink-mute);
	white-space: nowrap;
}

.vv-hub__list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	counter-reset: vvhub;
}

.vv-hub__item {
	list-style: none !important;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--vv-gap);
	padding: var(--vv-gap-sm) 0 !important;
	margin: 0 !important;
	border-bottom: 1px solid var(--vv-line);
	font-size: var(--vv-fs-base) !important;
	line-height: 1.45 !important;
}

.vv-hub__item:last-child {
	border-bottom: 0;
}

.vv-hub__item a {
	color: var(--vv-ink) !important;
	text-decoration: none !important;
}

.vv-hub__item a:hover {
	color: var(--vv-accent) !important;
}

.vv-hub__date {
	flex: 0 0 auto;
	font-size: var(--vv-fs-xs);
	color: var(--vv-ink-mute);
}

/* ================= Responsive ================= */

@media (max-width: 1024px) {
	:root {
		--vv-cols: 2;
	}
}

@media (max-width: 700px) {
	:root {
		--vv-cols: 1;
		--vv-fs-xl: 24px;
		--vv-fs-lg: 19px;
	}

	.vv-archive {
		padding: var(--vv-gap-lg) var(--vv-gap-sm);
	}

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

	.vv-hero__img {
		min-height: 190px;
	}

	.vv-filter__label {
		min-width: 0;
		width: 100%;
	}

	.vv-hub__item {
		flex-direction: column;
		gap: 2px;
	}
}
