/* Dodaj style dla kontenera obrazów */
main {
    margin-top: 6rem;
    width: 100%;
}
/* Dodaj style dla kontenera obrazów */
.images {
    column-count: 4; /* Liczba kolumn */
    column-gap: 10px; /* Odstępy między kolumnami */
    padding: 10px;
}
@media only screen and (min-width: 2000px) {
    .images {
        column-count: 5;
    }
}
@media only screen and (max-width: 1200px) {
    .images {
        column-count: 3;
    }
}

@media only screen and (max-width: 800px) {
    .images {
        column-count: 2;
    }
}

@media only screen and (max-width: 500px) {
    .images {
        column-count: 1;
    }
}

.image-item {
    break-inside: avoid; /* Zapobiega dzieleniu elementów pomiędzy kolumny */
    margin-bottom: 10px;
    transition: all 0.2s ease;
    position: relative;
    opacity: 0;
}
.image-item:hover{
    z-index: 1;
    transform: scale(1.02);
}

.images img {
    position: relative;
    opacity: 1;
    width: 100%;
    height: auto;
    object-fit: cover; 
    border-radius: 20px;
    display: block;
}
.image-item.hide {
    opacity: 0;
    /* width: 1rem;
    top: 0;
    left: -20rem;
    position: absolute;
    pointer-events: none;
    z-index: 5; */
}
.image-item:has(img:not(.loaded))::after{
    content: '';
    position: absolute;
    top: 0;
    z-index: 20;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.images img.loaded {
    opacity: 1;
    filter: blur(0px);
}
.gallery {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.images {
    flex: 1 1 100%;
    margin-left: 0.4rem;
    margin-right: 0.4rem;
    border-radius: 8px;
}
.filter {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.125rem;
}
.filter h2 {
    margin: 0;
    text-transform: uppercase;
    font-weight: 900;
    color: var(--text);
    font-size: 2.125rem;
}
.filter select {
    border: var(--primary) solid 2px;
    border-radius: 1rem;
    padding: .2rem .3rem .2rem .3rem;
    background-color: transparent;
    font-family: 'Outfit', sans-serif;
    text-align: center;
    text-transform: capitalize;
}
.filter option {
    text-transform: capitalize;
}
.filter .select {
    display: flex;
    flex-direction: column;
}
.filter label {
    font-family: 'Outfit', sans-serif;
    font-size: .7125rem;
    text-align: center;
}

/* |> New THUMB */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100dvw;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.8);
    display:flex;
    place-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    transition: all 0.5s ease;
}
.lightbox-container {
    width: 90%;
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.lightbox.active {
    opacity: 1;
    pointer-events: all;
}
.lightbox-image {
    max-width: 80%;
    max-height: 80%;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 30px;
    color: #000;
    cursor: pointer;
    padding-inline: .6rem;
    background-color: #fff;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.lightbox-close:hover {
    background-color: #B91C1C;
    color: white;
}
.lightbox-caption {
    color: white;
    text-align: center;
    padding: 10px;
    min-width: 5rem;
}
.lightbox-title {
    padding: 0;
    margin-top: 0;
    margin-bottom: 0.4rem;
    font-weight: 900;
    font-size: 1.8125rem;
}
.lightbox-desc {
    margin: 0;
    font-size: .925rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
}

@media screen and (max-width: 1200px) {
    .lightbox-container {
        flex-direction: column;
        height: 100%;
    } 
}

/* .thumbr {
    position: fixed;
    z-index: 10;
    width: 100%;
    height: 100%;
    top: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 0px;
    transition: max-width 1s ease-in-out;
}
.thumbr.active {
    max-width: 100%;
}
.thumbr-container {
    position: relative;
    background-color: #fff;
    width:fit-content;
    display: flex;
    margin: 1rem;
    border-radius: 20px;
    overflow: hidden;
}
.thumbr-image {
    flex: 1 1 60%;
    max-height: 80vh;
    width: 80%;
}
.thumbr-image img {
    width: 100%;
    height: 100%;
    margin-bottom: -.8rem;
}
.thumbr-image:has(img.vertical-image) {
    width: 18rem;
}
.thumbr-image img.horizontal-image {
    object-fit: cover;
}
.thumbr-image img.vertical-image {
    object-fit: contain;
    width: 24rem;
    height: auto;
}
.thumbr-title {
    flex: 1 1 30%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30vw;
}
.thumbr-title h4 {
    margin: 0;
    color: var(--text);
    font-weight: 800;
    text-align: center;
}
.thumbr-title p {
    margin: 0;
    font-size: .7rem;
}
.thumbr .close-button {
    position: absolute;
    top: .5em;
    right: .5em;
    background-color: #fff;
    padding: .3rem .4rem .3rem .4rem;
    border-radius: 50%;
    box-shadow: rgba(17, 17, 26, 0.1) 0px 1px 0px, rgba(17, 17, 26, 0.1) 0px 8px 24px, rgba(17, 17, 26, 0.1) 0px 16px 48px;
    transition: all 0.3s ease;
}
.thumbr .close-button:hover i{
    color: var(--primary);
}
.thumbr .close-button i {
    color: var(--text);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}
@media screen and (max-width: 800px) {
    .thumbr-container:has(img.vertical-image) {
        flex-direction: column;
        width: clamp(90dvw, 55vw, 50%);
        height: 75dvh;
        position: relative;
    }
    .thumbr-image:has(img.vertical-image) {
        width: 100vw;
        max-height: 75dvh;
    }
    .thumbr-image img.vertical-image {
        object-fit: cover;
        width: 90vw;
        height: 100%;
    }
    .thumbr-container:has(img.vertical-image) .thumbr-title {
        position: absolute;
        width: 100%;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 2;
    }
    .thumbr-container:has(img.vertical-image) .thumbr-title h4, .thumbr-title p {
        color: #fff;
    }
    .thumbr-container:has(img.horizontal-image) {
        flex-direction: column;
    }
    .thumbr-container:has(img.horizontal-image) .thumbr-title {
        width: 100%;
    }
    .thumbr-container:has(img.horizontal-image) .thumbr-title p{
        color: var(--text);
    }
    .thumbr-container:has(img.horizontal-image) .thumbr-image {
        width: 100%;
    }

} */