/* =========================================================
   AF_Services v1.1.0
   Active Freight — stable responsive cards
   Developed by Ilyas Benayad
   ========================================================= */

.wl-services{
    --wl-card-bg:#e8ecef;
    --wl-content-width:50%;
    --wl-duration:420ms;
    --wl-hover-lift:6px;
    --wl-hover-scale:1.01;
    --wl-image-scale:1;
    --wl-image-hover-scale:1.06;
    --wl-content-gap:7px;
    --wl-mobile-image-height:160px;

    width:100%;
    max-width:1200px;
    margin:0 auto;
    padding:70px 30px 85px;
    font-family:Arial,Helvetica,sans-serif;
    box-sizing:border-box;
}

.wl-services *,
.wl-services *::before,
.wl-services *::after{
    box-sizing:border-box;
}

.wl-services img,
.wl-services svg{
    max-width:100%;
}

.wl-services-header{
    text-align:center;
    margin-bottom:32px;
}

.wl-services-label{
    margin-bottom:13px;
    color:#f15b24;
    font-size:12px;
    line-height:1;
    font-weight:800;
    letter-spacing:.5px;
    text-transform:uppercase;
}

.wl-services-header h2{
    margin:0;
    padding:0;
    color:#111827;
    font-size:28px;
    line-height:1.25;
    font-weight:700;
    letter-spacing:-.7px;
    overflow-wrap:anywhere;
}

.wl-services-header h2 span{
    color:#f15b24;
}

/* GRID */
.wl-services-grid{
    width:100%;
    min-width:0;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:20px;
}

/* CARD — IMPORTANT:
   the card itself is the only moving object.
   Text and image never leave the card bounds. */
.wl-service-card{
    position:relative;
    min-width:0;
    width:100%;
    height:230px;

    display:flex;
    flex-direction:row;
    align-items:stretch;

    overflow:hidden;
    contain:paint;
    isolation:isolate;

    color:inherit;
    text-decoration:none!important;

    background:var(--wl-card-bg);
    border:1px solid rgba(225,228,232,.9);
    border-radius:14px;

    box-shadow:0 4px 14px rgba(20,30,40,.045);

    transform:translate3d(0,0,0);
    transform-origin:center center;
    backface-visibility:hidden;
    -webkit-font-smoothing:antialiased;

    transition:
        transform var(--wl-duration) cubic-bezier(.2,.8,.2,1),
        box-shadow var(--wl-duration) ease,
        border-color var(--wl-duration) ease;
}

.wl-service-card:focus-visible{
    outline:3px solid rgba(241,91,36,.35);
    outline-offset:3px;
}

/* WIDE CARD */
.wl-service-card--wide{
    grid-column:span 2;
}

/* CONTENT PANE */
.wl-service-content{
    position:relative;
    z-index:4;

    flex:0 0 var(--wl-content-width);
    width:var(--wl-content-width);
    min-width:0;
    max-width:var(--wl-content-width);
    height:100%;

    padding:20px 16px 18px 20px;

    display:flex;
    flex-direction:column;
    align-items:flex-start;

    background:var(--wl-card-bg);

    overflow:hidden;

    transition:
        transform var(--wl-duration) cubic-bezier(.2,.8,.2,1),
        background-color var(--wl-duration) ease;
}

/* Keep text as one coherent block. */
.wl-service-copy{
    min-width:0;
    width:100%;
    display:flex;
    flex-direction:column;
    gap:var(--wl-content-gap);
}

.wl-service-card h3{
    position:relative;
    z-index:2;

    width:100%;
    max-width:100%;

    margin:0;
    padding:0;

    color:#151b27;
    font-size:16px;
    line-height:1.22;
    font-weight:700;
    letter-spacing:-.2px;

    overflow-wrap:anywhere;
    word-break:normal;
}

.wl-service-card p{
    position:relative;
    z-index:2;

    width:100%;
    max-width:100%;

    margin:0;
    padding:0;

    color:#4d5560;
    font-size:10.5px;
    line-height:1.55;
    font-weight:400;

    overflow-wrap:anywhere;
    word-break:normal;
}

/* IMAGE PANE
   This pane NEVER scales or crosses into text.
   Only its inner media scales. */
.wl-service-image{
    position:relative;
    z-index:1;

    flex:1 1 auto;
    width:calc(100% - var(--wl-content-width));
    min-width:0;
    height:100%;

    overflow:hidden;
    clip-path:inset(0);

    background:var(--wl-card-bg);
}

