.apg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns), 1fr);
    gap: 15px;
}

.apg-gallery-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
}

.apg-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.apg-gallery-item:hover img {
    transform: scale(1.05);
}

/* Lightbox */
.apg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
	max-width: 100vw !important;
}

.apg-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.8);
}

.apg-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.apg-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
}

.apg-lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
}
