/* Gallery Carousel Styles */
.gallery-carousel-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.gallery-carousel-wrapper .swiper {
    position: relative;
    overflow: hidden;
}

.gallery-carousel-item {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gallery-carousel-image {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gallery-carousel-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.gallery-carousel-content {
    padding: 20px;
    text-align: center;
}

.gallery-carousel-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.gallery-carousel-description {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Navigation Styles */
.gallery-carousel-wrapper .swiper-button-next,
.gallery-carousel-wrapper .swiper-button-prev {
    width: 40px;
    height: 40px;
    margin-top: -20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.gallery-carousel-wrapper:hover .swiper-button-next,
.gallery-carousel-wrapper:hover .swiper-button-prev {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.gallery-carousel-wrapper .swiper-button-next:hover,
.gallery-carousel-wrapper .swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.gallery-carousel-wrapper .swiper-button-next::after,
.gallery-carousel-wrapper .swiper-button-prev::after {
    font-size: 16px;
    font-weight: 600;
}

.gallery-carousel-wrapper .swiper-button-next {
    right: 10px;
}

.gallery-carousel-wrapper .swiper-button-prev {
    left: 10px;
}

/* Pagination Styles */
.gallery-carousel-wrapper .swiper-pagination {
    position: relative;
    margin-top: 20px;
}

.gallery-carousel-wrapper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: #ccc;
    opacity: 1;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.gallery-carousel-wrapper .swiper-pagination-bullet-active {
    background-color: #007cba;
    transform: scale(1.2);
}

/* Link Styles */
.gallery-carousel-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.gallery-carousel-item a:hover {
    text-decoration: none;
}

/* Thumbnail Navigation Styles */
.gallery-carousel-thumbnails {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.gallery-carousel-thumbnails .thumbnail-item {
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gallery-carousel-thumbnails .thumbnail-item:hover {
    transform: scale(1.05);
}

.gallery-carousel-thumbnails .thumbnail-item.active {
    border-color: #007cba;
    transform: scale(1.1);
}

/* Default thumbnail image styles - can be overridden by widget */
.gallery-carousel-thumbnails .thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.4;
}

.gallery-carousel-thumbnails .thumbnail-item.active img {
    opacity: 1;
}

/* Lightbox Styles */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.lightbox-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 70vh;
    overflow: hidden;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox-navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.lightbox-prev {
    margin-left: 10px;
}

.lightbox-next {
    margin-right: 10px;
}

.lightbox-caption {
    padding: 20px;
    text-align: center;
    background: #fff;
}

.lightbox-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

.lightbox-description {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Lightbox trigger styles */
.lightbox-trigger {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.lightbox-trigger .lightbox-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.lightbox-trigger:hover .lightbox-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.lightbox-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.lightbox-trigger:hover::before {
    opacity: 1;
}

/* Body class when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}

/* Responsive lightbox */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .lightbox-caption {
        padding: 15px;
    }
    
    .lightbox-title {
        font-size: 16px;
    }
    
    .lightbox-description {
        font-size: 13px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .lightbox-close {
        width: 25px;
        height: 25px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .lightbox-content {
        max-width: 98%;
        max-height: 98%;
    }
    
    .lightbox-caption {
        padding: 10px;
    }
    
    .lightbox-title {
        font-size: 15px;
    }
    
    .lightbox-description {
        font-size: 12px;
    }
    
    .lightbox-trigger .lightbox-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Responsive thumbnail hiding */
@media (max-width: 1024px) {
    .hide-thumbnails-tablet .gallery-carousel-thumbnails {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .hide-thumbnails-mobile .gallery-carousel-thumbnails,
    .hide-thumbnails-tablet .gallery-carousel-thumbnails {
        display: none !important;
    }
}
