.grid_container h2 {
    text-align: center;
    width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: stretch;
    margin: 60px auto 140px;
}

.grid_panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: calc((100% - 60px) / 4);
    min-height: 330px;
    background-color: var(--grey);
    padding: 20px;
    border-radius: 20px;
    box-sizing: border-box;
}

.panel_wrapper {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    width: calc((100% - 60px) / 4);
}

.panel_wrapper .grid_panel {
    width: 100%;
    height: calc(50% - 10px);
}

.panel_wrapper .grid_panel:last-of-type {
    margin-bottom: 0;
}

.first_panel {
    justify-content: center;
    width: calc(50% - 10px);
    text-align: center;
}

.first_white_panel {
    margin-top: auto;
    border-radius: 10px;
    background-color: rgba(255,255,255,0.6);
    padding: 20px;
    z-index: 5;
}

.first_panel_image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 20px;
    z-index: 0;
}

.first_panel_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
}

.second_panel,
.third_panel {
    justify-content: center;
    padding: 30px 20px;
    text-align: center;
}

.second_panel {
    margin-bottom: 20px;
}

.third_panel {
    background-color: var(--black);
    color: var(--white);
}

.third_panel h4,
.fourth_panel h4 {
    color: var(--white);
}

.grid_panel .square_icon {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 46px;
    height: 46px;
    background-color: var(--green);
    color: var(--white);
    border-radius: 5px;
    box-sizing: border-box;
}

.first_panel .square_icon,
.second_panel .square_icon,
.third_panel .square_icon,
.first_panel .button,
.second_panel .button,
.third_panel .button {
    margin: 0 auto;
}

.fourth_panel {
    background-color: var(--black);
    color: var(--white);
}

.fourth_panel img {
    mask-image: linear-gradient(0deg, rgba(0, 0, 0, 0.3) 3%, black 90%);
    -webkit-mask-image: linear-gradient(0deg, rgba(0, 0, 0, 0.3) 3%, black 90%);
}

.fourth_panel .sub_panel {
    z-index: 5;
    margin-top: auto;
}

.grid_panel h4 {
    margin: 15px 0 10px 0;
}

.grid_panel p {
    margin: 5px 0 0 0;
}

.grid_panel a {
    color: var(--white);
}

.grid_panel .button {
    margin: 20px auto 0;
}


@media (max-width: 1560px) {
    .first_panel,
    .panel_wrapper {
        width: calc((100% - 20px) / 2);
    }

    .fourth_panel {
        width: 100%;
        flex-direction: row;
        margin-top: 20px;
    }

    .fourth_panel .sub_panel {
        width: 600px;
    }
}

@media (max-width: 1330px) {
    .grid_panel:last-of-type {
        margin: 20px auto 0;
    }

    .panel_wrapper .grid_panel:last-of-type {
        margin-top: 0;
    }
}

@media (max-width: 850px) {
    .grid_container h2 {
        width: 100%;
    }
}

@media (max-width: 750px) {
    .grid {
        flex-direction: column;
    }

    .first_panel {
        min-height: 500px;
    }

    .grid_panel,
    .panel_wrapper,
    .panel_wrapper .grid_panel {
        width: 100%;
        margin-bottom: 20px;
    }

    .panel_wrapper {
        margin-bottom: 0;
    }

    .fourth_panel {
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-content: space-between;
    }

    .fourth_panel .sub_panel {
        width: 100%;
    }
}