﻿.carousel-container {
    width: 60%;
    height: 100%;
    margin-top: 20px;
    overflow: hidden;
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 576px) {
    .carousel-container{
        width: 75%;
    }
}

@media (min-width: 768px) {
    .smooth-padding{
        padding-left: 2.5rem;
    }
}

.smooth-text {
    opacity: 0;
    min-width: 350px;
    max-width: 560px;
}

.smooth-text.active{
    opacity: 1;
    transition: opacity 0.25s ease-in-out;
}

.video-container {
    top: 0;
    left: 0;
    display: none;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
}

.video-container.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: expandFromCenter 2s ease forwards; /* 使用动画名称expandFromCenter，持续1秒，缓动函数为ease，结束后保持动画最终状态 */
}

@media (max-width: 768px) {
    .video-container.active {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        animation: expandFromCenter 1s ease forwards; /* 使用动画名称expandFromCenter，持续1秒，缓动函数为ease，结束后保持动画最终状态 */
    }
}

/* 定义动画 */
@keyframes expandFromCenter {
    from {
        opacity: 0; /* 初始时透明度为0 */
        transform: scale(0.5); /* 初始时缩放为0，元素隐藏 */
    }
    to {
        opacity: 1; /* 结束时透明度为1 */
        transform: scale(1); /* 结束时缩放为1，元素完全显示 */
    }
}

.video-container.active video {
    width: 100%;
    height: 100%;
}

.carousel-dots {
    margin: 30px auto;
    max-width: 720px;
    display: flex;
    color: #817f7f;
    justify-content: space-evenly;
    align-items: center;
    text-align: center;
}

.dot {
    color: #817f7f;
    margin: 0 10px;
    cursor: pointer;
}

.dot.active {
    color: white;
}

@media (max-width: 767px) {
    .carousel-dots {
        /*margin: calc((100% - 375px) * (30 / 100) + 0px) 0 30px 0;*/
        margin: calc(10%) 0 30px 0;
        max-width: 720px;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .dot {
        position: relative;
        margin: 0 8px;
        cursor: default;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        color: rgba(0, 0, 0, 0);
        background-color: #817f7f;
    }

    .dot.active {
        color: rgba(0, 0, 0, 0);
        background-color: white;
    }

    #smooth-arrow-prev{
        cursor: pointer;
    }

    #smooth-arrow-next{
        cursor: pointer;
    }
}

.video-icon-box{
    width: 100%;
    position: relative;
}

.video-icon{
    position: absolute;
    top:16px;
    left: 16px;
}

.smooth-box{
}