/*
 * HinhAnhDep4K – style chuyển từ mockup UI/code.html (Tailwind) sang CSS thuần.
 * Mọi thành phần nằm trong .hd-ui để không đụng tới style của Flatsome ở các trang khác.
 */

:root {
	--hd-accent: #ff4d6d;
	--hd-accent-2: #ff758f;
	--hd-pink: #e879a5;
	--hd-bg: #fff5f8;
	--hd-soft: #fce4ec;
	--hd-border: #f3d7e2;
	--hd-ink: #2b2d42;
	--hd-muted: #777;
	--hd-subtle: #8d99ae;
	--hd-gradient: linear-gradient(135deg, var(--hd-accent-2) 0%, var(--hd-accent) 100%);
	--hd-font: "Public Sans", system-ui, sans-serif;
	--hd-shadow-sm: 0 1px 2px rgba(43, 45, 66, .06);
	--hd-shadow-md: 0 4px 12px rgba(43, 45, 66, .08);
	--hd-shadow-lg: 0 12px 28px rgba(43, 45, 66, .12);
	--hd-header-h: 80px;
}

/* ---------- Nền chung ---------- */

body.hd4k-site,
body.hd4k-site #wrapper,
body.hd4k-site #main {
	background-color: var(--hd-bg);
}

body.hd4k-site ::selection {
	background: rgba(255, 117, 143, .2);
	color: var(--hd-accent);
}

/* ---------- Reset trong .hd-ui (ghi đè style phần tử mặc định của Flatsome) ---------- */

.hd-ui {
	font-family: var(--hd-font);
	color: var(--hd-ink);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.hd-ui :where(h1, h2, h3, h4, p, ul, li, figure) {
	margin: 0;
	padding: 0;
	width: auto;
	color: inherit;
	font-family: inherit;
	list-style: none;
}

.hd-ui :where(a) {
	color: inherit;
	text-decoration: none;
}

.hd-ui :where(a):hover {
	color: inherit;
}

.hd-ui :where(button) {
	margin: 0;
	min-height: 0;
	min-width: 0;
	padding: 0;
	line-height: inherit;
	letter-spacing: normal;
	text-transform: none;
	font-weight: inherit;
	border: 0;
	background: none;
}

.hd-ui :where(form) {
	margin: 0;
}

.hd-ui :where(img) {
	display: block;
}

.hd-ui .material-symbols-outlined {
	font-size: 1.15em;
	line-height: 1;
	vertical-align: middle;
}

.hd-container {
	width: 100%;
	max-width: 1360px;
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
}

/* ---------- Thành phần dùng chung ---------- */

.hd-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.hd-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--hd-soft), var(--hd-bg));
	color: var(--hd-accent-2);
	font-size: 40px;
}

.hd-gradient-text {
	background: linear-gradient(90deg, var(--hd-accent), var(--hd-accent-2), var(--hd-pink));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hd-badge {
	display: inline-flex;
	align-items: center;
	width: max-content;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
	background: var(--hd-accent);
	box-shadow: var(--hd-shadow-sm);
}

.hd-badge.is-dark { background: var(--hd-ink); }
.hd-badge.is-pink { background: var(--hd-pink); }
.hd-badge.is-soft { background: var(--hd-soft); color: var(--hd-accent); box-shadow: none; }

.hd-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .8);
	border: 1px solid var(--hd-border);
	font-size: 12px;
	font-weight: 600;
	color: var(--hd-accent);
}

.hd-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
	font-weight: 700;
	color: var(--hd-accent);
	white-space: nowrap;
}

.hd-link:hover {
	color: var(--hd-accent);
	text-decoration: underline;
}

.hd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 999px;
	font-family: var(--hd-font);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
	cursor: pointer;
	transition: all .2s ease;
}

.hd-btn--gradient {
	background: var(--hd-gradient);
	color: #fff;
	box-shadow: var(--hd-shadow-sm);
}

.hd-btn--gradient:hover {
	color: #fff;
	opacity: .95;
	box-shadow: var(--hd-shadow-md);
}

.hd-btn--soft {
	background: var(--hd-bg);
	border: 1px solid var(--hd-border);
	color: var(--hd-accent);
}

