/**
 * Autoplay Gallery Styles - Square tiles with contain images
 */

/* Container */
.autoplay-gallery-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 30px;
}

/* Swiper styles */
.autoplay-gallery-swiper {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}

/* Slide styles - Force square dimensions */
.autoplay-gallery-swiper .swiper-slide,
.autoplay-gallery-swiper .swiper-slide[style] {
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
    height: 250px !important;
    min-height: 250px !important;
    max-height: 250px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    margin-right: 20px !important;
}

/* Link wrapper - fill the slide completely */
.autoplay-gallery-swiper .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Image wrapper - Square shape with rounded corners */
.autoplay-gallery-image-wrapper {
    width: 250px;
    height: 250px;
    flex-shrink: 0;
    overflow: hidden;
    transition: 0.5s ease all;
    display: flex;
    align-items: center;
    justify-content: center;
}

.autoplay-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 40px;
}

/* Hover effect */
.autoplay-gallery-image-wrapper:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Caption styles */
.autoplay-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 15px;
    font-size: 14px;
    line-height: 1.3;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
}

.autoplay-gallery-image-wrapper:hover .autoplay-gallery-caption {
    opacity: 1;
}

/* Empty gallery message */
.autoplay-gallery-empty {
    padding: 20px;
    background-color: #f1f1f1;
    border-radius: 20px;
    text-align: center;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .autoplay-gallery-swiper .swiper-slide,
    .autoplay-gallery-swiper .swiper-slide[style] {
        width: 200px !important;
        min-width: 200px !important;
        max-width: 200px !important;
        height: 200px !important;
        min-height: 200px !important;
        max-height: 200px !important;
    }
    
    .autoplay-gallery-image-wrapper {
        width: 200px !important;
        height: 200px !important;
    }
}

@media (max-width: 768px) {
    .autoplay-gallery-swiper .swiper-slide,
    .autoplay-gallery-swiper .swiper-slide[style] {
        width: 180px !important;
        min-width: 180px !important;
        max-width: 180px !important;
        height: 180px !important;
        min-height: 180px !important;
        max-height: 180px !important;
    }
    
    .autoplay-gallery-image-wrapper {
        width: 180px !important;
        height: 180px !important;
        border-radius: 30px;
    }
    
    .autoplay-gallery-image {
        border-radius: 30px;
    }
    
    .autoplay-gallery-caption {
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
    }
}

@media (max-width: 576px) {
    .autoplay-gallery-swiper .swiper-slide,
    .autoplay-gallery-swiper .swiper-slide[style] {
        width: 150px !important;
        min-width: 150px !important;
        max-width: 150px !important;
        height: 150px !important;
        min-height: 150px !important;
        max-height: 150px !important;
    }
    
    .autoplay-gallery-image-wrapper {
        width: 150px !important;
        height: 150px !important;
        border-radius: 20px;
    }
    
    .autoplay-gallery-image {
        border-radius: 20px;
    }
    
    .autoplay-gallery-caption {
        padding: 8px 10px;
        font-size: 12px;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
    }
}

/* Ensure smooth transitions between slides */
.autoplay-gallery-swiper {
    cursor: pointer;
}

.autoplay-gallery-swiper .swiper-wrapper {
    box-sizing: border-box;
    transition-timing-function: linear !important;
    transition-property: transform !important;
}

/* Override default swiper styles for proper autoplay */
.autoplay-gallery-swiper .swiper-slide {
    flex-shrink: 0;
    position: relative;
    transition-property: transform;
    display: block;
}

/* GLightbox customization - keeps original image size in lightbox */
.glightbox-container {
    z-index: 9999;
}

.gslide-description {
    background-color: rgba(0, 0, 0, 0.7);
}

.gdesc-inner {
    padding: 15px;
}

.gslide-title {
    color: #fff;
    font-size: 16px;
    margin-bottom: 5px;
}