/* Inner image: hover zoom stays clipped inside image pane. */
.wl-service-image-media{
    position:absolute;
    inset:-1px;

    background-repeat:no-repeat;
    background-size:cover;
    background-position:center center;

    transform:scale(var(--wl-image-scale));
    transform-origin:center center;

    will-change:transform;

    transition:
        transform calc(var(--wl-duration) + 120ms) cubic-bezier(.2,.8,.2,1),
        filter var(--wl-duration) ease;
}

/* Clean internal blend.
   It lives INSIDE image pane only, therefore it can never escape
   across the text panel or outside the card. */
.wl-service-image::before{
    content:"";
    position:absolute;
    z-index:3;
    top:0;
    bottom:0;
    left:0;

    width:34%;

    pointer-events:none;

    background:linear-gradient(
        90deg,
        var(--wl-card-bg) 0%,
        color-mix(in srgb,var(--wl-card-bg) 92%,transparent) 20%,
        color-mix(in srgb,var(--wl-card-bg) 72%,transparent) 42%,
        color-mix(in srgb,var(--wl-card-bg) 42%,transparent) 67%,
        transparent 100%
    );
}

@supports not (background:color-mix(in srgb,#fff 50%,transparent)){
    .wl-service-image::before{
        background:linear-gradient(
            90deg,
            rgba(232,236,239,1) 0%,
            rgba(232,236,239,.92) 20%,
            rgba(232,236,239,.72) 42%,
            rgba(232,236,239,.42) 67%,
            rgba(232,236,239,0) 100%
        );
    }
}

.wl-service-image::after{
    content:"";
    position:absolute;
    z-index:2;
    inset:0;
    pointer-events:none;
    background:linear-gradient(180deg,rgba(255,255,255,.015),rgba(0,0,0,.045));
}

/* ICON */
.wl-service-icon{
    width:43px;
    height:43px;
    flex:0 0 43px;

    margin:0 0 9px;

    display:grid;
    place-items:center;

    border-radius:50%;

    color:#f15b24;
    background:rgba(241,91,36,.06);

    box-shadow:inset 0 0 0 1px rgba(241,91,36,.045);

    transform:translate3d(0,0,0);

    transition:
        transform var(--wl-duration) cubic-bezier(.2,.8,.2,1),
        background var(--wl-duration) ease;
}

.wl-service-icon svg{
    width:24px;
    height:24px;

    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;

    transition:transform var(--wl-duration) cubic-bezier(.2,.8,.2,1);
}

.wl-service-icon i{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    font-size:22px;
    line-height:1;
    color:currentColor;

    transition:transform var(--wl-duration) cubic-bezier(.2,.8,.2,1);
}

/* LINK */
.wl-service-link{
    position:relative;
    z-index:3;

    width:100%;
    min-width:0;

    margin-top:auto;
    padding-top:10px;

    display:flex;
    align-items:center;
    gap:8px;

    color:#f15b24;
    font-size:11px;
    line-height:1.1;
    font-weight:700;

    white-space:nowrap;
}

.wl-service-link__text{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
}

.wl-service-link__arrow{
    flex:0 0 auto;
    display:inline-block;

    font-size:17px;
    line-height:1;

    transform:translate3d(0,0,0);

    transition:transform var(--wl-duration) cubic-bezier(.2,.8,.2,1);
}

/* =========================================================
   HOVER — WHOLE CARD MOVES AS ONE UNIT
   ========================================================= */

@media (hover:hover) and (pointer:fine){

    .wl-hover-none .wl-service-card:hover{
        transform:none;
    }

    .wl-hover-lift .wl-service-card:hover{
        transform:translate3d(0,calc(var(--wl-hover-lift) * -1),0);
    }

    .wl-hover-lift-scale .wl-service-card:hover{
        transform:
            translate3d(0,calc(var(--wl-hover-lift) * -1),0)
            scale(var(--wl-hover-scale));
    }

    .wl-hover-scale .wl-service-card:hover{
        transform:scale(var(--wl-hover-scale));
    }

    .wl-service-card:hover{
        box-shadow:0 18px 42px rgba(20,30,40,.13);
    }

    /* Image animates INSIDE its pane. */
    .wl-service-card:hover .wl-service-image-media{
        transform:scale(var(--wl-image-hover-scale));
    }

    /* Content follows the hover in a tiny coherent movement;
       it never moves independently outside the card. */
    .wl-service-card:hover .wl-service-content{
        transform:translate3d(2px,0,0);
    }

    .wl-service-card:hover .wl-service-icon{
        transform:translate3d(0,-2px,0);
        background:rgba(241,91,36,.10);
    }

    .wl-service-card:hover .wl-service-icon svg,
    .wl-service-card:hover .wl-service-icon i{
        transform:scale(1.06);
    }

    .wl-service-card:hover .wl-service-link__arrow{
        transform:translate3d(5px,0,0);
    }
}

/* Touch devices: no accidental hover displacement. */
@media (hover:none), (pointer:coarse){
    .wl-service-card{
        transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
    }

    .wl-service-card:active{
        transform:scale(.992);
        border-color:rgba(241,91,36,.22);
    }

    .wl-service-card:active .wl-service-image-media{
        transform:scale(1.02);
    }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width:1100px){
    .wl-services{
        padding:60px 24px 70px;
    }

    .wl-services-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:18px;
    }

    .wl-service-card{
        height:225px;
    }

    .wl-service-card--wide{
        grid-column:span 2;
    }
}