.hd-btn--soft:hover,
.hd-btn--outline:hover {
	background: var(--hd-accent);
	border-color: var(--hd-accent);
	color: #fff;
}

.hd-btn--outline {
	width: 100%;
	padding: 8px 12px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid var(--hd-border);
	color: var(--hd-ink);
	font-size: 12px;
}

/* ---------- Ô tìm kiếm ---------- */

.hd-search {
	position: relative;
	display: flex;
	align-items: center;
}

.hd-ui input.hd-search__input {
	flex: 1;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 8px 40px 8px 16px;
	border: 1px solid var(--hd-border);
	border-radius: 999px;
	background: var(--hd-bg);
	box-shadow: none;
	font-family: var(--hd-font);
	font-size: 12px;
	color: var(--hd-ink);
	transition: border-color .2s, box-shadow .2s;
}

.hd-ui input.hd-search__input::placeholder {
	color: var(--hd-subtle);
}

.hd-ui input.hd-search__input:focus {
	background: var(--hd-bg);
	border-color: var(--hd-accent-2);
	box-shadow: 0 0 0 3px rgba(255, 117, 143, .25);
	color: var(--hd-ink);
	outline: 0;
}

.hd-search__btn {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	color: var(--hd-accent-2);
	cursor: pointer;
}

.hd-search__btn:hover {
	color: var(--hd-accent);
}

.hd-search--header {
	width: 256px;
}

/* Hero: ô tìm kiếm lớn có nút gradient */
.hd-search--hero {
	max-width: 576px;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--hd-border);
	border-radius: 999px;
	box-shadow: var(--hd-shadow-md);
}

.hd-search__lead {
	margin-left: 12px;
	color: var(--hd-subtle);
	font-size: 24px !important;
}

.hd-ui .hd-search--hero input.hd-search__input,
.hd-ui .hd-search--hero input.hd-search__input:focus {
	padding: 8px 12px;
	border: 0;
	background: transparent;
	box-shadow: none;
	font-size: 14px;
}

.hd-search--hero .hd-search__btn {
	position: static;
	transform: none;
	flex-shrink: 0;
	padding: 12px 28px;
	border-radius: 999px;
	background: var(--hd-gradient);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	box-shadow: var(--hd-shadow-sm);
}

.hd-search--hero .hd-search__btn:hover {
	color: #fff;
	opacity: .9;
}

.hd-ui .hd-search--footer input.hd-search__input {
	background: #fff;
	border-radius: 12px;
}

/* ---------- Header ---------- */

.hd-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .95);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--hd-border);
	box-shadow: var(--hd-shadow-sm);
}

.admin-bar .hd-header { top: 32px; }

@media (max-width: 782px) {
	.admin-bar .hd-header { top: 46px; }
}

@media (max-width: 600px) {
	.admin-bar .hd-header { top: 0; }
}

.hd-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	height: var(--hd-header-h);
}

.hd-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	transition: transform .2s;
}

.hd-logo:hover {
	transform: scale(1.03);
}

.hd-logo__img {
	width: auto;
	height: 44px;
	object-fit: contain;
}

.hd-logo__text {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -.01em;
	color: var(--hd-ink);
}

.hd-logo--footer .hd-logo__img {
	height: 40px;
}

.hd-nav__list {
	display: flex;
	align-items: center;
	gap: 32px;
}

.hd-nav .menu-item {
	margin: 0;
}

.hd-nav .menu-item > a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding-bottom: 6px;
	border-bottom: 2px solid transparent;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: .01em;
	color: var(--hd-muted);
	transition: all .2s;
}

.hd-nav .menu-item > a:hover {
	color: var(--hd-accent);
	border-bottom-color: rgba(255, 77, 109, .4);
}

.hd-nav .current-menu-item > a,
.hd-nav .current-menu-item > a:hover {
	color: var(--hd-accent);
	font-weight: 700;
	border-bottom-color: var(--hd-accent);
}

/* Thêm class "menu-hot" cho mục menu để hiện nhãn HOT */
.hd-nav .menu-hot > a::after {
	content: "HOT";
	padding: 2px 6px;
	border-radius: 999px;
	background: var(--hd-accent);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.2;
}

