/*!
Theme Name: Giải Nghĩa
Description: Theme cho website giải nghĩa thành ngữ, tục ngữ, ca dao Việt Nam: tra câu gợi ý tức thì, "Câu nên biết", nhóm có màu và biểu tượng, mục lục A–Z theo bảng chữ cái tiếng Việt, hộp trả lời nhanh, khổ thơ ca dao, mẹo nhớ, bài tập có đáp án và liên kết nội bộ tự động. Dựa trên theme Chính Tả (Underscores).
Version: 1.0.3
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: giainghia
Tags: blog, education, one-column, custom-logo, custom-menu, featured-images, block-patterns, block-styles

Giải Nghĩa is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.

Biến màu, font và giao diện các khối trong bài viết nằm ở assets/css/content.css.
*/

/*--------------------------------------------------------------
>>> MỤC LỤC:
----------------------------------------------------------------
# Nền tảng
# Bố cục
# Màu nhóm
# Header & menu
# Ô tìm kiếm
# Trang chủ: hero, Câu nên biết
# Thẻ nhóm, hàng chữ cái
# Thẻ bài, chip
# Breadcrumb & tiêu đề trang
# Trang nhóm
# Bài viết
# Bài liên quan, tác giả
# Mục lục A–Z
# Footer
# WordPress core & tiện ích
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Nền tảng
--------------------------------------------------------------*/
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {

	body {
		font-size: 1.125rem;
	}
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.5em;
	color: var(--c-text);
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.22;
	text-wrap: balance;
}

p {
	margin: 0 0 1.1em;
}

a {
	color: var(--c-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--c-seal-dark);
}

:focus-visible {
	outline: 3px solid var(--c-accent);
	outline-offset: 2px;
}

::selection {
	background: rgba(240, 180, 41, 0.45);
	color: var(--c-text);
}

img,
video {
	max-width: 100%;
	height: auto;
}

svg {
	flex: none;
}

button,
input,
select,
textarea {
	color: inherit;
	font: inherit;
}

button {
	cursor: pointer;
}

hr {
	height: 1px;
	margin: 2rem 0;
	border: 0;
	background: var(--c-line);
}

/*--------------------------------------------------------------
# Bố cục
--------------------------------------------------------------*/
:root {
	--gutter: 16px;
}

@media (min-width: 600px) {

	:root {
		--gutter: 24px;
	}
}

@media (min-width: 1024px) {

	:root {
		--gutter: 32px;
	}
}

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-main {
	flex: 1;
}

