/* ==========================================================================
   Single Post Page Styles — Nguyễn Hà Bằng Theme
   Bố cục dùng chung với archive.css (breadcrumb, lưới 2 cột, sidebar).
   ========================================================================== */

/* --- Header ------------------------------------------------------------- */
.nhb-single .nhb-archive-main-grid {
	align-items: start;
}

/* --- Article header ----------------------------------------------------- */
.nhb-article {
	min-width: 0;
}

.nhb-article__cat {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #fdf1e3;
	color: #2e1758;
	font-size: 13.5px;
	font-weight: 600;
	padding: 7px 16px 7px 12px;
	border-radius: 999px;
	text-decoration: none;
	margin-bottom: 22px;
	transition: background 0.18s ease;
}

.nhb-article__cat:hover {
	background: #fbe6cc;
}

.nhb-article__cat svg {
	width: 16px;
	height: 16px;
	color: #2e1758;
}

.nhb-article__title {
	margin: 0 0 18px;
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: clamp(30px, 3.3vw, 50px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.015em;
}

.nhb-article__title-main {
	display: block;
	color: #2e1758;
}

.nhb-article__title-sub {
	display: block;
	color: #c3791a;
	font-style: italic;
	font-weight: 700;
}

.nhb-article__excerpt {
	font-size: 16.5px;
	line-height: 1.7;
	color: #475569;
	margin: 0 0 22px;
	max-width: 760px;
}

/* --- Meta & share ------------------------------------------------------- */
.nhb-article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 22px;
	font-size: 13.5px;
	color: #646da0;
	padding-bottom: 26px;
}

.nhb-article__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.nhb-article__meta-item svg {
	width: 16px;
	height: 16px;
	color: #646da0;
	flex-shrink: 0;
}

.nhb-article__share {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding-left: 22px;
	border-left: 1px solid #e2e8f0;
}

.nhb-article__share-label {
	font-size: 13.5px;
	color: #646da0;
}

.nhb-article__share-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #eef3fb;
	color: #2e1758;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	padding: 0;
	cursor: pointer;
	text-decoration: none;
	font-family: "Montserrat", sans-serif;
	font-size: 15px;
	font-weight: 800;
	transition: background 0.18s ease, transform 0.18s ease;
}

.nhb-article__share-btn:hover {
	background: #dfe8f8;
	transform: translateY(-1px);
}

.nhb-article__share-btn svg {
	width: 17px;
	height: 17px;
}

.nhb-article__share-btn.is-facebook {
	color: #1877f2;
	font-size: 22px;
}

.nhb-article__share-btn.is-zalo {
	color: #0068ff;
	font-size: 11px;
	letter-spacing: -0.01em;
}

.nhb-article__share-btn.is-copied {
	background: #d1fae5;
	color: #047857;
}

/* --- Hero & lead -------------------------------------------------------- */
.nhb-article__hero {
	margin: 0 0 22px;
	border-radius: 18px;
	overflow: hidden;
	aspect-ratio: 2.1 / 1;
	background: #f1f5f9;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.nhb-article__hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nhb-article__lead {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	background: #fdf7ee;
	border-radius: 12px;
	padding: 20px 26px;
	margin-bottom: 36px;
}

.nhb-article__lead-icon {
	width: 28px;
	height: 28px;
	color: #e3a24d;
	flex-shrink: 0;
	margin-top: 2px;
}

.nhb-article__lead p {
	margin: 0;
	font-size: 16px;
	line-height: 1.65;
	color: #334155;
}

/* --- Body content ------------------------------------------------------- */
.nhb-article__content {
	font-size: 16px;
	line-height: 1.8;
	color: #334155;
	counter-reset: nhb-section;
}

.nhb-article__content p {
	margin: 0 0 16px;
}

.nhb-article__content h2 {
	counter-increment: nhb-section;
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 64px;
	margin: 44px 0 18px;
	padding-left: 84px;
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: clamp(24px, 2.2vw, 30px);
	font-weight: 700;
	line-height: 1.25;
	color: #2e1758;
}