.hd-nav__search {
	display: none;
}

.hd-header__actions {
	display: flex;
	align-items: center;
	gap: 16px;
}

.hd-header__toggle {
	display: none;
	padding: 8px;
	border-radius: 999px;
	color: var(--hd-ink);
	font-size: 26px;
	cursor: pointer;
}

.hd-header__toggle:hover {
	background: var(--hd-soft);
	color: var(--hd-accent);
}

@media (max-width: 1023px) {
	.hd-header__actions .hd-search--header { display: none; }
}

@media (max-width: 767px) {
	:root { --hd-header-h: 64px; }

	.hd-header__toggle { display: flex; }

	.hd-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		padding: 16px 24px 24px;
		background: #fff;
		border-bottom: 1px solid var(--hd-border);
		box-shadow: var(--hd-shadow-lg);
	}

	.hd-nav.is-open { display: block; }

	.hd-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 4px;
	}

	.hd-nav .menu-item > a {
		display: flex;
		padding: 10px 0;
		border-bottom: 1px solid var(--hd-bg);
	}

	.hd-nav__search {
		display: block;
		margin-top: 16px;
	}

	.hd-ui .hd-search--mobile input.hd-search__input {
		padding-top: 12px;
		padding-bottom: 12px;
		font-size: 14px;
	}
}

/* ---------- Trang chủ ---------- */

.hd-home__inner {
	display: flex;
	flex-direction: column;
	gap: 64px;
	padding-top: 32px;
	padding-bottom: 32px;
}

/* Hero */
.hd-hero {
	display: grid;
	grid-template-columns: 7fr 5fr;
	gap: 48px;
	align-items: center;
	padding: 56px;
	border-radius: 32px;
	border: 1px solid var(--hd-border);
	background: linear-gradient(to bottom right, var(--hd-soft), var(--hd-bg), #fff);
	box-shadow: var(--hd-shadow-sm);
	overflow: hidden;
}

.hd-hero__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
}

.hd-hero__content > .hd-search { align-self: stretch; }

.hd-hero__title {
	font-size: 46px;
	font-weight: 800;
	line-height: 1.2;
	color: var(--hd-ink);
}

.hd-hero__lead {
	max-width: 576px;
	font-size: 18px;
	line-height: 1.65;
	color: var(--hd-muted);
}

.hd-hero__pills {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.hd-hero__pills-label {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 500;
	color: var(--hd-subtle);
}

.hd-hero__pills-label .material-symbols-outlined {
	color: var(--hd-accent);
}

.hd-pill {
	padding: 4px 12px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--hd-border);
	font-size: 12px;
	color: var(--hd-ink);
	transition: all .2s;
}

.hd-pill:hover {
	background: var(--hd-accent);
	border-color: var(--hd-accent);
	color: #fff;
}

.hd-hero__collage {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.hd-hero__col {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.hd-hero__col + .hd-hero__col { padding-top: 24px; }

.hd-tile {
	position: relative;
	display: block;
	border-radius: 16px;
	border: 2px solid #fff;
	overflow: hidden;
	box-shadow: var(--hd-shadow-lg);
}

.hd-tile__media {
	display: block;
	width: 100%;
	height: 100%;
}

.hd-tile:hover .hd-img { transform: scale(1.05); }

.hd-tile.is-1 { height: 224px; }
.hd-tile.is-2 { height: 176px; }
.hd-tile.is-3 { height: 176px; }
.hd-tile.is-4 { height: 192px; }

.hd-tile.is-framed {
	padding: 8px;
	background: #fff;
	box-shadow: var(--hd-shadow-md);
}

.hd-tile.is-framed .hd-tile__media {
	border: 1px solid var(--hd-border);
	border-radius: 12px;
	overflow: hidden;
}

.hd-tile.is-framed .hd-img { object-fit: contain; background: #fff; }

.hd-tile__badge {
	position: absolute;
	left: 8px;
	bottom: 8px;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .6);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff;
	font-size: 10px;
	font-weight: 600;
}

.hd-tile.is-2 .hd-tile__badge { background: var(--hd-accent); left: 14px; bottom: 14px; }
.hd-tile.is-3 .hd-tile__badge { top: 8px; right: 8px; left: auto; bottom: auto; background: var(--hd-accent); font-weight: 700; }

.hd-tile__caption {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: 12px;
	background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent 60%);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.35;
}

.hd-hero__float {
	position: absolute;
	top: -16px;
	left: -24px;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border-radius: 16px;
	background: rgba(255, 255, 255, .9);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border: 1px solid var(--hd-border);
	box-shadow: var(--hd-shadow-lg);
}

.hd-hero__float-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--hd-gradient);
	color: #fff;
	font-size: 22px;
}

