.projects{
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(387px, 1fr));
    margin-bottom: 36px;
}

.project{
    padding: 12px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: .15s;
}

.project__thumb{
    display: block;
    width: 100%;
    margin-bottom: 24px;
}

.project__thumb > img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.project__info{
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 12px 12px;
}

.project__location{
    font-weight: 200;
    font-size: 12px;
    line-height: 16px;
    text-align: end;
    color: var(--secondary-text);
}

.project__name{
    text-transform: uppercase;
    font-size: 20px;
    line-height: 24px;
    color: var(--main-dark);
    text-decoration: none;
}

.project__style{
    font-weight: 200;
    font-size: 14px;
    line-height: 18px;
    color: var(--main-dark);
}

.project:hover{
    box-shadow: 0 6px 25px 0 #00000040;
}

#more{
    width: 240px;
}

.project-desc{
    display: flex;
    align-items: flex-start;
    gap: 72px;
    margin-bottom: 36px;
}

.project__image{
    max-width: 550px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.info{
    width: 100%;
}

.info > h2{
    text-transform: initial;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.section__name{
    display: flex;
    font-size: 18px;
    line-height: 21px;
    color: var(--main-dark);
    margin-bottom: 24px;
}

.char{
    display: flex;
    gap: 4px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.char:last-child{
    margin-bottom: 0;
}

.char__name, .char__value{
    font-weight: 300;
    font-size: 16px;
    line-height: 19px;
    color: var(--secondary-text);
}

.char__value{
    font-weight: 400;
    color: var(--main-dark);
}

.gallery{
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(410px, 1fr));
    margin-bottom: 36px;
}

.gallery__item{
    position: relative;
    border-radius: 6px;
    overflow: hidden;
}

.gallery__item:hover > .overlay{
    opacity: 1;
    visibility: visible;
}

.overlay{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.35) 100%);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: .15s;
}

.modal__gallery{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    padding: 24px;
    display: none;
    gap: 36px;
    flex-direction: row-reverse;
    background-color: #fff;
}

.modal__gallery.active{
    display: flex;
}

.gallery__slider{
    width: 60%;
    margin: 0 auto;
}

.thumbs__wrapper{
    position: relative;
    width: 6%;
    height: 55%;
    margin: auto 0;
}

.gallery__thumbs{
    height: 100%;
    user-select: none;
}

.gallery__thumbs .swiper-slide{
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.gallery__thumbs .swiper-slide{
    cursor: pointer;
}

.gallery__thumbs .swiper-slide img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbs__wrapper .swiper-button-next{
    top: calc(100% + 12px);
    right: 50%;
    transform: rotate(90deg) translateY(-50%);
}

.thumbs__wrapper .swiper-button-prev{
    top: -24px;
    left: 50%;
    transform: rotate(90deg) translateY(50%);
}

.swiper-button-next, .swiper-button-prev, .swiper-button-next:after, .swiper-button-prev:after{
    margin-top: 0;
    --swiper-navigation-size: 24px;
    height: 24px;
    width: 24px;
    color: var(--secondary-text);
}

.gallery__slider .swiper-slide img{
    height: 100%;
    display: block;
    margin: 0 auto;
}

#close-gallery{
    top: 24px;
    right: 24px;
    z-index: 17;
    position: absolute;
}

.gallery__slider .swiper-pagination{
    display: none;
}

#projects-filter {
    margin-bottom: 36px;
    width: 237px;
}

@media (max-width: 1300px) {
    .modal__gallery{
        gap: 12px;
    }
    .gallery__slider{
        width: 80%;
    }
    .thumbs__wrapper{
        width: 10%;
    }
    .gallery__slider .swiper-slide{
        display: flex;
    }
    .gallery__slider .swiper-slide img{
        max-width: 100%;
        object-fit: contain;
        margin: auto;
    }
    .gallery__item > img{
        width: 100%;
        object-fit: cover;
    }
    .project-desc{
        gap: 48px;
        margin-bottom: 48px;
    }
    .project__image{
        max-width: 428px;
    }
    .gallery{
        grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
        margin-bottom: 48px;
    }
}

@media(max-width: 900px){
    .project__image{
        max-width: 328px;
    }
}

@media(max-width: 767px){
    .project-desc{
        flex-wrap: wrap;
        margin-bottom: 24px;
    }
    .project__image {
        max-width: 100%;
        width: 100%;
    }
    .thumbs__wrapper{
        display: none;
    }
    .gallery{
        grid-template-columns: 1fr;
        margin-bottom: 24px;
    }
    .gallery__slider{
        width: 100%;
    }
    #close-gallery > svg{
        width: 24px;
        height: 24px;
    }
    .gallery__slider .swiper-pagination{
        display: flex;
    }
    .gallery__slider > .swiper-wrapper{
        max-height: 99%;
    }
    #projects-filter {
        margin-bottom: 24px;
    }
}