.story-history{
    .container{
        padding-top: 80px;
        padding-bottom: 128px;
        >h2{
            font-size: 60px;
            font-weight: 400;
            font-family: "Homemade Apple", cursive;
            line-height: 1;
            letter-spacing: 2px;
            color: var(--color-secondary-1);
            margin-bottom: 72px;
        }
    }
}
.story-history-desktop-swiper{
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.story-history-swiper{
    grid-column: span 7;
    width: 100%;
    padding-right: 90px;
    .swiper-slide{
        height: auto;
        >img{
            position: absolute;
            width: 100%;
            height: 100%;
            object-fit: contain;
        }
    }
}

.story-history-swiper-change-page{
    grid-column: span 5;
    display: flex;
    gap: 24px;
    align-items: center;
    >:nth-child(1){
        flex-grow: 1;
    }
    >:nth-child(2){
        flex-shrink: 0;
    }
}

.story-history-swiper-pagination{
    display: grid;
    grid-template-columns: auto auto auto 1fr;
    grid-auto-rows: 1fr;
    align-items: center;
    gap: 0 24px;
    >.line{
        position: relative;
        z-index: 1;
        > div{
            position: absolute;
            right: calc(100% + 24px);
            top: 50%;
            height: 1px;
            width: 110px;
            background-color: var(--color-gray-4);
            opacity: 0;
            transition: opacity 1s;
        }
        &.active > div{
            opacity: 1;
        }
    }
    >.en-h1{
        font-size: 60px;
        color: var(--color-gray-5);
        text-align: end;
        top: 4px;
        transform: scale(0.66666);
        transform-origin: right center;
        transition: color 1s, transform 1s;
        cursor: pointer;
        &.active{
            transform: scale(1);
            color: var(--color-gray-1);
            &::before{
                opacity: 1;
            }
        }
    }
    >.dot{
        position: relative;
        height: 100%;
        width: 2px;
        background-color: var(--color-secondary-1);
        &::before{
            content: "";
            position: absolute;
            top: calc(50% - 5px);
            left: -5px;
            width: 12px;
            aspect-ratio: 1;
            border-radius: 50%;
            background-color: var(--color-secondary-1);
            transition: background-color 1s;
        }
        &.active::before{
            background-color: var(--color-primary-2);
        }
    }
    >.title{
        white-space: pre-line;
        transition: font-weight 1s;
        &.active{
            font-weight: 500;
        }
    }
}

.story-history-swiper-prev,
.story-history-swiper-next{
    cursor: pointer;
    rect{
        fill: transparent;
        transition: fill .3s;
    }
    &:hover rect{
        fill: var(--color-secondary-1);
    }
}
.story-history-swiper-prev{
    margin-bottom: 20px;
}
.story-history-mobile-swiper{
    display: none;
}
.story-history-mobile-card{
    >.dot{
        position: relative;
        height: 2px;
        background-color: var(--color-secondary-1);
        margin: 12px -24px 12px 0;
        &::before{
            content: "";
            position: absolute;
            top: -5px;
            left: calc(50% - 18px);
            width: 12px;
            aspect-ratio: 1;
            border-radius: 50%;
            background-color: var(--color-primary-2);
        }
    }
    >.en-h1{
        margin-bottom: 24px;
        text-align: center;
        color: var(--color-primary-2);
    }
    >.img{
        aspect-ratio: 3 / 2;
        margin-bottom: 16px;
        >img{
            width: 100%;
            height: 100%;
            object-fit: contain;
        }
    }
    >p{
        white-space: pre-line;
        text-align: center;
    }
}

.story-history-mobile-swiper-change-page{
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
}


@media screen and (width < 1248px) {
    .story-history-swiper{
        grid-column: span 6;
        padding-right: 0;
    }
    .story-history-swiper-change-page{
        grid-column: span 6;
    }
    .story-history-swiper-pagination{
        >.line > div{
            right: 0;
        }
    }
}

@media screen and (width < 1024px) {
    .story-history > .container{
        padding-bottom: 80px;
        >h2{
            font-size: 40px;
            letter-spacing: 1px;
            margin-bottom: 60px;
        }
    }
    .story-history-desktop-swiper{
        display: none;
    }
    .story-history-mobile-swiper{
        display: block;
    }
}

@media screen and (width < 768px) {
    .story-history-mobile-swiper-change-page{
        margin-top: 24px;
    }
}

@media screen and (width < 576px) {
    .story-history > .container{
        padding-top: 60px;
        padding-bottom: 60px;
        >h2{
            font-size: 26px;
            margin-bottom: 40px;
        }
    }
}