.container {
	width: 100%;
	max-width: calc(1140px + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--narrow {
	max-width: calc(740px + 2 * var(--gutter));
}

.container .container--narrow {
	max-width: 740px;
	margin-inline: 0;
	padding-inline: 0;
}

.section {
	padding: clamp(2.25rem, 5vw, 3.75rem) 0;
}

.section--alt {
	background: var(--c-surface);
	border-block: 1px solid var(--c-line);
}

.section--chips {
	padding-top: clamp(2rem, 4vw, 2.75rem);
}

.section--letters {
	padding-top: 0;
}

.section__head {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 1.35rem;
}

/* Tiêu đề khối: hình thoi son nhỏ phía trước, như dấu mở đầu trong sách cũ. */
.section__title {
	display: flex;
	gap: 0.65rem;
	align-items: center;
	margin: 0;
	font-size: clamp(1.55rem, 3.5vw, 2.05rem);
}

.section__title::before {
	content: "";
	flex: none;
	width: 0.42em;
	height: 0.42em;
	background: var(--c-seal);
	border-radius: 2px;
	transform: rotate(45deg);
}

.section__title--sm {
	margin-bottom: 0.9rem;
	font-size: 1.3rem;
}

a.section__more {
	display: inline-flex;
	gap: 0.35rem;
	align-items: center;
	font-size: 0.95rem;
	font-weight: 700;
	text-decoration: none;
}

a.section__more:hover {
	text-decoration: underline;
}

.eyebrow {
	display: inline-flex;
	gap: 0.5rem;
	align-items: center;
	margin: 0 0 0.6rem;
	color: var(--c-seal-dark);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	line-height: 1.4;
	text-transform: uppercase;
}

.eyebrow::before {
	content: "";
	width: 1.6rem;
	height: 2px;
	background: currentcolor;
}

/*--------------------------------------------------------------
# Màu nhóm (lớp tone-*: biến --tone, --tone-soft, --tone-ink)
--------------------------------------------------------------*/
.tone-son {
	--tone: #c8442b;
	--tone-soft: #fbe9e3;
	--tone-ink: #983220;
}

.tone-cham {
	--tone: #1f5c66;
	--tone-soft: #e2eff0;
	--tone-ink: #164650;
}

.tone-tim {
	--tone: #7b3f6e;
	--tone-soft: #f5e9f2;
	--tone-ink: #61304f;
}

.tone-luc {
	--tone: #3f7a45;
	--tone-soft: #e6f2e5;
	--tone-ink: #2d5c33;
}

.tone-vang {
	--tone: #b7790c;
	--tone-soft: #fcf0d3;
	--tone-ink: #7a5207;
}

.tone-lam {
	--tone: #2e6a9e;
	--tone-soft: #e4eef8;
	--tone-ink: #214f77;
}

.tone-nau {
	--tone: #8a5a2b;
	--tone-soft: #f4ebe0;
	--tone-ink: #664220;
}

/*--------------------------------------------------------------
# Header & menu
--------------------------------------------------------------*/
.site-header {
	position: relative;
	z-index: 20;
	background: var(--c-surface);
	border-bottom: 1px solid var(--c-line);
}

/* Dải hoa văn mảnh trên cùng: son – vàng – chàm. */
.site-header::before {
	content: "";
	display: block;
	height: 4px;
	background: linear-gradient(90deg, var(--c-seal) 0 50%, var(--c-accent) 50% 75%, var(--c-primary) 75% 100%);
}

.site-header__inner {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	min-height: 64px;
}

.site-branding {
	display: flex;
	gap: 0.85rem;
	align-items: center;
	min-width: 0;
	margin-right: auto;
}

/* Logo đã có tên site; khẩu hiệu nằm trong thẻ title và trang chủ, không chen vào header. */
.site-description {
	display: none;
}

.site-branding {
	flex: none;
}

.custom-logo-link {
	display: block;
	min-width: 0;
	max-width: 100%;
}

/* Logo ngang (≈ 4,6:1): thu nhỏ theo màn hình, co lại thay vì tràn khi header chật. */
.custom-logo-link img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 36px;
}

@media (max-width: 400px) {

	.custom-logo-link img {
		max-height: 30px;
	}

	/* Màn hình rất hẹp: nút menu chỉ còn biểu tượng (chữ "Menu" vẫn đọc được bằng trình đọc màn hình). */
	.menu-toggle span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}

	.menu-toggle {
		padding: 0;
	}
}

.menu-toggle,
.search-toggle {
	display: inline-flex;
	gap: 0.4rem;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 0.85rem;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: 999px;
	color: var(--c-text);
	font-size: 0.95rem;
	font-weight: 700;
}

.search-toggle {
	padding: 0;
}

.menu-toggle:hover,
.search-toggle:hover,
.menu-toggle[aria-expanded="true"],
.search-toggle[aria-expanded="true"] {
	background: var(--c-seal-soft);
	border-color: #f1c8bc;
	color: var(--c-seal-dark);
}

.main-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-navigation a {
	display: block;
	color: var(--c-text);
	font-weight: 700;
	text-decoration: none;
}

.header-search {
	order: 1;
}

.main-navigation {
	order: 2;
}

@media (max-width: 959px) {

	.main-navigation .menu {
		display: none;
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		max-height: calc(100vh - 68px);
		overflow-y: auto;
		padding: 0.5rem var(--gutter) 1rem;
		background: var(--c-surface);
		border-bottom: 1px solid var(--c-line);
		box-shadow: var(--shadow);
	}

	.main-navigation.toggled .menu {
		display: block;
	}

	.main-navigation .menu a {
		padding: 0.75rem 0.25rem;
		border-bottom: 1px solid var(--c-line);
	}

	.main-navigation .sub-menu {
		padding-left: 1rem;
	}

	.main-navigation .sub-menu a {
		font-weight: 400;
	}

	.header-search__panel {
		display: none;
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		padding: 0.75rem var(--gutter);
		background: var(--c-surface);
		border-bottom: 1px solid var(--c-line);
		box-shadow: var(--shadow);
	}

	.header-search__panel.is-open {
		display: block;
	}
}

