/* =====================================================================================================
   blog.css - CSS rieng cua blog.minhchinh.com (2026-11-09)
   Nap SAU assets/css/main.css (CSS trang chinh, dong bo bang tools/sync-main-css.php) - xem box_code/css_template.php.
   Mau / bo goc / bong do lay theo trang chinh: do #d21213, tieu de module gradient #111827 -> #374151,
   khung trang vien #e5e7eb bo 10px. Che do toi: html[data-theme=dark] (bang mau giong assets/css/dark.css).
   ===================================================================================================== */

:root {
	--b-red: #d21213;
	--b-red-d: #a90e0f;
	--b-red-soft: #fdecec;
	--b-ink: #111827;
	--b-text: #374151;
	--b-muted: #6b7280;
	--b-line: #e5e7eb;
	--b-bg: #fff;
	--b-soft: #f9fafb;
	--b-head: linear-gradient(135deg, #111827 0%, #374151 100%);
	--b-shadow: 0 2px 8px rgba(17, 24, 39, .06);
	--b-shadow-h: 0 10px 24px rgba(17, 24, 39, .12);
	--b-radius: 10px;
}

html[data-theme=dark] {
	--b-red: #ef4444;
	--b-red-d: #f87171;
	--b-red-soft: #3a1d1d;
	--b-ink: #f3f4f6;
	--b-text: #e7e6e4;
	--b-muted: #a3a3a3;
	--b-line: #3b3535;
	--b-bg: #212121;
	--b-soft: #1b1b1b;
	--b-shadow: 0 2px 8px rgba(0, 0, 0, .35);
	--b-shadow-h: 0 10px 24px rgba(0, 0, 0, .5);
}

/* ---------- Thanh tren cung ---------- */
.blog-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 25px; line-height: 25px; }
.blog-topbar-home { color: var(--b-muted); text-decoration: none; font-size: 12px; }
.blog-topbar-home:hover { color: var(--b-red); }

/* ---------- Khung chung ---------- */
.blog-wrap { color: var(--b-text); font-size: 14px; line-height: 1.6; }
.blog-wrap a { text-decoration: none; }
.blog-wrap img { max-width: 100%; }
.blog-wrap h1, .blog-wrap h2, .blog-wrap h3 { font-family: inherit; }

.blog-head {
	position: relative;
	margin: 0 0 14px;
	padding: 14px 18px 14px 22px;
	background: var(--b-bg);
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius);
	box-shadow: var(--b-shadow);
	overflow: hidden;
}
.blog-head:before {
	content: "";
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 5px;
	background: var(--b-red);
}
.blog-wrap .blog-head-title,
.blog-wrap .blog-head h1 {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--b-ink);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	text-align: left;
	text-transform: uppercase;
	letter-spacing: .2px;
}
.blog-head-sub { margin: 4px 0 0; color: var(--b-muted); font-size: 13px; }

.blog-empty {
	padding: 40px 20px;
	text-align: center;
	color: var(--b-muted);
	background: var(--b-bg);
	border: 1px dashed var(--b-line);
	border-radius: var(--b-radius);
}
.blog-empty h1 { color: var(--b-ink); font-size: 22px; margin: 0 0 8px; }

.blog-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 6px;
	background: var(--b-red);
	color: #fff !important;
	font-weight: 700;
	font-size: 13px;
	border: 1px solid var(--b-red);
	transition: background .2s, color .2s;
}
.blog-btn:hover { background: var(--b-red-d); border-color: var(--b-red-d); }
.blog-btn-ghost { background: transparent; color: var(--b-red) !important; }
.blog-btn-ghost:hover { background: var(--b-red-soft); }

