/* ==========================================================================
   PAO PEVIL — STYLESHEET CHÍNH
   ========================================================================== */
:root {
	--pao-bg: #faf8f2;
	--pao-text: #2b231f;
	--pao-header-bg: #382923;
	--pao-nav-bg: #111111;
	--pao-nav-link: #ffffff;
	--pao-nav-hover: #f7cf00;
	--pao-title: #9b2226;
	--pao-title-hover: #6a171a;
	--pao-accent: #1d3557;
	--pao-gold: #C5A059;
	--pao-slogan: #f0e6d2;
	--pao-container: 800px;
	--pao-logo-w: 200px;
	--pao-slogan-size: 12px;
	--pao-font-body: "Bookerly", "Noto Serif", Georgia, serif;
	--pao-body-size: 19px;
	--pao-body-size-mob: 18px;
	--pao-line-height: 1.75;
	--pao-list-title-size: 26px;
	--pao-single-h1-size: 28px;
	--pao-single-align: justify;
}

*, *::before, *::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
}

body {
	margin: 0;
	padding: 0;
	background-color: var(--pao-bg);
	color: var(--pao-text);
	font-family: var(--pao-font-body);
	font-size: var(--pao-body-size);
	line-height: var(--pao-line-height);
	overflow-x: hidden;
}

a {
	color: var(--pao-accent);
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
	color: var(--pao-title);
}

img {
	max-width: 100%;
	height: auto;
	vertical-align: top;
}

.wrapper-boxed {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background-color: var(--pao-bg);
}

.container {
	width: 100%;
	max-width: var(--pao-container);
	margin: 0 auto;
	padding-left: 20px;
	padding-right: 20px;
}

/* ==========================================================================
   HEADER & SLOGAN
   ========================================================================== */
#header {
	margin-bottom: 45px;
	position: relative;
}

#header .inner-header {
	background-color: var(--pao-header-bg);
	padding: 36px 0 34px;
	text-align: center;
}

#logo {
	text-align: center;
}

#logo a {
	display: inline-block;
	max-width: var(--pao-logo-w);
	width: 100%;
}

.pao-site-title-text {
	font-size: 30px;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: var(--pao-slogan);
	text-transform: uppercase;
}

.header-slogan {
	margin: 15px 0 0;
	text-align: center;
	line-height: 1;
}

.header-slogan .header-slogan-text {
	display: inline-block;
	position: relative;
	padding: 0 18px;
	font-family: "Merriweather", "Noto Serif", serif;
	font-size: var(--pao-slogan-size);
	font-weight: 500;
	letter-spacing: 0.14em;
	color: var(--pao-slogan);
}

.header-slogan .header-slogan-text::before,
.header-slogan .header-slogan-text::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 36px;
	height: 1px;
	background-color: #ededcb;
	opacity: 0.7;
}

.header-slogan .header-slogan-text::before {
	right: 100%;
}

.header-slogan .header-slogan-text::after {
	left: 100%;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.sticky-wrapper.is-sticky-enabled {
	position: sticky;
	top: 0;
	z-index: 999;
}

#navigation {
	background-color: var(--pao-nav-bg);
	height: 54px;
	position: relative;
}

#navigation .container {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	position: relative;
}

#navigation ul.menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 32px;
}

#navigation ul.menu > li {
	position: relative;
}

#navigation ul.menu > li > a {
	color: var(--pao-nav-link);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 54px;
	display: inline-block;
}

#navigation ul.menu > li > a:hover,
#navigation ul.menu > li.current-menu-item > a,
#navigation ul.menu > li.current_page_item > a,
#navigation ul.menu > li.current-post-ancestor > a,
#navigation ul.menu > li.current-cat > a {
	color: var(--pao-nav-hover);
}

/* Dropdown menu cấp 2 */
#navigation ul.sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background-color: var(--pao-nav-bg);
	list-style: none;
	margin: 0;
	padding: 8px 0;
	z-index: 1000;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