.hd-hero__float strong {
	display: block;
	font-size: 12px;
	color: var(--hd-ink);
}

.hd-hero__float small {
	display: block;
	font-size: 10px;
	font-weight: 500;
	color: var(--hd-accent);
}

/* Tiêu đề khối */
.hd-section {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.hd-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--hd-border);
}

.hd-section__head.is-plain {
	padding-bottom: 0;
	border-bottom: 0;
}

.hd-section__heading {
	display: flex;
	align-items: center;
	gap: 12px;
}

.hd-section__bar {
	flex-shrink: 0;
	width: 12px;
	height: 32px;
	border-radius: 999px;
	background: var(--hd-gradient);
}

.hd-section__bar.is-pink { background: var(--hd-pink); }

.hd-section__title {
	font-size: 30px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--hd-ink);
}

.hd-section__desc {
	margin-top: 4px;
	font-size: 14px;
	color: var(--hd-muted);
}

.hd-panel {
	padding: 40px;
	border-radius: 32px;
	background: #fff;
	border: 1px solid var(--hd-border);
	box-shadow: var(--hd-shadow-sm);
	gap: 32px;
}

.hd-grid {
	display: grid;
	gap: 24px;
}

.hd-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hd-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.hd-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 48px 16px;
	border-radius: 16px;
	border: 1px dashed var(--hd-border);
	background: rgba(255, 255, 255, .6);
	font-size: 14px;
	font-weight: 600;
	color: var(--hd-subtle);
}

.hd-empty .material-symbols-outlined { color: var(--hd-accent-2); }

/* Thẻ chủ đề */
.hd-topic {
	display: flex;
	flex-direction: column;
	padding: 24px;
	border-radius: 24px;
	background: #fff;
	border: 1px solid var(--hd-border);
	transition: all .3s;
}

.hd-topic:hover {
	border-color: var(--hd-accent-2);
	box-shadow: var(--hd-shadow-lg);
}

.hd-topic__media {
	position: relative;
	display: block;
	height: 192px;
	margin-bottom: 20px;
	border-radius: 16px;
	overflow: hidden;
}

.hd-topic:hover .hd-img { transform: scale(1.05); }

.hd-topic__media .hd-badge {
	position: absolute;
	top: 12px;
	left: 12px;
}

.hd-topic__title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.hd-topic__title a { transition: color .2s; }
.hd-topic:hover .hd-topic__title a { color: var(--hd-accent); }

/* Khoảng cách tối thiểu 16px phía trên phần chân thẻ, dù có mô tả hay không */
.hd-topic__title,
.hd-topic__desc {
	padding-bottom: 16px;
}

.hd-topic__desc {
	margin-top: -8px;
	font-size: 14px;
	line-height: 1.65;
	color: var(--hd-muted);
}

.hd-topic__foot {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin-top: auto;
	padding-top: 20px;
	border-top: 1px solid rgba(243, 215, 226, .6);
	font-size: 12px;
	font-weight: 600;
	color: var(--hd-subtle);
}

.hd-topic__foot .hd-link { transition: transform .2s; }
.hd-topic:hover .hd-topic__foot .hd-link { transform: translateX(4px); }

/* Thẻ Anime */
.hd-card {
	border-radius: 16px;
	background: #fff;
	border: 1px solid var(--hd-border);
	overflow: hidden;
	transition: box-shadow .3s;
}

.hd-card:hover { box-shadow: var(--hd-shadow-lg); }

.hd-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
}

