/* --- Alternating service rows (Services 730:1552) ------------------------ */
/* The Figma parent frame allots 1566px; its auto-layout child reports 2809px
   because two hidden rows (UTILITIES, ASPHALT PAVING) still count toward that
   figure. The page total (6485px) confirms 1566px is what the page uses. */
.service-rows {
    background: rgba(var(--light-rgb, 232, 232, 232), 0.24);
}

.service-rows-inner {
    display: flex;
    flex-direction: column;
    gap: 91px;
    padding: 60px 58px;
}

/* The white card hugs its content instead of running to the section edge: the
   two columns cap at 747 + 81 + 740 = 1568, so past that the card was only
   growing its own empty inset (438px a side at 2560). The grey band still
   bleeds full width; below 1768px of room this rule is inert. */
.service-rows .card {
    display: grid;
    grid-template-columns: minmax(0, 747px) minmax(0, 740px);
    align-items: center;
    justify-content: center;
    gap: 81px;
    max-width: 1768px;
    margin-inline: auto;
    padding: 38px 100px;
    border-radius: 37px;
    background: var(--white, #ffffff);
}

.service-rows .card img {
    width: 100%;
    height: auto;
    aspect-ratio: 747 / 496;
    object-fit: cover;
    border-radius: 18px;
}

.service-rows .card-flip img {
    order: 2;
}

.service-rows .card .text {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
}

.service-rows .card-flip .text {
    align-items: flex-end;
    text-align: right;
}

/* Figma 719:1261: the title is brand blue at 64/700 with a 2px blue rule the full
   width of the text column 18px below it, then the copy 19px under the rule. */
.service-rows .card h2 {
    align-self: stretch;
    margin: 0;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--brand, #008AF7);
    font-size: clamp(32px, 3.33vw, 64px);
    line-height: 1.234;
    color: var(--brand, #008AF7);
}

.service-rows .card p {
    margin: 0;
    font-size: 18px;
    line-height: 1.4444;
    color: var(--ink, #212529);
}

@media (max-width: 1399px) {
    .service-rows .card {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 48px;
        padding: 38px 48px;
    }

    .service-rows-inner {
        min-height: 0;
        padding-inline: var(--gutter);
    }

    .standards .cards {
        gap: 48px;
    }

    .cta-band--trust .trust {
        gap: 32px;
    }
}

@media (max-width: 991px) {
    .service-rows .card,
    .service-rows .card-flip {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .service-rows .card-flip img {
        order: 0;
    }

    .service-rows .card-flip .text {
        align-items: flex-start;
        text-align: left;
    }

    .service-rows-inner {
        gap: 40px;
        padding-block: 40px;
    }

    .standards-inner {
        gap: 56px;
        padding-block: 64px;
    }

    .standards .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Slide count comes from sliders.js at this width; only the rhythm changes. */
    .photo-grid .photo-grid-images {
        padding-block: 32px;
    }

    .cta-band--trust .cta-band-inner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .cta-band--trust .trust {
        flex-wrap: wrap;
        gap: 24px 32px;
    }
}

@media (max-width: 767px) {
    .standards .cards {
        grid-template-columns: 1fr;
    }

    /* Client round 14: 18px on every Services card at phone width — the copy gets
       the width back (the standards cards' 49px inset was running the longest card
       to eight lines). These live here, after the base rules; the earlier 767 block
       would lose the source-order tie to `.service-rows .card` / `.standards .card`. */
    .service-rows .card,
    .standards .card {
        padding: 18px;
    }

    /* One card per row here, so the `flex-start` above has no row of icons left to
       align against — it just parks the content at the top of the 391px box and
       leaves 40-158px of dead space under the shortest cards. Centre it instead;
       the 2-column band (768-991px) keeps `flex-start`. */
    .standards .card {
        justify-content: center;
    }

    /* Taller crop on phones, in the same spirit as the video band's 4/3 (client
       round 19) — the 747/496 frame reads thin once the card is full width. */
    .service-rows .card img {
        aspect-ratio: 4 / 3;
    }

    .photo-grid-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .cta-band--trust .trust {
        flex-direction: column;
    }
}