.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.gallery-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
}

.gallery-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1055;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.8);
}

.gallery-modal-content {
    display: block;
    width: min(100%, 900px);
    max-height: 90vh;
    margin: auto;
    object-fit: contain;
}

.gallery-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-modal {
        padding: 1rem;
    }
}