/* ---------- Nhan chuyen muc ---------- */
.badge-group {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	background: var(--b-red);
	color: #fff !important;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.6;
	text-transform: uppercase;
	letter-spacing: .3px;
	text-decoration: none;
	white-space: nowrap;
	vertical-align: middle;
}
.badge-group:after { content: none !important; }
.badge-group:hover { filter: brightness(1.08); }
.badge-group-13 { background: #0e7490; }
.badge-group-11 { background: #7c3aed; }
.badge-group-15 { background: #059669; }
.badge-group-22, .badge-group-23, .badge-group-24, .badge-group-26, .badge-group-27 { background: #b45309; }

/* ---------- The bai viet (.bp) ---------- */
.bp {
	display: flex;
	flex-direction: column;
	background: var(--b-bg);
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius);
	box-shadow: var(--b-shadow);
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}
.bp:hover { box-shadow: var(--b-shadow-h); transform: translateY(-2px); }
.bp-thumb { position: relative; display: block; overflow: hidden; background: var(--b-soft); }
.bp-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}
.bp:hover .bp-thumb img { transform: scale(1.04); }
.bp-thumb.is-video:after {
	content: "";
	position: absolute;
	left: 50%; top: 50%;
	width: 44px; height: 44px;
	margin: -22px 0 0 -22px;
	border-radius: 50%;
	background: rgba(210, 18, 19, .9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 24px no-repeat;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.bp-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; min-width: 0; }
.bp-cat { line-height: 1; }
.blog-wrap .bp-title {
	margin: 0;
	padding: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	background: none;
	border: 0;
	text-align: left;
}
.bp-title a {
	color: var(--b-ink);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bp-title a:hover { color: var(--b-red); }
.bp-excerpt {
	margin: 0;
	color: var(--b-muted);
	font-size: 13px;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bp-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; color: var(--b-muted); font-size: 12px; }
.bp-meta i { margin-right: 3px; }

/* luoi (card) */
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.bp-card .bp-thumb { aspect-ratio: 16 / 10; }

/* danh sach ngang (row) */
.blog-list { display: flex; flex-direction: column; gap: 12px; }
.bp-row { flex-direction: row; }
.bp-row .bp-thumb { flex: 0 0 240px; aspect-ratio: 16 / 10; }
.bp-row .bp-thumb img { height: 100%; }
.blog-wrap .bp-row .bp-title { font-size: 17px; }

/* nho (mini) - cot ben canh bai noi bat */
.bp-mini { flex-direction: row; box-shadow: none; }
.bp-mini:hover { transform: none; }
.bp-mini .bp-thumb { flex: 0 0 120px; }
.bp-mini .bp-body { padding: 8px 10px; gap: 4px; }
.blog-wrap .bp-mini .bp-title { font-size: 13.5px; }
.bp-mini .bp-title a { -webkit-line-clamp: 3; }

/* ---------- Khoi tin noi bat (trang chu) ---------- */
.blog-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 12px; margin-bottom: 22px; }
.blog-hero-main {
	position: relative;
	min-height: 380px;
	border-radius: var(--b-radius);
	overflow: hidden;
	background: #111827;
	box-shadow: var(--b-shadow);
}
.blog-hero-img, .blog-hero-img img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.blog-hero-img img { object-fit: cover; transition: transform .5s ease; }
.blog-hero-main:hover .blog-hero-img img { transform: scale(1.03); }
.blog-hero-overlay {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 60px 18px 16px;
	background: linear-gradient(to top, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .55) 55%, rgba(0, 0, 0, 0) 100%);
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.blog-wrap .blog-hero-title { margin: 0; padding: 0; background: none; border: 0; font-size: 21px; line-height: 1.35; font-weight: 700; text-align: left; }
.blog-hero-title a { color: #fff; }
.blog-hero-title a:hover { color: #fecaca; }
.blog-hero-overlay .bp-meta { color: #d1d5db; }
.blog-hero-side { display: flex; flex-direction: column; gap: 10px; }
.blog-hero-side .bp-mini { flex: 1; }

/* ---------- Tieu de khoi (giong .mdtitle cua trang chinh) ---------- */
.blog-section { margin: 0 0 24px; }
.blog-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
	padding: 0 12px;
	min-height: 38px;
	border-radius: var(--b-radius) var(--b-radius) 0 0;
	background: var(--b-head);
	border-bottom: 3px solid var(--b-red);
}
.blog-wrap .blog-section-title { margin: 0; padding: 0; background: none; border: 0; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.blog-section-title, .blog-section-title a { color: #fff; }
.blog-section-more { color: #e5e7eb; font-size: 12px; white-space: nowrap; }
.blog-section-more:hover, .blog-section-title a:hover { color: #fecaca; }

/* ---------- Breadcrumb ---------- */
.blog-breadcrumb { margin: 0 0 12px; font-size: 13px; }
.blog-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.blog-breadcrumb li { display: flex; align-items: center; color: var(--b-muted); background: none; padding: 0; margin: 0; }
.blog-breadcrumb li + li:before { content: "\203A"; margin: 0 8px; color: #9ca3af; }
.blog-breadcrumb a { color: var(--b-text); }
.blog-breadcrumb a:hover { color: var(--b-red); }
.blog-breadcrumb li:first-child a:before {
	content: "";
	display: inline-block;
	width: 13px; height: 13px;
	margin-right: 5px;
	vertical-align: -2px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2 12h3v8h6v-6h2v6h6v-8h3z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2 12h3v8h6v-6h2v6h6v-8h3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Phan trang ---------- */
.blog-pagination { margin: 18px 0 6px; }
.blog-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.blog-pagination li { margin: 0; padding: 0; background: none; }
.blog-pagination a, .blog-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid var(--b-line);
	border-radius: 6px;
	background: var(--b-bg);
	color: var(--b-text);
	font-weight: 700;
	box-sizing: border-box;
}
.blog-pagination a:hover { border-color: var(--b-red); color: var(--b-red); }
.blog-pagination .active span { background: var(--b-red); border-color: var(--b-red); color: #fff; }
.blog-pagination .gap span { border: 0; background: none; min-width: 20px; padding: 0; }

/* ---------- Bai viet chi tiet ---------- */
.blog-article {
	background: var(--b-bg);
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius);
	box-shadow: var(--b-shadow);
	padding: 20px 24px 22px;
	margin-bottom: 24px;
}
.blog-article-head { padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--b-line); display: flex; flex-direction: column; gap: 10px; }
.blog-wrap .blog-article-title {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--b-ink);
	font-size: 26px;
	line-height: 1.35;
	font-weight: 700;
	text-align: left;
	text-transform: none;
}
.blog-article-body { font-size: 16px; line-height: 1.75; color: var(--b-text); overflow-wrap: anywhere; }
.blog-article-body p { margin: 0 0 14px; }
.blog-article-body p:empty { display: none; }
.blog-article-body img { max-width: 100%; height: auto !important; border-radius: 8px; }
.blog-article-body a { color: var(--b-red); text-decoration: underline; text-underline-offset: 2px; }
.blog-article-body h2, .blog-article-body h3, .blog-article-body h4 { color: var(--b-ink); line-height: 1.4; margin: 22px 0 10px; background: none; border: 0; padding: 0; text-align: left; }
.blog-article-body h2 { font-size: 21px; }
.blog-article-body h3 { font-size: 18px; }
.blog-article-body ul, .blog-article-body ol { margin: 0 0 14px 22px; padding: 0; }
.blog-article-body li { margin: 0 0 6px; background: none; padding: 0; }
.blog-article-body blockquote { margin: 16px 0; padding: 10px 16px; border-left: 4px solid var(--b-red); background: var(--b-soft); color: var(--b-text); }
.blog-article-body table { max-width: 100%; border-collapse: collapse; margin: 0 0 14px; }
.blog-article-body td, .blog-article-body th { border: 1px solid var(--b-line); padding: 6px 8px; }
.blog-article-body iframe, .blog-article-body video { max-width: 100%; }
/* noi dung soan bang CKEditor thuong gan cung font/co chu - dong bo lai cho de doc */
.blog-article-body span[style*="font-family"] { font-family: inherit !important; }
.blog-article-body span[style*="font-size"] { font-size: inherit !important; }
.blog-article-body .news_details hr, .blog-article-body > hr:first-child { display: none; }
.blog-article-lead { font-weight: 700; color: var(--b-ink); }
.blog-article-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--b-line); }

/* Trang tinh (chuyen muc co glr_html) */
.blog-static { background: var(--b-bg); border: 1px solid var(--b-line); border-radius: var(--b-radius); box-shadow: var(--b-shadow); padding: 16px 20px; overflow: hidden; }
.blog-static img { max-width: 100%; height: auto !important; }

/* ---------- Cot phai: module "Tin noi bat" (getgallerylist) + "Danh muc" ---------- */
/* Module PHP trong DB boc danh sach bang <div style="padding:5px"> -> bo lop dem do, de tung dong tu canh le */
#rightmodule .content > div[style*="padding"]:has(> .belowNews) { padding: 0 !important; }
#rightmodule .belowNews {
	position: relative;
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 0;
	padding: 10px 12px;
	border-bottom: 1px solid var(--b-line);
	font-size: 13px;
	font-weight: 400;
	background: none;
	transition: background .15s;
}
#rightmodule .belowNews:last-child { border-bottom: 0; }
#rightmodule .belowNews:hover { background: var(--b-soft); }
#rightmodule .belowNews:before {
	content: "";
	position: absolute;
	left: 0; top: 10px; bottom: 10px;
	width: 3px;
	border-radius: 0 3px 3px 0;
	background: var(--b-red);
	opacity: 0;
	transition: opacity .15s;
}
#rightmodule .belowNews:hover:before { opacity: 1; }
#rightmodule .belowNews .left { flex: 0 0 92px; width: 92px; float: none; padding: 0; margin: 0; background: none; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(17, 24, 39, .12); }
#rightmodule .belowNews .left img { display: block; width: 100%; aspect-ratio: 110 / 76; object-fit: cover; border: 0; padding: 0; margin: 0; transition: transform .3s ease; }
#rightmodule .belowNews:hover .left img { transform: scale(1.05); }
#rightmodule .belowNews .right { flex: 1; min-width: 0; float: none; width: auto; padding: 0; display: flex; flex-direction: column; gap: 5px; }
/* Nhan chuyen muc dang chu nho mau do (khong khoi do dac) - nhe mat hon trong cot hep */
#rightmodule .belowNews .badge-group {
	align-self: flex-start;
	padding: 0;
	border-radius: 0;
	background: none;
	background-image: none;
	color: var(--b-red) !important;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .4px;
	line-height: 1.3;
}
#rightmodule .belowNews .badge-group:hover { text-decoration: underline; filter: none; }
#rightmodule .belowNews a.belowNews-title {
	padding: 0;
	background: none;
	color: var(--b-text) !important;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color .15s;
}
#rightmodule .belowNews:hover a.belowNews-title,
#rightmodule .belowNews a.belowNews-title:hover { color: var(--b-red) !important; }
/* Danh muc: danh sach doc (moi chuyen muc 1 dong) - icon, mui ten phai, hover do. Markup tu module DB:
   <div class="menu_tags"><div><a>..</a></div>...</div> */
#rightmodule .menu_tags { display: block; padding: 4px 0; margin: 0; }
#rightmodule .menu_tags > div { margin: 0; padding: 0; float: none; border-bottom: 1px solid var(--b-line); }
#rightmodule .menu_tags > div:last-child { border-bottom: 0; }
#rightmodule .menu_tags a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 34px 11px 14px;
	border: 0;
	border-radius: 0;
	background: none;
	background-image: none;
	color: var(--b-text);
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background .15s, color .15s, padding-left .15s;
}
#rightmodule .menu_tags a:before {
	content: "";
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border-radius: 6px;
	background: var(--b-red-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23d21213' d='M4 5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm3 2v2h10V7zm0 4v2h10v-2zm0 4v2h6v-2z'/%3E%3C/svg%3E") center / 15px no-repeat;
}
#rightmodule .menu_tags a:after {
	content: "";
	position: absolute;
	right: 14px;
	top: 50%;
	width: 7px;
	height: 7px;
	margin-top: -4px;
	border-top: 2px solid #9ca3af;
	border-right: 2px solid #9ca3af;
	transform: rotate(45deg);
	transition: border-color .15s, right .15s;
}
#rightmodule .menu_tags a:hover { background: var(--b-soft); color: var(--b-red); padding-left: 18px; }
#rightmodule .menu_tags a:hover:after { border-color: var(--b-red); right: 11px; }