.hd-card:hover .hd-img { transform: scale(1.05); }

.hd-card__tag,
.hd-card__hd {
	position: absolute;
	top: 10px;
	padding: 2px 8px;
	border-radius: 999px;
	color: #fff;
	font-size: 10px;
	font-weight: 600;
}

.hd-card__tag {
	left: 10px;
	background: rgba(0, 0, 0, .6);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.hd-card__hd {
	right: 10px;
	background: var(--hd-accent);
	font-weight: 700;
}

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

.hd-card__title,
.hd-coloring__title {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hd-card__title a { transition: color .2s; }
.hd-card:hover .hd-card__title a { color: var(--hd-accent); }

.hd-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 11px;
	color: var(--hd-subtle);
}

.hd-card__meta > span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

/* Thẻ tranh tô màu */
.hd-coloring {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 16px;
	border-radius: 16px;
	background: var(--hd-bg);
	border: 1px solid var(--hd-border);
	transition: box-shadow .3s;
}

.hd-coloring:hover { box-shadow: var(--hd-shadow-md); }

.hd-coloring__media {
	display: block;
	aspect-ratio: 3 / 4;
	margin-bottom: 16px;
	padding: 12px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid rgba(243, 215, 226, .7);
	overflow: hidden;
}

.hd-coloring__media .hd-img { object-fit: contain; transition-duration: .3s; }
.hd-coloring__media:hover .hd-img { transform: scale(1.05); }

.hd-coloring__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.hd-coloring__meta {
	font-size: 12px;
	color: var(--hd-muted);
}

/* Chibi bento */
.hd-bento {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: 220px;
	gap: 20px;
}

.hd-bento__item {
	position: relative;
	display: block;
	border-radius: 24px;
	border: 1px solid var(--hd-border);
	overflow: hidden;
	box-shadow: var(--hd-shadow-sm);
}

.hd-bento__item.is-feature {
	grid-column: span 2;
	grid-row: span 2;
}

.hd-bento__item:hover .hd-img { transform: scale(1.05); }

.hd-bento__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-start;
	padding: 16px;
	transition: background .3s;
}

.hd-bento__item:not(.is-feature):hover .hd-bento__overlay {
	background: rgba(255, 77, 109, .2);
}

.hd-bento__item.is-feature .hd-bento__overlay {
	gap: 8px;
	padding: 24px;
	background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, .2) 50%, transparent);
}

.hd-bento__title {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
}

.hd-bento__excerpt {
	max-width: 384px;
	font-size: 12px;
	color: rgba(255, 255, 255, .8);
}

.hd-bento__label {
	max-width: 100%;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .95);
	color: var(--hd-ink);
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	box-shadow: var(--hd-shadow-sm);
}

/* Chủ đề thịnh hành */
.hd-card-box {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 32px;
	border-radius: 24px;
	background: #fff;
	border: 1px solid var(--hd-border);
}

.hd-card-box__title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 18px;
	font-weight: 700;
}

.hd-card-box__title .material-symbols-outlined { color: var(--hd-accent); }

.hd-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.hd-tag {
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--hd-bg);
	border: 1px solid var(--hd-border);
	font-size: 12px;
	font-weight: 600;
	color: var(--hd-accent);
	transition: all .2s;
}

.hd-tag:hover {
	background: var(--hd-accent);
	border-color: var(--hd-accent);
	color: #fff;
}

/* Giới thiệu */
.hd-about {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding: 48px;
	border-radius: 24px;
	background: linear-gradient(to right, #fff, var(--hd-bg), #fff);
	border: 1px solid var(--hd-border);
	box-shadow: var(--hd-shadow-sm);
}

.hd-about__intro {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	max-width: 768px;
}

.hd-about__title {
	font-size: 30px;
	font-weight: 800;
	line-height: 1.25;
}

.hd-about__intro p {
	font-size: 16px;
	line-height: 1.65;
	color: var(--hd-muted);
}

.hd-feature {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 20px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid var(--hd-border);
}

.hd-feature__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--hd-soft);
	color: var(--hd-accent);
	font-size: 22px;
}

.hd-feature__title {
	font-size: 14px;
	font-weight: 700;
}