#navigation ul.menu > li:hover > ul.sub-menu {
	display: block;
}

#navigation ul.sub-menu li a {
	display: block;
	padding: 8px 18px;
	color: var(--pao-nav-link);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

#navigation ul.sub-menu li a:hover {
	color: var(--pao-nav-hover);
}

/* Tìm kiếm trên Header */
.penci-top-search {
	position: absolute;
	right: 20px;
	top: 0;
	height: 54px;
	display: flex;
	align-items: center;
}

.search-click {
	background: none;
	border: 0;
	color: var(--pao-nav-link);
	cursor: pointer;
	padding: 6px;
	display: flex;
	align-items: center;
}

.search-click:hover {
	color: var(--pao-nav-hover);
}

.show-search {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	background-color: var(--pao-nav-bg);
	padding: 12px 20px;
	z-index: 1200;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.show-search .pc-searchform {
	max-width: var(--pao-container);
	margin: 0 auto;
	display: flex;
	align-items: center;
}

.show-search .search-input {
	flex: 1;
	background: transparent;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.3);
	color: #ffffff;
	font-family: var(--pao-font-body);
	font-size: 16px;
	padding: 8px 4px;
	outline: none;
}

.show-search .close-search {
	background: none;
	border: 0;
	color: #ffffff;
	font-size: 26px;
	cursor: pointer;
	padding: 0 8px;
}

/* Mobile Menu Button & Drawer */
.button-menu-mobile {
	display: none;
	background: none;
	border: 0;
	color: var(--pao-nav-link);
	cursor: pointer;
	position: absolute;
	left: 20px;
	padding: 6px;
}

#sidebar-nav {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: 270px;
	background-color: var(--pao-bg);
	z-index: 1500;
	padding: 50px 24px 24px;
	transform: translateX(-100%);
	transition: transform 0.28s ease;
	box-shadow: 2px 0 18px rgba(0, 0, 0, 0.25);
	overflow-y: auto;
}

#sidebar-nav.is-open {
	transform: translateX(0);
}

#close-sidebar-nav {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	z-index: 1490;
}

#close-sidebar-nav.is-open {
	display: block;
}

.close-mobile-drawer {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: 0;
	font-size: 28px;
	color: var(--pao-text);
	cursor: pointer;
}

#sidebar-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

#sidebar-nav ul li {
	border-bottom: 1px solid rgba(43, 35, 31, 0.12);
}

#sidebar-nav ul li a {
	display: block;
	padding: 12px 0;
	color: var(--pao-text);
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* ==========================================================================
   HOA VĂN TRANG TRÍ (IHS, DIVIDER, FOOTER ORNAMENT)
   ========================================================================== */
.pao-ornament-top {
	width: 100%;
	height: 180px;
	background-repeat: no-repeat;
	background-position: center top;
	background-size: contain;
	margin: 0 0 32px;
	filter: drop-shadow(0px 0px 1px var(--pao-gold)) drop-shadow(0px 0px 5px rgba(197, 160, 89, 0.4));
}

.pao-ornament-bottom {
	width: 100%;
	height: 150px;
	background-repeat: no-repeat;
	background-position: center bottom;
	background-size: contain;
	margin: 24px 0 15px;
	filter: drop-shadow(0px 0px 1px var(--pao-gold)) drop-shadow(0px 0px 5px rgba(197, 160, 89, 0.4));
}

.pao-excerpt-divider {
	width: 100%;
	height: 16px;
	margin: 24px auto 0;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

/* ==========================================================================
   DANH SÁCH BÀI VIẾT (HOME, ARCHIVE, SEARCH)
   ========================================================================== */
main#main {
	flex: 1;
	padding-bottom: 40px;
}

.classic-pitem {
	margin-bottom: 34px;
}

.header-standard {
	text-align: center;
	padding-bottom: 16px;
	position: relative;
	margin-bottom: 22px;
}

