@import 'colors.css';

.projects-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
}

.project {
    width: 400px;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 20px var(--shadow);
    position: relative;
    margin-bottom: 20px;
}

.project-cover {
    width: 100%;
    height: 100%;
    background-image: url(https://i.postimg.cc/ZqNzqkB1/project-cover.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.go-project-view {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff90;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.5s;
}

.project:hover .go-project-view{
    top: 0;
}

.go-project-button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
}

.go-projects-page {
    width: calc(100% - 100px);
    height: 80px;
    line-height: 80px;
    text-align: center;
    background-color: var(--primary-color);
    border-radius: 40px;
    color: var(--white);
    text-decoration: none;
    font-size: 32px;
}

.project-viewer {
    width: 100%;
    height: 100vh;
    background-color: #00000090;
    position: fixed;
    top: 0;
    left: 300px;
    display: none;
    z-index: 5000;
}

.project-viewer.active {
    display: block;
}

.project-view {
    width: 900px;
    height: 700px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(calc(-50% - 150px), -50%);
    background-color: var(--white);
    background-position: center;
    background-size: cover;
    border-radius: 10px;
}

@media (max-width: 1220px) {
    .project-view {
        width: 100%;
        height: 700px;
        border-radius: 0;
    }
}

@media (max-width: 970px) {
    .project-viewer {
        top: 0;
        left: 0;
    }

    .project-view {
        height: 500px;
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 500px) {
    .project {
        width: 300px;
        height: 200px;
    }

    .go-projects-page {
        width: 100%;
        height: 40px;
        line-height: 40px;
        font-size: 24px;
    }

    .project-view {
        height: 300px;
    }
}

@media (max-width: 350px) {
    .project {
        width: 200px;
        height: 200px;
    }
}