body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    background-color: #181a1b;
    overflow-x: hidden;
    transition: padding-top 0.3s;
}

.part1{
    padding-top: 80px;
    width: 70%;
    display: flex;
    align-items: center;
    margin: 0 auto;
    justify-self: center;
    flex-direction: row;
    font-family: 'TT_Prosto_Sans_Trial_Light', sans-serif;
    color: rgb(243, 243, 243);
}

.part1 h1 {
    color: #708564;
    font-size: 30px;
}

.part2{
    width: 100%;
    display: flex;
    align-items: center;
    margin: 0 auto;
    justify-content: center;
    flex-direction: column;
    font-family: 'TT_Prosto_Sans_Trial_Light', sans-serif;
    color: rgb(243, 243, 243);
    background-color: #708564;
}

.text2{
    width: 70%;
}

.part3 {
    width: 70%;
    display: flex;
    margin: 0 auto;
    justify-content: center;
    flex-direction: row;
    font-family: 'TT_Prosto_Sans_Trial_Light', sans-serif;
}

.part4{
    width: 70%;
    display: flex;
    margin: 0 auto;
    justify-self: center;
    flex-direction: column;
    font-family: 'TT_Prosto_Sans_Trial_Light', sans-serif;
    color: rgb(243, 243, 243);
}

.text4{
    align-items: center;
    
}

.part5{
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #708564;
}

.text5{
    font-family: 'TT_Prosto_Sans_Trial_Light', sans-serif;
    color: rgb(243, 243, 243);
    font-size: 20px;
}

.credit{
    font-size: 20px;
}

.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Minimalna širina slike */
    grid-auto-rows: 300px; /* Povećana osnovna visina redova */
    gap: 10px; /* Razmak između slika */
    padding: 20px;
    max-width: 70%;
    margin: auto;
}

.masonry-gallery1{
    display: block;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px; /* Dodato za blago zaobljene uglove */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Slika popunjava okvir uz minimalno sečenje */
    display: block;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item1 img {
    width: 150%;
}

.gallery-item:hover img {
    transform: scale(1.05); /* Slight zoom effect */
}

/* Lightbox */
.lightbox {
    display: none; /* Pokazaćemo lightbox kada je aktivan */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

.lightbox-image-wrapper {
    position: relative;
}

.lightbox-image {
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 80%;
    display: block;
    margin: 0 auto;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    background: #708564;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 2;
    border-radius: 10px;
}

.prev {
    left: 25%; /* Strelica levo */
}

.next {
    right: 25%; /* Strelica desno */
}

.prev:hover, .next:hover {
    background: #5d6e53;
    transition: background 0.2s ease-in-out;
}

.prev:not(:hover), .next:not(:hover) {
    transition: background 0.2s ease-in-out;
}

@media (max-width: 600px) {
    .part1{
        width: 95%;
        flex-direction: column;
        padding-top: 70px;
    }

    .masonry-gallery1 {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
        grid-auto-rows: 200px; 
        max-width: 90%;
    }
    
    .masonry-gallery1{
        display: block;
        padding-bottom: 20px !important;
    }
    
    .gallery-item1 img {
        width: 100%;
        height: 100%;
        transition: none;
    }
    
    .gallery-item:hover img {
        transform: none; 
    }

    #p4{
        margin: 0;
    }

    #br1{
        display: none;
    }
    
    .text2{
        width: 95%;
    }

    .part3 {
        width: 95%;
        flex-direction: column;
    }
    
    .part4{
        width: 95%;
        flex-direction: column;
    }

    .credit p{
        margin: 0;
    }
    
    #credit2{
        font-size: 16px;
        color: rgb(184, 184, 184);
    }

    .part5{
        padding-bottom: 20px;
    }

    .part5 p{
        padding-top: 20px;
    }

    .masonry-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 2fr));
        grid-auto-rows: 150px;
        padding: 0px;
        max-width: 100%;
        margin: auto 5px;
        background: none;
    }
    
    .gallery-item img {
        transition: none;
    }
    
    .gallery-item:hover img {
        transform: none
    }

    .prev {
        left: 5%; /* Strelica levo */
    }
    
    .next {
        right: 5%; /* Strelica desno */
    }
}

