/* ============================================================
   Cap Capabilities — Section 04
   Figma 292:2061 | Benlida PCB Manufacturing Capabilities
   顶部双列标题 + Tab 切换（图片 + 数值列）+ 底部 Learn More 卡片
   设计基准 1280px
   ============================================================ */

.sparta-cap-cap {
	background: #fff;
	width: 100%;
	padding: 80px 0;
}

.sparta-cap-cap__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 39px;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

/* ── 顶部标题双列 ── */
.sparta-cap-cap__header {
	display: flex;
	gap: 48px;
	align-items: flex-start;
}

.sparta-cap-cap__header-left {
	flex: 0 0 534px;
}

.sparta-cap-cap__header-right {
	flex: 1;
}

.sparta-cap-cap__title {
	font-family: 'Anton', sans-serif;
	font-size: 48px;
	line-height: 60px;
	color: #012f73;
	margin: 0;
	font-weight: 400;
}

.sparta-cap-cap__desc {
	font-family: 'Montserrat', sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 25px;
	color: #000;
	margin: 0;
}

/* ── Tab 导航 ── */
.sparta-cap-cap__tabs {
	display: flex;
	gap: 100px;
	border-bottom: 1px solid #e5e5e5;
	padding-left: 108px;
}

.sparta-cap-cap__tab {
	position: relative;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0 0 16px;
	font-family: 'Montserrat', sans-serif;
	font-weight: 600;
	font-size: 20px;
	line-height: 20px;
	color: #000;
	white-space: nowrap;
	transition: color 0.2s;
}

.sparta-cap-cap__tab::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 100%;
	height: 4px;
	background: #054fbd;
	opacity: 0;
	transition: opacity 0.2s;
}

.sparta-cap-cap__tab:hover {
	color: #054fbd;
}

.sparta-cap-cap__tab.is-active {
	color: #054fbd;
	font-weight: 700;
}

.sparta-cap-cap__tab.is-active::after {
	opacity: 1;
}

/* ── 中间：左图 + 右表 ── */
.sparta-cap-cap__body {
	display: flex;
	gap: 34px;
	align-items: stretch;
	padding-left: 108px;
}

/* 左图 */
.sparta-cap-cap__photo {
	flex: 0 0 426px;
	position: relative;
	min-height: 382px;
	border-radius: 20px;
	overflow: hidden;
}

.sparta-cap-cap__photo-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	opacity: 0;
	transition: opacity 0.3s;
}

.sparta-cap-cap__photo-img.is-active {
	opacity: 1;
}

/* 右表区（多个 Tab 表格叠放，只显示激活） */
.sparta-cap-cap__tables {
	flex: 1;
	align-self: flex-start;
	width: 100%;
}

.sparta-cap-cap__table {
	display: none;
	flex-direction: column;
	gap: 6px;
	width: 100%;
}

.sparta-cap-cap__table.is-active {
	display: flex;
}

.sparta-cap-cap__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-radius: 10px;
	overflow: hidden;
}

/* 左：蓝色分类列 */
.sparta-cap-cap__cat {
	background: #d0e4ff;
	color: #054fbd;
	font-family: 'Montserrat', sans-serif;
	font-weight: 600;
	font-size: 14px;
	line-height: 20px;
	padding: 9px 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 38px;
}

/* 右：灰色数值列 */
.sparta-cap-cap__val {
	background: #f9f9f8;
	font-family: 'Montserrat', sans-serif;
	font-weight: 600;
	font-size: 13px;
	line-height: 20px;
	color: #000;
	padding: 9px 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 38px;
}

/* ── 底部 Learn More 卡片 ── */
.sparta-cap-cap__cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	margin-top: 16px;
}

.sparta-cap-cap__card {
	background: #f9f9f8;
	border-radius: 20px;
	box-shadow: 0px 4px 10px 0px rgba(157, 157, 157, 0.25);
	padding: 40px 28px 28px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-height: 221px;
}

.sparta-cap-cap__card-title {
	font-family: 'Montserrat', sans-serif;
	font-weight: 600;
	font-size: 20px;
	line-height: 30px;
	color: #000;
	margin: 0;
}

.sparta-cap-cap__card-desc {
	font-family: 'Montserrat', sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 25px;
	color: #000;
	margin: 0;
	flex: 1;
}

.sparta-cap-cap__card-link {
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 18px;
	line-height: 20px;
	color: #054fbd;
	text-decoration: none;
	display: inline-flex;
	flex-direction: column;
	width: fit-content;
	gap: 2px;
	transition: color 0.2s;
}

.sparta-cap-cap__card-link-line {
	display: block;
	height: 2px;
	background: #054fbd;
	width: 100%;
	transition: background 0.2s;
}

.sparta-cap-cap__card-link:hover {
	color: #ffd739;
}

.sparta-cap-cap__card-link:hover .sparta-cap-cap__card-link-line {
	background: #ffd739;
}

/* ── 大屏 ≥1800px ── */
@media (min-width: 1800px) {
	.sparta-cap-cap__inner {
		max-width: 1600px;
	}

	.sparta-cap-cap__header-left {
		flex-basis: 640px;
	}

	.sparta-cap-cap__photo {
		flex-basis: 500px;
		min-height: 440px;
	}

	.sparta-cap-cap__title {
		font-size: 56px;
	}
}

/* ── 平板 768px–1279px ── */
@media (min-width: 768px) and (max-width: 1279px) {
	.sparta-cap-cap__inner {
		padding: 0 24px;
		gap: 32px;
	}

	.sparta-cap-cap__header {
		flex-direction: column;
		gap: 16px;
	}

	.sparta-cap-cap__header-left {
		flex: none;
	}

	.sparta-cap-cap__title {
		font-size: 36px;
		line-height: 46px;
	}

	.sparta-cap-cap__tabs {
		gap: 40px;
		padding-left: 0;
		overflow-x: auto;
	}

	.sparta-cap-cap__tab {
		font-size: 16px;
	}

	.sparta-cap-cap__body {
		flex-direction: column;
		gap: 24px;
		padding-left: 0;
	}

	.sparta-cap-cap__photo {
		flex: none;
		width: 100%;
		min-height: 260px;
	}

	.sparta-cap-cap__cards {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ── 手机 ≤767px ── */
@media (max-width: 767px) {
	.sparta-cap-cap {
		padding: 48px 0;
	}

	.sparta-cap-cap__inner {
		padding: 0 20px;
		gap: 28px;
	}

	.sparta-cap-cap__header {
		flex-direction: column;
		gap: 12px;
	}

	.sparta-cap-cap__header-left {
		flex: none;
	}

	.sparta-cap-cap__title {
		font-size: 28px;
		line-height: 36px;
	}

	.sparta-cap-cap__tabs {
		gap: 24px;
		padding-left: 0;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.sparta-cap-cap__tab {
		font-size: 14px;
		padding-bottom: 12px;
	}

	.sparta-cap-cap__body {
		flex-direction: column;
		gap: 20px;
		padding-left: 0;
	}

	.sparta-cap-cap__photo {
		flex: none;
		width: 100%;
		min-height: 200px;
	}

	.sparta-cap-cap__cat,
	.sparta-cap-cap__val {
		font-size: 12px;
		padding: 8px 12px;
	}

	.sparta-cap-cap__cards {
		grid-template-columns: 1fr;
	}
}
