.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.gallery-thumb {
    display: block;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 0.25rem;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.15s ease-in-out;
}

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

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.gallery-lightbox-image {
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
}

.gallery-lightbox-caption {
    color: #fff;
    text-align: center;
    max-width: 90vw;
    margin-top: 1rem;
}

.gallery-lightbox-close,
.gallery-lightbox-prev,
.gallery-lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.5rem 1rem;
}

.gallery-lightbox-close {
    top: 1rem;
    right: 1rem;
}

.gallery-lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}
