.service-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background-color: var(--color-light);
    overflow: hidden;
    transition:
        transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
        opacity 0.45s ease;
}

/* ---------- Cover: left colour panel (50%) ---------- */

.service-hero__cover {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--space-8) var(--space-7);
    background-color: var(--service-color, var(--x-teal));
}

.service-hero__cover-top {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.service-hero__kicker {
    margin: 0;
    font-size: 1.5rem;
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    color: var(--x-black);
}

.service-hero__title {
    margin: 0px;
    color: var(--x-white);
    font-size: 3.25rem;
    line-height: var(--lh-tight);
    text-transform: uppercase;
    overflow-wrap: break-word;
    word-break: break-word;
}

.service-hero__tagline {
    margin: 0;
    color: var(--x-black);
    font-weight: var(--fw-black);
    font-size: 2.25rem;
    line-height: var(--lh-tight);
    text-transform: uppercase;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ---------- Cover: service progress nav (segmented line) ---------- */

.service-progress {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-top: var(--space-5);
}

.service-progress__segment {
    flex: 1 1 0;
    display: block;
    padding: var(--space-2) 0;
    text-decoration: none;
    cursor: pointer;
}

.service-progress__segment.is-active {
    cursor: default;
}

.service-progress__line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-pill);
    transition:
        height var(--transition-fast),
        background-color var(--transition-fast);
}

.service-progress__segment:hover .service-progress__line {
    background-color: rgba(0, 0, 0, 0.55);
}

.service-progress__segment.is-active .service-progress__line {
    height: 4px;
    background-color: var(--x-black);
}

/* ---------- Stage: hero photo (right 50%) ---------- */

.service-hero__stage {
    position: relative;
    overflow: hidden;
    background-color: var(--x-black);
}

.service-hero__media {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

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

/* ---------- Panel: slides in, right half only — left half stays transparent ---------- */

.service-hero__panel {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
}

.service-hero__panel.is-open {
    transform: translateX(0);
}

/* Transparent spacer — lets the real cover (title + progress nav) show
   through and remain interactive underneath the panel. */
.service-hero__panel-spacer {
    background: transparent;
    pointer-events: none;
}

.service-hero__panel-content {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: var(--space-8) var(--space-7);
    background-color: var(--color-light);
}

.service-hero__panel-content #teal-marker {
    width: 44px;
    margin-bottom: var(--space-5);
    fill: var(--x-teal);
    stroke: var(--x-teal);
}

.service-hero__close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 40px;
    height: 40px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background-color: var(--x-lime);
    color: var(--color-dark);
    font-size: 1rem;
    cursor: pointer;
    z-index: 2;
    transition:
        transform var(--transition-fast),
        background-color var(--transition-fast);
}

.service-hero__close svg {
    width: 20px;
    height: 20px;
    color: var(--color-dark);
    position: relative;
    top: 2px;
}

.service-hero__close:hover,
.service-hero__close:focus-visible {
    transform: scale(1.08);
}

.service-hero__close:hover {
    background-color: var(--x-teal);
}

.service-hero__close:hover svg {
    color: var(--color-dark);
}

.service-hero__body {
    max-width: 640px;
    margin-top: var(--space-6);
}

.service-hero__body p:first-child {
    font-weight: var(--fw-black);
    font-size: 1.75rem;
    line-height: 1.2;
}

.service-hero__body p {
    color: var(--color-body-text);
}

/* ---------- Panel: next / prev arrows ---------- */

.service-hero__panel-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-top: auto;
    padding-top: var(--space-6);
    max-width: 640px;
}

.service-hero__arrow {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-body-text);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    font-size: var(--fs-sm);
    text-decoration: none;
    transition:
        transform var(--transition-fast),
        opacity var(--transition-fast),
        color var(--transition-fast);
}

.service-hero__arrow:hover {
    color: var(--x-teal);
}

.service-hero__arrow--next {
    margin-left: auto;
}

.service-hero__arrow-icon {
    display: block;
    width: 18px;
    height: 18px;
    color: currentColor;
}

.service-hero__arrow-icon .st0 {
    fill: currentColor;
}

.service-hero__arrow-icon polygon {
    fill: currentColor;
}

.service-hero__arrow--prev .service-hero__arrow-icon {
    transform: scaleX(-1);
}

/* ---------- Manual panel toggle (centered lime arrow) ---------- */
.service-hero__toggle {
    width: 88px;
    height: 88px;
    padding: 0.65em;
    position: absolute;
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    justify-self: center;
    align-self: center;
    z-index: 6;
    border: 0;
    border-radius: 50%;
    background-color: var(--x-lime);
    color: var(--color-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-h4);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    overflow: hidden;
    transition:
        opacity var(--transition-base),
        transform var(--transition-base);
}

.service-hero__toggle svg {
    width: 45px;
    height: 45px;
    color: var(--color-dark);
    fill: var(--color-dark);
    stroke: var(--color-dark);
    font-size: 1.45rem;
    transition: transform var(--transition-base);
}

