/* Image Gallery Block Styles */
.image-gallery-container {
    width: 100%;
}

.image-gallery-wrapper {
    position: relative;
    width: 100%;
}

.image-gallery-splide {
    width: 100%;
}

.gallery-item {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    border-radius: 0 0 8px 8px;
}

/* Transition Effects */

/* Slide Effect (default) */
.image-gallery-wrapper.transition-slide .splide__slide {
    transition: transform 0.4s ease;
}

/* Fade Effect */
.image-gallery-wrapper.transition-fade .splide__list {
    display: block !important;
    position: relative;
}

.image-gallery-wrapper.transition-fade .splide__slide {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    transform: none !important;
}

.image-gallery-wrapper.transition-fade .splide__slide.is-active {
    opacity: 1;
    z-index: 1;
    position: relative !important;
}

.image-gallery-wrapper.transition-fade .splide__track {
    height: auto;
    position: relative;
}

/* Loop Effect */
.image-gallery-wrapper.transition-loop .splide__slide {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Navigation Styles */
.image-gallery-splide .splide__arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.image-gallery-splide .splide__arrow {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.image-gallery-splide .splide__arrow:hover {
    background: white;
    transform: scale(1.1);
}

.image-gallery-splide .splide__arrow--prev {
    left: 16px;
}

.image-gallery-splide .splide__arrow--next {
    right: 16px;
}

.image-gallery-splide .splide__arrow svg {
    width: 16px;
    height: 16px;
    fill: #333;
}

/* Pagination Styles */
.image-gallery-splide .splide__pagination {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.image-gallery-splide .splide__pagination__page {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-gallery-splide .splide__pagination__page.is-active {
    background: white;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .image-gallery-splide .splide__arrow {
        width: 40px;
        height: 40px;
    }
    
    .image-gallery-splide .splide__arrow--prev {
        left: 8px;
    }
    
    .image-gallery-splide .splide__arrow--next {
        right: 8px;
    }
    
    .gallery-caption {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
}

/* Accordion Sync Indicator */
.image-gallery-container.accordion-sync-enabled::before {
    content: "🔗";
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 123, 186, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10;
    font-family: sans-serif;
}

/* Loading State */
.image-gallery-splide:not(.is-initialized) .gallery-item {
    opacity: 0.7;
}

.image-gallery-splide.is-initialized .gallery-item {
    opacity: 1;
    transition: opacity 0.3s ease;
}