.img-box {
    position: relative;
    width: 100%;
    aspect-ratio: 7 / 10;
    overflow: hidden;
}

.img1 {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    background: center center no-repeat;
    animation: anime 6s 0s infinite;
    z-index: 0;
    opacity: 0;
}
.img1:nth-of-type(2) {
  -webkit-animation-delay: 3s;
  animation-delay: 3s;
}

.img2 {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    background: center center no-repeat;
    animation: anime 9s 0s infinite;
    z-index: 0;
    opacity: 0;
}

.img2:nth-of-type(2) {
  -webkit-animation-delay: 3s;
  animation-delay: 3s;
}

.img2:nth-of-type(3) {
  -webkit-animation-delay: 6s;
  animation-delay: 6s;
}


@keyframes anime {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    60% {
        opacity: 0;
        z-index: 10;
    }
    100% {
        opacity: 0;
    }
}


/*トップ用*/

.img1_loop {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    background: center center no-repeat;
    animation: anime-loop1 10s 0s infinite;
    z-index: 0;
    opacity: 0;
}

.img1_loop:nth-of-type(2) {
  -webkit-animation-delay: 5s;
  animation-delay: 5s;
}



@keyframes anime-loop1 {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    60% {
        opacity: 0;
        z-index: 10;
    }
    100% {
        opacity: 0;
    }
}


.img1_loop::before {	
  animation: img-wrap1 2s ease 0s forwards normal;
  background: #fff;
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

@keyframes img-wrap1 {
  100% {
    transform: translateY(100%);
  }
}

.img2_loop {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    background: center center no-repeat;
    animation: anime-loop2 11s 0s infinite;
    z-index: 0;
    opacity: 0;
}

.img2_loop:nth-of-type(2) {
  -webkit-animation-delay: 5.5s;
  animation-delay: 5.5s;
}



@keyframes anime-loop2 {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    60% {
        opacity: 0;
        z-index: 10;
    }
    100% {
        opacity: 0;
    }
}


.img2_loop::before {	
  animation: img-wrap2 2s ease .5s forwards normal;
  background: #fff;
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

@keyframes img-wrap2 {
  100% {
    transform: translateY(100%);
  }
}



.img3_loop {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    background: center center no-repeat;
    animation: anime-loop3 12s 0s infinite;
    z-index: 0;
    opacity: 0;
}

.img3_loop:nth-of-type(2) {
  -webkit-animation-delay: 6s;
  animation-delay: 6s;
}



@keyframes anime-loop3 {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    60% {
        opacity: 0;
        z-index: 10;
    }
    100% {
        opacity: 0;
    }
}


.img3_loop::before {	
  animation: img-wrap3 2s ease 1s forwards normal;
  background: #fff;
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

@keyframes img-wrap3 {
  100% {
    transform: translateY(100%);
  }
}




/* 複数画像切り替え---------------------------------------------- */
.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; } /* 表示されるタイミング */
}