.service-hero__toggle:hover svg,
.service-hero__toggle:focus-visible svg {
    transform: rotate(90deg);
}

.service-hero.panel-open .service-hero__toggle {
    opacity: 0;
    pointer-events: none;
}

/* ---------- Page-transition illusion (next / prev / progress nav) ---------- */
.service-hero.is-transitioning-out.to-next {
    transform: translateX(-100%);
    opacity: 0.4;
}

.service-hero.is-transitioning-out.to-prev {
    transform: translateX(100%);
    opacity: 0.4;
}

.service-hero.from-next:not(.transition-settle) {
    transform: translateX(100%);
    opacity: 0.4;
    transition: none;
}

.service-hero.from-prev:not(.transition-settle) {
    transform: translateX(-100%);
    opacity: 0.4;
    transition: none;
}

.service-hero.transition-settle {
    transform: translateX(0);
    opacity: 1;
}

/* ==========================================================================
		  Media Queries: iPad
		 ========================================================================== */

/* iPad [landscape] */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
    .service-hero__close svg {
        left: 0 !important;
    }
}

/* iPad [portrait] */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {
    .service-hero__close svg {
        left: -6px !important;
    }
}

/* iPad 3/4 [landscape] */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {
    .service-hero__close svg {
        left: 0 !important;
    }
}

/* iPad 3/4 [portrait] */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {
    .service-hero__close svg {
        left: -6px !important;
    }
}
/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
    .service-hero {
        display: flex;
        flex-direction: column;
        height: auto !important;
        min-height: 0 !important;
    }

    .service-hero__cover {
        min-height: 100px !important;
        padding: var(--space-5) !important;
        justify-content: flex-start;
    }

    .service-hero__title {
        font-size: var(--fs-h2);
    }

    .service-progress {
        padding-top: var(--space-4);
    }

    /* Image */
    .service-hero__stage {
        min-height: 0 !important;
        aspect-ratio: 4 / 3;
    }

    .service-hero__media {
        pointer-events: none;
        cursor: default;
    }

    .service-hero__panel {
        position: static;
        display: block;
        width: 100%;
        height: auto;
        min-height: 0;
        transform: none !important;
        transition: none;
        overflow: visible;
    }

    .service-hero__panel-spacer,
    .service-hero__toggle,
    .service-hero__close {
        display: none !important;
    }

    .service-hero__panel-content {
        padding: var(--space-5) !important;
        height: auto;
        overflow: visible;
    }

    .service-hero__body,
    .service-hero__panel-nav {
        max-width: none;
    }

    .service-hero__panel-nav {
        margin-top: var(--space-5);
        padding-top: 0;
    }
}

@media (max-width: 767.98px) {
    .service-hero__kicker {
        font-size: 1rem !important;
    }

    .service-hero__title {
        font-size: 2rem !important;
    }

    .service-hero__tagline {
        font-size: 1.75rem !important;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .service-hero {
        height: calc(100vh - var(--service-chrome-height, 202px));
        min-height: 85vh;
    }

    .service-hero__body {
        max-width: 90%;
    }

    .service-hero__panel-nav {
        max-width: 90%;
    }

    .service-hero__body p:first-child {
        font-size: 2.5rem;
    }

    .service-hero__kicker {
        font-size: 1.25rem;
    }

    .service-hero__title {
        font-size: 3rem;
    }

    .service-hero__tagline {
        font-size: 1.75rem;
    }

    .service-hero__toggle {
        top: 47%;
    }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .service-hero {
        height: calc(100vh - var(--service-chrome-height, 202px));
        min-height: 85vh;
    }

    .service-hero__body {
        max-width: 90%;
    }

    .service-hero__panel-nav {
        max-width: 90%;
    }

    .service-hero__body p:first-child {
        font-size: 2rem;
    }

    .service-hero__body p {
        font-size: 1rem;
    }

    .service-hero__kicker {
        font-size: 1.25rem;
    }

    .service-hero__title {
        font-size: 3rem;
    }

    .service-hero__tagline {
        font-size: 1.75rem;
    }
}

@media (min-width: 1400px) and (max-width: 2199px) {
    .service-hero {
        height: calc(100vh - var(--service-chrome-height, 202px));
        min-height: 85vh;
    }

    .service-hero__body {
        max-width: 90%;
    }

    .service-hero__panel-nav {
        max-width: 90%;
    }

    .service-hero__body p:first-child {
        font-size: 2.75rem;
    }

    .service-hero__body p {
        font-size: 1.25rem;
    }
}

@media (min-width: 2200px) {
    .service-hero {
        height: calc(100vh - var(--service-chrome-height, 202px));
        min-height: 0;
    }

    .service-hero__body {
        max-width: 90%;
    }

    .service-hero__panel-nav {
        max-width: 90%;
    }

    .service-hero__body p:first-child {
        font-size: 3.5rem;
    }

    .service-hero__body p {
        font-size: 1.25rem;
    }
}
