/* ==========================================================================
   XD Slideshow – Frontend
   ========================================================================== */

.xd-slideshow {
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.xd-slideshow__slides {
    position: relative;
}

/* Slide – fade transition */
.xd-slideshow__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out;
}

.xd-slideshow__slide--active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

/* Caption (title area) */
.xd-slideshow__caption {
    background: #ebeced;
    text-align: center;
    padding: 25px 20px;
}

.xd-slideshow__caption h2 {
    margin: 0;
}

/* Image area */
.xd-slideshow__image {
    background: #3a424c;
    height: 400px;
    text-align: center;
    overflow: hidden;
}

.xd-slideshow__image img {
    width: 826px;
    height: 400px;
}

/* Subtitle */
.xd-slideshow__subtitle {
    font-size: 18px;
    text-align: center;
    padding: 20px;
    color: #3a424c;
}

/* Navigation arrows */
.xd-slideshow__nav {
    position: absolute;
    top: calc(50% + 14px);
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2;
}

.xd-slideshow__nav img {
    width: 67px;
    height: 67px;
    display: block;
}

.xd-slideshow__nav .xd-slideshow__nav-mobile {
    display: none;
}

.xd-slideshow__nav--prev {
    left: max(20px, calc(50% - 570px));
}

.xd-slideshow__nav--next {
    right: max(20px, calc(50% - 570px));
}

/* ==========================================================================
   Responsive – Tablet (768px–1124px)
   ========================================================================== */

@media (max-width: 1124px) {
    .xd-slideshow__image {
        height: 372px;
    }

    .xd-slideshow__image img {
        width: 565px;
        height: 372px;
    }

    .xd-slideshow__nav--prev {
        left: max(10px, calc(50% - 480px));
    }

    .xd-slideshow__nav--next {
        right: max(10px, calc(50% - 480px));
    }
}

/* ==========================================================================
   Responsive – Mobile (≤767px)
   ========================================================================== */

@media (max-width: 767px) {
    .xd-slideshow__caption h2 {
    }

    .xd-slideshow__image {
        background: #fff;
        height: 169px;
    }

    .xd-slideshow__image img {
        width: 356px;
        height: 169px;
    }

    .xd-slideshow__subtitle {
        font-size: 14px;
        padding: 15px;
    }

    .xd-slideshow__nav .xd-slideshow__nav-desktop {
        display: none;
    }

    .xd-slideshow__nav .xd-slideshow__nav-mobile {
        display: block;
    }

    .xd-slideshow__nav img {
        width: 41px;
        height: 41px;
    }

    .xd-slideshow__nav--prev {
        left: 5px;
    }

    .xd-slideshow__nav--next {
        right: 5px;
    }
}

/* ==========================================================================
   Editor styles
   ========================================================================== */

.slideshow-editor {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.slideshow-editor__card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 12px;
}

.slideshow-editor__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.slideshow-editor__actions {
    display: flex;
    gap: 4px;
}

.slideshow-editor__image {
    margin: 8px 0;
}