@media (max-width:760px){
    .wl-services{
        padding:50px 18px 60px;
    }

    .wl-services-header{
        margin-bottom:26px;
    }

    .wl-services-grid{
        grid-template-columns:1fr;
        gap:16px;
    }

    .wl-service-card,
    .wl-service-card--wide{
        grid-column:span 1;
        height:220px;
        min-width:0;
        max-width:100%;
    }

    .wl-service-content{
        min-width:0;
    }

    .wl-service-card h3{
        font-size:15px;
    }

    .wl-service-card p{
        font-size:10.25px;
        line-height:1.5;
    }
}

@media (max-width:480px){
    .wl-services{
        padding:42px 12px 52px;
    }

    .wl-services-header h2{
        font-size:22px;
    }

    .wl-service-card{
        height:210px;
        border-radius:12px;
    }

    /* Slightly more text room on narrow screens. */
    .wl-service-card{
        --wl-content-width:58%;
    }

    .wl-service-content{
        padding:15px 10px 14px 14px;
    }

    .wl-service-icon{
        width:38px;
        height:38px;
        flex-basis:38px;
        margin-bottom:7px;
    }

    .wl-service-icon svg{
        width:21px;
        height:21px;
    }

    .wl-service-icon i{
        font-size:19px;
    }

    .wl-service-card h3{
        font-size:14px;
        line-height:1.2;
    }

    .wl-service-card p{
        font-size:9.5px;
        line-height:1.45;
    }

    .wl-service-link{
        padding-top:7px;
        font-size:10px;
        gap:6px;
    }

    .wl-service-link__arrow{
        font-size:15px;
    }
}

/* Optional stacked mobile mode. */
@media (max-width:480px){
    .wl-services--mobile-stack .wl-service-card{
        height:auto!important;
        min-height:0!important;

        display:flex;
        flex-direction:column-reverse;
    }

    .wl-services--mobile-stack .wl-service-content{
        flex:0 0 auto;
        width:100%!important;
        max-width:100%!important;
        min-height:190px;
    }

    .wl-services--mobile-stack .wl-service-image{
        flex:0 0 var(--wl-mobile-image-height);
        width:100%!important;
        height:var(--wl-mobile-image-height);
    }

    .wl-services--mobile-stack .wl-service-image::before{
        top:auto;
        left:0;
        right:0;
        bottom:0;
        width:100%;
        height:34%;
        background:linear-gradient(
            0deg,
            var(--wl-card-bg) 0%,
            rgba(232,236,239,.70) 45%,
            transparent 100%
        );
    }
}

/* Absolutely no horizontal leakage from the widget. */
.elementor-widget-af_services,
.elementor-widget-af_services .elementor-widget-container,
.wl-services,
.wl-services-grid,
.wl-service-card{
    max-width:100%;
}

.elementor-widget-af_services{
    overflow:clip;
}

@supports not (overflow:clip){
    .elementor-widget-af_services{
        overflow:hidden;
    }
}

/* Accessibility — reduced motion */
@media (prefers-reduced-motion:reduce){
    .wl-services *,
    .wl-services *::before,
    .wl-services *::after{
        animation:none!important;
        transition:none!important;
        scroll-behavior:auto!important;
    }

    .wl-service-card:hover,
    .wl-service-card:active{
        transform:none!important;
    }
}
