.services-with-sidebar {
    background-color: var(--color-black);
    /* Mobile: no right padding so the filter slider peek bleeds to the edge */
    padding: 4rem 0rem 8rem 2.25rem;

    @media (min-width: 768px) {
        padding: 4rem 5rem 8rem 3.75rem;
    }

    /* Bricks' container styles (flex-row, no auto margins) don't suit
       hand-rendered markup: own layout, centered. */
    .brxe-container {
        display: grid;
        /* minmax(0, …) keeps wide content (nowrap filter buttons) from
           inflating the track and pushing the page sideways on mobile */
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
        width: 100%;
        max-width: 87.5rem;
        margin-inline: auto;

        /* Desktop: narrow sidebar + content; start alignment enables sticky */
        @media (min-width: 768px) {
            grid-template-columns: 13rem minmax(0, 1fr);
            align-items: start;
        }
        @media (min-width: 1200px) {
            gap: 4rem;
        }
    }

    .sidebar {
        min-width: 0;

        @media (min-width: 768px) {
            position: sticky;
            top: 6rem;
            /* Align all sidebar content to the right edge of the column */
            display: flex;
            flex-direction: column;
            align-items: flex-end;
        }

        @media (min-width: 991px) {
            padding-right: 2rem;
        }

        .brxe-button {
            display: none;

            @media (min-width: 768px) {
                display: inline-flex;
                margin-top: 2rem;
            }
        }
    }

    /* Desktop nav list */
    .side-nav {
        display: none;

        @media (min-width: 768px) {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 1rem;

            .side-link {
                width: auto;
                text-align: right;
            }
        }
    }

    /* Mobile filter slider */
    .filter-splide {
        visibility: visible; /* override Splide's pre-init hiding */
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden; /* contain the nowrap buttons before Splide mounts */

        @media (min-width: 768px) {
            display: none;
        }

        .splide__list {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .splide__slide {
            width: auto;
            margin: 0;
        }
    }

    .side-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        width: 100%;
        padding: 0;
        background: none;
        border: 0;
        color: rgba(255, 255, 255, 0.4);
        text-align: left;
        text-transform: uppercase;
        white-space: nowrap;
        cursor: pointer;
        transition: color 0.3s ease;

        &:hover {
            color: var(--color-blue-two);
        }

        /* Active section indicator */
        .dot {
            flex: 0 0 auto;
            width: 0.5rem;
            height: 0.5rem;
            border-radius: 50%;
            background-color: var(--color-blue-two);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        &.is-active {
            color: var(--color-blue-two);

            .dot {
                opacity: 1;
            }
        }
    }

    .sections {
        display: flex;
        flex-direction: column;
        gap: 5rem;
        min-width: 0;
        /* Mobile: content keeps its right padding while the slider bleeds */
        padding-right: 2.25rem;

        @media (min-width: 768px) {
            padding-right: 0;
        }
    }

    .svc-section {
        /* Keep headings clear of the sticky header when jumping via sidebar */
        scroll-margin-top: 6rem;
    }

    .svc-title {
        color: var(--color-white);
        font-size: var(--text-h3);
        line-height: 1.05;
        margin: 0 0 2rem 0;
        @media (min-width: 1200px) {
            font-size: var(--text-h2);
        }
    }

    .cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2.5rem;

        @media (min-width: 768px) {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    .svc-card {
        min-width: 0;

        .banner {
            position: relative;
            aspect-ratio: 16 / 5;
            overflow: hidden;
            margin-bottom: 1.5rem;

            /* Any banner image always spans the full card width */
            img {
                position: absolute;
                inset: 0;
                width: 100%;
                max-width: none;
                height: 100%;
                object-fit: cover;
            }

            /* Placeholder until real banner images are added */
            .banner-placeholder {
                position: absolute;
                inset: 0;
                background: linear-gradient(115deg, #0b3c4d 0%, var(--color-blue) 45%, var(--color-blue-two) 70%, #0b3c4d 100%);
                opacity: 0.85;
            }
        }

        .card-title {
            color: var(--color-white);
            font-family: var(--font-heading);
            font-size: var(--text-h3);
            line-height: 1.15;
            margin: 0;
            @media (min-width: 768px) {
                font-size: var(--text-h5);
            }
            @media (min-width: 1200px) {
                font-size: var(--text-h3);
            }
        }

        .paragraph {
            color: rgba(255, 255, 255, 0.72);
            font-size: var(--text-body);
            line-height: 1.5;
            margin: 1rem 0 0 0;
        }

        .svc-list {
            list-style: disc;
            margin: 1.25rem 0 0 0;
            padding-left: 1.125rem;
            color: rgba(255, 255, 255, 0.72);
            font-size: var(--text-body-small);
            line-height: 1.6;

            @media (min-width: 768px) {
                columns: 2;
                column-gap: 2rem;
            }

            li {
                break-inside: avoid;
                padding-bottom: 0.25rem;

                &::marker {
                    color: var(--color-blue);
                }
            }
        }
    }
}
