.service {
    background-color: rgba(64, 139, 90, 0.10);
    position: relative;
    z-index: 1;
}

.service--homepage {
    padding: 63px 0 42px;
    margin-top: -24px;
}

.service-heading  {
    padding-bottom: 7px;
}

.service-cards {
    display: inline-block;
    width: 100%;
    text-decoration: none;
    border-bottom: 1px solid #E2D4C3;
    position: relative;
    padding: 12px 0;
}

.service-card-content h4 {
    font-size: 20px;
    color: var(--color-black);
    line-height: 1.1em;
    padding: 0;
    margin: 0;
}

.btn-service {
    border: none;
    outline: none;
    background-color: var(--color-green);
    line-height: 32px;
    padding: 0;
    font-size: 0px;
    width: 31px;
}

.btn-service__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 31px;
    font-size: 16px;
    color: var(--color-white);
}

.service-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.service-btn {
    margin-top: 23px;
}

@media(min-width: 768px) {
    .service--homepage {
        padding: 318px 0 60px;
        margin-top: -253px;
    }

    .service-cards {
        padding: 0;
        border: none;
    }

    .service-cards::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: calc(100% - 15px);
        background: linear-gradient(0deg, rgba(38,35,31,0) 0%, rgba(38,35,31,0.68) 42%); 
    }

    .service-card-image {
        height: 159px;
    }

    .service-card-content {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: block;
        padding: 23px 21px;
        z-index: 1;
    }

    .service-flex {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .service-cards {
        width: calc(50% - 7px);
        margin-top: 13px;
    }

    .service-card-content h4 {
        font-size: 24px;
        line-height: 1.125em;
        color: var(--color-white);
    }

    .btn-service {
        width: 45px;
        line-height: 46px;
        position: absolute;
        bottom: 11px;
        left: unset;
        right: 12px;
    }

    .service-overlay-image {
        position: absolute;
        bottom: 0;
        right: -12px;
        width: 858px;
        height: 658px;
        z-index: -1;
    }

    .service-btn {
        margin-top: 46px;
    }
    
}

@media(min-width: 1200px) {

    .service--homepage {
        padding: 400px 0 111px;
        margin-top: -341px;
    }

    .service-flex {
        justify-content: flex-start;
        width: calc(100% + 16px);
        margin-left: -8px;
    }

    .service-cards {
        width: calc(25% - 16px);
        margin: 17px 8px 0;
        height: 229px;
    }

    .service-card-image {
        height: 229px;
    }

    .service-cards:nth-child(even),
    .service-cards:nth-child(even) .service-card-image {
        height: 258px;
    }

    .service-flex-nth-reverse,
    .service-flex:nth-child(even) {
        align-items: end;
        margin-top: -30px;
    }

    .service-flex:nth-child(even)  .service-card-image,
    .service-flex:nth-child(even)  .service-cards,
    .service-flex:nth-child(even)  .service-card-image,
    .service-flex:nth-child(even)  .service-cards {
        height: 258px;
    }

    .service-flex-nth-reverse .service-cards:nth-child(even),
    .service-flex-nth-reverse .service-cards:nth-child(even) .service-card-image,
    .service-flex:nth-child(even) .service-cards:nth-child(even) ,
    .service-flex:nth-child(even) .service-cards:nth-child(even) .service-card-image {
        height: 229px;
    }

    .btn-service {
        position: relative;
        top: 0;
        right: 0;
        bottom: 0;
    }

    .service-card-content {
        width: calc(100% - 38px);
        height: calc(100% - 38px);
        top: 50%;
        left: 50%;
        transform: translate(-50% , -50%);
        padding-top: 10px;
        transition: all 0.3s ease-in-out;
    }

    .service-card-content h4 {
        text-align: center;
        transition: all 0.3s ease-in-out;
    }

    .service-heading h2 {
        padding: 0 0 11px;
    }

    .service-cards:hover .service-card-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .service-cards:hover .service-card-content h4 {
        padding: 0 0 28px;
        color: var(--color-black);
    }

    .service-cards:hover .service-card-content {
        background-color: rgba(247,241,233,0.78);
    }

    .btn-service {
        font-size: 14px;
        font-weight: 400;
        color: var(--color-white);
        width: max-content;
        text-transform: uppercase;
        letter-spacing: 0.2em;
        line-height: 48px;
        padding: 0 35px;
        opacity: 0;
    }

    .service-cards:hover .btn-service {
        opacity: 1;
    }

    .btn-service span {
        display: none;
    }

    .service-heading {
        padding-bottom: 20px;
    }

    .service-overlay-image {
        right: -43px;
        width: auto;
        height: auto;
    }

    .service-btn {
        margin-top: 34px;
    }
}

@media(min-width: 1366px) {

    .service-flex {
        justify-content: flex-start;
        width: calc(100% + 16px);
        margin-left: -8px;
    }

    .service-cards {
        width: 100%;
        max-width: 304px;
        margin: 17px 8px 0;
        height: 229px;
    }
}

@media (max-width: 1199px) {
    .btn-service {
        line-height: 0;
        height: 45px;
    }
}

@media (max-width: 767px) {
    .btn-service {
        height: 31px;
    }
}

@media (max-width: 1199px) {
    .service-overlay-image {
        width: 100%;
        max-width: 858px;
        height: auto;
    }
}