/* トップページのメインビジュアル(フェードで自動切り替えするスライダー)
   表示位置: index.html 上部 / 動作: js/top-visual.js
   PC(992px以上)は横長画像2000x800、スマホは正方形画像800x800 */

.top-visual {
	position: relative;
	padding-bottom: 15px; /* インジケーターの分 */
}
.top-visual__slides {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #fff;
	overflow: hidden;
}

/* 各スライドは重ねて置き、表示中のものだけ opacity:1 にして0.6秒でフェードする */
.top-visual__slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	visibility: hidden;
	z-index: 1;
	transition: opacity 600ms ease, visibility 0s linear 600ms;
}
.top-visual__slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
	transition: opacity 600ms ease, visibility 0s;
}
.top-visual__link {
	display: block;
	width: 100%;
	height: 100%;
}
.top-visual__link img {
	display: block;
	width: 100%;
	height: auto;
}

/* インジケーター(表示中のバーが5秒かけて左から右へ伸びる) */
.top-visual__dots {
	display: flex;
	justify-content: space-between;
	gap: 4px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}
.top-visual__dots li {
	flex: 1 1 0;
}
.top-visual__dot {
	position: relative;
	display: block;
	width: 100%;
	height: 5px;
	padding: 0;
	border: 0;
	background: #dde1ea;
	cursor: pointer;
	overflow: hidden;
}
.top-visual__dot::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 0;
	height: 100%;
	background: linear-gradient(90deg, #cdb241, #af9936);
}
.top-visual__dot.is-active::after {
	width: 100%;
	animation: top-visual-progress var(--top-visual-interval, 5000ms) linear;
}
@keyframes top-visual-progress {
	from { width: 0; }
	to { width: 100%; }
}

@media (min-width: 992px) {
	.top-visual {
		padding-bottom: 35px;
	}
	.top-visual__slides {
		aspect-ratio: 2000 / 800;
	}
	.top-visual__dots {
		justify-content: center;
		gap: 4px;
		margin-top: 30px;
	}
	.top-visual__dots li {
		flex: 0 0 70px;
	}
}
