.project-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.project-grid .item {
    display: flex;
    flex-direction: column;
}

.project-grid .item.layout-2 {
    flex-direction: row;
}

.project-grid .layout-0 {
    width: calc(39.84375% - 10px);
}

.project-grid .layout-1 {
    width: calc(60.15625% - 10px);
}

.project-grid .layout-2 {
    width: 100%;
}

.project-grid .layout-3 {
    width: calc(52.34375% - 10px);
}

.project-grid .layout-4 {
    width: calc(47.65625% - 10px);
}

.project-grid .item .wp-post-image {
    height: 240px;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.project-grid .item.layout-2 .wp-post-image {
    height: 345px;
    width: 59.21875%;
}

.project-grid .item .content {
    border: 1px solid;
    text-align: center;
    font-size: 14px;
    line-height: 25px;
    height: 194px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px;
    background-color: var(--e-global-color-secondary);
    transition: all 0.3s;
    color: var(--e-global-color-text);
}

.project-grid .item:hover .content {
    border-color: var(--e-global-color-accent);
}

.project-grid .item .content-inner {
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-grid .item.layout-2 .content {
    height: 345px;
}

.project-grid .layout-2.item .content {
    width: 40.78125%;
}

.project-grid .layout-0 .content-inner {
    max-width: 395px;
}

.project-grid .layout-1 .content-inner,
.project-grid .layout-3 .content-inner {
    max-width: 575px;
}

.project-grid .layout-2 .content-inner {
    max-width: 425px;
}

.project-grid .layout-4 .content-inner {
    max-width: 420px;
}

.project-grid .item .post-title {
    margin-bottom: 7px;
}

@media (max-width: 1600.98px) {
    .project-grid {
        gap: 18px;
    }

    .project-grid .layout-0 {
        width: calc(33.36267605633803% - 9px);
    }

    .project-grid .layout-1 {
        width: calc(66.63732394366197% - 9px);
    }

    .project-grid .layout-3 {
        width: calc(58.89084507042254% - 9px);
    }

    .project-grid .layout-4 {
        width: calc(41.10915492957746% - 9px);
    }

    .project-grid .layout-0 .content-inner,
    .project-grid .layout-4 .content-inner {
        max-width: 310px;
    }

    .project-grid .layout-1 .content-inner {
        max-width: 425px;
    }

    .project-grid .layout-2 .content-inner {
        max-width: 305px;
    }

    .project-grid .layout-3 .content-inner {
        max-width: 405px;
    }
}

@media (max-width: 991.98px) {
    .project-grid .item.layout-2 .wp-post-image,
    .project-grid .item.layout-2 .content {
        height: 240px;
    }
}

@media (max-width: 767.98px) {
    .project-grid {
        gap: 16px;
    }

    .project-grid .item.post-item {
        width: 100%;
        flex-direction: row;
    }

    .project-grid .item.post-item .wp-post-image {
        width: 55%;
    }

    .project-grid .item.post-item .content {
        width: 45%;
        height: 240px;
    }
}

@media (max-width: 575.98px) {
    .project-grid .item.post-item {
        flex-direction: column;
    }

    .project-grid .item.post-item .wp-post-image {
        width: 100%;
    }

    .project-grid .item.post-item .content {
        width: 100%;
        height: 194px;
    }
}