.hd-feature__desc {
	font-size: 12px;
	line-height: 1.65;
	color: var(--hd-muted);
}

/* ---------- Trang lưu trữ & bài viết ---------- */

.hd-page__inner {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding-top: 32px;
	padding-bottom: 32px;
}

/* Breadcrumb Rank Math: nav.rank-math-breadcrumb > p > a, span.separator, span.last */
.hd-breadcrumb {
	font-size: 13px;
	color: var(--hd-subtle);
}

.hd-breadcrumb .rank-math-breadcrumb p {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin: 0;
}

.hd-breadcrumb a { color: var(--hd-muted); }
.hd-breadcrumb a:hover { color: var(--hd-accent); }
.hd-breadcrumb .separator { color: var(--hd-subtle); }
.hd-breadcrumb .last { color: var(--hd-ink); font-weight: 600; }

/* Đầu trang danh mục */
.hd-page-head {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	align-items: center;
	padding: 40px 48px;
	border-radius: 32px;
	border: 1px solid var(--hd-border);
	background: linear-gradient(to bottom right, var(--hd-soft), var(--hd-bg), #fff);
	box-shadow: var(--hd-shadow-sm);
}

.hd-page-head.has-art { grid-template-columns: 1fr 360px; }

.hd-page-head__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.hd-page-head__title {
	font-size: 40px;
	font-weight: 800;
	line-height: 1.2;
}

.hd-page-head__desc {
	max-width: 640px;
	font-size: 16px;
	line-height: 1.65;
	color: var(--hd-muted);
}

.hd-page-head__art img {
	width: 100%;
	height: auto;
	border-radius: 24px;
	border: 4px solid #fff;
	box-shadow: var(--hd-shadow-lg);
}

/* Phân trang */
.hd-pagination {
	margin-top: 32px;
}

.hd-pagination .nav-links,
.hd-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.hd-pagination .nav-links { margin: 0; }
.hd-pagination .screen-reader-text { position: absolute; clip: rect(0 0 0 0); width: 1px; height: 1px; overflow: hidden; }

.hd-pagination .page-numbers,
.hd-pagination .post-page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 999px;
	border: 1px solid var(--hd-border);
	background: #fff;
	font-size: 14px;
	font-weight: 600;
	color: var(--hd-ink);
	transition: all .2s;
}

.hd-pagination a.page-numbers:hover,
.hd-pagination a.post-page-numbers:hover {
	border-color: var(--hd-accent);
	color: var(--hd-accent);
}

.hd-pagination .page-numbers.current,
.hd-pagination .post-page-numbers.current {
	background: var(--hd-gradient);
	border-color: transparent;
	color: #fff;
}

.hd-pagination .page-numbers.dots { border: 0; background: none; }

/* Bài viết */
.hd-single__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	align-items: start;
}

.hd-single__layout.has-aside { grid-template-columns: minmax(0, 1fr) 320px; }

.hd-article {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding: 48px;
	border-radius: 32px;
	background: #fff;
	border: 1px solid var(--hd-border);
	box-shadow: var(--hd-shadow-sm);
}

.hd-article__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--hd-border);
}

.hd-article__head .hd-badge:hover { color: #fff; opacity: .9; }

.hd-article__title {
	font-size: 36px;
	font-weight: 800;
	line-height: 1.25;
}

.hd-article__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	font-size: 13px;
	color: var(--hd-subtle);
}

.hd-article__meta > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* Nội dung bài (HTML từ Classic Editor) */
.hd-entry {
	font-size: 17px;
	line-height: 1.75;
	color: #4a4c5e;
	overflow-wrap: break-word;
}

.hd-entry > * + * { margin-top: 1.1em; }

.hd-entry h2,
.hd-entry h3,
.hd-entry h4 {
	margin-top: 1.8em;
	color: var(--hd-ink);
	font-weight: 700;
	line-height: 1.3;
}

.hd-entry h2 { font-size: 26px; }
.hd-entry h3 { font-size: 21px; }
.hd-entry h4 { font-size: 18px; }