/* ---------- Khung trang: lap day het chieu rong .pcontent ----------
   main.css (trang chinh) dat .noleft #contentmodule = 690px tu thoi khung 1000px; nay .pcontent da la 1024px
   nen hut 24px (cot phai khong thang mep menu). Tinh lai = phan con lai sau cot phai (300px + 10px dem trai). */
@media only screen and (min-width: 1000px) {
	.responsive.noleft #contentmodule { width: calc(100% - 310px); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
	.blog-wrap { padding: 0 2px; }
	.blog-hero { grid-template-columns: 1fr; }
	.blog-hero-main { min-height: 260px; }
	.blog-wrap .blog-hero-title { font-size: 18px; }
	.bp-row .bp-thumb { flex-basis: 130px; }
	.bp-row .bp-excerpt { display: none; }
	.blog-wrap .bp-row .bp-title { font-size: 15px; }
	.blog-article { padding: 14px 14px 16px; }
	.blog-wrap .blog-article-title { font-size: 21px; }
	.blog-article-body { font-size: 15.5px; }
	.blog-wrap .blog-head-title { font-size: 19px; }
}
@media (max-width: 480px) {
	.blog-grid { grid-template-columns: 1fr; }
	.bp-row .bp-thumb, .bp-mini .bp-thumb { flex-basis: 110px; }
	.bp-row .bp-body { padding: 8px 10px; }
	.blog-article-foot .blog-btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	.bp, .bp-thumb img, .blog-hero-img img { transition: none; }
	.bp:hover { transform: none; }
}
