.img-box {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 6;
    overflow: hidden;
	z-index: 1;
}

.img2 {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    background: center center no-repeat;
    animation: anime 6s 0s infinite;
    z-index: 0;
    opacity: 0;
}
.img2:nth-of-type(2) {
  -webkit-animation-delay: 3s;
  animation-delay: 3s;
}

.img3 {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    background: center center no-repeat;
    animation: anime 9s 0s infinite;
    z-index: 0;
    opacity: 0;
}

.img3:nth-of-type(2) {
  -webkit-animation-delay: 3s;
  animation-delay: 3s;
}

.img3:nth-of-type(3) {
  -webkit-animation-delay: 6s;
  animation-delay: 6s;
}

.img4 {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    background: center center no-repeat;
    animation: anime 12s 0s infinite;
    z-index: 0;
    opacity: 0;
}

.img4:nth-of-type(2) {
  -webkit-animation-delay: 3s;
  animation-delay: 3s;
}

.img4:nth-of-type(3) {
  -webkit-animation-delay: 6s;
  animation-delay: 6s;
}

.img4:nth-of-type(4) {
  -webkit-animation-delay: 9s;
  animation-delay: 9s;
}


.img5 {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    background: center center no-repeat;
    animation: anime 15s 0s infinite;
    z-index: 0;
    opacity: 0;
}

.img5:nth-of-type(2) {
  -webkit-animation-delay: 3s;
  animation-delay: 3s;
}

.img5:nth-of-type(3) {
  -webkit-animation-delay: 6s;
  animation-delay: 6s;
}

.img5:nth-of-type(4) {
  -webkit-animation-delay: 9s;
  animation-delay: 9s;
}

.img5:nth-of-type(5) {
  -webkit-animation-delay: 12s;
  animation-delay: 12s;
}


@keyframes anime {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    60% {
        opacity: 0;
        z-index: 10;
    }
    100% {
        opacity: 0;
    }
}


/* 複数画像切り替え---------------------------------------------- */
.slider-container {
	position: relative; /* コンテナ内でスライド位置を相対的に設定 */
	width: 100%; /* コンテナ幅を100%に */
    aspect-ratio: 2 / 3; /* コンテナの高さを固定 */
	overflow: hidden; /* スライドがコンテナ外に出ないように非表示 */
}

/*画像の配置*/
.slideimg {
	position: absolute; /* 位置を絶対指定で重ねて配置 */
 	inset: 0; /*親要素内にフルサイズで配置*/
	opacity: 0; /* 初期状態で透明に */
	background-size: cover; /* 画像をスライド全体にカバー */
	animation: slideAnime 15s infinite; /* 1サイクル15秒を無限ループ */
}

/* スライド個別設定 */
.slideimg:nth-of-type(1) { animation-delay: 0s; }
.slideimg:nth-of-type(2) { animation-delay: 3s; }
.slideimg:nth-of-type(3) { animation-delay: 6s; }
.slideimg:nth-of-type(4) { animation-delay: 9s; }
.slideimg:nth-of-type(5) { animation-delay: 12s; }

/*タイミング設定*/
@keyframes slideAnime {
	0%, 30%, 100% { opacity: 0; } /* 非表示のタイミング */
	10%, 20% { opacity: 1; } /* 表示されるタイミング */
}

