﻿.slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 2000px;
    margin: auto;
    overflow: hidden;
    background: #ffffff;
    padding: 40px 0;
}

.video-slider {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s ease-in-out;
    overflow: visible;
}

.spacer-left {
    flex: 0 0 300px; /* 左邊空白加寬 */
}

.spacer-right {
    flex: 0 0 150px; /* 右邊保留空白 */
}

/* 桌機版 */
.video-card {
    flex: 0 0 280px;
    margin: 0 40px;
    text-align: center;
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0.5;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

    .video-card a {
        display: block;
        text-decoration: none;
        color: inherit;
    }

    .video-card img {
        width: 100%;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }

    .video-card.active {
        transform: scale(1.4);
        opacity: 1;
        z-index: 5;
        max-width: 480px;
    }

/* 手機版 RWD */
@media (max-width: 768px) {
    .video-slider {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .video-card {
        flex: 0 0 80%; /* 只顯示一張，縮小寬度 */
        margin: 0 10px;
    }

        .video-card.active {
            transform: scale(1.1); /* 手機放大幅度小一點 */
        }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

.title {
    margin-top: 8px;
    font-size: 14px;
    white-space: nowrap;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    font-size: 28px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
    transition: background 0.3s;
}

    .slider-btn:hover {
        background: rgba(0,0,0,0.85);
    }

#prevBtn {
    left: 15px;
}

#nextBtn {
    right: 15px;
}