@media (min-width: 960px) {

	.site-header__inner {
		gap: 1rem;
		min-height: 76px;
	}

	.custom-logo-link img {
		max-height: 44px;
	}

	.menu-toggle,
	.search-toggle {
		display: none;
	}

	.header-search,
	.main-navigation {
		order: 0;
	}

	.header-search__panel {
		width: 240px;
	}

	.main-navigation .menu {
		display: flex;
		gap: 0.15rem;
		align-items: center;
	}

	.main-navigation li {
		position: relative;
	}

	.main-navigation .menu > li > a {
		padding: 0.5rem 0.75rem;
		border-radius: 999px;
		font-size: 0.97rem;
		white-space: nowrap;
	}

	.main-navigation .menu > li > a:hover,
	.main-navigation .menu > .current-menu-item > a,
	.main-navigation .menu > .current-menu-ancestor > a {
		background: var(--c-seal-soft);
		color: var(--c-seal-dark);
	}

	.main-navigation .menu-item--a-z > a {
		font-family: var(--font-display);
		letter-spacing: 0.02em;
	}

	.main-navigation .menu-item-has-children > a::after {
		content: "";
		display: inline-block;
		width: 0.4em;
		height: 0.4em;
		margin-left: 0.45em;
		border-right: 2px solid currentcolor;
		border-bottom: 2px solid currentcolor;
		transform: translateY(-0.2em) rotate(45deg);
	}

	.main-navigation .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 30;
		min-width: 260px;
		padding: 0.5rem;
		background: var(--c-surface);
		border: 1px solid var(--c-line);
		border-radius: var(--radius);
		box-shadow: var(--shadow);
		opacity: 0;
		visibility: hidden;
		transform: translateY(6px);
		transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
	}

	/* Mục cuối nằm sát mép phải: menu con mở về bên trái để không tràn màn hình. */
	.main-navigation .menu > li:last-child > .sub-menu,
	.main-navigation .menu > li:nth-last-child(2) > .sub-menu {
		right: 0;
		left: auto;
	}

	.main-navigation .sub-menu .sub-menu {
		top: 0;
		left: 100%;
	}

	.main-navigation li:hover > .sub-menu,
	.main-navigation li.focus > .sub-menu,
	.main-navigation li:focus-within > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.main-navigation .sub-menu a {
		padding: 0.5rem 0.75rem;
		border-radius: var(--radius-sm);
		font-size: 0.95rem;
		font-weight: 400;
	}

	.main-navigation .sub-menu a:hover,
	.main-navigation .sub-menu .current-menu-item > a {
		background: var(--c-seal-soft);
		color: var(--c-seal-dark);
	}
}

/*--------------------------------------------------------------
# Ô tìm kiếm
--------------------------------------------------------------*/
.search-form {
	position: relative;
}

