/* ==========================================================================
   GALLERY SLIDESHOW STYLES
   ========================================================================== */

/* Container
   ========================================================================== */
.gallery-container {
    max-width: 1000px;
    margin: 0 auto;
    --swiper-navigation-color: #fff;
}

.gallery-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2em;
}

/* Main Gallery
   ========================================================================== */
.gallery-main {
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
    min-height: 500px; /* Reserve space before virtual slide renders — prevents CLS */
}

.gallery-main .swiper-slide {
    position: relative;
    cursor: pointer;
}

.gallery-main .swiper-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

/* Placeholder image rendered in HTML for early LCP discovery.
   Sits behind the swiper-wrapper (z-index 0) and is hidden once
   Swiper boots and adds swiper-initialized to the container. */
.gallery-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    z-index: 0;
}

.gallery-main.swiper-initialized .gallery-placeholder {
    opacity: 0;
    pointer-events: none;
}
/* Thumbnail Gallery
   ========================================================================== */
.gallery-thumbs {
    margin-top: 20px;
    min-height: 140px; /* Reserve space before thumbnails render — prevents CLS */
}

.gallery-thumbs .swiper-slide {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border: var(--e-global-color-primary);
}

.gallery-thumbs .swiper-slide img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

/* Navigation Buttons
   ========================================================================== */
.swiper-button-next,
.swiper-button-prev,
.thumb-swiper-button-next,
.thumb-swiper-button-prev {
    position: absolute;
    top: 40%;
    transform: none;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    border: none;
    transition: all 0.3s ease;
}

.swiper-button-next,
.thumb-swiper-button-next {
    right: 10px;
}

.swiper-button-prev,
.thumb-swiper-button-prev {
    left: 10px;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: rgb(96, 197, 199);
}

.swiper-button-next:after,
.swiper-button-prev:after,
.thumb-swiper-button-next:after,
.thumb-swiper-button-prev:after {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
}

/* Thumbnail Navigation Specific Styles */
.thumb-swiper-button-next,
.thumb-swiper-button-prev {
    background: rgba(96, 197, 199, 0.6);
}

.thumb-swiper-button-next:hover,
.thumb-swiper-button-prev:hover {
    color: #e4e4e4;
}

.thumb-swiper-button-prev.swiper-button-disabled,
.thumb-swiper-button-next.swiper-button-disabled {
    background: rgba(96, 197, 199, 0);
}

.thumb-swiper-button-next:after,
.thumb-swiper-button-prev:after {
    font-family: swiper-icons;
    font-size: 24px;
    text-transform: none !important;
    letter-spacing: 0;
    font-variant: initial;
    line-height: 1;
    content: 'next';
}

.thumb-swiper-button-prev:after,
.swiper-rtl .thumb-swiper-button-next:after {
    content: 'prev';
}

/* Lightbox Icon Overlay
   ========================================================================== */
.lightbox-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.gallery-main .swiper-slide:hover .lightbox-icon,
.simple-gallery-main .swiper-slide:hover .lightbox-icon {
    opacity: 1;
}

/* Pagination
   ========================================================================== */
.swiper-pagination-bullet {
    background: #007bff;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
}

/* GLightbox Overlay Styles
   ========================================================================== */
.goverlay {
    background: rgba(255, 255, 255, 1) !important;
}

.gslide-description.description-bottom {
    display: none;
}

/* ==========================================================================
   SIMPLE GALLERY SLIDESHOW STYLES
   ========================================================================== */

/* Container
   ========================================================================== */
.simple-gallery-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.home .simple-gallery-container {
    max-width: 450px;
}

/* Main Gallery
   ========================================================================== */
.simple-gallery-main {
    position: relative;
    overflow: hidden;
    width: 100% !important;
}

.slider-listings .simple-gallery-main {
    padding-bottom: 5px !important;
}

.simple-gallery-main .swiper-slide {
    position: relative;
    cursor: pointer;
}

.simple-gallery-main .swiper-slide img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* Navigation Buttons
   ========================================================================== */
.simple-gallery-container .swiper-button-next,
.simple-gallery-container .swiper-button-prev {
    color: #fff;
    background: transparent;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

.simple-gallery-container .swiper-button-next {
    right: 0 !important;
}

.simple-gallery-container .swiper-button-prev {
    left: 0 !important;
}

.simple-gallery-container .swiper-button-next:hover,
.simple-gallery-container .swiper-button-prev:hover {
    color: rgb(96, 197, 199);
    transform: scale(1.1);
}

.simple-gallery-container .swiper-button-next:after,
.simple-gallery-container .swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */

/* Tablet and Mobile
   ========================================================================== */
@media (max-width: 768px) {
    /* Main Gallery */
    .gallery-main {
        min-height: 300px;
    }

    .gallery-main .swiper-slide img,
    .gallery-placeholder {
        height: 300px;
    }

    .gallery-thumbs {
        min-height: 60px;
    }

    .gallery-thumbs .swiper-slide img {
        height: 60px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    
    /* Simple Gallery */
    .simple-gallery-container .swiper-button-next,
    .simple-gallery-container .swiper-button-prev {
        width: 40px;
        height: 40px;
    }
    
    .simple-gallery-container .swiper-button-next:after,
    .simple-gallery-container .swiper-button-prev:after {
        font-size: 16px;
    }
    
    /* Lightbox */
    .lightbox-icon {
        padding: 10px;
        font-size: 18px;
    }
    .thumb-swiper-button-next,
    .thumb-swiper-button-prev {
        top: 20%;
    }
}

/* Desktop
   ========================================================================== */
@media (min-width: 769px) {
    .glightbox-clean .gclose,
    .glightbox-clean .gnext,
    .glightbox-clean .gprev {
        background-color: rgba(96, 197, 199, 0.6) !important;
        border: 0 !important;
    }
    
    .goverlay {
        background: rgba(255, 255, 255, 0.92);
    }
    
    .gslide-description.description-bottom {
        display: none;
    }
}