@media (min-width: 601px) and (max-width: 1000px) {
    .part1{
        width: 95%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .masonry-gallery1 {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
        grid-auto-rows: 200px; 
        max-width: 70%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .masonry-gallery1{
        padding-bottom: 20px !important;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .gallery-item1 img {
        width: 50%;
        height: 50%;
        object-fit: cover;
        margin: auto;
        display: block;
        border-radius: 5px;
    }
    
    
    .gallery-item:hover img {
        transform: none; 
    }

    #p4{
        margin: 0;
    }

    #br1{
        display: none;
    }
    
    .text2{
        width: 95%;
    }

    .part3 {
        width: 95%;
        flex-direction: column;
    }
    
    .part4{
        width: 95%;
        flex-direction: column;
    }

    .credit p{
        margin: 0;
    }
    
    #credit2{
        font-size: 16px;
        color: rgb(184, 184, 184);
    }

    .part5{
        padding-bottom: 20px;
    }

    .part5 p{
        padding-top: 20px;
    }

    .masonry-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 2fr));
        grid-auto-rows: 150px;
        padding: 0px;
        max-width: 100%;
        margin: auto 5px;
        background: none;
    }
    
    .gallery-item img {
        transition: none;
    }
    
    .gallery-item:hover img {
        transform: none
    }

    .prev {
        left: 5%; /* Strelica levo */
    }
    
    .next {
        right: 5%; /* Strelica desno */
    }
}

@media (min-width: 1000px) and (max-width: 1200px) {
    .part1{
        width: 95%;
        flex-direction: row;
    }

    .masonry-gallery1 {
        width: 150%;
        margin: 20px 0;
    }
    
    .gallery-item1 img {
        width: 150%;
        margin: 20px 0;
        border-radius: 5px;
    }

    .text2{
        width: 95%;
    }

    .part3{
        width: 95%;
    }

    .part4{
        width: 95%;
    }
    
    .part5{
        padding-bottom: 20px;
    }

    .part5 p{
        padding-top: 20px;
    }

    #br1{
        display: none;
    }

    .credit p{
        margin: 0;
    }

    #credit2{
        font-size: 16px;
        color: rgb(184, 184, 184);
    }

    .masonry-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 2fr));
        grid-auto-rows: 200px;
        padding: 0px;
        max-width: 100%;
        margin: auto 5px;
        background: none;
    }
    
    .gallery-item img {
        transition: none;
    }
    
    .gallery-item:hover img {
        transform: none
    }
    .prev {
        left: 10%; /* Strelica levo */
    }
    
    .next {
        right: 10%; /* Strelica desno */
    }
}

@media (min-width: 1201px) and (max-width: 1500px) {
    .part1{
        width: 95%;
        flex-direction: row;
    }

    .masonry-gallery1 {
        width: 100%;
        margin: 20px 0;
    }
    
    .gallery-item1 img {
        width: 150%;
        margin: 20px 0;
        border-radius: 5px;
    }

    .text2{
        width: 95%;
    }

    .part3{
        width: 95%;
    }

    .part4{
        width: 95%;
    }

    .part5{
        padding-bottom: 20px;
    }

    .part5 p{
        padding-top: 20px;
    }

    #br1{
        display: none;
    }

    .credit p{
        margin: 0;
    }

    #credit2{
        font-size: 16px;
        color: rgb(184, 184, 184);
    }

    .masonry-gallery {
        grid-template-columns: repeat(auto-fill, minmax(300px, 2fr));
        grid-auto-rows: 300px;
        padding: 0px;
        max-width: 100%;
        margin: auto 20px;
        background: none;
    }
    
    .gallery-item img {
        transition: none;
    }
    
    .gallery-item:hover img {
        transform: none
    }

    .prev {
        left: 15%; /* Strelica levo */
    }
    
    .next {
        right: 15%; /* Strelica desno */
    }
}