/* 归档回退 Banner：使用独立的中性背景，不依赖详情页 Banner 资源。 */
.archive-fallback-banner {
	--banner-text-color: #1f2125;
	--banner-height-pc: 250px;
	position: relative;
	min-height: var(--banner-height-pc);
	margin-bottom: 20px;
	border-bottom: 1px solid #e3e7eb;
	background: #eef1f4;
}

.archive-fallback-banner__inner {
	position: relative;
	z-index: 1;
	display: flex;
	min-height: var(--banner-height-pc);
	align-items: center;
}

.archive-fallback-banner .banner-text {
	width: 100%;
	color: var(--banner-text-color);
	line-height: 1.5;
}

.archive-fallback-banner .banner-title {
	margin: 0;
	color: var(--banner-text-color);
	font-size: 36px;
	font-weight: 500;
	line-height: 1.4;
}

.archive-fallback-banner .banner-desc {
	margin-top: 10px;
	color: #666;
	font-size: 15px;
	line-height: 1.5;
}

.archive-fallback-banner .banner-desc > :last-child {
	margin-bottom: 0;
}

/* page-width 使用 padding 简写，因此组合选择器确保页脚前留白不会被主样式覆盖。 */
.archive-fallback.page-width {
	padding-top: 0;
	padding-bottom: 60px;
}

/* 默认文章首页标题：替代归档 Banner，以紧凑标题和主题色短线建立内容层级。 */
.archive-fallback--home.page-width {
	padding-top: 40px;
}

.archive-home-heading {
	position: relative;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e5e7eb;
}

.archive-home-heading::after {
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 48px;
	height: 2px;
	background: var(--main_color, #16499c);
	content: "";
}

.archive-home-heading h1 {
	margin: 0;
	color: #1f2125;
	font-size: 26px;
	font-weight: 500;
	line-height: 1.4;
}

/* 搜索横幅由外层负责与列表等宽，内层只保留搜索区留白，不改变其他归档页面。 */
.archive-search-page {
	padding-top: 20px;
}

/* 搜索页仅控制面包屑与横幅的间距，图标、分隔符和文字外观由共用资源提供。 */
.archive-search-page .site-breadcrumb {
	margin: 0 0 16px;
}

/* 搜索横幅使用中性浅灰衬托白色输入框，避免随主题色偏色；各设备保留 5px 圆角。 */
.archive-search-banner {
	border: 0;
	border-radius: 5px;
	background: #f6f6f6;
}

.archive-search-banner .archive-fallback-banner__inner {
	padding: 36px 32px;
}

.archive-search-empty {
	padding: 40px 20px;
	border: 1px dashed #dcdcde;
	border-radius: 6px;
	text-align: center;
}

.archive-search-empty h2 {
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.5;
}

.archive-search-empty p {
	margin: 0;
	color: #787c82;
	font-size: 14px;
	line-height: 1.6;
}

/* 最终兜底模板仍使用单列信息流，不影响搜索页共用的文章和产品网格。 */
.archive-fallback__list {
	display: grid;
	gap: 28px;
}

.archive-fallback__item {
	display: grid;
	grid-template-columns: minmax(220px, 32%) minmax(0, 1fr);
	gap: 28px;
	align-items: center;
}

.archive-fallback__media,
.archive-fallback__media img {
	display: block;
	width: 100%;
}

.archive-fallback__media img {
	height: auto;
}

.archive-fallback__item-title {
	margin: 0 0 8px;
}

.archive-fallback__meta {
	margin-bottom: 10px;
	color: #888;
	font-size: 13px;
}

.archive-card-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.archive-card {
	min-width: 0;
	overflow: hidden;
	border-radius: 5px;
	background: #fff;
	box-shadow: 0 0 40px 5px rgb(0 0 0 / 5%);
}

/* 固定 4:3 占位，避免不同原图比例造成卡片高度跳动。 */
.archive-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.archive-card__media > a {
	display: block;
	width: 100%;
	height: 100%;
}

.archive-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease-out;
}

.archive-card:hover .archive-card__media img {
	transform: scale(1.1);
}

.archive-card__date {
	position: absolute;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	padding: 6px 12px 4px 20px;
	border-radius: 30px 0 0;
	background: var(--main_color, #16499c);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
}

.archive-card__date .xintheme-icon {
	width: 1em;
	height: 1em;
	margin-right: 4px;
	fill: currentColor;
}

.archive-card__content {
	padding: 12px;
}

.archive-card__title {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
	text-transform: capitalize;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.archive-card__title a {
	padding: 0.5% 0;
	background-image: linear-gradient(to right, currentColor 0%, currentColor 100%);
	background-position: 0 95%;
	background-repeat: no-repeat;
	background-size: 0 1.5px;
	color: #1f2125;
	text-decoration: none;
	transition: background-size 0.25s cubic-bezier(0.785, 0.135, 0.15, 0.86), color 0.2s ease;
}

.archive-card:hover .archive-card__title a {
	background-size: 100% 1.5px;
}

.archive-card__title a:hover {
	color: var(--main_color, #16499c);
}

.archive-card__excerpt {
	display: -webkit-box;
	overflow: hidden;
	margin: 12px 0 0;
	padding-top: 12px;
	border-top: 1px solid rgb(0 0 0 / 8%);
	color: inherit;
	font-size: 14px;
	line-height: 1.4;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

/* 平板降为两列，手机继续保持双列并隐藏摘要，延续原主题的紧凑列表节奏。 */
@media (max-width: 991px) {
	.archive-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.archive-fallback-banner,
	.archive-fallback-banner__inner {
		min-height: 220px;
	}

	.archive-fallback-banner .banner-title {
		font-size: 28px;
	}

	.archive-fallback.page-width {
		padding-top: 0;
		padding-bottom: 36px;
	}

	.archive-fallback--home.page-width {
		padding-top: 24px;
	}

	.archive-search-banner .archive-fallback-banner__inner {
		padding: 28px 18px;
	}

	.archive-home-heading h1 {
		font-size: 22px;
	}

	.archive-fallback__item {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	.archive-card-grid {
		gap: 10px;
	}

	.archive-card__title {
		font-size: 15px;
	}

	.archive-card__excerpt {
		display: none;
	}
}
