/* Hallmark · built: the project · edit: services page, shorter with a heading that holds still beside the rows · genre: editorial · theme: brand (MedGermany teal, blue and orange) · job: book · posture: quiet · copy: the page's own wording, merged · hero: quiet banner, the same photo and teal panel · nav: kept · footer: kept · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V3 · weakest: V, the rows use the existing stock photos and two of them do not show the service */
/* Hallmark · waive 24b · padding 30px on the phone hero caption · the site's phone text edge is 18px page padding plus 12px container padding, and the hero lines up with it */
/* Hallmark · waive 44c ·hero ends at 592px of a 900px screen · the owner asked for shorter pages and the first service row should show on the first screen, as on the home page */

/* ---------- One voice for headings, as on the home page ---------- */

.page-services main h2 {
    min-width: 0;
    margin-bottom: 20px;
    overflow-wrap: break-word;
    color: var(--mg-ink);
    font-family: var(--mg-font-title);
    font-size: clamp(2rem, 1.45rem + 2.4vw, 3.25rem) !important;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.1;
    text-align: left !important;
    text-wrap: balance;
}

.page-services main h2 span {
    color: inherit;
    font: inherit;
}

.page-services main .service-h2 img {
    display: inline-block;
    width: 0.8em;
    max-width: 0.8em;
    height: auto;
    vertical-align: -0.04em;
}

.page-services main > section {
    padding-block: clamp(48px, 6.5vw, 104px);
}

.page-services main > section.inner-banner {
    padding-block: 0;
}

/* ---------- Hero: photo and teal panel, the same pieces in the home page's arrangement ---------- */

/* The header is fixed, so the hero starts below it, as the home page's does. */
.page-services .inner-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin-top: var(--mg-header-h);
}

.page-services .inner-banner picture {
    display: block;
    min-width: 0;
}

.page-services .inner-banner img {
    float: none;
    width: 100% !important;
    height: 200px;
    min-height: 0;
}

.page-services .inner-banner .caption {
    position: relative;
    inset: auto;
    width: auto;
    padding: 28px 30px 36px; /* 30px: the section text edge on a phone */
    background: none;
}

.page-services .inner-banner .caption h1 {
    min-width: 0;
    margin: 0 0 16px;
    overflow-wrap: break-word;
    color: var(--mg-on-teal);
    font-family: var(--mg-font-title);
    font-size: var(--mg-size-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-align: left;
    text-wrap: balance;
}

.page-services .inner-banner .caption p {
    max-width: 46ch;
    margin-bottom: 24px;
    font-size: var(--mg-size-body);
    line-height: 1.55;
}

@media (min-width: 992px) {
    .page-services .inner-banner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-services .inner-banner picture {
        grid-column: 2;
        grid-row: 1;
    }

    .page-services .inner-banner img {
        height: 100%;
        min-height: 520px;
    }

    .page-services .inner-banner .caption {
        display: flex;
        grid-column: 1;
        grid-row: 1;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding-block: 48px;
        padding-inline: max(32px, calc(100% - 468px)) 48px;
    }
}

/* The hero's words start on the same edge as everything below. These are the container's widths. */
@media (min-width: 768px) and (max-width: 991.98px) {
    .page-services .inner-banner .caption {
        padding-inline: 36px;
    }
}

@media (min-width: 1200px) {
    .page-services .inner-banner .caption {
        padding-inline-start: max(32px, calc(100% - 558px));
    }
}

@media (min-width: 1400px) {
    .page-services .inner-banner .caption {
        padding-inline-start: max(32px, calc(100% - 588px));
    }
}

/* ---------- The heading holds still beside the rows on desktop ---------- */

.page-services .svc-split__head p {
    max-width: 52ch;
    color: var(--mg-body);
    font-size: var(--mg-size-body);
    line-height: 1.6;
}

.page-services .svc-split__head p:last-child {
    margin-bottom: 0;
}

.page-services .svc-split__head a,
.page-services .svc-row p a {
    color: var(--mg-link);
    text-underline-offset: 3px;
}

.page-services .svc-split__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 28px;
}

@media (min-width: 992px) {
    .page-services .svc-split {
        display: grid;
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        column-gap: 72px;
        align-items: start;
    }

    .page-services .svc-split__head {
        position: sticky;
        top: calc(var(--mg-header-h) + 24px);
    }

    .page-services .svc-split__list {
        gap: 20px;
        margin-top: 0;
    }
}

/* ---------- Rows: same colours and corners, a third of the height. Sharp on every screen. ---------- */

body.page-services :is(.service-India, .service-Germany) .card-main {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 12px;
    align-items: center;
    margin: 0;
    padding: 16px 12px;
    border: 0;
    border-radius: 0;
    border-top-right-radius: 32px;
    border-bottom-left-radius: 32px;
    box-shadow: none;
    animation: none;
}

.page-services .svc-row__photo {
    grid-row: 1;
    grid-column: 1;
    transform: none;
}

.page-services .svc-row__photo picture {
    display: block;
}

body.page-services :is(.service-India, .service-Germany) .svc-row img {
    display: block;
    width: 100%;
    height: 68px;
    border-top-right-radius: 24px;
    border-bottom-left-radius: 24px;
    object-fit: cover;
}