.search-form__field {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	padding: 0.25rem 0.25rem 0.25rem 0.9rem;
	background: var(--c-surface);
	border: 2px solid var(--c-line);
	border-radius: 999px;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.search-form__field:focus-within {
	border-color: var(--c-seal);
	box-shadow: 0 0 0 4px var(--c-seal-soft);
}

.search-form__field .icon {
	color: var(--c-muted);
}

.search-field {
	flex: 1;
	min-width: 0;
	padding: 0.45rem 0;
	background: transparent;
	border: 0;
	outline: 0;
	font-size: 1rem;
}

.search-field::placeholder {
	color: #9a8d82;
}

.search-field::-webkit-search-cancel-button {
	cursor: pointer;
}

.search-submit {
	flex: none;
	padding: 0.5rem 1.05rem;
	background: var(--grad-brand);
	border: 0;
	border-radius: 999px;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
}

.search-submit:hover {
	background: var(--grad-brand-hover);
}

.search-form--lg .search-form__field {
	padding: 0.45rem 0.45rem 0.45rem 1.2rem;
	border-width: 2px;
	border-color: var(--c-line-strong);
	box-shadow: 0 10px 0 -2px rgba(200, 68, 43, 0.12), var(--shadow);
}

.search-form--lg .search-form__field:focus-within {
	border-color: var(--c-seal);
	box-shadow: 0 10px 0 -2px rgba(200, 68, 43, 0.12), 0 0 0 4px var(--c-seal-soft);
}

.search-form--lg .search-field {
	padding: 0.7rem 0;
	font-size: 1.1rem;
}

.search-form--lg .search-submit {
	padding: 0.8rem 1.4rem;
	font-size: 1.05rem;
}

@media (max-width: 420px) {

	.search-form--lg .search-submit {
		padding: 0.75rem 1rem;
	}
}

.search-suggest {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	left: 0;
	z-index: 40;
	overflow: hidden;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	text-align: left;
}

.search-suggest[hidden] {
	display: none;
}

.search-suggest__list {
	margin: 0;
	padding: 0.35rem;
	list-style: none;
}

.search-suggest__list a {
	display: block;
	padding: 0.55rem 0.8rem;
	border-radius: var(--radius-sm);
	color: var(--c-text);
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
}

.search-suggest__list a:hover,
.search-suggest__list [aria-selected="true"] a {
	background: var(--c-seal-soft);
	color: var(--c-seal-dark);
}

.search-suggest__list .search-suggest__all {
	margin-top: 0.25rem;
	padding-top: 0.25rem;
	border-top: 1px solid var(--c-line);
}

.search-suggest__list .search-suggest__all a {
	color: var(--c-primary);
	font-size: 0.95rem;
	font-weight: 400;
}

/*--------------------------------------------------------------
# Trang chủ: hero, Câu nên biết
--------------------------------------------------------------*/
.hero {
	position: relative;
	overflow: hidden;
	padding: clamp(2.25rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
	background:
		radial-gradient(rgba(43, 36, 32, 0.07) 1px, transparent 1.2px) 0 0 / 22px 22px,
		linear-gradient(180deg, var(--c-surface) 0%, var(--c-bg) 100%);
	border-bottom: 1px solid var(--c-line);
}

/* Dấu ngoặc kép lớn, mờ, làm nền ở góc phải. */
.hero::before {
	content: "“";
	position: absolute;
	top: -0.02em;
	right: 0.04em;
	color: rgba(200, 68, 43, 0.08);
	font-family: var(--font-display);
	font-size: clamp(11rem, 30vw, 24rem);
	font-weight: 700;
	line-height: 1;
	pointer-events: none;
}

.hero__inner {
	position: relative;
	display: grid;
	gap: 2.5rem;
	align-items: center;
}

@media (min-width: 960px) {

	.hero__inner {
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
		gap: 3.5rem;
	}
}

.hero__title {
	margin: 0 0 0.45em;
	font-size: clamp(2.1rem, 6.2vw, 3.5rem);
	line-height: 1.12;
	letter-spacing: -0.01em;
}

.brand-mark {
	padding: 0 0.06em;
	background: linear-gradient(transparent 68%, rgba(240, 180, 41, 0.5) 68%, rgba(240, 180, 41, 0.5) 92%, transparent 92%);
	color: var(--c-seal);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.hero__text {
	max-width: 36rem;
	margin-bottom: 1.6rem;
	color: var(--c-muted);
	font-size: 1.08rem;
}

.hero .search-form {
	max-width: 40rem;
}

.hero__chips {
	margin-top: 1.25rem;
}

/* Thẻ "Câu nên biết": mảnh giấy dán băng dính, con dấu son ở góc. */
.cau-card {
	position: relative;
	padding: 2.6rem 1.6rem 1.5rem;
	background:
		repeating-linear-gradient(180deg, transparent 0 31px, rgba(31, 92, 102, 0.07) 31px 32px),
		var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: 6px;
	box-shadow: var(--shadow-lg);
	transform: rotate(1.2deg);
}

.cau-card::before {
	content: "";
	position: absolute;
	top: -13px;
	left: 50%;
	width: 120px;
	height: 28px;
	background: repeating-linear-gradient(135deg, rgba(240, 180, 41, 0.55) 0 8px, rgba(240, 180, 41, 0.38) 8px 16px);
	transform: translateX(-50%) rotate(-3deg);
}

.cau-card__seal {
	position: absolute;
	top: 1rem;
	right: 1rem;
	margin: 0;
	padding: 0.2rem 0.55rem;
	border: 2px solid var(--c-seal);
	border-radius: 5px;
	outline: 1px solid var(--c-seal);
	outline-offset: 2px;
	color: var(--c-seal);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.35;
	text-transform: uppercase;
	transform: rotate(5deg);
}

.cau-card__quote {
	margin: 0.4rem 0 0.9rem;
	font-family: var(--font-display);
	font-size: clamp(1.65rem, 3.4vw, 2.15rem);
	font-style: italic;
	font-weight: 600;
	line-height: 1.25;
}

.cau-card__quote a {
	color: var(--c-text);
	text-decoration: none;
}

.cau-card__quote a::before,
.cau-card__quote a::after {
	color: var(--c-seal);
}

.cau-card__quote a::before {
	content: "“";
}

.cau-card__quote a::after {
	content: "”";
}

.cau-card__quote a:hover {
	color: var(--c-seal-dark);
}

.cau-card__group {
	margin: 0 0 0.6rem;
}

.cau-card__text {
	margin: 0 0 1rem;
	color: var(--c-muted);
	font-size: 0.98rem;
	line-height: 1.6;
}

.cau-card__more {
	display: inline-flex;
	gap: 0.35rem;
	align-items: center;
	font-weight: 700;
	text-decoration: none;
}

.cau-card__more:hover {
	text-decoration: underline;
}

@media (max-width: 959px) {

	.cau-card {
		transform: rotate(0.6deg);
	}
}

/*--------------------------------------------------------------
# Thẻ nhóm, hàng chữ cái
--------------------------------------------------------------*/
.group-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
	gap: 0.9rem;
}

.group-card {
	position: relative;
	display: flex;
	gap: 0.95rem;
	align-items: flex-start;
	padding: 1.1rem 1.15rem 1.15rem;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.group-card:hover {
	border-color: var(--tone);
	box-shadow: var(--shadow);
	transform: translateY(-2px);
}

.group-card__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 48px;
	height: 48px;
	background: var(--tone-soft);
	border-radius: 13px;
	color: var(--tone);
}

.group-card__icon .icon {
	width: 27px;
	height: 27px;
}

.group-card__body {
	min-width: 0;
}

.group-card__title {
	margin: 0 0 0.1rem;
	font-size: 1.22rem;
	line-height: 1.3;
}

.group-card__title a {
	color: var(--c-text);
	text-decoration: none;
}

/* Cả thẻ bấm được. */
.group-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: var(--radius);
}

.group-card:hover .group-card__title a {
	color: var(--tone-ink);
}

.group-card__count {
	margin: 0 0 0.4rem;
	color: var(--tone-ink);
	font-size: 0.88rem;
	font-weight: 700;
}

.group-card__sample {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--c-muted);
	font-size: 0.88rem;
	line-height: 1.5;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.letter-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.letter-nav__item {
	display: inline-grid;
	place-items: center;
	min-width: 2.6rem;
	height: 2.6rem;
	padding: 0 0.5rem;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: 10px;
	color: var(--c-text);
	font-family: var(--font-display);
	font-size: 1.12rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

a.letter-nav__item:hover,
a.letter-nav__item:focus-visible {
	background: var(--c-seal);
	border-color: var(--c-seal);
	color: #fff;
}

.letter-nav__item.is-empty {
	background: transparent;
	border-style: dashed;
	color: #c7b9a8;
}

/*--------------------------------------------------------------
# Thẻ bài, chip
--------------------------------------------------------------*/
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 1.1rem;
}

/* Thẻ ngang xếp lưới 2 cột (trang nhóm, bài liên quan, tìm kiếm), như theme Chính Tả. */
.card-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.85rem;
}

