@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}
.wrapper{
    margin: 50px auto;
    max-width: 1100px;
}
.wrapper nav{
    display: flex;
    justify-content: center;
}
nav .items{
    display: flex;
    max-width: 720px;
    width: 100%;
    justify-content: space-between;
}

nav .items .item{
    background: #fff;
    padding: 7px 25px;
    font-size: 18px;
    font-weight: 500;
    color: #007bff;
    border: 2px solid #007bff;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}
nav .items .active,
nav .items .item:hover{
    color: #fff;
    background: #007bff;
}

/* Galerry */
.gallery {
    display: flex;
    flex-wrap: wrap;
    margin-top: 30px;
}

.gallery .image {
    padding: 7px;
    width: calc(100% / 4);
}

.gallery .image.hide{
    display: none;
}
.gallery .image.show{
    animation: animate 0.5s ease;
}
@keyframes animate {
    0%{
        transform: scale(0.5);
    }
    100%{
        transform: scale(1);
    }
}

.gallery .image span{
    display: flex;
    width: 100%;
    overflow: hidden;
    height: 100%;
    object-fit: cover;
}

.gallery .image img{
    width: 100%;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.gallery .image:hover img {
    transform: scale(1.1);
}

.preview-box{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    max-width: 700px;
    width: 100%;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    border-radius: 3px;
    padding: 0 5px 5px 5px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
}
.preview-box.show{
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
    transition: all 0.3s ease;
}

.preview-box .details{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 15px 13px 10px;
}
.preview-box .details .title{
    display: flex;
    font-size: 18px;
    font-weight: 400;
}
.details .title p{
    margin-left: 5px;
    font-weight: 600;
    line-height: inherit;
}
.details .icon{
    color: #007bff;
    font-size: 22px;
    cursor: pointer;
}
.preview-box .image-box{
    display: flex;
    width: 100%;
}
.image-box img{
    width: 100%;
    border-radius: 0 0 3px 3px;
}
.shadow{
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 2;
    display: none;
    background: rgba(0, 0, 0, 0.4);
}
.shadow.show{
    display: block;
}

@media (max-width: 1000px) {
    .gallery .image{
        width: calc(100% / 3);
    }
}
@media (max-width: 800px) {
    .gallery .image{
        width: calc(100% / 2);
    }
}
@media (max-width: 700px) {
    nav .items{
        max-width: 600px;
    }
    
    nav .items .item{
        padding: 7px 15px;
    }
}
@media (max-width: 600px) {
    nav .items{
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav .items .item{
        margin: 5px;
    }
    .gallery .image{
        width: 100%;
    }
}