.nhb-article__content h2::before {
	content: counter(nhb-section, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: 0;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #eef2fb;
	color: #2e1758;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	font-weight: 700;
}

.nhb-article__content h2::after {
	content: "";
	display: block;
	width: 48px;
	height: 3px;
	margin-top: 10px;
	border-radius: 2px;
	background: #d3923a;
}

.nhb-article__section-body {
	padding-left: 84px;
}

.nhb-article__section-body p {
	margin-bottom: 14px;
}

.nhb-article__figure {
	margin: 24px 0 30px;
}

.nhb-article__figure img {
	display: block;
	width: 100%;
	aspect-ratio: 2.8 / 1;
	object-fit: cover;
	border-radius: 14px;
}

/* Bảng dữ liệu (Table) trong nội dung bài viết */
.nhb-article__content .wp-block-table,
.nhb-article__content .nhb-table-wrap {
	margin: 26px 0 34px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 14px;
	box-shadow: 0 6px 24px rgba(46, 23, 88, 0.06);
}

.nhb-article__content table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin: 26px 0 34px;
	background: #ffffff;
	border: 1px solid #e5dff2;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 6px 24px rgba(46, 23, 88, 0.06);
	font-size: 15px;
	line-height: 1.65;
	color: #334155;
	text-align: left;
}

.nhb-article__content .wp-block-table table,
.nhb-article__content .nhb-table-wrap table {
	margin: 0;
	box-shadow: none;
	border-collapse: separate;
}

.nhb-article__content .wp-block-table thead,
.nhb-article__content table thead {
	border-bottom: 0;
}