@media (min-width: 700px) {

	.card-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1rem;
	}
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.section--alt .card {
	background: var(--c-bg);
}

.card:hover {
	border-color: var(--c-line-strong);
	box-shadow: var(--shadow);
	transform: translateY(-2px);
}

.card__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.45rem;
	padding: 1rem 1.1rem 1.15rem;
}

.card__group {
	margin: 0;
}

.card__title {
	margin: 0;
	font-size: 1.22rem;
	line-height: 1.3;
}

.card__title a {
	color: var(--c-text);
	text-decoration: none;
}

/* Cả thẻ bấm được. */
.card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.card:hover .card__title a {
	color: var(--c-seal-dark);
}

.card__excerpt {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--c-muted);
	font-size: 0.95rem;
	line-height: 1.55;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

/* Thẻ ngang: ảnh nhỏ bo góc bên trái, thụt vào trong thẻ. */
.card--row {
	flex-direction: row;
	align-items: center;
}

.card--row .card__media {
	flex: none;
	width: clamp(112px, 30%, 200px);
	padding: 0.7rem 0 0.7rem 0.7rem;
}

.card--row .card__media img {
	border-radius: calc(var(--radius) - 5px);
}

.card--row .card__body {
	gap: 0.35rem;
	align-self: stretch;
	justify-content: center;
	padding: 0.85rem 1rem;
}

.card--row .card__title {
	font-size: 1.15rem;
}

