/* Tin tức KDK – danh sách + chi tiết bài viết. Cùng ngôn ngữ thiết kế với trang chủ (Inter, đỏ #e63946, thẻ bo tròn, bóng mềm). */
.mbw-news {
	--red: #e63946;
	--ink: #111827;
	--text: #4b5563;
	--muted: #9ca3af;
	--line: #e5e7eb;
	--soft: #f8fafc;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--text);
	background: #fff;
}
.mbw-news *, .mbw-news *::before, .mbw-news *::after { box-sizing: border-box; }
.mbw-wrap, .mbw-narrow { max-width: 1440px; margin: 0 auto; padding: 0 40px; }
@media (min-width: 768px) and (max-width: 1280px) { .mbw-wrap, .mbw-narrow { padding: 0 24px; } }
@media (min-width: 768px) and (max-width: 1024px) { .mbw-wrap, .mbw-narrow { padding: 0 16px; } }

/* Breadcrumb */
.mbw-bc { margin-bottom: 22px; font-size: 13.5px; }
.mbw-bc ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.mbw-bc li { margin: 0; color: var(--muted); }
.mbw-bc li + li::before { content: "/"; margin-right: 6px; color: #cbd5e1; }
.mbw-bc a { color: var(--text); text-decoration: none; }
.mbw-bc a:hover { color: var(--red); }
.mbw-bc .is-current { color: var(--ink); font-weight: 500; }

/* Eyebrow + dash (như phần "Why choose us" ở trang chủ) */
.mbw-eyebrow { display: inline-block; font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: .3px; }
.mbw-dash { display: block; width: 24px; height: 2px; background: var(--red); margin: 12px 0 18px; border-radius: 2px; }

/* Hero danh sách */
.mbw-hero { background: linear-gradient(180deg, #f8fafc 0%, #fff 100%); padding: 56px 0 36px; }
.mbw-hero__title { font-size: 46px; font-weight: 800; line-height: 1.15; letter-spacing: -1px; color: var(--ink); margin: 0; }
.mbw-hero__sub { max-width: 640px; margin: 16px 0 0; font-size: 17px; line-height: 1.6; }

.mbw-list-body { padding-top: 8px; padding-bottom: 80px; }

/* Bộ lọc chuyên mục */
.mbw-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 36px; }
.mbw-filter a {
	display: inline-flex; align-items: center; height: 40px; padding: 0 20px; border-radius: 999px;
	border: 1px solid var(--line); background: #fff; color: #2d3748; font-size: 14px; font-weight: 600; text-decoration: none;
	transition: all .25s ease;
}
.mbw-filter a:hover { border-color: var(--red); color: var(--red); }
.mbw-filter a.is-active { background: var(--red); border-color: var(--red); color: #fff; }

/* Thẻ bài viết: chỉ ảnh + tiêu đề, không viền, không bóng; hover chỉ nhích lên nhẹ */
.mbw-card { display: flex; flex-direction: column; background: transparent; border: 0; border-radius: 0; box-shadow: none; transition: transform .3s cubic-bezier(.2, 0, 0, 1); }
.mbw-card:hover { transform: translateY(-4px); }
.mbw-card__media { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 14px; background: var(--soft); }
.mbw-card__media > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mbw-card__ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f1f5f9, #e2e8f0); }
.mbw-card__ph img { width: 96px; height: auto; opacity: .55; }
.mbw-card__body { padding: 14px 2px 0; }
.mbw-card__title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mbw-card__title a { color: var(--ink); text-decoration: none; }
.mbw-card__title a:hover { color: var(--ink); }
.mbw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 20px; }
.mbw-empty { padding: 60px 0; text-align: center; font-size: 16px; }

/* Phân trang */
.mbw-pagination { margin-top: 56px; }
.mbw-pagination ul.page-numbers, .mbw-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.mbw-pagination li { margin: 0; }
.mbw-pagination ul.page-numbers { border: 0; box-shadow: none; background: none; min-width: 0; height: auto; padding: 0; border-radius: 0; }
.mbw-pagination a.page-numbers, .mbw-pagination span.page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 14px;
	border-radius: 999px; border: 1px solid var(--line); color: #2d3748; font-size: 14px; font-weight: 600; text-decoration: none; transition: all .25s ease;
}
.mbw-pagination a.page-numbers:hover { border-color: var(--red); color: var(--red); }
.mbw-pagination span.page-numbers.current, .mbw-pagination a.page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; }
.mbw-pagination .page-numbers.dots { border: none; }

