/* 홈 카테고리 블록 — /wp-content/plugins/chot-home-blocks/assets/home-blocks.css */

.chb-home .chb-grid {
	--chb-border: #e6e8eb;
	--chb-border-soft: #f1f3f5;
	--chb-muted: #6b7280;
	--chb-hover: #f7f9fc;

	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
	margin: 0 0 10px;
}

/* ---------- 블록 ---------- */

.chb-home .chb-block {
	background: #fff;
	border: 1px solid var(--chb-border);
	border-radius: 10px;
	overflow: hidden;
}

.chb-home .chb-block__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--chb-border);
}

.chb-home .chb-block__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.chb-home .chb-block__title::before {
	content: "";
	flex: 0 0 auto;
	width: 4px;
	height: 15px;
	border-radius: 2px;
	background: var(--chb-accent, #2563eb);
}

.chb-home .chb-block__title a {
	color: inherit;
	text-decoration: none;
}

.chb-home .chb-block__title a:hover {
	color: var(--chb-accent, #2563eb);
}

.chb-home .chb-block__more {
	flex: 0 0 auto;
	font-size: 0.76rem;
	color: var(--chb-muted);
	text-decoration: none;
	white-space: nowrap;
}

.chb-home .chb-block__more:hover {
	color: var(--chb-accent, #2563eb);
}

/* ---------- 목록 ---------- */

.chb-home .chb-list {
	list-style: none;
	margin: 0;
	padding: 4px 0;
}

.chb-home .chb-item {
	margin: 0;
}

.chb-home .chb-item + .chb-item {
	border-top: 1px solid var(--chb-border-soft);
}

.chb-home .chb-item__link {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	padding: 10px 16px;
	color: inherit;
	text-decoration: none;
}

.chb-home .chb-item__link:hover {
	background: var(--chb-hover);
}

.chb-home .chb-item__thumb {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	border-radius: 6px;
	overflow: hidden;
	background: #f1f3f5;
}

.chb-home .chb-item__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.chb-home .chb-item__thumb--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--chb-accent, #2563eb);
	color: #fff;
	font-size: 1.1rem;
	font-weight: 700;
}

.chb-home .chb-item__body {
	flex: 1 1 auto;
	min-width: 0;
}

.chb-home .chb-item__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.45;
	word-break: keep-all;
}

.chb-home .chb-item__link:hover .chb-item__title {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.chb-home .chb-item__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin-top: 4px;
	font-size: 0.72rem;
	color: var(--chb-muted);
}

.chb-home .chb-item__cat {
	color: var(--chb-accent, #2563eb);
	font-weight: 600;
}

/* ---------- 모바일 ---------- */

@media (max-width: 768px) {
	.chb-home .chb-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.chb-home .chb-block__head {
		padding: 11px 13px;
	}

	.chb-home .chb-item__link {
		padding: 9px 13px;
		gap: 10px;
	}

	.chb-home .chb-item__thumb {
		flex-basis: 52px;
		width: 52px;
		height: 52px;
	}
}
