/* Giao diện tạp chí doisongso.net – nạp mọi trang (inc/tap-chi.php, công tắc DSS_TAP_CHI).
   Không dùng url() / @import: inc/toc-do.php chèn file này thẳng vào HTML. */

:root {
	--dss-chu: #222;
	--dss-mo: #767676;
	--dss-vien: #ebebeb;
}
body {
	color: var(--dss-chu);
}
[hidden] {
	display: none !important;
}

/* ===== Thanh trên cùng ===== */
.dss-thanh-tren {
	background: #111;
	color: #cfcfcf;
	font-size: 12px;
}
.dss-thanh-tren-trong {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 34px;
	padding: 0 40px;
}
.dss-hom-nay {
	font-weight: 600;
	text-transform: capitalize;
	white-space: nowrap;
}
.dss-thanh-tren-link {
	display: flex;
	gap: 18px;
	overflow: hidden;
}
.dss-thanh-tren-link a {
	color: #cfcfcf;
	text-decoration: none;
	white-space: nowrap;
}
.dss-thanh-tren-link a:hover {
	color: #fff;
}

/* ===== Header: logo trái, quảng cáo 728x90 phải ===== */
.site-header .inside-header {
	padding-top: 22px;
	padding-bottom: 22px;
	align-items: center;
}
.main-title {
	font-size: 34px;
	letter-spacing: -1px;
}
.main-title a::before {
	height: 34px;
}
.dss-qc-dau {
	margin-left: auto;
	width: 728px;
	height: 90px;
	line-height: 0;
	background: #f4f4f4;
}
@media (max-width: 1024px) {
	.dss-qc-dau {
		display: none;
	}
}

/* ===== Menu: nền trắng, kẻ trên dưới, mục đang xem gạch chân ===== */
.main-navigation {
	border-top: 1px solid var(--dss-vien);
	border-bottom: 1px solid var(--dss-vien);
}
.main-navigation .main-nav > ul > li > a {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .2px;
}
@media (min-width: 769px) {
	.main-navigation .main-nav > ul > li > a {
		position: relative;
	}
	.main-navigation .main-nav > ul > li > a::after {
		content: "";
		position: absolute;
		left: 20px;
		right: 20px;
		bottom: 0;
		height: 3px;
		background: var(--dss-xanh);
		transform: scaleX(0);
		transition: transform .2s;
	}
	.main-navigation .main-nav > ul > li:hover > a::after,
	.main-navigation .main-nav > ul > li.current-menu-item > a::after,
	.main-navigation .main-nav > ul > li.current-menu-ancestor > a::after,
	.main-navigation .main-nav > ul > li.current-menu-parent > a::after {
		transform: scaleX(1);
	}
	.main-navigation ul ul {
		box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
		border-top: 3px solid var(--dss-xanh);
	}
}
.main-navigation ul ul li a {
	font-size: 14px;
	font-weight: 600;
}

