/* ─── Blog Grid Widget ────────────────────────────────────────────────────── */

.hbc-bg-wrap {
	position: relative;
}

/* ── Header ── */

.hbc-bg-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 32px;
	gap: 20px;
	flex-wrap: wrap;
}

.hbc-bg-header-left {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.hbc-bg-subtitle {
	font-size: 16px;
	font-weight: 400;
	color: #c19a6b;
	line-height: 1.4;
}

.hbc-bg-heading {
	margin: 0;
	font-size: 32px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.2;
}

/* ── Tabs ── */

.hbc-bg-tabs-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.hbc-bg-tabs-title {
	font-size: 14px;
	font-weight: 500;
	color: #c19a6b;
	line-height: 1.4;
}

.hbc-bg-tabs {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

.hbc-bg-tab {
	padding: 8px 20px;
	border: 1px solid #c19a6b;
	border-radius: 20px;
	background: transparent;
	color: #333333;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.hbc-bg-tab:hover {
	background-color: rgba(193, 154, 107, 0.1);
}

.hbc-bg-tab.active {
	background-color: #c19a6b;
	color: #ffffff;
	border-color: #c19a6b;
}

/* ── Posts grid ── */

.hbc-bg-posts {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin-bottom: 40px;
	align-items: stretch;
}

/* ── Card ── */

.hbc-bg-card {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	background-color: #ffffff;
	border: 1px solid #e8e8e8;
	display: flex;
	flex-direction: column;
	height: 100%;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hbc-bg-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

/* 整卡可点击的覆盖链接 */
.hbc-bg-card-link {
	position: absolute;
	inset: 0;
	z-index: 1;
	text-decoration: none;
	font-size: 0;
}

/* 卡片内需要独立点击/层级的元素置于覆盖链接之上 */
.hbc-bg-card .hbc-bg-readmore {
	position: relative;
	z-index: 2;
}

/* ── Thumbnail ── */

.hbc-bg-thumb-link {
	display: block;
	text-decoration: none;
	overflow: hidden;
}

.hbc-bg-thumb {
	height: 200px;
	width: 100%;
	background-color: #2c3e5a;
	background-size: cover;
	background-position: center center;
	transition: transform 0.3s ease;
}

.hbc-bg-card:hover .hbc-bg-thumb {
	transform: scale(1.03);
}

/* ── Body ── */

.hbc-bg-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

/* 分类标签 - 圆角样式 */
.hbc-bg-cat {
	display: inline-block;
	align-self: flex-start;
	padding: 5px 14px;
	background-color: #c19a6b;
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	border-radius: 20px;
	margin-bottom: 12px;
	letter-spacing: 0.3px;
}

.hbc-bg-title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.2s ease;
}

.hbc-bg-card:hover .hbc-bg-title {
	color: #c19a6b;
}

.hbc-bg-excerpt {
	margin: 0 0 16px;
	font-size: 14px;
	color: #666666;
	line-height: 1.6;
	flex: 1;
}

/* 分割线 - 全宽 */
.hbc-bg-divider {
	height: 2px;
	width: 100%;
	background-color: #c19a6b;
	margin-bottom: 14px;
}

.hbc-bg-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 14px;
}

.hbc-bg-meta {
	font-size: 13px;
	color: #999999;
}

/* Read more - 蓝色，下划线与文案等宽 */
.hbc-bg-readmore {
	font-size: 13px;
	font-weight: 600;
	color: #2c3e5a;
	text-decoration: none;
	padding-bottom: 4px;
	border-bottom: 1.5px solid #2c3e5a;
	transition: opacity 0.2s ease;
}

.hbc-bg-readmore:hover {
	opacity: 0.7;
	color: #1a2d45;
	border-bottom-color: #1a2d45;
}

/* ── Pagination ── */

.hbc-bg-pagination {
	text-align: center;
	padding: 20px 0;
}

.hbc-bg-pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	margin: 0 2px;
	font-size: 14px;
	color: #999999;
	text-decoration: none;
	transition: color 0.2s ease;
}

.hbc-bg-pagination .page-numbers:hover {
	color: #1a1a1a;
}

.hbc-bg-pagination .page-numbers.current {
	color: #1a1a1a;
	font-weight: 700;
}

.hbc-bg-pagination .prev,
.hbc-bg-pagination .next {
	font-weight: 500;
}

/* ── Empty ── */

.hbc-bg-empty {
	grid-column: 1 / -1;
	text-align: center;
	color: #999;
	padding: 60px 20px;
	font-size: 16px;
}

/* ── Loading state ── */

.hbc-bg-posts.is-loading {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

/* ── Responsive ── */

@media (max-width: 1024px) {
	.hbc-bg-posts {
		grid-template-columns: repeat(2, 1fr);
	}

	.hbc-bg-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 767px) {
	.hbc-bg-posts {
		grid-template-columns: 1fr;
	}

	.hbc-bg-heading {
		font-size: 24px;
	}

	.hbc-bg-tabs {
		gap: 8px;
	}

	.hbc-bg-tab {
		padding: 6px 14px;
		font-size: 12px;
	}
}