.header-standard::after {
	content: "";
	position: absolute;
	width: 60px;
	height: 1px;
	background-color: var(--pao-accent);
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
}

.header-standard h2.entry-title {
	margin: 0;
	font-size: var(--pao-list-title-size);
	font-weight: 700;
	line-height: 1.25;
	text-transform: uppercase;
}

.header-standard h2.entry-title a {
	color: var(--pao-title);
}

.header-standard h2.entry-title a:hover {
	color: var(--pao-title-hover);
}

.classic-post-entry p {
	text-align: center;
	margin: 0 auto 12px;
	font-size: var(--pao-body-size);
	line-height: var(--pao-line-height);
}

/* Archive & Search Box */
.archive-box {
	text-align: center;
	margin-bottom: 28px;
}

.archive-box .title-bar span {
	display: block;
	font-size: 13px;
	font-style: italic;
	color: #777;
	margin-bottom: 4px;
}

.archive-box .title-bar h1 {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--pao-text);
}

.penci-category-description {
	margin-bottom: 36px;
}

.penci-category-description-inner p {
	margin-bottom: 18px;
}

.penci-category-description-inner hr {
	border: 0;
	border-top: 1px solid rgba(29, 53, 87, 0.25);
	margin: 28px 0 0;
}

/* ==========================================================================
   TRANG CHI TIẾT BÀI VIẾT (SINGLE POST) & TRANG TĨNH (PAGE)
   ========================================================================== */
.penci-standard-cat {
	margin-bottom: 8px;
}

.penci-standard-cat a {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--pao-accent);
	font-weight: 700;
}

.single-header h1.single-post-title,
.penci-page-header h1.entry-title {
	margin: 0 0 12px;
	font-size: var(--pao-single-h1-size);
	font-weight: 700;
	line-height: 1.25;
	text-transform: uppercase;
	color: var(--pao-text);
	text-align: center;
}

.penci-page-header {
	text-align: center;
	padding-bottom: 18px;
	margin-bottom: 28px;
	position: relative;
}

.penci-page-header::after {
	content: "";
	position: absolute;
	width: 60px;
	height: 1px;
	background-color: var(--pao-accent);
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
}

.post-box-meta-single {
	text-align: center;
	font-size: 14px;
	color: #777;
	font-style: italic;
}

.post-box-meta-single > span + span::before {
	content: "";
	display: inline-block;
	height: 10px;
	border-right: 1px solid currentColor;
	margin: 0 12px;
	opacity: 0.6;
}

.inner-post-entry p {
	text-align: var(--pao-single-align);
	margin: 0 0 24px;
	font-size: var(--pao-body-size);
	line-height: var(--pao-line-height);
}

.inner-post-entry blockquote {
	margin: 28px 0;
	padding: 12px 24px;
	border-left: 3px solid var(--pao-accent);
	font-style: italic;
	background-color: rgba(29, 53, 87, 0.04);
}

/* Dropcap chữ cái đầu tiên */
.pao-has-dropcap > p:first-of-type::first-letter {
	font-family: "Rosecaps", "Bookerly", "Noto Serif", serif;
	float: left;
	font-size: 4.6rem;
	line-height: 0.72;
	margin-right: 12px;
	margin-top: 0.14em;
	color: var(--pao-accent);
	text-shadow:
		-1px -1px 0 var(--pao-gold),
		 1px -1px 0 var(--pao-gold),
		-1px  1px 0 var(--pao-gold),
		 1px  1px 0 var(--pao-gold),
		 0px  0px 8px rgba(197, 160, 89, 0.5);
}

/* Hộp Hỗ trợ nghiên cứu */
.pao-donate-wrap {
	text-align: center;
	margin: 40px 0;
	padding: 25px 16px;
	border-top: 1px solid var(--pao-text);
	border-bottom: 1px solid var(--pao-text);
	opacity: 0.92;
}

.pao-donate-text {
	margin-bottom: 16px;
	font-size: 1.02em;
	font-style: italic;
}

