.home-services {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #ffffff;
}

.home-services > .container {
    width: min(var(--site-max-width), calc(100% - var(--site-gutter) - var(--site-gutter)));
    margin-inline: auto;
}

.home-services::before,
.home-services::after {
    position: absolute;
    z-index: -1;
    content: "";
    pointer-events: none;
}

.home-services::before {
    top: 28px;
    left: max(18px, calc((100% - var(--container)) / 2 - 30px));
    width: 92px;
    height: 92px;
    opacity: 0.6;
    background-image: radial-gradient(rgba(120, 191, 0, 0.35) 1.5px, transparent 1.5px);
    background-size: 15px 15px;
}

.home-services::after {
    top: -110px;
    right: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220, 244, 194, 0.4), rgba(220, 244, 194, 0));
}

.home-services__heading {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin: 0 auto 34px;
    text-align: center;
}

.home-services__heading h2 {
    margin: 0;
    color: #112b3d;
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: clamp(2rem, 3.8vw, 2.9rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.12;
}

.home-services__heading h2 span {
    color: #4c900e;
}

.home-services__heading p {
    max-width: 700px;
    margin: 0;
    color: #536273;
    font-size: 1.02rem;
    line-height: 1.65;
}

.home-services__grid {
    display: grid;
    gap: 24px;
}

.home-services__row {
    display: grid;
    gap: 24px;
}

.home-services__row--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-services__row--three {
    width: calc(75% - 6px);
    margin: 0 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 350px;
    flex-direction: column;
    padding: 12px 18px 22px;
    overflow: hidden;
    border: 1px solid rgba(120, 191, 0, 0.38);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(67, 110, 22, 0.07);
    color: #112b3d;
    isolation: isolate;
    transition:
        transform 350ms cubic-bezier(0.16, 1, 0.3, 1),
        border-color 350ms ease,
        box-shadow 350ms ease,
        color 350ms ease;
}

.service-card::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, #70B600 0%, #5da90a 100%);
    content: "";
    opacity: 0;
    transition: opacity 350ms ease;
}

.service-card__visual {
    display: flex;
    width: 100%;
    height: 184px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
}

.service-card__visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card__body {
    display: grid;
    grid-template-rows: 44px 60px;
    gap: 8px;
    margin-top: auto;
    padding: 8px 22px 0 0;
}

.service-card__title {
    display: flex;
    min-width: 0;
    height: 44px;
    align-items: center;
    gap: 11px;
}

.service-card__icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(120, 191, 0, 0.6);
    color: #69ad0a;
    transition: color 350ms ease, border-color 350ms ease;
}

.service-card__icon svg {
    width: 23px;
    height: 23px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.service-card__name {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #112b3d;
    font-size: 1.08rem;
    font-weight: 750;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: color 350ms ease;
}

.service-card__description {
    display: block;
    min-height: 60px;
    margin: 0;
    padding-right: 20px;
    overflow: hidden;
    color: #485564;
    font-size: 0.84rem;
    line-height: 1.55;
    transition: color 350ms ease;
}

.service-card__arrow {
    position: absolute;
    right: 18px;
    bottom: 20px;
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--syddhi-green);
    color: #ffffff;
    transition: background 350ms ease, color 350ms ease, transform 350ms ease;
}

.service-card__arrow svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.service-card:hover,
.service-card:focus-visible,
.service-card:active {
    transform: translateY(-6px);
    border-color: #5da90a;
    box-shadow: 0 20px 36px rgba(56, 103, 15, 0.2);
    color: #112b3d;
}

.service-card:hover::before,
.service-card:focus-visible::before,
.service-card:active::before {
    opacity: 1;
}

.service-card:hover .service-card__visual img,
.service-card:focus-visible .service-card__visual img,
.service-card:active .service-card__visual img {
    transform: scale(1.04);
}

.service-card:hover .service-card__name,
.service-card:focus-visible .service-card__name,
.service-card:active .service-card__name,
.service-card:hover .service-card__description,
.service-card:focus-visible .service-card__description,
.service-card:active .service-card__description {
    color: #ffffff;
}

.service-card:hover .service-card__icon,
.service-card:focus-visible .service-card__icon,
.service-card:active .service-card__icon {
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff;
}

.service-card:hover .service-card__arrow,
.service-card:focus-visible .service-card__arrow,
.service-card:active .service-card__arrow {
    transform: translateX(2px);
    background: #ffffff;
    color: #4f940d;
}

.service-card:focus-visible {
    outline: 3px solid #244e0b;
    outline-offset: 4px;
}

@media (max-width: 1199px) {
    .home-services__row--four,
    .home-services__row--three {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .home-services__heading {
        gap: 12px;
        margin-bottom: 26px;
    }

    .home-services__heading h2 {
        max-width: 620px;
        font-size: clamp(1.8rem, 7vw, 2.35rem);
    }

    .home-services__heading p {
        max-width: 540px;
        font-size: 0.96rem;
    }

    .home-services__grid,
    .home-services__row {
        gap: 16px;
    }

    .home-services__row--four,
    .home-services__row--three {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-card {
        min-height: 320px;
        padding: 12px 18px 20px;
    }

    .service-card__visual {
        height: 176px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-card,
    .service-card::before,
    .service-card__visual img,
    .service-card__icon,
    .service-card__name,
    .service-card__description,
    .service-card__arrow {
        transition: none;
    }
}
