/* SERVICES — greige bg, 5 photo+content rows separated by hairlines */

.services {
    background: var(--clr-greige);
    padding: var(--section-py-lg) 0;
    color: var(--clr-navy);
}

.services-container {
    max-width: 1180px;
}

/* ---------- HEADER ---------- */

.services-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 48px;
    align-items: end;
    margin: 0 auto 56px;
    max-width: 920px;
    position: relative;
}

.services-heading {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.4rem, 4.2vw, 3.8rem);
    line-height: 1.04;
    color: var(--clr-navy);
    letter-spacing: -0.01em;
    margin: 0;
}

.services-sub-wrap {
    position: relative;
    max-width: 440px;
    justify-self: start;
    padding-bottom: 14px;
}

.services-sub {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.6rem, 2.2vw, 2.1rem);
    line-height: 1.2;
    color: var(--clr-navy);
    margin: 0;
}

.services-sub strong { font-weight: 500; }

.services-arrow {
    position: absolute;
    left: -156px;
    bottom: -7px;
    width: 92px;
    height: auto;
    pointer-events: none;
}

/* ---------- DIVIDERS ---------- */

.services-divider {
    border: 0;
    border-top: 2px solid rgba(26, 31, 54, 0.28);
    margin: 0;
}

/* ---------- ROW SHELL ---------- */

.service-row {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 40px;
    align-items: center;
    padding: 36px 0;
}

/* Feature row centered within the container, narrower than the pair rows below */
.service-row--feature {
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 56px;
    padding: 48px 0;
    max-width: 920px;
    margin: 0 auto;
}

/* 2-col pair with a vertical hairline between them — the vertical line runs
   the full height of the row so it connects to the horizontal hairlines
   above/below at the corners. */
.services-row-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    position: relative;
}

.services-row-pair::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(26, 31, 54, 0.28);
    transform: translateX(-1px);
}

.services-row-pair .service-row {
    grid-template-columns: minmax(180px, 240px) 1fr;
    gap: 28px;
}

/* ---------- PHOTO ---------- */

.service-photo {
    display: block;
    border-radius: 22px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: rgba(0, 0, 0, 0.04);
}

.service-row--feature .service-photo { aspect-ratio: 5 / 4; }

.service-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- BODY ---------- */

.service-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    max-width: 480px;
}

.service-row--feature .service-body { max-width: 520px; gap: 22px; }

.service-body p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--clr-navy);
    margin: 0;
}

.service-row--feature .service-body p {
    font-size: 1.1rem;
    max-width: 440px;
}

/* ---------- PILL LABEL ---------- */

.service-pill {
    display: inline-block;
    padding: 13px 32px;
    border: 1px solid var(--clr-navy);
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.2rem;
    line-height: 1.15;
    color: #fff;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

.service-row--feature .service-pill {
    font-size: 1.45rem;
    padding: 16px 36px;
}

.service-pill--blue     { background: #0152f5; }
.service-pill--red      { background: var(--clr-red); }
.service-pill--yellow   { background: #f6bf00; color: #fff; }
.service-pill--lavender { background: #8090ff; }

/* ---------- CTA ---------- */

.service-cta {
    margin-top: 6px;
    padding: 14px 34px;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--clr-navy);
    background: url('../assets/images/SVG/learn-more-circle.svg') center / 100% 100% no-repeat;
    border: 0;
}
.service-cta:hover {
    background: url('../assets/images/SVG/learn-more-circle.svg') center / 100% 100% no-repeat;
    color: var(--clr-navy);
    transform: translateY(-1px);
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1024px) {
    .services { padding: 80px 0; }

    .services-container { padding: 0 24px; }

    .services-header {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 36px;
        max-width: 100%;
    }

    .service-row--feature {
        max-width: 100%;
        margin: 0;
    }

    .services-sub-wrap {
        justify-self: start;
        padding-top: 0;
        max-width: 100%;
    }

    .services-arrow { display: none; }

    /* Collapse pairs to a single column; each row stays photo-left → body-right */
    .services-row-pair {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .services-row-pair::before { display: none; }

    /* Each row in a pair becomes its own divided block */
    .services-row-pair .service-row + .service-row {
        border-top: 2px solid rgba(26, 31, 54, 0.28);
    }

    .service-row,
    .service-row--feature,
    .services-row-pair .service-row {
        grid-template-columns: minmax(160px, 220px) 1fr;
        gap: 24px;
        padding: 28px 0;
    }

    .service-row--feature .service-photo { aspect-ratio: 4 / 5; }

    .service-pill,
    .service-row--feature .service-pill {
        font-size: 1.1rem;
        padding: 12px 22px;
    }

    .service-body p,
    .service-row--feature .service-body p { font-size: 0.98rem; }
}

@media (max-width: 640px) {
    .services { padding: 56px 0; }

    .services-container { padding: 0 20px; }

    .service-row,
    .service-row--feature,
    .services-row-pair .service-row {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 24px 0;
    }

    .service-photo,
    .service-row--feature .service-photo {
        aspect-ratio: 5 / 4;
        max-width: 360px;
    }

    .service-body { max-width: 100%; }
}