.pao-donate-btn {
	display: inline-block;
	padding: 10px 26px;
	border: 1px solid var(--pao-text);
	border-radius: 4px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--pao-text);
	transition: all 0.25s ease;
}

.pao-donate-btn:hover {
	background-color: var(--pao-text);
	color: var(--pao-bg);
}

/* Từ khóa bài viết */
.pao-post-tags {
	margin: 24px 0 8px;
	font-size: 14px;
	font-style: italic;
	text-align: center;
}

/* Thanh chia sẻ mạng xã hội */
.tags-share-box {
	text-align: center;
	padding: 20px 0;
	margin-top: 16px;
	clear: both;
}

.post-share-item {
	display: inline-block;
	margin: 0 4px 8px;
	padding: 0 14px;
	height: 36px;
	line-height: 36px;
	font-size: 13px;
	color: #ffffff !important;
	border-radius: 2px;
}

.post-share-facebook { background-color: #0d47a1; }
.post-share-twitter  { background-color: #1da1f2; }
.post-share-reddit   { background-color: #f74300; }
.post-share-threads  { background-color: #111111; }
.post-share-email    { background-color: #0084ff; }

.post-share-item:hover {
	opacity: 0.85;
}

/* Khung tiểu sử tác giả */
.post-author.abio-style-4 {
	margin-top: 75px;
	margin-bottom: 20px;
	padding: 20px 24px 24px;
	border: 1px solid var(--pao-accent);
	text-align: center;
}

.abio-style-4 .author-img {
	margin-top: -70px;
	margin-bottom: 14px;
}

.abio-style-4 .author-img img {
	border-radius: 50%;
	border: 2px solid var(--pao-accent);
	background-color: var(--pao-bg);
}

.abio-style-4 .author-content h5 {
	margin: 0 0 10px;
	font-size: 18px;
	text-transform: uppercase;
}

.abio-style-4 .author-content p {
	margin: 0;
	font-size: 15px;
	line-height: 1.65;
}

/* ==========================================================================
   PHÂN TRANG (PAGINATION)
   ========================================================================== */
.penci-pagination {
	margin: 36px 0 20px;
	text-align: center;
}

.penci-pagination ul.page-numbers {
	list-style: none;
	margin: 0;
	padding: 0;
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
}

.penci-pagination ul.page-numbers li a,
.penci-pagination ul.page-numbers li span {
	display: inline-block;
	min-width: 34px;
	height: 34px;
	line-height: 32px;
	padding: 0 8px;
	border: 1px solid var(--pao-accent);
	font-size: 13px;
	color: var(--pao-accent);
}

.penci-pagination ul.page-numbers li span.current {
	background-color: #14181d;
	border-color: #14181d;
	color: #ffffff;
}

.penci-pagination ul.page-numbers li a:hover {
	background-color: var(--pao-accent);
	color: #ffffff;
}

/* ==========================================================================
   TRANG 404
   ========================================================================== */
.error-404 {
	text-align: center;
	padding: 30px 0 50px;
}

.pao-404-numeral {
	font-size: 84px;
	font-weight: 700;
	color: var(--pao-title);
	line-height: 1;
}

.sub-heading-text-404 {
	margin: 20px 0 24px;
	font-size: 17px;
	font-style: italic;
}

.pc-searchform-box {
	max-width: 420px;
	margin: 0 auto 24px;
}

.pc-searchform-box .search-input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--pao-accent);
	background-color: transparent;
	font-family: var(--pao-font-body);
	font-size: 15px;
	color: var(--pao-text);
}

.go-back-home a {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 700;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
#footer-section {
	background-color: var(--pao-header-bg);
	padding: 28px 0 22px;
	text-align: center;
	margin-top: auto;
}

#footer-copyright p {
	margin: 0;
	font-size: 13px;
	line-height: 1.65;
	color: #b5aba4;
	font-style: italic;
}

#footer-section a {
	color: #90a4ae;
}

#footer-section a:hover {
	text-decoration: underline;
}

