/* Certifications Carousel - 资质证书传送带式轮播模块 */

/* ========== 全局容器 ========== */
.certifications-carousel {
	position: relative;
	padding: 56px 0 64px;
	background: #f0f1f3;
	overflow: hidden;
}

.certifications-carousel__inner {
	position: relative;
}

/* ========== 标题区 ========== */
.certifications-carousel__header {
	text-align: center;
	margin-bottom: 44px;
}

.certifications-carousel__title-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-bottom: 14px;
}

/* 左侧"权"字圆形图标 */
.certifications-carousel__icon {
	width: 68px;
	height: 68px;
	border-radius: 50%;
	background: #ff8a1f;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 4px 12px rgba(255, 138, 31, 0.35);
}

.certifications-carousel__icon-text {
	font-size: 36px;
	font-weight: 800;
	color: #ffffff;
	line-height: 1;
	letter-spacing: 1px;
	font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

/* 主标题 */
.certifications-carousel__title {
	font-size: 34px;
	font-weight: 700;
	line-height: 1.2;
	color: #2a2a2a;
	margin: 0;
	letter-spacing: 0.5px;
}

.certifications-carousel__title-accent {
	color: #ff8a1f;
}

/* 副标题 */
.certifications-carousel__subtitle {
	margin: 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: #666666;
	letter-spacing: 0.3px;
}

/* =========================================================
   传送带核心：视口裁剪溢出 + 轨道超长不换行
   卡片宽度由 JS 动态计算，保证一屏正好显示整数张（不裁半张）
   ========================================================= */
.certifications-carousel__viewport {
	position: relative;
	overflow: hidden;                 /* 关键：把超长轨道超出部分裁掉，视觉上就是传送带窗口 */
	padding: 16px 0;                  /* 上下留一点，防止边框阴影被裁 */
	width: 100%;
}

.certifications-carousel__track {
	display: flex;
	flex-wrap: nowrap;                /* 关键：强制一行，让卡片连续排，不换行就不会"后面空" */
	align-items: stretch;
	column-gap: 24px;                 /* 卡片之间的间距（JS里同步读取这个值） */
	will-change: transform;
}

/* ========== 证书卡片 ==========
   宽度优先由 JS 根据"一屏显示几张"动态写入 style.flexBasis（优先级更高）
   这里的 flex-basis 作为 **fallback**，防止 JS 未执行时卡片按内容宽度撑开，导致大小不一、不板正
*/
.cert-card {
	flex: 0 0 auto;
	flex-basis: calc((100% - 24px * 4) / 5);  /* 桌面：一屏5张，gap 24px */
	min-width: 0;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s ease;
	cursor: pointer;
	box-sizing: border-box;
}

/* 相框 */
.cert-card__frame {
	position: relative;
	background: #ffffff;
	padding: 10px;
	border: 4px solid transparent;
	border-radius: 2px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* 鼠标悬停卡片：橙色边框高亮 */
.cert-card:hover .cert-card__frame {
	border-color: #ff8a1f;
	box-shadow: 0 6px 20px rgba(255, 138, 31, 0.18);
	transform: scale(1.02);
}

/* 图片区域（证书内容） */
.cert-card__image {
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 4;             /* 竖版证书比例 */
	background: #ffffff;
	overflow: hidden;
	border: 1px solid #e5e5e5;
}

/* 真实证书图片：自适应填满，不变形 */
.cert-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* 占位图 - 模拟证书外观 */
.cert-card__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
	padding: 16px;
}

.cert-card__placeholder-inner {
	width: 100%;
	height: 100%;
	background: #ffffff;
	border: 1px solid #e8e8e8;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

/* 模拟证书顶部印章/标识区域 */
.cert-card__placeholder-inner::before {
	content: '';
	position: absolute;
	top: 18%;
	left: 50%;
	transform: translateX(-50%);
	width: 70%;
	height: 6px;
	background: linear-gradient(90deg, transparent 0%, #c9a96e 15%, #c9a96e 85%, transparent 100%);
	opacity: 0.6;
}

/* 模拟证书底部装饰 */
.cert-card__placeholder-inner::after {
	content: '';
	position: absolute;
	bottom: 18%;
	left: 50%;
	transform: translateX(-50%);
	width: 50%;
	height: 4px;
	background: linear-gradient(90deg, transparent 0%, #006b35 20%, #006b35 80%, transparent 100%);
	opacity: 0.5;
}

.cert-card__placeholder-logo {
	position: relative;
	z-index: 1;
	font-size: 12px;
	font-weight: 600;
	color: #333333;
	text-align: center;
	line-height: 1.5;
	padding: 8px 10px;
	max-width: 92%;
	word-break: break-all;
	background: rgba(255, 255, 255, 0.85);
	border-radius: 4px;
}

/* 卡片底部标题标签 */
.cert-card__title {
	margin-top: 12px;
	padding: 10px 12px;
	background: #e4e6ea;
	color: #333333;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	text-align: center;
	letter-spacing: 0.2px;
	border-radius: 2px;
	transition: background 0.3s ease, color 0.3s ease;
}

/* 鼠标悬停卡片的标题标签也跟着变橙色 */
.cert-card:hover .cert-card__title {
	background: #ff8a1f;
	color: #ffffff;
}

/* ========== 左右轮播按钮 ==========
   按钮浮在卡片上面（不占流空间），不会挤开卡片宽度
*/
.certifications-carousel__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid #e4e6ea;
	background: rgba(255, 255, 255, 0.96);
	color: #555555;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	z-index: 10;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
	padding: 0;
}

.certifications-carousel__btn:hover {
	background: #ff8a1f;
	border-color: #ff8a1f;
	color: #ffffff;
	box-shadow: 0 5px 18px rgba(255, 138, 31, 0.35);
}

.certifications-carousel__btn:active {
	transform: translateY(-50%) scale(0.94);
}

.certifications-carousel__btn svg {
	width: 20px;
	height: 20px;
	display: block;
}

.certifications-carousel__btn--prev {
	left: 0;
}

.certifications-carousel__btn--next {
	right: 0;
}

/* ========== 响应式适配：不同屏幕下 一屏显示的卡片数量不同
   卡片宽度由 JS 动态计算，这里只调间距、按钮、字号 ========== */
@media (max-width: 1199px) {
	.certifications-carousel__title {
		font-size: 30px;
	}

	.certifications-carousel__icon {
		width: 60px;
		height: 60px;
	}

	.certifications-carousel__icon-text {
		font-size: 32px;
	}

	.certifications-carousel__track {
		column-gap: 20px;
	}

	/* 一屏5张 fallback */
	.cert-card {
		flex-basis: calc((100% - 20px * 4) / 5);
	}
}

@media (max-width: 991px) {
	.certifications-carousel {
		padding: 44px 0 52px;
	}

	.certifications-carousel__header {
		margin-bottom: 36px;
	}

	.certifications-carousel__title {
		font-size: 26px;
	}

	.certifications-carousel__title-wrap {
		gap: 12px;
		margin-bottom: 10px;
	}

	.certifications-carousel__icon {
		width: 54px;
		height: 54px;
	}

	.certifications-carousel__icon-text {
		font-size: 28px;
	}

	.certifications-carousel__subtitle {
		font-size: 15px;
	}

	.certifications-carousel__track {
		column-gap: 18px;
	}

	/* 一屏4张 fallback */
	.cert-card {
		flex-basis: calc((100% - 18px * 3) / 4);
	}

	.certifications-carousel__btn {
		width: 40px;
		height: 40px;
	}

	.certifications-carousel__btn svg {
		width: 18px;
		height: 18px;
	}
}

@media (max-width: 767px) {
	.certifications-carousel {
		padding: 36px 0 44px;
	}

	.certifications-carousel__header {
		margin-bottom: 30px;
	}

	.certifications-carousel__title {
		font-size: 22px;
	}

	.certifications-carousel__title-wrap {
		gap: 10px;
		margin-bottom: 8px;
	}

	.certifications-carousel__icon {
		width: 48px;
		height: 48px;
	}

	.certifications-carousel__icon-text {
		font-size: 24px;
	}

	.certifications-carousel__subtitle {
		font-size: 14px;
		padding: 0 16px;
	}

	.certifications-carousel__track {
		column-gap: 14px;
	}

	/* 一屏3张 fallback */
	.cert-card {
		flex-basis: calc((100% - 14px * 2) / 3);
	}

	.cert-card__title {
		font-size: 12px;
		padding: 8px 10px;
		margin-top: 10px;
	}

	.cert-card__placeholder-logo {
		font-size: 11px;
		padding: 6px 8px;
	}

	.certifications-carousel__btn {
		width: 36px;
		height: 36px;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	}
}

@media (max-width: 575px) {
	.certifications-carousel__title {
		font-size: 20px;
	}

	.certifications-carousel__title-wrap {
		flex-direction: column;
		gap: 8px;
	}

	.certifications-carousel__subtitle {
		font-size: 13px;
	}

	.certifications-carousel__track {
		column-gap: 12px;
	}

	/* 一屏2张 fallback */
	.cert-card {
		flex-basis: calc((100% - 12px * 1) / 2);
	}

	.cert-card__title {
		font-size: 12px;
		padding: 7px 8px;
	}

	.certifications-carousel__btn {
		width: 32px;
		height: 32px;
	}

	.certifications-carousel__btn svg {
		width: 16px;
		height: 16px;
	}
}

@media (max-width: 380px) {
	.certifications-carousel__title {
		font-size: 18px;
	}
}
