/* Masonry layout */
.masonry {
    column-count: 3;
    column-gap: 15px;
}

.masonry img {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 10px;
    cursor: pointer;
    object-fit: cover;
    height: 250px; /* miniatury nie są spłaszczane */
    object-position: center;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

/* Fade-in animacja */
@keyframes fadeIn {
    to { opacity: 1; }
}

/* Modal */
#lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#lightbox-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* Close button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* Arrows */
.arrow {
    position: absolute;
    top: 50%;
    font-size: 60px;
    color: white;
    cursor: pointer;
    user-select: none;
}

.arrow.left { left: 40px; }
.arrow.right { right: 40px; }

/* RWD */
@media (max-width: 900px) {
    .masonry { column-count: 2; }
}

@media (max-width: 600px) {
    .masonry { column-count: 1; }
}
