/* ================= NỘI DUNG BÀI VIẾT ================= */
.post-content {
	--pc-orange: #f26a1f;
	--pc-orange-soft: #fdebd9;
	--pc-navy: #1c2b4a;
	--pc-num: 30px;
	--pc-gap: 16px;
	--pc-indent: calc(var(--pc-num) + var(--pc-gap) * 2 + 4px);
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
	counter-reset: h2;
	padding-left: var(--pc-indent);
	color: #4b5563;
}
.post-content p { font-size: 16px !important; line-height: 1.7; margin-bottom: .8rem; }
.post-content p:has(img) { text-align: center; }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; }

/* ---- H2: vòng số cam + vạch dọc cam ---- */
.post-content h2 {
	counter-reset: h3;
	counter-increment: h2;
	position: relative;
	display: block;
	margin: 28px 0 10px calc(var(--pc-indent) * -1);
	padding: 12px 0 12px var(--pc-indent);
	min-height: var(--pc-num);
	font-size: 1.4rem !important;
	font-weight: 700 !important;
	line-height: 1.3;
	color: var(--pc-navy);
	scroll-margin-top: 90px;
	background: linear-gradient(var(--pc-orange), var(--pc-orange)) no-repeat
	            calc(var(--pc-num) + var(--pc-gap)) center / 4px 36px;
}
.post-content h2 strong { font-weight: 700 !important; }
.post-content h2::before {
	content: counter(h2);
	position: absolute; left: 0; top: 50%;
	transform: translateY(-50%);
	width: var(--pc-num); height: var(--pc-num);
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: calc(var(--pc-num) * .5); font-weight: 700; color: #fff;
	background: radial-gradient(circle at 30% 25%, #ff9a4d, var(--pc-orange) 70%);
	box-shadow: 0 0 0 7px rgba(242,106,31,.15), 0 6px 14px rgba(242,106,31,.3);
}
.post-content h2 ~ h2 { margin-top: 44px; }
.post-content h2 ~ h2::after {
	content: ""; position: absolute; left: 0; right: 0; top: -2px;
	height: 1px; background: #eceff3;
}

/* ---- H3: vòng số cam nhạt + kẻ ngang ---- */
.post-content h3 {
	display: flex; align-items: center; gap: 14px;
	font-size: 18px !important; font-weight: 700 !important;
	color: var(--pc-navy); margin: 20px 0 10px !important;
	scroll-margin-top: 90px;
}
.post-content h3::before {
	counter-increment: h3;
	content: counter(h2) "." counter(h3);
	flex: 0 0 auto;
	min-width: 42px; height: 42px; padding: 0 8px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--pc-orange-soft); color: var(--pc-orange);
	font-size: 15px; font-weight: 700;
}
.post-content h3::after {
	content: ""; flex: 1 1 auto; height: 1px; background: #e5e7eb; margin-left: 6px;
}

/* ---- Bảng ---- */
.post-content table { width: 100% !important; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.post-content th, .post-content td { padding: 10px 14px; text-align: left; border: 1px solid #eaeaea; }
.post-content th { background: #f7f7f7; color: #333; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.post-content tr:nth-child(even) td { background: #fafafa; }

/* ================= MỤC LỤC ================= */
.post-content #main-toc {
	position: relative; overflow: hidden;
	margin: 0 0 28px calc(var(--pc-indent) * -1);
	padding: 18px 20px;
	border: 1px solid #cfe3fb; border-radius: 18px;
	background: linear-gradient(135deg, #eef6ff 0%, #f7fbff 55%, #e3f1ff 100%);
	box-shadow: 0 6px 20px rgba(37,99,235,.08);
}
.post-content #main-toc::after {           /* ngôi nhà mờ góc phải */
	content: "\f015"; font-family: "Font Awesome 5 Free"; font-weight: 900;
	position: absolute; right: 14px; bottom: -16px;
	font-size: 150px; color: rgba(37,99,235,.08); pointer-events: none;
}
.pc-toc-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.pc-toc-head .ic {
	width: 60px; height: 60px; flex: 0 0 60px; border-radius: 50%;
	background: #dbeafe; color: var(--pc-orange);
	display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.pc-toc-head .t { font-size: 1.5rem; font-weight: 700; color: var(--pc-navy); line-height: 1.2; }
.pc-toc-head .s { font-size: .9rem; color: #6b7280; }

.pc-toc-list { column-count: 2; column-gap: 56px; column-rule: 1px solid #d5e4f7; position: relative; z-index: 1; }
.pc-toc-list > div { break-inside: avoid; display: flex; align-items: center; gap: 14px; padding: 5px 6px; margin: 0 !important; border-radius: 8px; }
.pc-toc-list > div:hover { background: rgba(242,106,31,.07); }
.pc-toc-list .num {
	width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
	background: var(--pc-orange-soft); color: var(--pc-orange); font-weight: 700;
	display: flex; align-items: center; justify-content: center;
}
.pc-toc-list a { color: #1d4ed8; font-size: 1rem; font-weight: 500; text-decoration: none; }
.pc-toc-list a:hover { color: var(--pc-orange); text-decoration: none; }
/* mục con (h3): giữ vòng tròn cam nhạt, số nhỏ hơn */
.pc-toc-list > div.lv3 { padding-left: 6px; }
.pc-toc-list > div.lv3 .num { font-size: .85rem; }
.pc-toc-list > div.lv3 a { font-size: .95rem; }

/* ================= MOBILE ================= */
@media (max-width: 576px) {
	.post-content { --pc-num: 30px; --pc-gap: 10px; padding-left: 0; }
	.post-content p { text-align: justify; }
	.post-content h2 { margin-left: 0; font-size: 1.25rem !important; background-size: 3px 26px; }
	.post-content h2::before { box-shadow: 0 0 0 4px rgba(242,106,31,.15); }
	.post-content h3 { font-size: 16px !important; gap: 10px; }
	.post-content h3::before { min-width: 36px; height: 36px; font-size: 13px; }
	.post-content #main-toc { margin-left: 0; padding: 12px; border-radius: 14px; }
	.post-content #main-toc::after { display: none; }
	.pc-toc-head .ic { width: 44px; height: 44px; flex-basis: 44px; font-size: 18px; }
	.pc-toc-head .t { font-size: 1.15rem; }
	.pc-toc-head .s { font-size: .8rem; }
	.pc-toc-list { column-count: 1; }
	.pc-toc-list .num { width: 30px; height: 30px; flex-basis: 30px; font-size: .9rem; }
	.pc-toc-list a { font-size: 14px; }
}