/* スライド全体のフェードイン */
@keyframes fadeInSlide {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* イメージ1のフェードインとフェードアウト */
@keyframes fadeInOutImage1 {
    0% {
        opacity: 0;
    }
    33% {
        opacity: 1; /* フェードイン完了 */
    }
    66% {
        opacity: 1; /* 1秒間表示 */
    }
    100% {
        opacity: 0; /* フェードアウト */
    }
}

/* イメージ2のフェードイン */
@keyframes fadeInImage2 {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* テキストのフェードイン */
@keyframes fadeInText {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* テキスト1のフェードアウト＆左にスライドアウト */
@keyframes slideOutText1 {
    0% {
        opacity: 1;
        transform: translate(0, 0);
    }
    100% {
        opacity: 0;
        transform: translateX(-100%); /* 左にスライド */
    }
}

/* テキスト2のフェードアウト（その位置のまま） */
@keyframes fadeOutText2 {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* テキスト3のフェードアウト＆右にスライドアウト */
@keyframes slideOutText3 {
    0% {
        opacity: 1;
        transform: translate(0, 0);
    }
    100% {
        opacity: 0;
        transform: translateX(100%); /* 右にスライド */
    }
}

/* テキスト4のフェードイン（左の外側から中央へ移動） */
@keyframes slideInText4 {
    0% {
        opacity: 0;
        transform: translate(-150%, -50%); /* 左の外側からスタート */
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%); /* スライドの中央に到達 */
    }
}

/* ベースのスタイル */
.slide {
    width: 1000px;
    height: 300px;
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    animation: fadeInSlide 1s ease-in forwards; /* スライド全体のフェードイン */
    opacity: 0;
}

.s-image1 {
    width: 1000px;
    height: auto;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    animation: fadeInOutImage1 4s ease-in 0s forwards; /* 1秒かけてフェードイン、1秒表示、1秒かけてフェードアウト */
}

.s-image2 {
    width: 1000px;
    height: auto;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    animation: fadeInImage2 1s ease-in 5s forwards; /* s-image1が消えた1秒後にフェードイン */
}

.text1, .text2, .text3 {
    width: auto;
    height: 25px;
    position: absolute;
    opacity: 0;
}

.text4 {
    width: auto;
    height: 22px;
    position: absolute;
    opacity: 0;
}

.text1 {
    top: 31%;
    left: 35%;
    animation: fadeInText 1s ease-in 7s forwards, slideOutText1 2s ease-out 12s forwards; /* 7秒後にフェードイン開始、12秒後にスライドアウト */
}

.text2 {
    top: 45%;
    left: 38%;
    animation: fadeInText 1s ease-in 8s forwards, fadeOutText2 2s ease-out 12s forwards; /* 8秒後にフェードイン開始、12秒後にフェードアウト */
}

.text3 {
    top: 59%;
    left: 41%;
    animation: fadeInText 1s ease-in 9s forwards, slideOutText3 2s ease-out 12s forwards; /* 9秒後にフェードイン開始、12秒後にスライドアウト */
}

.text4 {
    top: 50%;
    left: 50%;
    transform: translate(-150%, -50%); /* 左の外側から始まり、中央に移動 */
    animation: slideInText4 2s ease-in 15s forwards; /* 15秒後にフェードイン開始 */
    opacity: 0;
}