.hd-entry ul,
.hd-entry ol { padding-left: 1.4em; }
.hd-entry ul { list-style: disc; }
.hd-entry ol { list-style: decimal; }
.hd-entry li { list-style: inherit; margin: .4em 0 0; }

.hd-entry a { color: var(--hd-accent); }
.hd-entry a:hover { color: var(--hd-accent); text-decoration: underline; }

.hd-entry blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: 16px 20px;
	border-left: 4px solid var(--hd-accent-2);
	border-radius: 0 16px 16px 0;
	background: var(--hd-bg);
}

/* Ảnh trong bài: khung trắng bo góc, căn giữa, kèm nút tải (thêm bằng JS) */
.hd-entry p:has(> a > img),
.hd-entry p:has(> img) {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.hd-entry a:has(> img) {
	display: block;
	max-width: 720px;
	width: 100%;
}

.hd-entry img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	padding: 12px;
	box-sizing: border-box;
	border-radius: 20px;
	border: 1px solid var(--hd-border);
	background: #fff;
	box-shadow: var(--hd-shadow-sm);
	transition: box-shadow .3s;
}

.hd-entry a:hover > img { box-shadow: var(--hd-shadow-lg); }

/* Lưới ảnh do main.js gom từ các đoạn ảnh liền nhau */
.hd-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	align-items: start;
}

.hd-gallery > p { margin: 0; }

.hd-gallery a:has(> img) { max-width: none; }

.hd-gallery img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: contain;
}

/* Nhóm ảnh đa số là ảnh ngang */
.hd-gallery.is-landscape { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hd-gallery.is-landscape img { aspect-ratio: 16 / 10; }

.hd-entry .hd-dl {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	border-radius: 999px;
	border: 1px solid var(--hd-border);
	background: #fff;
	color: var(--hd-ink);
	font-size: 13px;
	font-weight: 700;
	transition: all .2s;
}

.hd-entry .hd-dl:hover {
	background: var(--hd-accent);
	border-color: var(--hd-accent);
	color: #fff;
	text-decoration: none;
}

/* Ô "Xem thêm" chèn vào nội dung (inc/related-links.php) */
.hd-related-link {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	padding: 14px 18px;
	border-radius: 16px;
	border: 1px solid var(--hd-border);
	border-left: 4px solid var(--hd-accent);
	background: var(--hd-bg);
	font-size: 15px;
	line-height: 1.5;
}

.hd-related-link .material-symbols-outlined { color: var(--hd-accent); }

.hd-related-link__label {
	font-weight: 700;
	color: var(--hd-ink);
}

.hd-entry .hd-related-link a {
	font-weight: 700;
	color: var(--hd-accent);
}

.hd-article__tags { padding-top: 24px; border-top: 1px solid var(--hd-border); }

/* Bài trước / sau */
.hd-postnav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.hd-postnav__item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 20px;
	border-radius: 16px;
	border: 1px solid var(--hd-border);
	background: var(--hd-bg);
	transition: all .2s;
}

.hd-postnav__item:hover { border-color: var(--hd-accent-2); box-shadow: var(--hd-shadow-md); }
.hd-postnav__item.is-next { grid-column: 2; text-align: right; align-items: flex-end; }

.hd-postnav__item small {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 700;
	color: var(--hd-accent);
}

.hd-postnav__item span:last-child {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--hd-ink);
}

/* Cột phụ */
.hd-aside {
	position: sticky;
	top: calc(var(--hd-header-h) + 24px);
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.admin-bar .hd-aside { top: calc(var(--hd-header-h) + 56px); }

.hd-aside__box {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	padding: 24px;
	border-radius: 24px;
	background: #fff;
	border: 1px solid var(--hd-border);
}

.hd-aside__box > .hd-search { align-self: stretch; }

.hd-aside__title {
	font-size: 18px;
	font-weight: 700;
}

.hd-aside__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-self: stretch;
}

.hd-aside__item {
	display: flex;
	align-items: center;
	gap: 12px;
}

.hd-aside__thumb {
	flex-shrink: 0;
	width: 64px;
	height: 64px;
	border-radius: 12px;
	border: 1px solid var(--hd-border);
	background: #fff;
	overflow: hidden;
}

