.gallery-row,
.z5i {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.gallery-row-item,
.z4q {
    position: relative;
    overflow: hidden;
    line-height: 0;
    height: 280px;
    flex: 1 1 100%;
}
@media (min-width: 640px) {
    .gallery-row-item,
.z4q {
        height: 340px;
        flex: 1 1 auto;
        min-width: 280px;
    }
}
@media (min-width: 1024px) {
    .gallery-row-item,
.z4q { height: 400px; }
}
.gallery-row-item img,
.z4q img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.gallery-row-item::after,
.z4q::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
    pointer-events: none;
}
.gallery-row-item:hover::after,
.z4q:hover::after {
    background: rgba(0,0,0,0.25);
}
.gallery-theme-group:first-child h3,
.z5r:first-child h3 {
    margin-top: 0;
}

#lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
#lightbox.is-open { opacity: 1 !important; }
#lb-backdrop {
    position: absolute;
    inset: 0;
    background: inherit;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: backdrop-filter 0.6s ease, -webkit-backdrop-filter 0.6s ease;
}
#lightbox.is-open #lb-backdrop {
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}
#lb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.5s ease;
}
#lightbox.is-open #lb-overlay {
    background: rgba(0,0,0,0.85);
}
#lb-img-wrap {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 60px 24px;
}
@media (min-width: 768px) {
    #lb-img-wrap { padding: 80px 60px; }
}
#lb-img {
    display: block;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 60px rgba(0,0,0,0.6);
}
@media (min-width: 768px) {
    #lb-img {
        max-width: calc(100vw - 120px);
        max-height: calc(100vh - 160px);
    }
}
#lb-img.entering {
    opacity: 0;
    transform: scale(0.85) translateY(20px);
}
#lb-img.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}