/* ===== Chi tiết bài viết ===== */
.mbw-article__head { padding: 48px 0 8px; }
.mbw-article__title { margin: 6px 0 0; font-size: 40px; font-weight: 800; line-height: 1.2; letter-spacing: -.8px; color: var(--ink); }
.mbw-article__cover { margin-top: 32px; margin-bottom: 0; }
.mbw-article__cover img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: cover; border-radius: 20px; }

.mbw-article__content { padding: 36px 0 8px; font-size: 17px; line-height: 1.8; color: #374151; overflow-wrap: break-word; }
.mbw-article__content > *:first-child { margin-top: 0; }
.mbw-article__content p { margin: 0 0 1.25em; }
.mbw-article__content h2, .mbw-article__content h3, .mbw-article__content h4 { color: var(--ink); font-weight: 800; line-height: 1.3; letter-spacing: -.4px; margin: 2em 0 .7em; text-transform: none; }
.mbw-article__content h2 { font-size: 28px; padding-bottom: 10px; border-bottom: 2px solid var(--line); position: relative; }
.mbw-article__content h2::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 56px; height: 2px; background: var(--red); }
.mbw-article__content h3 { font-size: 22px; }
.mbw-article__content h4 { font-size: 18px; }
.mbw-article__content a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.mbw-article__content ul, .mbw-article__content ol { margin: 0 0 1.4em 1.4em; padding: 0; }
.mbw-article__content li { margin-bottom: .5em; }
.mbw-article__content li::marker { color: var(--red); font-weight: 700; }
.mbw-article__content img { max-width: 100%; height: auto; border-radius: 14px; }
.mbw-article__content figure { margin: 1.6em 0; }
.mbw-article__content figcaption { margin-top: 8px; font-size: 13.5px; color: var(--muted); text-align: center; }
.mbw-article__content blockquote { margin: 1.6em 0; padding: 18px 24px; border-left: 4px solid var(--red); background: var(--soft); border-radius: 0 14px 14px 0; color: var(--ink); font-style: normal; }
.mbw-article__content blockquote p:last-child { margin-bottom: 0; }
.mbw-article__content table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.6em 0; font-size: 15px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: block; overflow-x: auto; }
.mbw-article__content th, .mbw-article__content td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mbw-article__content th { background: var(--soft); color: var(--ink); font-weight: 700; }
.mbw-article__content tr:last-child td { border-bottom: none; }
/* Biến thể bảng: thêm class vào khối Bảng (Nâng cao > Lớp CSS bổ sung) */
.mbw-article__content figure.wp-block-table { margin: 1.6em 0; overflow-x: auto; }
.mbw-article__content figure.wp-block-table table { display: table; width: 100%; min-width: 560px; margin: 0; }
.mbw-article__content table th { text-transform: none; letter-spacing: 0; font-size: inherit; }
.mbw-article__content figure.wp-block-table figcaption { text-align: left; }
.mbw-article__content table.is-style-stripes tbody tr:nth-child(even) td { background: var(--soft); }
/* bang-bao-gia: tiêu đề xanh lá, viền đen (kiểu bảng giá) */
.mbw-article__content .bang-bao-gia table, .mbw-article__content table.bang-bao-gia { border: 1px solid #111; border-radius: 0; }
.mbw-article__content .bang-bao-gia th, .mbw-article__content table.bang-bao-gia th { background: #92d050; color: #111; border: 1px solid #111; padding: 8px 6px; }
.mbw-article__content .bang-bao-gia td, .mbw-article__content table.bang-bao-gia td { border: 1px solid #111; padding: 8px 6px; }
.mbw-article__content .bang-bao-gia tr:last-child td, .mbw-article__content table.bang-bao-gia tr:last-child td { border-bottom: 1px solid #111; }
/* bang-luoi: lưới mảnh, nhiều cột, phù hợp bảng phạm vi áp dụng */
.mbw-article__content .bang-luoi table, .mbw-article__content table.bang-luoi { border-radius: 0; border: 1px solid var(--line); font-size: 14px; }
.mbw-article__content .bang-luoi th, .mbw-article__content table.bang-luoi th { background: #fff; font-weight: 600; border: 1px solid var(--line); }
.mbw-article__content .bang-luoi td, .mbw-article__content table.bang-luoi td { border: 1px solid var(--line); }
.mbw-article__content .bang-luoi tr:last-child td, .mbw-article__content table.bang-luoi tr:last-child td { border-bottom: 1px solid var(--line); }
.mbw-article__content .bang-luoi td:not(:first-child):not(:nth-child(2)):not(:nth-child(3)), .mbw-article__content table.bang-luoi td:not(:first-child):not(:nth-child(2)):not(:nth-child(3)), .mbw-article__content .bang-luoi th:not(:first-child):not(:nth-child(2)):not(:nth-child(3)), .mbw-article__content table.bang-luoi th:not(:first-child):not(:nth-child(2)):not(:nth-child(3)) { text-align: center; }

.mbw-article__content iframe, .mbw-article__content video { max-width: 100%; border-radius: 14px; }

/* Chia sẻ */
.mbw-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 36px 0 0; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink); }
.mbw-share__ico {
	display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; margin: 0; border-radius: 50%; border: 1px solid var(--line); background: #fff;
	color: #2d3748; line-height: 1; text-decoration: none; cursor: pointer; transition: all .25s ease; box-sizing: border-box;
}
.mbw-share__ico svg, .mbw-share__ico img { display: block; width: 20px; height: 20px; }
.mbw-share__ico img { width: 22px; height: 22px; }
.mbw-share__ico--fb { color: #1877f2; }
.mbw-share__ico--in { color: #0a66c2; }
.mbw-share__ico:hover { transform: translateY(-2px); border-color: var(--red); box-shadow: 0 6px 16px rgba(15, 23, 42, .12); }
.mbw-share__copy:hover { background: var(--red); color: #fff; }
.mbw-share__copy .i-ok { display: none; }
.mbw-share__copy.is-done { background: #16a34a; border-color: #16a34a; color: #fff; }
.mbw-share__copy.is-done .i-link { display: none; }
.mbw-share__copy.is-done .i-ok { display: block; }

/* Bài trước / sau */
.mbw-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0 0; }
.mbw-postnav__item { display: block; padding: 18px 22px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; transition: all .25s ease; }
.mbw-postnav__item:hover { border-color: var(--red); box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }
.mbw-postnav__item small { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.mbw-postnav__item span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.mbw-postnav__item--next { grid-column: 2; text-align: right; }

/* Bài viết liên quan */
.mbw-related { margin-top: 72px; padding: 64px 0 80px; background: var(--soft); }
.mbw-related__title { margin: 0 0 32px; font-size: 34px; font-weight: 800; letter-spacing: -.8px; color: var(--ink); }

/* Bài liên quan: 4 card / hàng, nhỏ gọn, không đổ bóng, tiêu đề tối đa 2 dòng */
.mbw-related .mbw-grid { gap: 20px; }

/* Responsive */
@media (max-width: 991px) {
	.mbw-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
	.mbw-related .mbw-grid { grid-template-columns: repeat(2, 1fr); }
	.mbw-card--featured .mbw-card__media { flex-basis: 48%; min-height: 280px; }
	.mbw-card--featured .mbw-card__body { padding: 28px; }
	.mbw-card--featured .mbw-card__title { font-size: 24px; }
}
@media (max-width: 767px) {
	.mbw-wrap, .mbw-narrow { padding: 0 16px; }
	.mbw-hero { padding: 36px 0 24px; }
	.mbw-hero__title { font-size: 32px; letter-spacing: -.6px; }
	.mbw-hero__sub { font-size: 15px; }
	.mbw-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
	.mbw-related .mbw-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.mbw-card--featured { flex-direction: column; }
	.mbw-card--featured .mbw-card__media { flex-basis: auto; min-height: 0; aspect-ratio: 16 / 10; }
	.mbw-card--featured .mbw-card__body { padding: 22px 22px 26px; }
	.mbw-card--featured .mbw-card__title { font-size: 21px; }
	.mbw-article__head { padding-top: 28px; }
	.mbw-article__title { font-size: 28px; }
	.mbw-article__content { font-size: 16px; }
	.mbw-article__content h2 { font-size: 23px; }
	.mbw-article__content h3 { font-size: 19px; }
	.mbw-postnav { grid-template-columns: 1fr; }
	.mbw-postnav__item--next { grid-column: auto; text-align: left; }
	.mbw-related { margin-top: 48px; padding: 44px 0 56px; }
	.mbw-related__title { font-size: 26px; }
}
@media (max-width: 480px) { .mbw-wrap, .mbw-narrow { padding: 0 12px; } }

/* Bảng chèn trực tiếp (trình soạn thảo cổ điển, không có figure bọc): luôn full-width, mobile cuộn ngang */
.mbw-article__content table { display: table; width: 100%; }
@media (max-width: 767px) { .mbw-article__content table { display: block; overflow-x: auto; } }

/* Chuẩn hóa bảng tạo bằng trình soạn thảo cổ điển (thuộc tính border="1", style inline, không có hàng tiêu đề) */
.mbw-article__content table { border-collapse: separate !important; border-spacing: 0; }
.mbw-article__content :where(table[border]) { border: 1px solid var(--line); }
.mbw-article__content :where(table[border]) :where(td, th) { border-width: 0 0 1px; border-style: solid; border-color: var(--line); }
.mbw-article__content :where(table[border]) :where(tr:last-child) td { border-bottom: 0; }
/* Không có <th>: coi hàng đầu tiên là hàng tiêu đề cho các kiểu có class */
.mbw-article__content table.bang-bao-gia:not(:has(th)) tr:first-child td, .mbw-article__content .bang-bao-gia table:not(:has(th)) tr:first-child td { background: #92d050; color: #111; font-weight: 700; }
.mbw-article__content table.bang-luoi:not(:has(th)) tr:first-child td, .mbw-article__content .bang-luoi table:not(:has(th)) tr:first-child td { font-weight: 600; text-align: center; }
.mbw-article__content table.is-style-stripes:not(:has(th)) tr:first-child td, .mbw-article__content .is-style-stripes table:not(:has(th)) tr:first-child td { background: var(--soft); font-weight: 700; color: var(--ink); }
/* Kẻ sọc: bỏ sọc ở hàng tiêu đề */
.mbw-article__content table.is-style-stripes:not(:has(th)) tbody tr:nth-child(even) td { background: var(--soft); }
.mbw-article__content table.is-style-stripes:not(:has(th)) tbody tr:nth-child(odd) td { background: #fff; }
.mbw-article__content table.is-style-stripes:not(:has(th)) tbody tr:first-child td { background: var(--soft); }

/* Không kẻ đường dọc giữa các cột (dùng kèm bang-bao-gia / bang-luoi) */
.mbw-article__content table.khong-ke-doc td, .mbw-article__content table.khong-ke-doc th,
.mbw-article__content .khong-ke-doc table td, .mbw-article__content .khong-ke-doc table th { border-left: 0; border-right: 0; }
.mbw-article__content table.khong-ke-doc, .mbw-article__content .khong-ke-doc table { border-left: 0; border-right: 0; }

/* Trang dịch vụ lắp đặt KDK: bỏ ngày đăng trên thẻ */
.mbw-news--service .mbw-card__meta time { display: none; }

/* Bố cục danh sách + sidebar: 4 cột, nội dung chiếm 3 cột, sidebar 1 cột (bằng bề rộng 1 card) */
.mbw-layout--side { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; align-items: start; }
.mbw-layout--side .mbw-layout__main { grid-column: span 3; min-width: 0; }
.mbw-layout--side .mbw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mbw-side { grid-column: span 1; position: sticky; top: 100px; display: flex; flex-direction: column; gap: 20px; }
.mbw-side__box { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.mbw-side__title { margin: 0 0 14px; font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: 0; }
.mbw-side__search { margin: 0; display: flex; align-items: center; height: 44px; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; transition: border-color .2s; }
.mbw-side__search:focus-within { border-color: var(--red); }
.mbw-side__search input[type="search"] { flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0 0 0 16px; border: 0; box-shadow: none; background: transparent; font-size: 14px; color: var(--ink); outline: none; }
.mbw-side__search button { flex: 0 0 44px; height: 100%; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.mbw-side__search button:hover { color: var(--red); }
.mbw-side__cats { list-style: none; margin: 0; padding: 0; }
.mbw-side__cats li { margin: 0; }
.mbw-side__cats a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; font-weight: 600; color: #2d3748; text-decoration: none; transition: color .2s; }
.mbw-side__cats li:last-child a { border-bottom: 0; padding-bottom: 0; }
.mbw-side__cats a:hover, .mbw-side__cats a.is-active { color: var(--red); }
.mbw-side__cats em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.mbw-side__banner { padding: 24px 20px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #e63946 0%, #b91c2a 100%); }
.mbw-side__banner h2 { margin: 0 0 8px; font-size: 19px; font-weight: 800; line-height: 1.3; letter-spacing: -.2px; color: #fff; }
.mbw-side__banner p { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .9); }
.mbw-side__cta { display: inline-flex; align-items: center; height: 42px; padding: 0 22px; border-radius: 999px; background: #fff; color: var(--red); font-size: 14px; font-weight: 700; text-decoration: none; transition: transform .25s; }
.mbw-side__cta:hover { transform: translateY(-2px); color: var(--red); }
@media (max-width: 991px) {
	.mbw-layout--side { grid-template-columns: 1fr; gap: 32px; }
	.mbw-layout--side .mbw-layout__main { grid-column: auto; }
	.mbw-layout--side .mbw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mbw-side { grid-column: auto; position: static; }
}