.card--row .card__excerpt {
	font-size: 0.92rem;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

@media (max-width: 480px) {

	.card--row .card__title {
		font-size: 1.05rem;
	}

	.card--row .card__body {
		padding: 0.7rem 0.8rem;
	}

	.card--row .card__excerpt {
		font-size: 0.84rem;
		line-height: 1.45;
	}
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.chips__label {
	color: var(--c-muted);
	font-size: 0.9rem;
	font-weight: 700;
}

.chip {
	display: inline-flex;
	gap: 0.4rem;
	align-items: center;
	padding: 0.4rem 0.85rem;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: 999px;
	color: var(--c-text);
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.chip .icon {
	width: 1.1em;
	height: 1.1em;
	color: var(--tone, var(--c-seal));
}

.chip:hover {
	border-color: var(--tone, var(--c-seal));
	color: var(--tone-ink, var(--c-seal-dark));
}

.chip__count {
	color: var(--c-muted);
	font-size: 0.85em;
	font-weight: 400;
}

/* Gợi ý dưới ô tra ở trang chủ: tên câu in nghiêng như câu trích. */
.chip--quiet {
	font-family: var(--font-display);
	font-style: italic;
	font-weight: 500;
}

.group-chip {
	display: inline-flex;
	gap: 0.35rem;
	align-items: center;
	padding: 0.25rem 0.7rem 0.25rem 0.55rem;
	background: var(--tone-soft);
	border-radius: 999px;
	color: var(--tone-ink);
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}

.group-chip .icon {
	width: 1.1em;
	height: 1.1em;
	color: var(--tone);
}

a.group-chip:hover {
	background: var(--tone);
	color: #fff;
}

a.group-chip:hover .icon {
	color: #fff;
}

.group-chip--sm {
	padding: 0.12rem 0.55rem 0.12rem 0.45rem;
	font-size: 0.76rem;
}

/*--------------------------------------------------------------
# Breadcrumb & tiêu đề trang
--------------------------------------------------------------*/
.breadcrumb {
	padding: 1rem 0 0.25rem;
	color: var(--c-muted);
	font-size: 0.88rem;
}

.breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.15rem 0.45rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.breadcrumb li {
	display: inline-flex;
	gap: 0.45rem;
	align-items: center;
	min-width: 0;
}

.breadcrumb li + li::before {
	content: "›";
	color: #b3a596;
}

.breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.breadcrumb a:hover {
	color: var(--c-seal-dark);
	text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
	overflow: hidden;
	max-width: 22rem;
	color: var(--c-text);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.page-header {
	padding: 1.25rem 0 1.5rem;
}

.page-title {
	margin: 0 0 0.4rem;
	font-size: clamp(1.9rem, 5vw, 2.6rem);
}

.page-count {
	margin: 0 0 1rem;
	color: var(--c-muted);
}

.archive-description {
	color: var(--c-muted);
}

/*--------------------------------------------------------------
# Trang nhóm
--------------------------------------------------------------*/
.hub-hero {
	position: relative;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem 1.35rem;
	align-items: start;
	margin: 0.75rem 0 1.75rem;
	padding: 1.5rem 1.35rem;
	overflow: hidden;
	background:
		radial-gradient(rgba(43, 36, 32, 0.06) 1px, transparent 1.2px) 0 0 / 20px 20px,
		var(--c-surface);
	border: 1px solid var(--c-line);
	border-top: 5px solid var(--tone);
	border-radius: 16px;
}

@media (min-width: 600px) {

	.hub-hero {
		grid-template-columns: auto 1fr;
		padding: 1.75rem 1.75rem 1.6rem;
	}
}

.hub-hero__icon {
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	background: var(--tone-soft);
	border-radius: 16px;
	color: var(--tone);
}

.hub-hero__icon .icon {
	width: 34px;
	height: 34px;
}

.hub .eyebrow {
	color: var(--tone-ink);
}

.hub-hero__title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.9rem, 5vw, 2.6rem);
}

.hub-hero__desc {
	max-width: 48rem;
	color: var(--c-muted);
}

.hub-hero__desc > :last-child {
	margin-bottom: 0;
}

.hub-hero__count {
	margin: 0.85rem 0 0;
	color: var(--tone-ink);
}

.hub-hero__page {
	margin-left: 0.25rem;
	color: var(--c-muted);
	font-weight: 400;
}

.hub-more {
	margin-top: 2.75rem;
	padding-top: 2rem;
	border-top: 1px solid var(--c-line);
}

/*--------------------------------------------------------------
# Bài viết
--------------------------------------------------------------*/
.entry-header {
	padding: 1rem 0 1.25rem;
}

.entry-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin-bottom: 0.9rem;
}

.entry-title {
	margin: 0 0 0.65rem;
	font-size: clamp(1.9rem, 5.5vw, 2.75rem);
	line-height: 1.16;
	letter-spacing: -0.01em;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.6rem;
	color: var(--c-muted);
	font-size: 0.92rem;
}

.entry-meta a {
	color: inherit;
}

.post-thumbnail {
	margin: 0 0 1.75rem;
}

.post-thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.entry-content {
	overflow-wrap: break-word;
}

.entry-content > :first-child {
	margin-top: 0;
}

.entry-content h2 {
	margin: 2.4em 0 0.7em;
	font-size: clamp(1.5rem, 4vw, 1.9rem);
	scroll-margin-top: 1.5rem;
}

/* Hình thoi son + nét vàng trên mỗi H2. */
.entry-content h2::before {
	content: "";
	display: block;
	width: 48px;
	height: 10px;
	margin-bottom: 0.65rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='10'%3E%3Cpath d='M5 0l5 5-5 5-5-5z' fill='%23c8442b'/%3E%3Crect x='14' y='4' width='34' height='2' rx='1' fill='%23f0b429'/%3E%3C/svg%3E") no-repeat;
}

.entry-content h3 {
	margin: 1.8em 0 0.5em;
	font-size: clamp(1.18rem, 3vw, 1.38rem);
	scroll-margin-top: 1.5rem;
}

/* Câu hỏi thường gặp (H2 cuối bài): mỗi câu hỏi có vạch chàm bên trái. */
.entry-content h2#cau-hoi-thuong-gap ~ h3 {
	padding-left: 0.85rem;
	border-left: 3px solid var(--c-primary);
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 1.1em;
	padding-left: 1.35em;
}

