/**
 * 百家 行业图片轮播（悬停切图 + 自动滚动）
 */

/* ── 外层容器 ─────────────────────────────── */
.baijia-industry-slider {
	position: relative;
	width: 100%;
	overflow: hidden;
}

/* ── 区块标题 ─────────────────────────────── */
.baijia-industry-slider .bis-heading {
	text-align: center;
	margin-bottom: 20px;
}

/* ── 滚动轨道 ─────────────────────────────── */
.bis-track {
	display: flex;
	width: max-content;
	animation: bis-scroll-left var(--duration, 30s) linear infinite;
	will-change: transform;
}

.baijia-industry-slider.is-direction-right .bis-track {
	animation-name: bis-scroll-right;
}

/* 悬停暂停 */
.baijia-industry-slider.is-pause-hover:hover .bis-track {
	animation-play-state: paused;
}

/* ── 单组（不留间距） ─────────────────────── */
.bis-group {
	display: flex;
	flex-shrink: 0;
}

/* ── 单个项目 ─────────────────────────────── */
.bis-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex-shrink: 0;
}

.bis-item-link {
	position: relative;
	display: block;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	line-height: 0;
	width: 190px;
}

/* ── 图片容器（正方形，可通过控件覆盖尺寸） */
.bis-item-img-wrap {
	position: relative;
	width: 190px;
	height: 190px;
	overflow: hidden;
	margin: 0;
	padding: 0;
	font-size: 0;
	border: 0;
	display: block;
}

/* ── 默认图片 ─────────────────────────────── */
.bis-img-default {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 1;
	transition: opacity 300ms ease;
	display: block;
	border: 0;
}

/* ── 悬停图片（默认隐藏） ─────────────────── */
.bis-img-hover {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 300ms ease;
	display: block;
	border: 0;
}

/* ── 悬停切换 ─────────────────────────────── */
.bis-item.has-hover-img:hover .bis-img-default,
.bis-item.has-hover-img:focus-within .bis-img-default {
	opacity: 0;
}

.bis-item.has-hover-img:hover .bis-img-hover,
.bis-item.has-hover-img:focus-within .bis-img-hover {
	opacity: 1;
}

/* ── 项目标题 ─────────────────────────────── */
.bis-item-title {
	display: block;
	width: 100%;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	color: #333333;
	background-color: #ffda00;
	padding: 5px 4px 11px;
	margin: 0 !important;
	white-space: nowrap;
	line-height: 1.4;
	box-sizing: border-box;
}

/* ── 滚动关键帧 ──────────────────────────── */
@keyframes bis-scroll-left {
	from { transform: translateX(0); }
	to   { transform: translateX(calc(-100% / var(--repeat, 4))); }
}

@keyframes bis-scroll-right {
	from { transform: translateX(calc(-100% / var(--repeat, 4))); }
	to   { transform: translateX(0); }
}

/* ── 响应式 ───────────────────────────────── */
@media (max-width: 1024px) {
	.bis-item-link,
	.bis-item-img-wrap {
		width: 150px;
	}
	.bis-item-img-wrap {
		height: 150px;
	}
}

@media (max-width: 767px) {
	.bis-item-link,
	.bis-item-img-wrap {
		width: 110px;
	}
	.bis-item-img-wrap {
		height: 110px;
	}

	.bis-item-title {
		font-size: 11px;
	}
}

/* ── 无障碍：减弱动画 ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.bis-track {
		animation-duration: 0s;
		animation-play-state: paused;
	}
}
