/* =========================================================
   N-FLUX SERVICES
========================================================= */

.services-section {

    position: relative;

    padding:
        var(--section-space-lg)
        0;

    overflow: hidden;

    background: var(--bg);

}


/* =========================================================
   BACKGROUND ELEMENT
========================================================= */

.services-section::before {

    content: "";

    position: absolute;

    width: 460px;

    height: 460px;

    top: -230px;

    right: -180px;

    border-radius: 50%;

    background:
        rgba(22,141,226,.045);

    pointer-events: none;

}


.services-section::after {

    content: "";

    position: absolute;

    width: 300px;

    height: 300px;

    left: -170px;

    bottom: -170px;

    border-radius: 50%;

    background:
        rgba(53,168,83,.035);

    pointer-events: none;

}


/* =========================================================
   HEADER
========================================================= */

.services-header {

    position: relative;

    z-index: 2;

    max-width: 720px;

    margin:
        0 auto 38px;

    text-align: center;

}


.services-header .section-eyebrow {

    justify-content: center;

}


.services-header .section-heading {

    margin-bottom: 12px;

}


.services-description {

    max-width: 620px;

    margin: 0 auto;

    color: var(--text-muted);

    font-size: .92rem;

    line-height: 1.75;

}


/* =========================================================
   SERVICE GRID
========================================================= */

.services-grid {

    position: relative;

    z-index: 2;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 14px;

}


/* =========================================================
   SERVICE CARD
========================================================= */

.service-card {

    position: relative;

    display: flex;

    flex-direction: column;

    min-height: 330px;

    padding: 22px;

    overflow: hidden;

    background: var(--surface);

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-lg);

    box-shadow:
        var(--shadow-sm);

    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);

}


.service-card::before {

    content: "";

    position: absolute;

    width: 150px;

    height: 150px;

    top: -65px;

    right: -65px;

    border-radius: 50%;

    background:
        var(--primary-light);

    transition:
        transform var(--transition);

}


.service-card:hover {

    transform:
        translateY(-6px);

    border-color:
        rgba(22,141,226,.18);

    box-shadow:
        var(--shadow-md);

}


.service-card:hover::before {

    transform:
        scale(1.35);

}


/* =========================================================
   SERVICE NUMBER
========================================================= */

.service-number {

    position: absolute;

    top: 18px;

    right: 19px;

    color:
        rgba(11,59,130,.10);

    font-size: 1.9rem;

    font-weight: 900;

    line-height: 1;

    letter-spacing: -.06em;

}


[data-theme="dark"]
.service-number {

    color:
        rgba(255,255,255,.07);

}


/* =========================================================
   SERVICE ICON
========================================================= */

.service-icon {

    position: relative;

    z-index: 2;

    width: 53px;

    height: 53px;

    display: grid;

    place-items: center;

    margin-bottom: 24px;

    border-radius: 16px;

    background:
        var(--primary-light);

    color:
        var(--primary);

    font-size: 1.15rem;

    transition:
        transform var(--transition),
        background var(--transition),
        color var(--transition);

}


.service-card:hover
.service-icon {

    transform:
        rotate(-4deg)
        scale(1.06);

    background:
        var(--primary);

    color: #fff;

}


/* =========================================================
   SERVICE CONTENT
========================================================= */

.service-category {

    position: relative;

    z-index: 2;

    display: block;

    margin-bottom: 7px;

    color: var(--accent);

    font-size: .61rem;

    font-weight: 800;

    letter-spacing: .09em;

    text-transform: uppercase;

}


.service-title {

    position: relative;

    z-index: 2;

    margin:
        0 0 10px;

    color: var(--text);

    font-size: 1.04rem;

    font-weight: 800;

    line-height: 1.25;

    letter-spacing: -.025em;

}


.service-description {

    position: relative;

    z-index: 2;

    margin:
        0;

    color: var(--text-muted);

    font-size: .71rem;

    line-height: 1.7;

}


/* =========================================================
   SERVICE FEATURES
========================================================= */

.service-features {

    position: relative;

    z-index: 2;

    display: flex;

    flex-direction: column;

    gap: 7px;

    margin-top: 18px;

}


.service-feature {

    display: flex;

    align-items: center;

    gap: 7px;

    color: var(--text-soft);

    font-size: .85rem;

    font-weight: 700;

}


.service-feature i {

    color: var(--accent);

    font-size: .7rem;

}


/* =========================================================
   SERVICE LINK
========================================================= */

.service-link {

    position: relative;

    z-index: 2;

    display: inline-flex;

    align-items: center;

    gap: 6px;

    margin-top: auto;

    padding-top: 20px;

    color: var(--primary);

    font-size: .85rem;

    font-weight: 800;

}


.service-link i {

    transition:
        transform var(--transition-fast);

}


.service-link:hover i {

    transform:
        translateX(4px);

}


/* =========================================================
   ACCENT VARIATIONS
========================================================= */

.service-card--water
.service-icon {

    color: var(--primary);

    background: var(--primary-light);

}


.service-card--install
.service-icon {

    color: var(--secondary);

    background: var(--secondary-light);

}


.service-card--service
.service-icon {

    color: var(--accent);

    background: var(--accent-light);

}


.service-card--consult
.service-icon {

    color: var(--warning);

    background: var(--warning-light);

}


/* =========================================================
   CTA
========================================================= */

.services-cta {

    position: relative;

    z-index: 2;

    display: flex;

    justify-content: center;

    margin-top: 32px;

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    .services-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .services-section {

        padding:
            var(--section-space)
            0;

    }


    .services-header {

        margin-bottom: 25px;

    }


    .services-header .section-heading {

        font-size:
            clamp(
                2rem,
                9vw,
                2.7rem
            );

    }


    .services-description {

        font-size: .84rem;

        line-height: 1.7;

    }


    /* =============================================
       HORIZONTAL SERVICE SLIDER
    ============================================== */

    .services-grid {

        display: flex;

        gap: 12px;

        overflow-x: auto;

        scroll-snap-type: x mandatory;

        margin:
            0 -15px;

        padding:
            3px 15px 15px;

        scrollbar-width: none;

    }


    .services-grid::-webkit-scrollbar {

        display: none;

    }


    .service-card {

        flex:
            0 0 82%;

        min-height: 310px;

        scroll-snap-align: start;

        padding: 19px;

    }


    .service-card:hover {

        transform: none;

    }


    .service-icon {

        width: 48px;

        height: 48px;

        margin-bottom: 21px;

        border-radius: 14px;

    }


    .service-title {

        font-size: .98rem;

    }


    .service-description {

        font-size: .85rem;

    }


    .service-feature {

        font-size: .62rem;

    }


    .services-cta {

        margin-top: 13px;

    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .service-card {

        flex-basis: 88%;

        min-height: 300px;

    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .service-card,
    .service-card::before,
    .service-icon,
    .service-link i {

        transition: none;

    }

}