.entry-content li {
	margin-bottom: 0.35em;
}

.entry-content li::marker {
	color: var(--c-seal);
}

.entry-content ol > li::marker {
	font-weight: 700;
}

.entry-content strong {
	color: #1d1714;
}

/* Mục lục tự động */
.toc {
	margin: 0 0 1.75rem;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
}

.toc summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.8rem 1.1rem;
	font-family: var(--font-display);
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.toc summary::-webkit-details-marker {
	display: none;
}

.toc summary::after {
	content: "";
	width: 0.5em;
	height: 0.5em;
	border-right: 2px solid currentcolor;
	border-bottom: 2px solid currentcolor;
	transform: rotate(45deg);
	transition: transform 0.2s;
}

.toc details[open] summary::after {
	transform: rotate(-135deg);
}

.entry-content .toc ol {
	margin: 0;
	padding: 0 1.1rem 1rem 2.5rem;
	font-size: 0.97rem;
}

.toc li {
	margin: 0.3rem 0;
}

.toc a {
	color: var(--c-text);
	text-decoration: none;
}

.toc a:hover {
	color: var(--c-seal-dark);
	text-decoration: underline;
}

.entry-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	margin-top: 1.5rem;
	color: var(--c-muted);
	font-size: 0.92rem;
}

.widget-area--after {
	margin-top: 2rem;
}

.widget {
	margin: 0 0 1.5rem;
}

.widget-title {
	font-size: 1.25rem;
}

/*--------------------------------------------------------------
# Bài liên quan, tác giả
--------------------------------------------------------------*/
.author-box {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	margin-top: 2rem;
	padding: 1.25rem;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
}

.author-box__avatar {
	flex: none;
	border-radius: 50%;
}

