/* Layout for template-post-sidebar.php (loaded only on that template). */
.qq-post-wrap {
	max-width: var(--maxsmall-width-container, 1200px);
	margin: 0 auto;
	padding: 0 16px;
}

/* Breadcrumb */
.qq-breadcrumb {
	padding: 20px 0;
	font-size: var(--small-font-size, 13px);
	color: #8a9293;
}
.qq-breadcrumb a {
	color: var(--normal-color, #354849);
	text-decoration: none;
}
.qq-breadcrumb a:hover { color: var(--active-color, #c0462e); }
.qq-breadcrumb .sep { margin: 0 8px; }

/* Two columns */
.qq-post-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 40px;
	align-items: start;
	padding-bottom: 60px;
}
.qq-post-main { min-width: 0; }
.qq-post-main img { max-width: 100%; height: auto; }
.qq-post-sidebar {
	position: sticky;
	top: 100px;
}

/* Widgets */
.qq-widget {
	margin-bottom: 30px;
	padding: 24px;
	border: 1px solid var(--deactive-color, #d9dbdc);
	border-radius: 6px;
}
.qq-widget-title {
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--deactive-color, #d9dbdc);
	font-size: var(--big-font-size, 18px);
	color: var(--normal-color, #354849);
}
.qq-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Popular posts */
.qq-popular-posts li {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	margin-bottom: 16px;
}
.qq-popular-posts li:last-child { margin-bottom: 0; }
.qq-pp-thumb { flex: 0 0 80px; }
.qq-pp-thumb img {
	display: block;
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 4px;
}
.qq-pp-title {
	display: block;
	font-weight: 600;
	line-height: 1.4;
	color: var(--normal-color, #354849);
	text-decoration: none;
}
.qq-pp-title:hover { color: var(--active-color, #c0462e); }
.qq-pp-date {
	display: block;
	margin-top: 4px;
	font-size: var(--small-font-size, 13px);
	color: #8a9293;
}

/* Categories */
.qq-categories li {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px dashed var(--deactive-color, #d9dbdc);
}
.qq-categories li:last-child { border-bottom: 0; }
.qq-categories a {
	color: var(--normal-color, #354849);
	text-decoration: none;
}
.qq-categories a:hover { color: var(--active-color, #c0462e); }
.qq-cat-count { color: #8a9293; }

/* Tablet / mobile: sidebar goes under the content */
@media (max-width: 991px) {
	.qq-post-layout { grid-template-columns: 1fr; }
	.qq-post-sidebar { position: static; }
}

/* Category archive (category.php → template-parts/listpost-sidebar.php) */
.qq-cat-title { margin-top: 0; }
.qq-cat-desc { margin-bottom: 30px; color: var(--second-color, #424B4D); }
.qq-cat-item {
	display: flex;
	gap: 24px;
	padding: 24px 0;
	border-bottom: 1px solid var(--deactive-color, #d9dbdc);
}
.qq-cat-item:first-child { padding-top: 0; }
.qq-cat-thumb { flex: 0 0 280px; }
.qq-cat-thumb img {
	display: block;
	width: 280px;
	height: 190px;
	object-fit: cover;
	border-radius: 6px;
}
.qq-cat-body { min-width: 0; }
.qq-cat-name {
	display: block;
	font-size: var(--big-font-size, 18px);
	font-weight: 600;
	line-height: 1.4;
	color: var(--normal-color, #354849);
	text-decoration: none;
}
.qq-cat-name:hover { color: var(--active-color, #c0462e); }
.qq-cat-excerpt { margin-top: 10px; }

/* Pagination */
.qq-post-main .pagination { margin-top: 30px; }
.qq-post-main .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.qq-post-main .page-numbers {
	min-width: 38px;
	padding: 8px 12px;
	text-align: center;
	border: 1px solid var(--deactive-color, #d9dbdc);
	border-radius: 4px;
	color: var(--normal-color, #354849);
	text-decoration: none;
}
.qq-post-main .page-numbers.current,
.qq-post-main a.page-numbers:hover {
	background: var(--active-color, #c0462e);
	border-color: var(--active-color, #c0462e);
	color: #fff;
}
.qq-post-main .screen-reader-text { display: none; }

@media (max-width: 767px) {
	.qq-cat-item { flex-direction: column; gap: 14px; }
	.qq-cat-thumb { flex-basis: auto; }
	.qq-cat-thumb img { width: 100%; height: auto; aspect-ratio: 3 / 2; }
}
