/* 轮播图 */
.carousel-controls {
	position: absolute;
	left: 0%; /* 改用固定单位 */
	top: 13%;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: 25px; /* 增加间隙防止放大重叠 */
	z-index: 10; /* 提升层级 */
	padding: 15px 0; /* 增加内边距 */
}

.control-btn {
	width: 16px; /* 基础尺寸稍大 */
	height: 16px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,0.8);
	background: transparent;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	transform-origin: center center; /* 确保缩放中心点 */
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
	will-change: transform; /* 优化动画性能 */
}

	.control-btn:hover {
		transform: scale(1.4);
		border-color: #fff;
	}

	.control-btn.active {
		background: #fff;
		transform: scale(2); /* 扩大一倍 */
		box-shadow: 0 4px 12px rgba(0,0,0,0.3);
		animation: pulse 1.5s infinite; /* 添加脉冲动画 */
	}

@keyframes pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(255,255,255,0.4);
	}

	70% {
		box-shadow: 0 0 0 10px rgba(255,255,255,0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(255,255,255,0);
	}
}

.carousel-container {
	position: relative;
	width: 90vw; /* 改为视窗宽度单位 */
	height: 60vh; /* 固定高宽比 3:2 */
	margin-left: 5%;
	overflow: hidden; /* 关键修复 */
}

.carousel-slide {
	display: flex;
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	height: 100%;
	width: 400%; /* 4个100%宽度的幻灯片 */
	will-change: transform; /* 启用GPU加速 */
}

/* 轮播项容器 */
.carousel-item {
	position: relative;
	flex: 0 0 25%;
	height: 100%;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	overflow: hidden; /* 防止内容溢出 */
}

	.carousel-item img {
		width: 55%;
		height: 100%; /* 制造溢出效果 */
		object-fit: cover;
		object-position: center;
		margin-left: auto;
		order: 2;
		clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%); /* 斜切效果 */
		/*transform: skewX(-8deg); /* 倾斜变换 */
		transition: all 0.5s ease;
	}

/* 文字说明 */
.caption {
	top: 2%;
	left: 0%;
	width: 50%;
	height: 100%;
	line-height: 2vh;
	position: relative;
	z-index: 3;
	order: 1;
	color: #fff;
	transform: translateX(5%);
}

/* 悬停动效 */
.carousel-item:hover img {
	width: 60%;
	transform: skewX(0deg);
}

.caption h3 {
	font-size: calc(2rem + 1vw);
	margin-bottom: 1.5rem;
}

.caption p {
	font-size: calc(1rem + 0.5vw);
	line-height: 1.6;
}
/* 文字动画 */
@keyframes slideIn {
	from {
		transform: translateX(-50px);
		opacity: 0;
	}

	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

/* 左右切换按钮 */
button.prev, button.next {
	width: 3vh;
	height: 5vh;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	border: none;
	cursor: pointer;
	z-index: 10;
	background-color: transparent; /* 明确设置背景透明 */
	background-size: cover; /* 确保图片覆盖整个按钮 */
	background-repeat: no-repeat; /* 防止图片重复 */
}

button.prev {
	background-image: url('img/按钮-left.png');
	left: 50%;
}

button.next {
	background-image: url('img/按钮-right.png');
	right: 2%;
}
