.apg-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.apg-gallery a {
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.apg-gallery img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.2s ease-in-out;
}

.apg-gallery img:hover {
    transform: scale(1.05);
}

/* Lightbox styles */
.apg-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.9);
}

.apg-lightbox-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 80vh;
}

.apg-close, .apg-prev, .apg-next {
    position: absolute;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
}

.apg-close {
    top: 20px;
    right: 35px;
    font-size: 40px;
}

.apg-prev, .apg-next {
    top: 50%;
    font-size: 50px;
    padding: 10px;
    margin-top: -25px;
    background-color: rgba(0,0,0,0.3);
    border-radius: 4px;
}

.apg-prev {
    left: 20px;
}

.apg-next {
    right: 20px;
}

.apg-close:hover, .apg-prev:hover, .apg-next:hover {
    color: #bbb;
    background-color: rgba(0,0,0,0.5);
}
