/* Gallery Slideshow Styles */
.gallery-slide-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
    min-height: 300px;
}

.gallery-slide-img {
    max-height: 600px;
    width: 100%;
    object-fit: contain;
    border-radius: 10px;
    cursor: pointer;
    background-color: #f8f9fa;
    transition: opacity 0.3s ease;
    margin: 0 auto;
    display: block;
}

.gallery-slide-img:hover {
    opacity: 0.9;
}

.gallery-thumbnails {
    padding: 0 40px;
    margin-top: 20px;
}

.thumbnail-container {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-thumb {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.gallery-thumb:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

/* Modal Gallery Styles */
#galleryModal .modal-content {
    background-color: rgba(0, 0, 0, 0.9);
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

#galleryModal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px 20px;
}

#galleryModal .modal-title {
    color: white;
    font-weight: 600;
}

#galleryModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-img-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
}

#galleryModalCarousel .carousel-item img {
    max-height: 80vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    background-color: transparent;
}

#galleryModalCarousel .carousel-control-prev,
#galleryModalCarousel .carousel-control-next {
    width: 10%;
    opacity: 0.8;
}

#galleryModalCarousel .carousel-control-prev:hover,
#galleryModalCarousel .carousel-control-next:hover {
    opacity: 1;
}

.gallery-caption {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 8px;
    max-width: 80%;
    margin: 0 auto;
    bottom: 20px;
}

/* Enhanced Carousel Controls */
#albumGalleryCarousel .carousel-control-prev,
#albumGalleryCarousel .carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    opacity: 0.8;
    color: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

#albumGalleryCarousel .carousel-control-prev {
    left: 20px;
}

#albumGalleryCarousel .carousel-control-next {
    right: 20px;
}

#albumGalleryCarousel .carousel-control-prev-icon,
#albumGalleryCarousel .carousel-control-next-icon {
    width: 20px;
    height: 20px;
    filter: invert(1) grayscale(100%);
}

#albumGalleryCarousel .carousel-control-prev:hover,
#albumGalleryCarousel .carousel-control-next:hover {
    background-color: var(--primary-color);
    opacity: 1;
}

#albumGalleryCarousel .carousel-control-prev:hover .carousel-control-prev-icon,
#albumGalleryCarousel .carousel-control-next:hover .carousel-control-next-icon {
    filter: none;
}

/* Animation Effects */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.carousel-item.active {
    animation: fadeIn 0.5s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .gallery-slide-img {
        max-height: 400px;
    }
    
    #galleryModalCarousel .carousel-item img {
        max-height: 70vh;
    }
    
    .gallery-caption {
        max-width: 100%;
        padding: 10px;
    }
    
    #albumGalleryCarousel .carousel-control-prev,
    #albumGalleryCarousel .carousel-control-next {
        width: 40px;
        height: 40px;
    }
}