.hd-aside__thumb .hd-img { object-fit: contain; }
.hd-aside__thumb .hd-placeholder { font-size: 24px; }

.hd-aside__name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--hd-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color .2s;
}

.hd-aside__item:hover .hd-aside__name { color: var(--hd-accent); }

.hd-comments {
	padding-bottom: 32px;
}

/* ---------- Footer ---------- */

.hd-footer {
	margin-top: 80px;
	background: rgba(252, 228, 236, .6);
	border-top: 1px solid var(--hd-border);
}

.hd-footer > .hd-container {
	padding-top: 56px;
	padding-bottom: 24px;
}

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

.hd-footer__col {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.hd-footer__col > .hd-search { align-self: stretch; }

.hd-footer__title {
	font-size: 14px;
	font-weight: 700;
	color: var(--hd-ink);
}

.hd-footer__text {
	font-size: 12px;
	line-height: 1.65;
	color: var(--hd-muted);
}

.hd-footer__links {
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-size: 12px;
	color: var(--hd-muted);
}

.hd-footer__links li { margin: 0; list-style: none; }

.hd-footer__links a {
	color: var(--hd-muted);
	text-underline-offset: 4px;
	transition: color .2s;
}

.hd-footer__links a:hover {
	color: var(--hd-accent);
	text-decoration: underline;
}

.hd-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 16px;
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--hd-border);
	font-size: 12px;
	color: var(--hd-muted);
}

/* Menu text link ở footer (vị trí "Footer – Text link") – ẩn khỏi người dùng theo yêu cầu chủ site */
.hd-footer__text-links {
	display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1023px) {
	.hd-hero {
		grid-template-columns: 1fr;
		padding: 40px 32px;
	}

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

	.hd-page-head.has-art { grid-template-columns: 1fr; }
	.hd-page-head__art { max-width: 480px; }

	.hd-single__layout.has-aside { grid-template-columns: minmax(0, 1fr); }
	.hd-aside { position: static; }
}

@media (max-width: 767px) {
	.hd-home__inner { gap: 48px; padding-top: 20px; }

	.hd-hero { padding: 32px 20px; border-radius: 24px; }
	.hd-hero__title { font-size: 34px; }
	.hd-hero__lead { font-size: 16px; }
	.hd-hero__float { display: none; }
	.hd-search--hero .hd-search__btn { padding: 10px 18px; }
	.hd-search__lead { display: none; }

	.hd-section__title,
	.hd-about__title { font-size: 24px; }
	.hd-section__head:not(.is-plain) { align-items: flex-end; }
	.hd-section__head.is-plain { flex-direction: column; align-items: flex-start; }

	.hd-panel,
	.hd-about { padding: 28px 20px; }

	.hd-grid--3 { grid-template-columns: 1fr; }

	.hd-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; gap: 12px; }

	.hd-footer__bottom { flex-direction: column; text-align: center; }

	.hd-page__inner { gap: 24px; padding-top: 20px; }
	.hd-page-head { padding: 28px 20px; border-radius: 24px; }
	.hd-page-head__title { font-size: 30px; }

	.hd-article { padding: 24px 16px; border-radius: 24px; gap: 24px; }
	.hd-article__title { font-size: 26px; }
	.hd-entry { font-size: 16px; }
	.hd-entry h2 { font-size: 22px; }
	.hd-entry img { padding: 6px; border-radius: 14px; }

	.hd-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.hd-gallery.is-landscape { grid-template-columns: 1fr; }
	.hd-entry .hd-dl { padding: 6px 12px; font-size: 12px; }

	.hd-postnav { grid-template-columns: 1fr; }
	.hd-postnav__item.is-next { grid-column: auto; }
}

@media (max-width: 549px) {
	.hd-container { padding: 0 16px; }

	.hd-grid--4,
	.hd-footer__grid { grid-template-columns: 1fr; }

	.hd-hero__collage,
	.hd-hero__col { gap: 12px; }
	.hd-tile.is-1 { height: 180px; }
	.hd-tile.is-2,
	.hd-tile.is-3 { height: 140px; }
	.hd-tile.is-4 { height: 150px; }
}
