/* 横スクロールするアニメーション */

#gallery2{
    transition : 0.5s ease-in;
    height : 200px;
    border-radius : 10px;
}

.carousel {
    margin: 5px auto;
    width: 100%;
    height : fit-content;
    border: 0px solid red;
    display: flex;
    overflow: hidden; 
    gap: 0; 
    /* フェードインを8秒から1秒に短縮し、表示の遅延感を解消 */
    animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.carousel-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1em;
    padding-right: 1em;
    flex-shrink: 0;
    width : max-content;
    will-change: transform;
    /* ここにあった animation 指定を削除 */
}

/* JSからこのクラスが付与された瞬間に、オリジナルとクローンが同時に動き出す */
.carousel-group.is-animating {
    /* ※元の caroulse-left のスペルミスを carousel-left に修正しています */
    animation: carousel-left 40s infinite linear; 
}

.carousel-card {
    flex : 0 0 200px;
    width : min-content;
    height : 100%;
    max-height : 200px;
    font-size : 3rem;
    text-align : center;
    align-content : center;
}

.carousel-group img {
    object-fit : cover;
    width : auto;
    max-width : none; 
    height : 200px;
    border : skyblue solid 1px;
    border-radius : 10px;
    /* 読み込み前の画像枠を綺麗に保つための背景色を追加するとよりモダンです */
    background-color: #f3f4f6; 
}

@keyframes carousel-left {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

@media screen and (max-width : 414px){
    #gallery2{
        display : none;
    }
}