.page-services .svc-row h3 {
    grid-row: 1;
    grid-column: 2;
    justify-self: start;
    margin: 0;
    padding-bottom: 4px;
    color: var(--mg-ink);
    font-family: var(--mg-font-title);
    font-size: var(--mg-size-h3);
    font-weight: 600;
    line-height: 1.25;
    text-wrap: pretty;
    transform: none;
}

.page-services .svc-row p {
    grid-row: 2;
    grid-column: 1 / -1;
    margin: 0;
    color: var(--mg-body);
    font-size: var(--mg-size-label);
    line-height: 1.55;
    transform: none;
}

@media (min-width: 768px) {
    body.page-services :is(.service-India, .service-Germany) .card-main {
        grid-template-columns: 148px minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 24px;
        row-gap: 8px;
        align-items: start;
        padding: 16px 24px 16px 16px;
    }

    .page-services .svc-row__photo {
        grid-row: 1 / span 2;
    }

    body.page-services :is(.service-India, .service-Germany) .svc-row img {
        height: 112px;
    }

    .page-services .svc-row h3 {
        align-self: end;
    }

    .page-services .svc-row p {
        grid-row: 2;
        grid-column: 2;
    }
}

/* ---------- Doctors and dentists ---------- */

.page-services main > section.svc-routes {
    background: var(--mg-wash);
    border-top-right-radius: 58px;
}

.page-services .svc-routes__cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.page-services .svc-routes__lead,
.page-services .svc-routes__more {
    max-width: 68ch;
    margin: 0 0 16px;
}

.page-services .svc-routes__more {
    margin: 16px 0 0;
}

.page-services .svc-route {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px;
    column-gap: 16px;
    align-items: start;
    padding: 20px;
    border: 1px solid var(--mg-line-strong);
    border-radius: var(--mg-radius-lg);
    background: var(--mg-paper);
    color: var(--mg-body);
    text-decoration: none;
    transition: transform 0.25s ease;
}

.page-services .svc-route:hover {
    color: var(--mg-body);
    transform: translateY(-2px);
}

.page-services .svc-route:active {
    transform: scale(0.99);
}

.page-services .svc-route svg {
    width: 24px;
    height: 24px;
    color: var(--mg-ink);
}

.page-services .svc-route__title {
    display: block;
    margin-bottom: 4px;
    color: var(--mg-ink);
    font-family: var(--mg-font-title);
    font-size: var(--mg-size-h3);
    font-weight: 600;
    line-height: 1.25;
}

.page-services .svc-route__text {
    display: block;
    font-size: var(--mg-size-label);
    line-height: 1.5;
}

@media (min-width: 768px) {
    .page-services .svc-routes__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        margin-top: 12px;
    }
}

/* ---------- Closing band ---------- */

.page-services main > section.svc-closing {
    padding-block: clamp(32px, 4vw, 56px);
    background: var(--mg-paper);
}

.page-services .svc-closing__band {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    justify-items: start;
    padding: 32px 24px;
    border-top-right-radius: 58px;
    border-bottom-left-radius: 58px;
    background: var(--mg-teal);
}

.page-services main .svc-closing__band h2 {
    max-width: 24ch;
    margin: 0;
    color: var(--mg-on-teal);
    font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.5rem) !important;
    line-height: 1.15;
}

.page-services .svc-closing__band p {
    max-width: 58ch;
    margin: 16px 0 0;
    color: var(--mg-on-teal-muted);
    font-size: var(--mg-size-body);
    line-height: 1.6;
}

.page-services .svc-closing__band p a {
    color: var(--mg-on-teal);
    text-underline-offset: 3px;
}

.page-services .svc-closing__band p a:focus-visible {
    outline: 2px solid var(--mg-focus-on-dark);
    outline-offset: 2px;
    transition: none;
}

.page-services .svc-closing__band .cta-pulse {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    margin-top: 0;
    padding: 0 28px;
    border-radius: var(--mg-radius-pill);
}

@media (min-width: 768px) {
    .page-services .svc-closing__band {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 32px;
        padding: 48px 56px;
    }
}

/* ---------- Phones: rows, cards and band take the width the gutter was wasting ---------- */

@media (max-width: 767.98px) {
    .page-services .svc-split__list,
    .page-services .svc-routes__cards,
    .page-services .svc-closing__band {
        margin-inline: -12px;
    }

    .page-services .svc-closing__band {
        border-top-right-radius: 40px;
        border-bottom-left-radius: 40px;
    }
}

/* ---------- Keyboard focus shows at once ---------- */

.page-services .svc-route:focus-visible,
.page-services .svc-row a:focus-visible,
.page-services .svc-split__head a:focus-visible {
    outline: 2px solid var(--mg-focus);
    outline-offset: 2px;
    transition: none;
}

.page-services .inner-banner .btn:focus-visible,
.page-services .svc-closing__band .cta-pulse:focus-visible {
    outline: 2px solid var(--mg-focus-on-dark);
    outline-offset: 3px;
    transition: none;
}

@media (prefers-reduced-motion: reduce) {
    .page-services .svc-route {
        transition: none;
    }

    .page-services .svc-route:hover,
    .page-services .svc-route:active {
        transform: none;
    }
}