.author-box__label {
	margin: 0;
	color: var(--c-muted);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.author-box__name {
	margin: 0 0 0.25rem;
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
}

.author-box__name a {
	color: var(--c-text);
	text-decoration: none;
}

.author-box__bio {
	margin: 0;
	color: var(--c-muted);
	font-size: 0.95rem;
}

.related {
	margin-top: 2.5rem;
	background: var(--c-surface);
	border-top: 1px solid var(--c-line);
}

.related .card {
	background: var(--c-bg);
}

/*--------------------------------------------------------------
# Mục lục A–Z
--------------------------------------------------------------*/
.page-header--az {
	padding-bottom: 1rem;
}

.page-header__intro {
	max-width: 48rem;
	color: var(--c-muted);
}

/* Hàng chữ cái dính trên đầu khi cuộn. */
.az-nav {
	position: sticky;
	top: 0;
	z-index: 10;
	margin: 0 calc(-1 * var(--gutter)) 1rem;
	padding: 0.65rem var(--gutter);
	background: rgba(250, 246, 238, 0.94);
	border-bottom: 1px solid var(--c-line);
	backdrop-filter: blur(6px);
}

.admin-bar .az-nav {
	top: 32px;
}

@media (max-width: 782px) {

	.admin-bar .az-nav {
		top: 0;
	}
}

.az-nav .letter-nav {
	gap: 0.3rem;
}

.az-nav .letter-nav__item {
	min-width: 2.2rem;
	height: 2.2rem;
	font-size: 1rem;
}

.az-group {
	padding: 1.25rem 0 0.75rem;
	scroll-margin-top: 4.5rem;
}

.az-group__letter {
	display: flex;
	gap: 0.6rem;
	align-items: baseline;
	margin: 0 0 0.85rem;
	padding-bottom: 0.4rem;
	border-bottom: 2px solid var(--c-line);
	color: var(--c-seal);
	font-size: 2.1rem;
	line-height: 1.1;
}

.az-group__count {
	color: var(--c-muted);
	font-family: var(--font-body);
	font-size: 0.85rem;
	font-weight: 400;
}

.az-list {
	margin: 0;
	padding: 0;
	list-style: none;
	columns: 1;
	column-gap: 2.5rem;
}

@media (min-width: 640px) {

	.az-list {
		columns: 2;
	}
}

@media (min-width: 1024px) {

	.az-list {
		columns: 3;
	}
}

.az-list li {
	margin: 0 0 0.45rem;
	line-height: 1.45;
	break-inside: avoid;
}

.az-list a {
	color: var(--c-text);
	text-decoration: none;
}

.az-list a:hover {
	color: var(--c-seal-dark);
	text-decoration: underline;
}

.az-list__group {
	display: inline-block;
	margin-left: 0.3rem;
	padding: 0 0.45rem;
	background: var(--tone-soft);
	border-radius: 999px;
	color: var(--tone-ink);
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.6;
	vertical-align: 0.12em;
	white-space: nowrap;
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.site-footer {
	padding: 3rem 0 1.5rem;
	background:
		radial-gradient(rgba(255, 248, 236, 0.05) 1px, transparent 1.2px) 0 0 / 22px 22px,
		#2b2420;
	color: #d9cbbb;
	font-size: 0.95rem;
}

.site-footer::before {
	content: "";
	display: block;
	height: 4px;
	margin-top: -3rem;
	margin-bottom: 3rem;
	background: linear-gradient(90deg, var(--c-seal) 0 50%, var(--c-accent) 50% 75%, #4b97a3 75% 100%);
}

.site-footer a {
	color: #f4e7d6;
	text-decoration: none;
}

.site-footer a:hover {
	color: #fff;
	text-decoration: underline;
}

.site-footer__grid {
	display: grid;
	gap: 2rem;
}

@media (min-width: 768px) {

	.site-footer__grid {
		grid-template-columns: 1.3fr 1.2fr 0.8fr;
		gap: 2.5rem;
	}
}

.site-footer__brand {
	margin-bottom: 0.9rem;
}

.site-footer__brand .custom-logo-link img {
	max-height: 40px;
}

.site-footer__about p:last-child {
	max-width: 26rem;
	margin: 0;
}

.site-footer__heading {
	margin: 0 0 0.75rem;
	color: var(--c-accent);
	font-family: var(--font-display);
	font-size: 1.05rem;
	font-weight: 700;
}

.site-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer li {
	margin: 0 0 0.45rem;
}

@media (min-width: 480px) {

	.site-footer__groups ul {
		columns: 2;
		column-gap: 1.5rem;
	}

	.site-footer__groups li {
		break-inside: avoid;
	}
}

.site-info {
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(255, 248, 236, 0.12);
	color: #a8998a;
	font-size: 0.88rem;
}

/*--------------------------------------------------------------
# Trang 404, không có kết quả
--------------------------------------------------------------*/
.error-404 {
	padding: clamp(2.5rem, 7vw, 4.5rem) 0 1rem;
	text-align: center;
}

.error-404__code {
	margin: 0;
	color: var(--c-seal);
	font-family: var(--font-display);
	font-size: clamp(4.5rem, 16vw, 7.5rem);
	font-weight: 700;
	line-height: 1;
}

.error-404 .search-form {
	max-width: 36rem;
	margin: 1.5rem auto 0;
	text-align: left;
}

.no-results {
	padding: 1rem 0 2rem;
}

/*--------------------------------------------------------------
# WordPress core & tiện ích
--------------------------------------------------------------*/
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	border: 0;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	top: 5px;
	left: 5px;
	z-index: 100000;
	display: block;
	width: auto;
	height: auto;
	padding: 15px 23px 14px;
	clip: auto !important;
	clip-path: none;
	background-color: var(--c-surface);
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	color: var(--c-seal-dark);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: normal;
	text-decoration: none;
}

#primary[tabindex="-1"]:focus {
	outline: 0;
}

.alignleft {
	float: left;
	margin-right: 1.5em;
	margin-bottom: 1.5em;
}

.alignright {
	float: right;
	margin-bottom: 1.5em;
	margin-left: 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin-right: auto;
	margin-left: auto;
}

.wp-caption,
.wp-block-image figcaption,
.wp-caption-text {
	color: var(--c-muted);
	font-size: 0.88rem;
	text-align: center;
}

.wp-caption {
	max-width: 100%;
	margin-bottom: 1.5em;
}

.gallery {
	display: grid;
	grid-gap: 1.5em;
	margin-bottom: 1.5em;
}

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

.gallery-columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.sticky,
.bypostauthor {
	display: block;
}

.page-links {
	clear: both;
	margin: 1.5em 0;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	justify-content: center;
	margin: 2rem 0 0.5rem;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.4rem 0.85rem;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-radius: 999px;
	color: var(--c-text);
	font-weight: 700;
	text-decoration: none;
}

.pagination .page-numbers.dots {
	min-width: auto;
	padding: 0.4rem 0.2rem;
	background: transparent;
	border-color: transparent;
}

.pagination .page-numbers.current {
	background: var(--grad-brand);
	border-color: transparent;
	color: #fff;
}

.pagination a.page-numbers:hover {
	background: var(--c-seal);
	border-color: var(--c-seal);
	color: #fff;
}

@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
