/**
 * 文章页头小部件 - 样式
 *
 * 顶部两栏：左（分类前缀 + 标题）/ 右（搜索框）
 * 底部：单篇为一张特色图，归档为文章列表（每项标题 + 特色图）
 */

/* 容器 ---------------------------------------------------------------- */
.hbc-ah {
	width: 100%;
}

/* 顶部 ---------------------------------------------------------------- */
.hbc-ah__top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
	margin-bottom: 28px;
}

.hbc-ah__head {
	flex: 1 1 auto;
	min-width: 0;
}

/* 分类前缀 ------------------------------------------------------------ */
.hbc-ah__cat {
	margin: 0 0 6px;
	padding: 0;
}

:where(.hbc-ah__cat) {
	color: #666666;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.04em;
	line-height: 1.4;
}

.hbc-ah__cat a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.hbc-ah__cat a:hover {
	color: #cc0000;
}

/* 标题 ---------------------------------------------------------------- */
.hbc-ah__title,
.hbc-ah__title a {
	margin: 0;
	padding: 0;
}

:where(.hbc-ah__title) {
	color: #111111;
	font-size: clamp(24px, 3.4vw, 38px);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
}

.hbc-ah__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.hbc-ah__title a:hover {
	color: #cc0000;
}

/* 搜索框 -------------------------------------------------------------- */
.hbc-ah__search {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 8px;
	width: 260px;
	max-width: 100%;
	padding: 6px 0;
}

.hbc-ah__search-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: none;
	background: transparent;
	color: #111111;
	font-size: 14px;
	line-height: 1.4;
	padding: 0;
	box-shadow: none;
}

.hbc-ah__search-input::placeholder {
	color: #999999;
}

.hbc-ah__search-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #111111;
	cursor: pointer;
}

.hbc-ah__search-btn svg {
	width: 16px;
	height: 16px;
}

/* 媒体区 -------------------------------------------------------------- */
.hbc-ah__media {
	width: 100%;
}

.hbc-ah__image {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	line-height: 0;
}

.hbc-ah__image-img,
.hbc-ah__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 描述【超出隐藏】 ----------------------------------------- */
:where(.hbc-ah__excerpt) {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 18px 0 0;
	color: #333333;
	font-size: 14px;
	line-height: 1.6;
	word-break: break-word;
}

/* READ MORE 链接 ---------------------------------------------------- */
.hbc-ah__readmore {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	margin-top: 14px;
	transition: color 0.2s ease;
}

:where(.hbc-ah__readmore) {
	color: #111111;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.4;
}

.hbc-ah__readmore:hover {
	color: #cc0000;
}

.hbc-ah__readmore svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.hbc-ah__readmore:hover svg {
	transform: translateX(2px);
}

/* 归档列表项 ---------------------------------------------------------- */
.hbc-ah__list {
	width: 100%;
}

.hbc-ah__item {
	display: block;
}

.hbc-ah__item + .hbc-ah__item {
	margin-top: 60px;
}

/* 列表项内的小标题 + 图片 */
.hbc-ah__item-title {
	margin: 0 0 14px;
}

/* 响应式：平板 (≤1024px) -------------------------------------------- */
@media (max-width: 1024px) {
	.hbc-ah__top {
		gap: 24px;
	}

	.hbc-ah__search {
		width: 200px;
	}
}

/* 响应式：手机 (≤768px) ---------------------------------------------- */
@media (max-width: 768px) {
	.hbc-ah__top {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		margin-bottom: 16px;
	}

	:where(.hbc-ah__title) {
		font-size: clamp(20px, 6vw, 28px);
	}

	.hbc-ah__search {
		width: 100%;
	}

	:where(.hbc-ah__excerpt) {
		font-size: 13px;
		margin-top: 12px;
	}

	.hbc-ah__readmore {
		margin-top: 10px;
	}

	.hbc-ah__item + .hbc-ah__item {
		margin-top: 36px;
	}

	.hbc-ah__item-title {
		margin-bottom: 10px;
	}
}
