/* Metro grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-auto-rows: 150px;
    gap: 10px;
    padding: 10px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s;
}

/* Mozaikový efekt */
.gallery-item:nth-child(3n) { grid-row: span 2; }
.gallery-item:nth-child(5n) { grid-row: span 2; }

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item:hover {
    transform: scale(1.05);
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: row;
}

#lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

/* Ovládací prvky lightboxu */
#lightbox .close, #lightbox .prev, #lightbox .next {
    position: absolute;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    padding: 10px;
    z-index: 10001;
    transition: 0.3s;
}

#lightbox .close:hover, #lightbox .prev:hover, #lightbox .next:hover {
    color: #ccc;
}

#lightbox .close {
    top: 10px;
    right: 20px;
}

#lightbox .prev {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

#lightbox .next {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}
