/* Gallery container */
.footer-gallery {
    padding: 20px;
}

/* Grid layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

/* Each item */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

/* Images */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

/* Hover zoom */
.gallery-item:hover img {
    transform: scale(1.1);
}

/* Lightbox background */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* Using viewport width */
    height: 100vh; /* Using viewport height */
    background: rgba(0, 0, 0, 0.9);

    /* Centering logic */
    display: flex;
    align-items: center;
    justify-content: center;

    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

/* Visible state */
.lightbox.show {
    visibility: visible;
    opacity: 1;
}

/* Lightbox image */
.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    transition: opacity 0.3s ease;

    /* Ensure no margins interfere with flex centering */
    margin: auto;
    display: block;
}