:root {
    --gap: 18px;
    --flex: 10px;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.card.service-link {
    opacity: 0;
    transition: transform 0.3s ease;
}

.servicii-icon {
    width: 100%;
}

.servicii-icon img {
    width: 3rem;
    height: 3rem !important;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
    align-items: stretch;
}

.service-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, background-color 0.3s ease;
    will-change: transform;
    overflow: hidden;
}

.service-link .bg {
    top: auto;
    right: -40px;
    bottom: -40px;
    z-index: -1;
    position: absolute;
    max-width: 60%;
    -webkit-transition: 0.5s;
    -o-transition: 0.5s;
    transition: 0.5s;
    opacity: 0;
}

.service-link:hover .bg {
    right: 0;
    bottom: 0;
    opacity: 0.6;
}

.service-link:hover {
    background-color: var(--bs-primary)
}

.service-link:hover h4,
.service-link:hover p {
    color: #fff;
}

.service-link:hover .servicii-icon {
    filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%) hue-rotate(93deg) brightness(105%) contrast(103%);
}

.service-body {
    flex: 1 1 auto;
    padding: calc(var(--bs-card-spacer-y)) calc(var(--bs-card-spacer-x) - 1.2rem);
    color: var(--bs-card-color);
    flex-grow: 1;
    text-align: center;
}

.service-body h4 {
    font-size: 1.1rem;
}

.service-body p {
    line-height: 1.2rem;
    margin-bottom: 0;
    font-size: .8rem;
}

.services-item {
    flex: 1 1 calc(25% - 10px);
}

@media screen and (max-width: 1440px) {
    .services-item {
        flex: 1 1 calc(33.33% - 20px); /* 3 items */
    }
}

@media screen and (max-width: 991px) {
    .services-item {
        flex: 1 1 calc(50% - 20px); /* 2 items*/
    }
}

@media screen and (max-width: 767px) {
    .services-item {
        flex: 1 1 100%; /*1 item */
        max-width: 100%;
    }
}