/* Lightbox Styles */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    cursor: pointer;
    height: 200px;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

/* Lightbox */
#image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#image-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80%;
    text-align: center;
}

#lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border: 3px solid white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#lightbox-caption {
    color: white;
    margin-top: 15px;
    font-size: 18px;
    font-family: 'Lobster Two', cursive;
}

#lightbox-counter {
    position: absolute;
    top: -30px;
    right: 0;
    color: white;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
}

.lightbox-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.lightbox-btn {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    margin: 0 20px;
}

.lightbox-btn:hover {
    background: rgba(204, 0, 0, 0.8);
}

#lightbox-close {
    position: absolute;
    top: -40px;
    right: -40px;
    background: rgba(204, 0, 0, 0.8);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

#lightbox-close:hover {
    background: rgba(255, 204, 51, 0.8);
    color: black;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin: 0 10px;
    }
    
    #lightbox-close {
        top: -30px;
        right: -10px;
        width: 35px;
        height: 35px;
    }
}
