.spectrum-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 50px 0;
}

.spectrum-carousel-wrapper .spectrum-carousel-swiper {
    position: relative;
    width: 100%;
    height: auto;
}

.spectrum-carousel-wrapper .swiper-wrapper {
    display: flex;
    align-items: center;
}

@media (min-width: 1024px) {
    .spectrum-carousel-wrapper .swiper-slide {
        width: calc(100% / 5);

        flex-shrink: 0;
        position: relative;
        transition: all 0.5s ease;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .spectrum-carousel-wrapper .swiper-slide {
        width: calc(100% / 4);
        flex-shrink: 0;
        position: relative;
        transition: all 0.5s ease;
    }
}


@media (max-width: 767px) {
    .spectrum-carousel-wrapper .swiper-slide {
        width: calc(100% / 3);
        flex-shrink: 0;
        position: relative;
        transition: all 0.5s ease;
    }
}

.spectrum-carousel-wrapper .spectrum-carousel-item {
    position: relative;
    width: 100%;
    height: auto;
}

.spectrum-carousel-wrapper .spectrum-carousel-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    transition: all 0.5s ease;
}

.spectrum-carousel-wrapper .spectrum-carousel-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    transition: all 0.5s ease;
}

.spectrum-carousel-wrapper .spectrum-carousel-title {
    position: relative;
    z-index: 10;
    text-align: center;
}

.spectrum-carousel-wrapper .spectrum-carousel-title a {
    text-shadow: -2px 3px 4px black;
    text-decoration: none;
    color: inherit;
    display: inline-block;
    line-height: 1;
    text-align: center;
    font-family: 'IBM Plex Sans Thai', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 21px;
}

.spectrum-carousel-wrapper .spectrum-carousel-title a:hover {
    text-decoration: none;
}

.spectrum-carousel-wrapper .spectrum-carousel-content {
    opacity: 0;
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 100%;
    padding: 20px;
    transition: all 0.8s ease;
}

.spectrum-carousel-wrapper .spectrum-carousel-prev,
.spectrum-carousel-wrapper .spectrum-carousel-next {
    position: absolute;
    top: 70%;
    transform: translateY(-50%);
    z-index: 100;
    color: #000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
}


.spectrum-carousel-wrapper .spectrum-carousel-prev {
    left: 32%;
}

.spectrum-carousel-wrapper .spectrum-carousel-next {
    right: 32%;
}

