/* qlbd-fir-histr - 发展历程时间轴（奇偶交替图文 / 手机端纵向） */

.qlbd-fir-histr-container {
	width: 100%;
	padding: 48px 0 56px;
	background-color: #ffffff;
}

.qlbd-fir-histr-inner {
	max-width: var(--ql-container-width);
	margin: 0 auto;
	padding: 0 16px;
}

/*
 * 整条时间轴「脊柱」：用列表背景的 linear-gradient 画 2px 竖线，
 * 贯穿所有节点并在最后一节下方略延长（见 padding-bottom），避免被 li 盖住。
 */
.qlbd-fir-histr-list {
	list-style: none;
	margin: 0;
	padding: 0 0 36px;
	display: flex;
	flex-direction: column;
	gap: 48px;
	position: relative;
	background-image: linear-gradient(
		to right,
		transparent 0,
		transparent calc(50% - 1px),
		color-mix(in srgb, var(--ql-color-primary) 90%, transparent) calc(50% - 1px),
		color-mix(in srgb, var(--ql-color-primary) 90%, transparent) calc(50% + 1px),
		transparent calc(50% + 1px)
	);
	background-repeat: no-repeat;
	background-size: 100% 100%;
}

/* 桌面：三列网格 — 奇数 图|轴|文，偶数 文|轴|图 */
.qlbd-fir-histr-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
	align-items: center;
	column-gap: 28px;
}

.qlbd-fir-histr-item:nth-child(odd) {
	grid-template-areas: "media axis body";
}

.qlbd-fir-histr-item:nth-child(even) {
	grid-template-areas: "body axis media";
}

.qlbd-fir-histr-media {
	grid-area: media;
}

.qlbd-fir-histr-axis {
	grid-area: axis;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
	min-height: 140px;
}

.qlbd-fir-histr-marker {
	position: relative;
	z-index: 1;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: var(--ql-color-primary);
	color: #ffffff;
	display: grid;
	place-items: center;
	box-shadow: 0 4px 14px color-mix(in srgb, var(--ql-color-primary) 35%, transparent);
	flex-shrink: 0;
}

.qlbd-fir-histr-marker-icon {
	width: 18px;
	height: 18px;
	display: block;
}

.qlbd-fir-histr-image {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 12px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.qlbd-fir-histr-body {
	grid-area: body;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.qlbd-fir-histr-item:nth-child(odd) .qlbd-fir-histr-body {
	text-align: left;
	align-items: flex-start;
}

.qlbd-fir-histr-item:nth-child(even) .qlbd-fir-histr-body {
	text-align: right;
	align-items: flex-end;
}

.qlbd-fir-histr-year {
	font-size: clamp(26px, 3vw, 34px);
	font-weight: 800;
	line-height: 1.1;
	color: var(--ql-color-primary);
}

.qlbd-fir-histr-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--ql-color-text-title);
}

.qlbd-fir-histr-desc {
	margin: 0;
	font-size: 14px;
	line-height: var(--ql-line-height-base);
	color: var(--ql-color-text-body);
	max-width: 100%;
}

.qlbd-fir-histr-item:nth-child(even) .qlbd-fir-histr-desc {
	text-align: right;
}

/* 手机：左时间线 + 右栏依次为 年份 / 标题 / 描述 / 大图 */
@media (max-width: 768px) {
	.qlbd-fir-histr-container {
		padding: 32px 0 40px;
	}

	.qlbd-fir-histr-inner {
		padding: 0 12px;
	}

	.qlbd-fir-histr-list {
		gap: 36px;
		padding-bottom: 28px;
		background-image: linear-gradient(
			to right,
			transparent 0,
			transparent calc(16px - 1px),
			color-mix(in srgb, var(--ql-color-primary) 90%, transparent) calc(16px - 1px),
			color-mix(in srgb, var(--ql-color-primary) 90%, transparent) calc(16px + 1px),
			transparent calc(16px + 1px)
		);
	}

	.qlbd-fir-histr-item {
		display: grid;
		grid-template-columns: 32px minmax(0, 1fr);
		grid-template-rows: auto auto;
		column-gap: 14px;
		row-gap: 14px;
		align-items: start;
		/* 覆盖奇偶桌面区域名 */
		grid-template-areas: none;
	}

	.qlbd-fir-histr-axis {
		grid-column: 1;
		grid-row: 1 / -1;
		min-height: 100%;
		width: 32px;
		align-self: stretch;
	}

	.qlbd-fir-histr-body {
		grid-column: 2;
		grid-row: 1;
		text-align: left !important;
		align-items: flex-start !important;
		gap: 8px;
	}

	.qlbd-fir-histr-item:nth-child(even) .qlbd-fir-histr-desc {
		text-align: left;
	}

	.qlbd-fir-histr-media {
		grid-column: 2;
		grid-row: 2;
	}

	.qlbd-fir-histr-marker {
		width: 36px;
		height: 36px;
		align-self: start;
		margin-top: 2px;
	}

	.qlbd-fir-histr-year {
		font-size: 28px;
	}
}
