/* Ga Gallery Styles */

.ga-gallery-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    gap: var(--con_gap, 20px);
}

/* Main Slider */
.ga-gallery-main {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.ga-gallery-main .swiper {
    width: 100%;
    height: auto;
}

.ga-gallery-main .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ga-gallery-main .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.ga-gallery-main .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.ga-gallery-main .elementor-swiper-button-prev,
.ga-gallery-main .elementor-swiper-button-next {
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 5px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    z-index: 10;
}

.ga-gallery-main .elementor-swiper-button-prev {
    left: 10px;
}

.ga-gallery-main .elementor-swiper-button-next {
    right: 10px;
}

.ga-gallery-main .elementor-swiper-button-prev svg,
.ga-gallery-main .elementor-swiper-button-next svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    display: block;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.ga-gallery-main .elementor-swiper-button-prev:hover,
.ga-gallery-main .elementor-swiper-button-next:hover {
    opacity: 0.8;
}

.ga-gallery-main .ga-gallery-lightbox-trigger {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.ga-gallery-main .ga-gallery-lightbox-trigger i {
    color: #fff;
    font-size: 20px;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.ga-gallery-main .ga-gallery-lightbox-trigger:hover {
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 1;
}

.ga-gallery-main .ga-gallery-lightbox-trigger:hover i {
    color: #fff;
}

/* Thumbnails */
.ga-gallery-thumbnails {
    position: relative;
    width: 100%;
}

.ga-gallery-thumbnails .swiper {
    width: 100%;
}

.ga-gallery-thumbnails-horizontal .ga-gallery-thumbnails .swiper-wrapper .swiper-slide {
  max-width: calc((100% - var(--gap) *  (var(--slides) - 1 )) / var(--slides));
  height: auto;
}
@media screen and (max-width: 768px) {
    .ga-gallery-thumbnails-horizontal .ga-gallery-thumbnails .swiper-wrapper .swiper-slide {
        max-width: calc((100% - var(--gap) *  (var(--mobile-slides) - 1 )) / var(--mobile-slides))
    }
}
.ga-gallery-thumbnails-vertical-left .ga-gallery-thumbnails  .swiper-wrapper .swiper-slide,
.ga-gallery-thumbnails-vertical-right .ga-gallery-thumbnails  .swiper-wrapper .swiper-slide {
    height: ;
    width: ;
}
.ga-gallery-thumbnails .swiper-slide {
    cursor: pointer;
    opacity: 0.6;
    -webkit-transition: opacity 0.3s ease;
    -o-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

.ga-gallery-thumbnails .swiper-slide-thumb-active {
    opacity: 1;
}

.ga-gallery-thumbnails .swiper-slide img {
    width: 100%;
    height: auto;
    -o-object-fit: cover;
    object-fit: cover;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

/* Horizontal Thumbnails */
.ga-gallery-thumbnails-horizontal .ga-gallery-main {
    margin-right: 0;
    margin-bottom: 20px;
}

.ga-gallery-thumbnails-horizontal .ga-gallery-thumbnails {
    width: 100%;
    height: auto;
}

.ga-gallery-thumbnails-horizontal .ga-gallery-thumbnails .swiper {
    height: auto;
}

.ga-gallery-thumbnails-horizontal .ga-gallery-thumbnails .swiper-slide {
    width: auto;
    margin-bottom: 0;
}

.ga-gallery-thumbnails-horizontal .ga-gallery-thumbnails .swiper-slide img {
    height: 100%;
    width: 100%;
}

/* Vertical Thumbnails - Common Styles */
.ga-gallery-thumbnails-vertical-left,
.ga-gallery-thumbnails-vertical-right {
    display: flex;
    flex-direction: row;
}

.ga-gallery-thumbnails-vertical-left .ga-gallery-main,
.ga-gallery-thumbnails-vertical-right .ga-gallery-main {
    flex-shrink: 1;
    flex-grow: 1;
    margin:0;
    max-width: 100%;
}

@media screen and (min-width: 768px) {
    .ga-gallery-thumbnails-vertical-left .ga-gallery-thumbnails,
    .ga-gallery-thumbnails-vertical-right .ga-gallery-thumbnails {
        width: var(--thumbs-col-width);
    }
    .ga-gallery-thumbnails-vertical-left .ga-gallery-main,
    .ga-gallery-thumbnails-vertical-right .ga-gallery-main {
        width: calc(100% - var(--thumbs-col-width) - var(--con_gap));
    }
    .ga-gallery-thumbnails .swiper.swiper-vertical{
        height: 100%;
    }
}
.ga-gallery-thumbnails-vertical-left .ga-gallery-thumbnails,
.ga-gallery-thumbnails-vertical-right .ga-gallery-thumbnails{
    flex-shrink: 0;
    flex-grow: 0;
}

.ga-gallery-thumbnails-vertical-left .ga-gallery-thumbnails-swiper:not(.swiper-horizontal) .swiper-wrapper,
.ga-gallery-thumbnails-vertical-right .ga-gallery-thumbnails-swiper:not(.swiper-horizontal) .swiper-wrapper {
    flex-direction: column;
    position: absolute;
}

.ga-gallery-thumbnails-vertical-left .ga-gallery-thumbnails .swiper-slide,
.ga-gallery-thumbnails-vertical-right .ga-gallery-thumbnails .swiper-slide {
    width: 100%;
    height: auto;
    margin-right: 0;
    margin-bottom: 10px;
}

/* Vertical Left Specific */
.ga-gallery-thumbnails-vertical-left .ga-gallery-thumbnails {
    order: -1;
}

/* Responsive Design for Vertical Layouts */
@media (max-width: 767px) {
    /* Vertical Thumbnails on Mobile - Common */
    .ga-gallery-thumbnails-vertical-left,
    .ga-gallery-thumbnails-vertical-right {
        flex-direction: column;
        gap: 15px;
    }

    .ga-gallery-thumbnails-vertical-left .ga-gallery-thumbnails,
    .ga-gallery-thumbnails-vertical-right .ga-gallery-thumbnails {
        width: 100%;
        height: auto;
    }

    .ga-gallery-thumbnails-vertical-left .ga-gallery-thumbnails .swiper,
    .ga-gallery-thumbnails-vertical-right .ga-gallery-thumbnails .swiper {
        height: auto;
    }

    .ga-gallery-thumbnails-vertical-left .ga-gallery-thumbnails-swiper:not(.swiper-horizontal) .swiper-slide,
    .ga-gallery-thumbnails-vertical-right .ga-gallery-thumbnails-swiper:not(.swiper-horizontal) .swiper-slide {
        width: auto;
        height: 80px;
        margin-right: 8px;
        margin-bottom: 0;
    }

    /* Vertical Left Specific on Mobile */
    .ga-gallery-thumbnails-vertical-left .ga-gallery-thumbnails {
        order: 1;
    }
}

/* Responsive Design */
@media (max-width: 767px) {
    /* Main Slider */
    .ga-gallery-main {
        margin-bottom: 15px;
    }

    .ga-gallery-main .elementor-swiper-button-prev,
    .ga-gallery-main .elementor-swiper-button-next {
        width: 36px;
        height: 36px;
    }

    .ga-gallery-main .elementor-swiper-button-prev svg,
    .ga-gallery-main .elementor-swiper-button-next svg {
        width: 20px;
        height: 20px;
    }

    .ga-gallery-main .elementor-swiper-button-prev {
        left: 5px;
    }

    .ga-gallery-main .elementor-swiper-button-next {
        right: 5px;
    }

    .ga-gallery-main .ga-gallery-lightbox-trigger {
        width: 32px;
        height: 32px;
        top: 5px;
        right: 5px;
    }

    .ga-gallery-main .ga-gallery-lightbox-trigger i {
        font-size: 16px;
    }

    /* Horizontal Thumbnails on Mobile */
    .ga-gallery-thumbnails-horizontal .ga-gallery-thumbnails .swiper-slide {
        margin-right: 8px;
    }

    /* Fallback for old vertical class on Mobile */
    .ga-gallery-thumbnails-vertical {
        flex-direction: column;
        gap: 15px;
    }

    .ga-gallery-thumbnails-vertical .ga-gallery-thumbnails {
        width: 100%;
        height: auto;
    }

    .ga-gallery-thumbnails-vertical .ga-gallery-thumbnails .swiper {
        height: auto;
    }

    .ga-gallery-thumbnails-vertical .ga-gallery-thumbnails .swiper-slide {
        width: auto;
        height: 80px;
        margin-right: 8px;
        margin-bottom: 0;
    }

    .ga-gallery-thumbnails-vertical .ga-gallery-thumbnails .swiper-slide img {
        height: 100%;
        width: auto;
    }
}

@media (max-width: 480px) {
    /* Main Slider */
    .ga-gallery-main {
        margin-bottom: 10px;
    }

    /* Horizontal Thumbnails on Mobile */
    .ga-gallery-thumbnails-horizontal .ga-gallery-thumbnails .swiper-slide {
        margin-right: 6px;
    }

    /* Fallback for old vertical class on Mobile */
    .ga-gallery-thumbnails-vertical {
        gap: 10px;
    }
    
    /* Vertical Thumbnails on Mobile - Common */
    .ga-gallery-thumbnails-vertical-left,
    .ga-gallery-thumbnails-vertical-right {
        gap: 10px;
    }

    .ga-gallery-thumbnails-vertical-left .ga-gallery-thumbnails-swiper:not(.swiper-horizontal) .swiper-slide,
    .ga-gallery-thumbnails-vertical-right .ga-gallery-thumbnails-swiper:not(.swiper-horizontal) .swiper-slide {
        height: 60px;
        margin-right: 6px;
    }
}

/* Loading State */
.ga-gallery-container.loading {
    position: relative;
}

.ga-gallery-container.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00adb5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* RTL Support */
body.rtl .ga-gallery-main .elementor-swiper-button-prev {
    left: auto;
    right: 10px;
}

body.rtl .ga-gallery-main .elementor-swiper-button-next {
    right: auto;
    left: 10px;
}

@media (max-width: 767px) {
    body.rtl .ga-gallery-main .elementor-swiper-button-prev {
        left: auto;
        right: 5px;
    }

    body.rtl .ga-gallery-main .elementor-swiper-button-next {
        right: auto;
        left: 5px;
    }
}

/* Focus styles for accessibility */


/* Disabled state */
.ga-gallery-main .elementor-swiper-button-prev.swiper-button-disabled,
.ga-gallery-main .elementor-swiper-button-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Hover Image */
.ga-gallery-main .hover-image{
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
}
.ga-gallery-main:hover .hover-image{
    opacity: 1;
}