:root {
    --gap: 15px;
    --radius: 12px;
}

.gallery-flow {
    /* Počet stĺpcov */
    flex-flow: row;
    display: flex;
    flex-wrap: wrap;
    flex-basis: auto;
    gap: 1px;
}

.photo-item {
    max-width: 49.8%;
    display: inline-block;
    flex-grow: 1;
}

.photo-item:hover {
    /* transform: scale(1.05); */
    /* box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2); */
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Vyplní štvorec bez deformácie */
    display: block;
    cursor: pointer;
}

/* Informačná vrstva, ktorá sa objaví pri hoveri */
.info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.photo-item:hover .info-overlay {
    transform: translateY(0);
}

.btn-dl {
    background: #fff;
    color: #000;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.overlay {
    display: none;
    /* Skryté defaultne */
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    user-select: none;
}

#overlayImg {
    max-width: 90%;
    max-height: 85%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 3px solid white;
}

.nav-btn {
    position: absolute;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    transition: 0.3s;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

.save-btn {
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

.nav-btn:hover,
.close-btn:hover {
    color: #bbb;
}

#overlayCaption {
    position: absolute;
    bottom: 20px;
    color: white;
    font-family: sans-serif;
}