/* ============================================================
 * 自定义 Banner 轮播 - 基础结构样式
 * 颜色/尺寸等外观由 Elementor 样式面板通过 selectors 覆盖
 * ============================================================ */

.cbs-banner-slider {
	position: relative;
	width: 100%;
}

/* 全宽：无视父容器宽度，横向撑满整个视口 */
.cbs-banner-slider.cbs-full-width {
	width: 100vw;
	max-width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
}

.cbs-viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.cbs-slides {
	display: flex;
	width: 100%;
	will-change: transform;
	transition: transform 500ms ease; /* 会被 JS 按设置覆盖 */
}

.cbs-slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	height: 500px; /* 默认，会被 Elementor 高度控件覆盖 */
	overflow: hidden;
}

/* 文字遮罩层 */
.cbs-slide::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;
}

.cbs-slide-link,
.cbs-slide > img {
	display: block;
	width: 100%;
	height: 100%;
}

.cbs-slide-link {
	position: relative;
	z-index: 0;
}

.cbs-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- 文字内容 ---------- */
.cbs-caption {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px;
	pointer-events: none; /* 让点击穿透到整张 Banner 链接 */
}

.cbs-caption > * {
	max-width: 90%;
}

.cbs-title {
	margin: 0 0 12px;
	font-size: 40px;
	line-height: 1.2;
	color: #fff;
}

.cbs-subtitle {
	margin: 0 0 20px;
	font-size: 18px;
	line-height: 1.5;
	color: #f0f0f0;
}

.cbs-button {
	pointer-events: auto; /* 按钮可点击 */
	display: inline-block;
	padding: 12px 28px;
	background: #0073e6;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	transition: opacity .25s ease, transform .25s ease;
}

.cbs-button:hover {
	opacity: .9;
	transform: translateY(-2px);
}

/* ---------- 切换按钮（箭头） ---------- */
.cbs-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, .4);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background-color .3s ease, color .3s ease, transform .3s ease;
}

.cbs-arrow:hover {
	background: rgba(0, 0, 0, .75);
}

.cbs-arrow svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.cbs-arrow-prev { left: 20px; }
.cbs-arrow-next { right: 20px; }

/* ---------- 分页圆点 ---------- */
.cbs-dots {
	position: absolute;
	bottom: 20px;
	left: 0;
	right: 0;
	z-index: 5;
	display: flex;
	justify-content: center;
	gap: 10px;
}

.cbs-dot {
	width: 12px;
	height: 12px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, .5);
	cursor: pointer;
	transition: background-color .3s ease, transform .3s ease;
}

.cbs-dot.cbs-dot-active {
	background: #fff;
	transform: scale(1.2);
}

/* 移动端稍微缩小箭头 */
@media (max-width: 767px) {
	.cbs-arrow { width: 36px; height: 36px; font-size: 16px; }
	.cbs-title { font-size: 26px; }
	.cbs-subtitle { font-size: 15px; }
}
