.gallery {
    /*background: linear-gradient(
        60deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.5)
    );*/
    border-radius: 20px;
    display: flex;
    flex-wrap: wrap; /* jak się nie mieści to urwórz nową linię */
    justify-content: space-evenly;
    list-style-type: none;
    padding: 24px;
}

.thumbnail {
    border: solid 3px rgba(255, 255, 255, 0.9); /* a - przeźroczystość */
    border-radius: 15px;
    box-shadow: 0 0 48px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    margin: 32px;
    max-height: 200px;
    max-width: 300px;
    overflow: hidden; /* bez scrola */
    transform: scale(1);
    transition: transform 0.3s; /* animacja */
}

.thumbnail:hover { 
    transform: scale(1.2); /*  po najechaniu 120% */
}

.thumbnail img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.thumbnail img:focus,
.thumbnail img:focus {
    border: solid 5px rgb(78, 76, 226);
}

.popup {
    align-content: center;
    animation: fadeIn 0.3s;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px); /* blur warstwy pod */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    height: 100vh;
    left: 0;
    position: fixed;
    top: 0;
    width: 100vw;
}

.popup.hidden {
    display: none;
}

.popup.fade-out {
    animation: fadeOut 0.3s both;
}

.popup__img {
    max-height: 80%;
    max-width: 80%;
}

.popup__close {
    background-color: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 128px;
    position: fixed;
    right: 64px;
    top: 64px;
}

.popup__arrow {
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 128px;
    height: 128px;
    line-height: 128px;
    position: absolute;
    top: 50%;
    width: 128px;
}

.popup__close,
.popup__arrow {
    opacity: 0.5;
    transition: opacity 0.3s;
}

.popup__close:hover,
.popup__arrow:hover {
    opacity: 1;
}

.popup__arrow--left {/* popup__arrow + left */
    left: 5%;
}

.popup__arrow--right {
    right: 5%;
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
