#projects{
    justify-content: space-between;
    overflow: auto;
    padding: 10px 15px;
}
#projects div{
    width: 33%;
    position: relative;
    padding: 80px 30px 30px 30px;
    overflow: hidden;
}
#projects div:hover img{
    transform: scale(1.1);
}
#projects div:hover::before{
    background-color: rgb(0 0 0 / 40%);
}
#projects div:hover ::after{
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 5px;
    background-color: var(--color-secondary);
    transition: 0.6s;
    z-index: -1;
    animation: loadProject 1s infinite ease;
}
#projects div::before{
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 50%);
    transition: 0.6s;
    z-index: -1;
}
#projects div img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    z-index: -2;
    top: 0;
    left: 0;
}
#projects div small{
    color: #fff;
    background: var(--color-primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
}
#projects div h3{
    color: #fff;
    margin-top: 1rem;
}
#projects div a{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#lastProjects {
    position: relative;
}

#lastProjects .row:nth-child(1) {
    justify-content: space-between;
    padding-bottom: 5rem;
}

#lastProjects::before{
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 300px;
    background-color: var(--color-quaternary);
    z-index: -3;
}

#lastProjects h1{
    color: var(--color-quaternary);
}

#lastProjects{
    background-image: url(../../images/illustrations/stars.svg);
    background-repeat: no-repeat;
    background-position: top right;
}

#lastProjects button{
    position: absolute;
    right: 150px;
}

@media(max-width: 991px){
    #projects{
        overflow: auto;
        flex-wrap: nowrap;
        grid-gap: 2rem;
    }
    #projects div{
        min-width: 90%;
    }
    #lastProjects .row:nth-child(1) {
        padding-bottom: 1rem;
    }
    #lastProjects::before{
        content: none
    }
    #lastProjects h1{
        padding-left: 15px;
    }
    #lastProjects button{
        background-color: var(--color-primary);
        position: absolute;
        bottom: 20px;
        left: 15px;
    }
}

@keyframes loadProject {
    0%{
        transform: translateX(-150%)
    }
    50%{
        transform: translateX(0%)
    }
    100%{
        transform: translateX(150%)
    }
}