.nhb-article__content table thead th,
.nhb-article__content table thead td,
.nhb-article__content table tr > th {
	background: linear-gradient(135deg, #2e1758 0%, #3b1f70 100%);
	color: #ffffff;
	font-weight: 700;
	font-size: 14.5px;
	line-height: 1.45;
	letter-spacing: 0.01em;
	padding: 15px 18px;
	text-align: left;
	vertical-align: middle;
	border-bottom: 2px solid #d3923a;
	border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.nhb-article__content table thead th:last-child,
.nhb-article__content table thead td:last-child,
.nhb-article__content table tr > th:last-child {
	border-right: 0;
}

.nhb-article__content table thead th strong,
.nhb-article__content table thead td strong,
.nhb-article__content table tr > th strong {
	color: #ffffff;
}

.nhb-article__content table tbody td,
.nhb-article__content table td {
	padding: 15px 18px;
	vertical-align: top;
	color: #334155;
	border-bottom: 1px solid #ebe6f4;
	border-right: 1px solid #f1edf8;
	background-color: #ffffff;
	transition: background-color 0.18s ease;
}

.nhb-article__content table tbody td:last-child,
.nhb-article__content table td:last-child {
	border-right: 0;
}

.nhb-article__content table tbody tr:nth-child(even) td {
	background-color: #faf8fe;
}

.nhb-article__content table tbody tr:hover td {
	background-color: #f3edfc;
}

.nhb-article__content table tbody tr:last-child td,
.nhb-article__content table tr:last-child td {
	border-bottom: 0;
}

.nhb-article__content table td:first-child {
	min-width: 135px;
}

.nhb-article__content table td strong,
.nhb-article__content table td b {
	color: #2e1758;
	font-weight: 700;
}

.nhb-article__content table p {
	margin: 0 0 8px;
}

/* --- Table of Contents (Mục lục bài viết) ------------------------------ */
.nhb-toc {
	margin: 0 0 28px;
	padding: 18px 24px 20px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.nhb-toc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e2e8f0;
}

.nhb-toc__head.is-collapsed {
	padding-bottom: 0;
	border-bottom-color: transparent;
}

.nhb-toc__title {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-family: "Montserrat", sans-serif;
	font-size: 16.5px;
	font-weight: 700;
	color: #1e293b;
}

.nhb-toc__title svg {
	color: #2e1758;
	flex-shrink: 0;
}

.nhb-toc__toggle {
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	color: #475569;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, transform 0.2s ease;
}

.nhb-toc__toggle:hover {
	background: #f1f5f9;
	color: #2e1758;
}

.nhb-toc__toggle[aria-expanded="false"] svg {
	transform: rotate(-90deg);
}

.nhb-toc__list {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.nhb-toc__list[hidden] {
	display: none;
}

.nhb-toc__item a {
	display: inline-block;
	font-size: 14.5px;
	line-height: 1.55;
	color: #2e1758;
	text-decoration: underline;
	text-decoration-color: rgba(46, 23, 88, 0.28);
	text-underline-offset: 3px;
	transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.nhb-toc__item--h2 a {
	font-weight: 600;
}

.nhb-toc__item--h3 {
	padding-left: 22px;
}

.nhb-toc__item--h3 a {
	font-size: 14px;
	font-weight: 400;
	color: #334e8f;
	text-decoration-color: rgba(51, 78, 143, 0.28);
}

.nhb-toc__item a:hover {
	color: #c3791a;
	text-decoration-color: #c3791a;
}

.nhb-article__content h2[id],
.nhb-article__content h3[id] {
	scroll-margin-top: 90px;
}

.nhb-article__content table p:last-child {
	margin-bottom: 0;
}

.nhb-article__content .wp-block-table figcaption,
.nhb-article__content table caption {
	margin-top: 10px;
	font-size: 13.5px;
	color: #64748b;
	text-align: center;
	font-style: italic;
}

/* Lưới 4 lợi ích */
.nhb-benefits {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin: 8px 0 34px;
}

.nhb-benefit {
	background: #ffffff;
	border: 1px solid #eef2f7;
	border-radius: 14px;
	padding: 24px 18px;
	text-align: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.nhb-benefit svg {
	width: 34px;
	height: 34px;
	color: #d3923a;
	margin-bottom: 14px;
}

.nhb-benefit h4 {
	font-family: "Montserrat", sans-serif;
	font-size: 15px;
	font-weight: 700;
	color: #2e1758;
	margin: 0 0 8px;
	line-height: 1.35;
}

.nhb-benefit p {
	font-size: 13.5px;
	line-height: 1.6;
	color: #64748b;
	margin: 0;
}

/* Rào cản: danh sách + ảnh */
.nhb-barriers {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin: 0 0 40px;
}

.nhb-cross-list {
	list-style: none;
	margin: 0;
	padding: 22px 26px;
	background: #fdf1f1;
	border-radius: 14px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 12px;
}

.nhb-cross-list li {
	position: relative;
	padding-left: 34px;
	font-size: 15px;
	color: #334155;
	line-height: 1.5;
}

.nhb-cross-list li::before {
	content: "\00d7";
	position: absolute;
	left: 0;
	top: 1px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #ef4444;
	color: #ffffff;
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}

.nhb-barriers__img {
	width: 100%;
	height: 100%;
	min-height: 200px;
	object-fit: cover;
	border-radius: 14px;
	display: block;
}

/* 7 cách: số tròn cam */
.nhb-steps {
	list-style: none;
	counter-reset: nhb-step;
	margin: 8px 0 0;
	padding: 0;
}

.nhb-steps li {
	counter-increment: nhb-step;
	position: relative;
	padding-left: 72px;
	min-height: 44px;
	margin-bottom: 26px;
}

.nhb-steps li::before {
	content: counter(nhb-step);
	position: absolute;
	left: 0;
	top: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #d3923a;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	font-weight: 700;
	box-shadow: 0 4px 12px rgba(211, 146, 58, 0.3);
}

.nhb-steps strong {
	display: block;
	font-size: 17px;
	color: #2e1758;
	margin-bottom: 6px;
}

.nhb-steps p {
	margin: 0;
	font-size: 15px;
	line-height: 1.7;
	color: #475569;
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1080px) {
	.nhb-benefits {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.nhb-article__share {
		border-left: 0;
		padding-left: 0;
		width: 100%;
	}

	.nhb-article__hero {
		aspect-ratio: 16 / 10;
		border-radius: 14px;
	}

	.nhb-article__lead {
		padding: 16px 18px;
	}

	.nhb-article__content h2 {
		padding-left: 64px;
		min-height: 52px;
	}

	.nhb-article__content h2::before {
		width: 48px;
		height: 48px;
		font-size: 18px;
	}

	.nhb-article__section-body {
		padding-left: 0;
	}

	.nhb-barriers {
		grid-template-columns: 1fr;
	}

	.nhb-barriers__img {
		min-height: 180px;
	}

	.nhb-steps li {
		padding-left: 60px;
	}

	.nhb-article__content table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		font-size: 14px;
	}

	.nhb-article__content table thead th,
	.nhb-article__content table thead td,
	.nhb-article__content table tr > th,
	.nhb-article__content table tbody td,
	.nhb-article__content table td {
		padding: 12px 14px;
	}
}

@media (max-width: 480px) {
	.nhb-benefits {
		grid-template-columns: 1fr;
	}
}