/* Pagination */
.spectrum-carousel-wrapper .spectrum-carousel-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.spectrum-carousel-wrapper .spectrum-carousel-pagination .swiper-pagination-bullet {
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.spectrum-carousel-wrapper .spectrum-carousel-pagination .swiper-pagination-bullet-active {
    background: #fff;
}

.spectrum-carousel-wrapper .spectrum-carousel-logo {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* No posts message */
.spectrum-carousel-no-posts {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Info message */
.spectrum-carousel-info {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}


.spectrum-carousel-wrapper .swiper-button-prev:after,
.spectrum-carousel-wrapper .swiper-button-next:after {
    content: unset !important;
}


/* Spectrum Carousel Widget - Same behavior as .sp-slide-bottom-blog */
.spectrum-carousel-wrapper {
    position: relative;
    width: 100%;
}

.spectrum-carousel-wrapper .swiper-slide:after {
    content: "";
    height: 14px;
    width: auto;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: url('http://18.140.213.107/wp-content/uploads/2025/03/Column_Spectator-02.png') no-repeat center center;
    background-size: contain;
    position: absolute;
    width: 100%;
    opacity: 0;
    transition: all 0.8s ease;
}

/* Additional positioning rules for 5-slide layout: 4-2-1-3-5 */
.spectrum-carousel-wrapper .swiper-slide {
    transition: all 0.5s ease;
}

/* Default state for all slides */
.spectrum-carousel-wrapper .swiper-slide .spectrum-carousel-image {
    overflow: hidden;
    transition: all 0.5s ease;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.spectrum-carousel-wrapper .swiper-slide .spectrum-carousel-image img {
    transition: all 0.5s ease;
}

/* Desktop and Tablet Styles */
@media only screen and (min-width: 769px) {
    .spectrum-carousel-wrapper .swiper-slide {
        transition: all 0.5s ease;
        transform: scale(0.7);
        filter: blur(2px);
    }


    .spectrum-carousel-wrapper .swiper-slide .spectrum-carousel-image {
        /* width: 180px !important; */
        height: 144px !important;
        /* overflow: hidden;
        border-radius: 10px;
        margin: 0 auto; */
    }

    .spectrum-carousel-wrapper .swiper-slide .spectrum-carousel-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        object-position: center;
        border-radius: 10px;
        transition: all 0.5s ease;
    }

    .spectrum-carousel-wrapper .swiper-slide .spectrum-carousel-content {
        opacity: 0;
        position: absolute;
        bottom: -30px;
        left: 0;
        width: 100%;
        padding: 0px 20px;
        transition: all 0.8s ease;
    }

    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-active {
        transform: scale(1.44) !important;
        z-index: 30;
        filter: blur(0px) !important;
    }


    /* รายการที่ 2,4 (ข้างกลาง) - 280x156 */
    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-prev .spectrum-carousel-image,
    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-next .spectrum-carousel-image {
        /* width: 280px !important;*/
        height: 156px !important;
    }

    /* รายการที่ 3 (กลาง) - 380x212 */
    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-active .spectrum-carousel-image {
        /* width: 380px !important; */
        height: 148px !important;
    }

    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-active .spectrum-carousel-content {
        opacity: 1;
        bottom: 0;
    }

    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-active:after {
        opacity: 1;
    }

    /* Position 2 and 3 (sides of center) - Add spacing with margin */
    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-prev,
    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-next {

        z-index: 25;
        filter: blur(1px) !important;

    }

    /* Position 4 and 5 (far sides) - Equal spacing with margin */
    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-prev.swiper-slide-prev,
    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-next.swiper-slide-next {

        z-index: 20;
        filter: blur(0px) !important;

    }

    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-prev.swiper-slide-prev {
        transform: translateX(-19%);
    }

    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-next.swiper-slide-next {
        transform: translateX(19%);
    }

    .spectrum-carousel-wrapper .spectrum-carousel-prev,
    .spectrum-carousel-wrapper .spectrum-carousel-next {
        padding: 5px;
        border-radius: 50%;
        position: absolute;
        top: 60% !important;
        transform: translateY(-50%);
        z-index: 100;
    }

    .spectrum-carousel-wrapper .spectrum-carousel-prev {
        left: 30%;
    }

    .spectrum-carousel-wrapper .spectrum-carousel-next {
        right: 30%;
    }

    .spectrum-carousel-wrapper .spectrum-carousel-prev i,
    .spectrum-carousel-wrapper .spectrum-carousel-next i {
        font-size: 48px !important;
    }

}

/* Mobile Styles */
@media only screen and (max-width: 768px) {
    .spectrum-carousel-wrapper .swiper-slide {
        transition: all 0.5s ease;
        transform: scale(0.85);

        filter: blur(1.5px);
    }

    .spectrum-carousel-wrapper .swiper-slide .spectrum-carousel-image img {
        border-radius: 12px;
        transition: all 0.5s ease;
    }

    .spectrum-carousel-wrapper .swiper-slide .spectrum-carousel-content {
        opacity: 0;
        position: absolute;
        bottom: -30px;
        left: 0;
        width: 100%;
        padding: 10px;
        transition: all 0.8s ease;
    }


    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-active {
        transform: scale(1.2) !important;
        z-index: 30;
        filter: blur(0px) !important;
    }

    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-active .spectrum-carousel-content {
        opacity: 1;
        bottom: 0;
    }

    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-active:after {
        opacity: 1;
    }

    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-prev,
    .spectrum-carousel-wrapper .swiper-slide.swiper-slide-next {
        transform: scale(0.9) !important;
        z-index: 25;
        filter: blur(2px) !important;

    }

    .spectrum-carousel-wrapper .spectrum-carousel-prev,
    .spectrum-carousel-wrapper .spectrum-carousel-next {
        padding: 2px;
        border-radius: 50%;
        position: absolute;
        top: 70% !important;
        transform: translateY(-50%);
        z-index: 100;
    }

    .spectrum-carousel-wrapper .spectrum-carousel-prev {
        left: 15% !important;
    }

    .spectrum-carousel-wrapper .spectrum-carousel-next {
        right: 15% !important;
    }


    .spectrum-carousel-wrapper .spectrum-carousel-prev i,
    .spectrum-carousel-wrapper .spectrum-carousel-next i {
        font-size: 24px !important;
    }

}

.spectrum-carousel-wrapper .swiper {
    overflow: unset !important;
}