.pao-cc-icons {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 6px;
	color: #b5aba4;
}

.go-to-top-parent {
	margin-top: 16px;
}

.go-to-top {
	display: inline-block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #b5aba4 !important;
}

/* ==========================================================================
   RESPONSIVE (MOBILE & TABLET)
   ========================================================================== */
@media screen and (max-width: 768px) {
	body,
	.classic-post-entry p,
	.inner-post-entry p {
		font-size: var(--pao-body-size-mob);
		line-height: 1.65;
	}

	.button-menu-mobile {
		display: flex;
		align-items: center;
	}

	#navigation ul.menu {
		display: none;
	}

	.pao-ornament-top {
		height: 120px;
	}

	.pao-ornament-bottom {
		height: 100px;
	}

	.header-standard h2.entry-title,
	.single-header h1.single-post-title,
	.penci-page-header h1.entry-title {
		font-size: 23px;
	}

	.pao-donate-btn {
		width: 100%;
	}
}

/* ==========================================================================
   BỔ SUNG CHUẨN WORDPRESS, GUTENBERG HỌC THUẬT & FOOTNOTES
   ========================================================================== */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.inner-post-entry h2,
.inner-post-entry h3,
.inner-post-entry h4 {
	color: var(--pao-text);
	font-weight: 700;
	line-height: 1.35;
	margin: 34px 0 16px;
}

.inner-post-entry h2 { font-size: 24px; }
.inner-post-entry h3 { font-size: 21px; }
.inner-post-entry h4 { font-size: 19px; }

.inner-post-entry ul,
.inner-post-entry ol {
	margin: 0 0 24px 26px;
	padding: 0;
}

.inner-post-entry ul { list-style-type: disc; }
.inner-post-entry ol { list-style-type: decimal; }
.inner-post-entry li { margin-bottom: 8px; }

.inner-post-entry figure {
	margin: 28px 0;
	text-align: center;
}

.inner-post-entry figcaption {
	margin-top: 8px;
	font-size: 14px;
	font-style: italic;
	color: #666;
}

.inner-post-entry table {
	width: 100%;
	border-collapse: collapse;
	margin: 28px 0;
	font-size: 16px;
}

.inner-post-entry th,
.inner-post-entry td {
	border: 1px solid rgba(43, 35, 31, 0.25);
	padding: 10px 14px;
	text-align: left;
}

.inner-post-entry th {
	background-color: rgba(29, 53, 87, 0.08);
	font-weight: 700;
}

/* Khối chú thích cuối bài (Gutenberg Footnotes) */
.inner-post-entry ol.wp-block-footnotes {
	margin-top: 40px;
	padding-top: 20px;
	border-top: 1px solid rgba(43, 35, 31, 0.25);
	font-size: 15px;
	line-height: 1.6;
}

/* Menu con trong ngăn kéo di động */
#sidebar-nav ul.sub-menu {
	padding-left: 16px;
	border-top: 1px solid rgba(43, 35, 31, 0.08);
}

#sidebar-nav ul.sub-menu li:last-child {
	border-bottom: 0;
}

/* Khung bình luận tối giản (khi được bật) */
.comments-area {
	margin-top: 48px;
	padding-top: 28px;
	border-top: 1px solid rgba(29, 53, 87, 0.25);
}

.comment-list {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
}

.comment-body {
	padding: 16px 0;
	border-bottom: 1px solid rgba(43, 35, 31, 0.12);
	font-size: 16px;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--pao-accent);
	background: transparent;
	font-family: var(--pao-font-body);
	font-size: 15px;
	color: var(--pao-text);
}

.comment-form input[type="submit"] {
	padding: 10px 22px;
	background-color: var(--pao-accent);
	color: #fff;
	border: 0;
	font-family: var(--pao-font-body);
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	cursor: pointer;
}