/* ===== Dòng "Tin mới" dưới menu ===== */
.dss-tin-moi {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 40px 0;
	font-size: 14px;
}
.dss-tin-moi-nhan {
	flex: 0 0 auto;
	background: #111;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 5px 10px;
}
.dss-tin-moi ul {
	flex: 1;
	min-width: 0;
	list-style: none;
	margin: 0;
	padding: 0;
}
.dss-tin-moi li {
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.dss-tin-moi a {
	color: var(--dss-chu);
	text-decoration: none;
}
.dss-tin-moi a:hover {
	color: var(--dss-xanh);
}

/* ===== Nhãn chuyên mục (màu theo chuyên mục: --mau) ===== */
.dss-nhan {
	display: inline-block;
	background: var(--mau, #46a546);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.5;
	text-transform: uppercase;
	letter-spacing: .3px;
	padding: 3px 8px;
	border-radius: 0;
	text-decoration: none;
}
a.dss-nhan:hover {
	color: #fff;
	filter: brightness(.9);
}

/* ===== Tiêu đề widget: nhãn đen + kẻ dưới ===== */
.widget-title {
	border-bottom: 2px solid #111;
	padding: 0;
	margin-bottom: 18px;
	font-size: 14px;
	line-height: 1;
}
.widget-title span {
	display: inline-block;
	background: #111;
	color: #fff;
	padding: 8px 12px 6px;
}
/* one-container: GP vẫn để đệm 40px quanh mỗi widget (kiểu hộp cũ) → khe giữa 2 cột 80px, sidebar chỉ còn 256px
   (không vừa quảng cáo 300px) và lệch mép phải so với lưới nổi bật. Bỏ đệm: khe còn 40px, sidebar rộng ~336px. */
.one-container .sidebar .widget {
	padding: 0;
	margin-bottom: 36px;
}
.sidebar .widget a {
	text-decoration: none;
}
.dss-ds-nho a.dss-tieu-de {
	font-weight: 600;
	color: var(--dss-chu);
}

/* ===== Trang chuyên mục / thẻ / tìm kiếm: ảnh trái – chữ phải ===== */
.archive .page-header,
.search .page-header {
	border-bottom: 3px solid #111;
	margin-bottom: 28px;
	padding-bottom: 12px;
}
.archive .page-header h1,
.search .page-header h1 {
	font-size: 32px;
	font-weight: 800;
	margin: 0;
}
.taxonomy-description {
	color: var(--dss-mo);
	font-size: 15px;
	margin-top: 8px;
}
:is(.archive, .search, .blog) .site-main > article {
	border-bottom: 1px solid var(--dss-vien);
	padding-bottom: 24px;
	margin-bottom: 24px;
}
:is(.archive, .search, .blog) .site-main .inside-article {
	padding: 0;
}
:is(.archive, .search, .blog) .inside-article:has(.post-image) {
	display: grid;
	grid-template-columns: 280px 1fr;
	column-gap: 24px;
	align-items: start;
}
:is(.archive, .search, .blog) .inside-article:has(.post-image) > :not(.post-image) {
	grid-column: 2;
}
:is(.archive, .search, .blog) .post-image {
	grid-column: 1;
	grid-row: 1 / span 4;
	margin: 0 !important;
	overflow: hidden;
}
:is(.archive, .search, .blog) .post-image img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform .3s;
}
:is(.archive, .search, .blog) .post-image:hover img {
	transform: scale(1.04);
}
:is(.archive, .search, .blog) .entry-title {
	font-size: 22px;
	line-height: 1.3;
	font-weight: 800;
	margin-bottom: 6px;
}
:is(.archive, .search, .blog) .entry-title a {
	color: #111;
}
:is(.archive, .search, .blog) .entry-title a:hover {
	color: var(--dss-xanh);
}
:is(.archive, .search, .blog) .entry-meta {
	font-size: 12px;
	color: var(--dss-mo);
}
:is(.archive, .search, .blog) .entry-summary {
	margin-top: 8px;
	font-size: 15px;
	line-height: 1.6;
	color: #555;
}
:is(.archive, .search, .blog) .entry-summary p {
	margin-bottom: 0;
}
:is(.archive, .search, .blog) footer.entry-meta {
	display: none;
}
.paging-navigation .nav-links > * {
	display: inline-block;
	min-width: 40px;
	padding: 8px 12px;
	margin: 0 4px 4px 0;
	border: 1px solid var(--dss-vien);
	text-align: center;
	text-decoration: none;
}
.paging-navigation .nav-links .current {
	background: #111;
	border-color: #111;
	color: #fff;
}
@media (max-width: 768px) {
	:is(.archive, .search, .blog) .inside-article:has(.post-image) {
		grid-template-columns: 120px 1fr;
		column-gap: 14px;
	}
	:is(.archive, .search, .blog) .entry-title {
		font-size: 16px;
	}
	:is(.archive, .search, .blog) .entry-summary {
		display: none;
	}
	.archive .page-header h1,
	.search .page-header h1 {
		font-size: 24px;
	}
}

/* ===== Quảng cáo ===== */
.dss-qc {
	min-height: 0;
	margin: 0 0 32px;
}
.dss-qc-nhan {
	display: block;
	font-size: 11px;
	line-height: 1;
	color: #999;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 8px;
}
.dss-qc-nhan::before,
.dss-qc-nhan::after {
	content: " — ";
}
.dss-qc-trong-bai {
	margin: 28px 0;
	min-height: 300px; /* nhãn + quảng cáo ~280px: chừa sẵn để chữ không bị đẩy */
}
.dss-trang-chu .dss-qc {
	min-height: 300px;
}
/* AdSense không có quảng cáo để hiện → ẩn hẳn khung, không để ô trắng.
   Chỉ nhắm khối của mình + 2 widget quảng cáo (text-5, text-6): Auto ads có thể chèn <ins> vào widget khác, không được ẩn nhầm widget đó. */
.dss-qc:has(> ins[data-ad-status="unfilled"]),
:is(#text-5, #text-6):has(ins[data-ad-status="unfilled"]) {
	display: none;
}
.dss-qc-dau:has(> ins[data-ad-status="unfilled"]) {
	visibility: hidden; /* giữ chỗ 90px để header không nhảy */
}

/* ===== Chân trang ===== */
.footer-widgets {
	font-size: 14px;
}
.footer-widgets a {
	text-decoration: none;
}
.footer-widgets a:hover {
	color: var(--dss-xanh);
}
.site-footer .widget-title {
	border-color: #333;
}
.site-footer .widget-title span {
	background: var(--dss-xanh);
}
.tagcloud {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.tagcloud a {
	font-size: 12px !important; /* tag cloud in cỡ chữ bằng style riêng từng thẻ */
	line-height: 1.4;
	padding: 5px 10px;
	border: 1px solid #333;
	color: #ccc;
}
.tagcloud a:hover {
	background: var(--dss-xanh);
	border-color: var(--dss-xanh);
	color: #fff;
}

/* ===== Điện thoại ===== */
@media (max-width: 768px) {
	.dss-thanh-tren-trong,
	.dss-tin-moi {
		padding-left: 20px;
		padding-right: 20px;
	}
	.dss-thanh-tren-link {
		display: none;
	}
	.main-title {
		font-size: 26px;
	}
	.main-title a::before {
		height: 26px;
	}
}
