/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.gallery-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    text-align: center;
}

.gallery-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.gallery-slide.active {
    display: block;
}

.gallery-slide img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.gallery-caption {
    margin: 15px 0;
    color: #fff;
    text-align: center;
    font-size: 1.2rem;
}

/* Navigation buttons */
.gallery-prev,
.gallery-next,
.gallery-close {
    position: absolute;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    padding: 10px;
    user-select: none;
    transition: 0.3s;
}

.gallery-close {
    top: 15px;
    right: 35px;
    font-size: 3rem;
}

.gallery-prev,
.gallery-next {
    top: 50%;
    transform: translateY(-50%);
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

/* Thumbnails */
.gallery-thumbnails {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
    gap: 10px;
    padding: 0 20px;
}

.thumbnail {
    width: 60px;
    height: 60px;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
    object-fit: cover;
    border: 2px solid transparent;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
    border-color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-prev,
    .gallery-next {
        font-size: 2rem;
        padding: 10px;
    }
    
    .gallery-close {
        top: 5px;
        right: 15px;
        font-size: 2.5rem;
    }
    
    .thumbnail {
        width: 40px;
        height: 40px;
    }
}

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

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}
