/* ==========================================================================
   KENCO – GIAO DIỆN BÀI VIẾT (tiền tố kpo-), cùng phong cách sản phẩm và dự án
   Độc lập với các module khác. Mọi selector nằm trong .kpo.
   ========================================================================== */
.kpo {
	--kpo-blue: #005bac; --kpo-blue-d: #004b93; --kpo-ink: #04417b; --kpo-orange: #f26522; --kpo-border: #e2e8f0;
	font-family: 'Montserrat', 'Plus Jakarta Sans', system-ui, sans-serif;
}
.kpo *, .kpo *::before, .kpo *::after { box-sizing: border-box; }
.kpo.kpo-post { padding: 36px 0 64px; background: #f4f6f9; }
.kpo .kpo-container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* Thanh tiến độ đọc */
.kpo-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 99997; height: 3px; background: transparent; pointer-events: none; }
body.admin-bar .kpo-progress { top: 32px; }
.kpo-progress-bar { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #005bac, #f26522); transform: scaleX(0); transform-origin: left; }
@media (max-width: 782px) { body.admin-bar .kpo-progress { top: 46px; } }

/* Breadcrumb */
.kpo .kpo-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; font-size: 13.5px; font-weight: 500; color: #64748b; }
.kpo .kpo-crumb a { color: #004b93; font-weight: 600; text-decoration: none; }
.kpo .kpo-crumb a:hover { text-decoration: underline; }
.kpo .kpo-crumb i { font-style: normal; color: #cbd5e1; }
.kpo .kpo-crumb span { color: var(--kpo-ink); font-weight: 700; overflow-wrap: anywhere; }

/* Bố cục */
.kpo .kpo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
.kpo .kpo-article { min-width: 0; padding: 42px 46px 46px; background: #fff; border: 1px solid var(--kpo-border); border-radius: 18px; box-shadow: 0 10px 30px rgba(15, 23, 42, .04); }

/* Đầu bài */
.kpo .kpo-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.kpo .kpo-cats a { padding: 4px 12px; background: #e0f0ff; color: #003d75; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; text-decoration: none; }
.kpo .kpo-cats a:hover { background: var(--kpo-blue); color: #fff; }
.kpo .kpo-title { margin: 0 0 20px; font-size: clamp(26px, 3vw, 36px); font-weight: 800; line-height: 1.28; letter-spacing: -.01em; color: var(--kpo-ink); text-transform: none; }
.kpo .kpo-meta { display: flex; align-items: center; gap: 12px; margin: 0 0 26px; padding-bottom: 22px; border-bottom: 1px solid var(--kpo-border); }
.kpo .kpo-avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; object-fit: cover; background: #f1f5f9; border: 1px solid #e2e8f0; }
.kpo .kpo-meta strong { display: block; font-size: 14px; font-weight: 800; color: #0f172a; }
.kpo .kpo-meta span { display: block; margin-top: 2px; font-size: 13px; color: #64748b; }

.kpo .kpo-hero { margin: 0 0 34px; }
.kpo .kpo-hero-img { display: block; width: 100%; height: auto; max-height: 520px; margin: 0; object-fit: cover; border-radius: 14px; }
.kpo .kpo-hero figcaption { margin-top: 10px; font-size: 13.5px; font-style: italic; text-align: center; color: #64748b; }

/* Nội dung */
.kpo .kpo-entry { max-width: 820px; margin: 0 auto; font-size: 16.5px; line-height: 1.85; color: #1e293b; overflow-wrap: anywhere; }
.kpo .kpo-entry > :first-child { margin-top: 0; }
.kpo .kpo-entry p { margin: 0 0 20px; }
.kpo .kpo-entry strong { font-weight: 700; color: #0f172a; }
.kpo .kpo-entry a { color: var(--kpo-blue); text-decoration: underline; text-underline-offset: 3px; }
.kpo .kpo-entry a:hover { color: var(--kpo-orange); }
.kpo .kpo-entry h2 { position: relative; margin: 46px 0 16px; padding-left: 16px; font-size: 24px; font-weight: 800; line-height: 1.35; color: var(--kpo-ink); text-transform: none; scroll-margin-top: 90px; }
.kpo .kpo-entry h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 3px; background: linear-gradient(180deg, #ea580c, #f26522); }
.kpo .kpo-entry h3 { margin: 32px 0 12px; font-size: 19px; font-weight: 800; line-height: 1.4; color: var(--kpo-ink); text-transform: none; scroll-margin-top: 90px; }
.kpo .kpo-entry ul, .kpo .kpo-entry ol { margin: 0 0 22px; padding-left: 0; list-style: none; }
.kpo .kpo-entry ul > li { position: relative; margin: 0 0 10px; padding-left: 26px; }
.kpo .kpo-entry ul > li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 8px; height: 8px; border-radius: 2px; background: #ea580c; transform: rotate(45deg); }
.kpo .kpo-entry ol { counter-reset: kpo-ol; }
.kpo .kpo-entry ol > li { position: relative; margin: 0 0 12px; padding-left: 40px; counter-increment: kpo-ol; }
.kpo .kpo-entry ol > li::before {
	content: counter(kpo-ol); position: absolute; left: 0; top: .15em; width: 28px; height: 28px; display: grid; place-items: center;
	border-radius: 50%; background: #e0f0ff; color: #003d75; font-size: 13px; font-weight: 800; line-height: 1;
}
.kpo .kpo-entry blockquote { margin: 28px 0; padding: 18px 22px; background: #f8fafc; border-left: 4px solid var(--kpo-blue); border-radius: 0 12px 12px 0; color: #334155; font-style: italic; }
.kpo .kpo-entry img { display: block; max-width: 100%; height: auto; margin: 28px auto 8px; border: 1px solid #e2e8f0; border-radius: 12px; }
.kpo .kpo-entry .wp-caption { max-width: 100% !important; margin: 28px 0; }
.kpo .kpo-entry .wp-caption img { margin: 0 auto; }
.kpo .kpo-entry figcaption, .kpo .kpo-entry .wp-caption-text, .kpo .kpo-entry img + em { display: block; margin: 8px 0 24px; font-size: 13.5px; font-style: italic; text-align: center; color: #64748b; }

/* Bảng thông số */
.kpo .kpo-entry table { display: block; width: 100%; max-width: 100%; margin: 26px 0; overflow-x: auto; border-collapse: separate; border-spacing: 0; font-size: 14.5px; line-height: 1.55; border: 1px solid #e2e8f0; border-radius: 12px; }
.kpo .kpo-entry th { padding: 13px 16px; background: #004b93; color: #fff; font-size: 13px; font-weight: 700; text-align: left; white-space: nowrap; border: 0; }
.kpo .kpo-entry td { min-width: 150px; padding: 12px 16px; vertical-align: top; color: #1e293b; border: 0; border-top: 1px solid #edf2f7; }
.kpo .kpo-entry tbody tr:nth-child(even) td { background: #f8fafc; }
.kpo .kpo-entry td:first-child { font-weight: 700; color: #0f172a; }
.kpo .kpo-entry td:last-child { color: #003d75; font-weight: 600; }

/* Mục lục */
.kpo .kenco-toc-box { max-width: 820px; margin: 0 auto 36px; padding: 20px 24px; background: #f8fafc; border: 1px solid #e2e8f0; border-top: 4px solid #004b93; border-radius: 14px; font-size: 14.5px; line-height: 1.5; }
.kpo .kenco-toc-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #0f172a; }
.kpo .kenco-toc-list { margin: 0 !important; padding: 0 !important; list-style: none; counter-reset: kpo-toc; }
.kpo .kenco-toc-list li { position: relative; margin: 0 0 4px !important; padding: 0 !important; counter-increment: kpo-toc; }
.kpo .kenco-toc-list li::before { display: none !important; }
.kpo .kenco-toc-list a { display: block; padding: 7px 10px; border-radius: 8px; color: #334155; font-weight: 600; text-decoration: none; transition: background-color .2s, color .2s; }
.kpo .kenco-toc-list a:hover { background: #e0f0ff; color: #003d75; }
.kpo .kenco-toc-list a.is-active { background: #004b93; color: #fff; }
.kpo .kenco-toc-list .kenco-toc-sub { padding-left: 18px !important; }
.kpo .kenco-toc-list .kenco-toc-sub a { font-weight: 500; font-size: 14px; }

/* Chia sẻ */
.kpo .kpo-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 820px; margin: 40px auto 0; padding-top: 22px; border-top: 1px solid var(--kpo-border); }
.kpo .kpo-share-label { margin-right: 4px; font-size: 13.5px; font-weight: 700; color: #475569; }
.kpo .kpo-share a, .kpo .kpo-share button {
	display: inline-flex; align-items: center; height: 38px; margin: 0; padding: 0 16px; background: #fff; color: #334155;
	border: 1px solid #d5deea; border-radius: 999px; box-shadow: none; font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1;
	text-decoration: none; text-transform: none; letter-spacing: 0; cursor: pointer; transition: all .2s ease;
}
.kpo .kpo-share a:hover, .kpo .kpo-share button:hover { background: var(--kpo-blue); border-color: var(--kpo-blue); color: #fff; }
.kpo .kpo-share button.is-done { background: #15803d; border-color: #15803d; color: #fff; }

/* Khối kêu gọi hành động */
.kpo .kpo-cta {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; max-width: 820px; margin: 34px auto 0; padding: 28px 30px;
	background: linear-gradient(135deg, #004b93 0%, #0069c4 100%); color: #fff; border-radius: 16px; box-shadow: 0 18px 36px -18px rgba(0, 75, 147, .7);
}
.kpo .kpo-cta-text { flex: 1 1 320px; }
.kpo .kpo-cta h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; line-height: 1.35; color: #fff; text-transform: none; }
.kpo .kpo-cta p { margin: 0; font-size: 14.5px; line-height: 1.6; color: rgba(255, 255, 255, .88); }
.kpo .kpo-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.kpo .kpo-cta-tel { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; color: #fff; border: 1.5px solid rgba(255, 255, 255, .6); border-radius: 12px; font-size: 13px; font-weight: 800; text-decoration: none; transition: background-color .2s, color .2s; }
.kpo .kpo-cta-tel:hover { background: #fff; color: #004b93; }

/* Bài viết liên quan */
.kpo .kpo-related { max-width: 820px; margin: 44px auto 0; }
.kpo .kpo-related-title { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 18px; font-weight: 800; color: #0f172a; text-transform: none; }
.kpo .kpo-related-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: #ea580c; }
.kpo .kpo-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.kpo .kpo-rel-card { display: flex; flex-direction: column; gap: 8px; }
.kpo .kpo-rel-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #e2e8f0; border-radius: 10px; }
.kpo .kpo-rel-thumb img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; transition: transform .4s ease; }
.kpo .kpo-rel-card:hover .kpo-rel-thumb img { transform: scale(1.05); }
.kpo .kpo-rel-card h3 { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.45; text-transform: none; }
.kpo .kpo-rel-card h3 a { color: #0f172a; text-decoration: none; }
.kpo .kpo-rel-card h3 a:hover { color: var(--kpo-blue); }
.kpo .kpo-rel-card time { font-size: 12.5px; color: #64748b; }

@media (max-width: 1024px) {
	.kpo .kpo-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.kpo .kpo-article { padding: 32px 30px 36px; }
}
@media (max-width: 640px) {
	.kpo.kpo-post { padding: 22px 0 44px; }
	.kpo .kpo-container { padding: 0 12px; }
	.kpo .kpo-article { padding: 22px 16px 28px; border-radius: 14px; }
	.kpo .kpo-entry { font-size: 16px; line-height: 1.8; }
	.kpo .kpo-entry h2 { font-size: 21px; margin-top: 36px; }
	.kpo .kpo-related-grid { grid-template-columns: minmax(0, 1fr); }
	.kpo .kpo-cta { padding: 22px 18px; }
	.kpo .kpo-cta-actions { width: 100%; }
	.kpo .kpo-cta-actions > * { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	.kpo .kpo-rel-thumb img, .kpo .kenco-toc-list a, .kpo .kpo-share a, .kpo .kpo-share button { transition: none; }
	.kpo .kpo-rel-card:hover .kpo-rel-thumb img { transform: none; }
}

/* Sidebar bài viết: dùng chung assets/css/kenco-sidebar.css (tiền tố ks-). */
