.steps-section {
    position: relative;
    overflow: hidden;
    color: var(--color-navy);
}

/* Background colours */
.steps-section.bg-white { background: var(--color-white); }
.steps-section.bg-cyan  { background: var(--color-cyan); }
.steps-section.bg-azure { background: var(--color-azure); }

/* Header */
.steps-section .steps-header {
    max-width: 45rem;
    margin-bottom: 3.5rem;
}
.steps-section.header-center .steps-header {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.steps-section.header-center .steps-header .buttons { justify-content: center; }
.steps-section.header-left .steps-header {
    margin-left: 0;
    text-align: left;
}
.steps-section .steps-title {
    color: var(--color-navy);
    margin-bottom: 1.25rem;
}
.steps-section .steps-header .content { color: var(--color-navy); }
.steps-section .steps-header .buttons {
    margin-top: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Grid */
.steps-section .steps-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 4rem;
    row-gap: 2.5rem;
}
.steps-section.split-40-60 .steps-inner { grid-template-columns: 2fr 3fr; }
.steps-section.split-60-40 .steps-inner { grid-template-columns: 3fr 2fr; }
.steps-section.no-image .steps-inner    { grid-template-columns: 1fr; max-width: 45rem; }
.steps-section.no-image.header-center .steps-inner { margin: 0 auto; }

.steps-section.align-stretch .steps-inner { align-items: stretch; }
.steps-section.align-top .steps-inner     { align-items: start; }
.steps-section.align-middle .steps-inner  { align-items: center; }

/* Swap sides */
.steps-section.image-right .steps-media { order: 2; }
.steps-section.image-right .steps-list  { order: 1; }
.steps-section.image-right.split-40-60 .steps-inner { grid-template-columns: 3fr 2fr; }
.steps-section.image-right.split-60-40 .steps-inner { grid-template-columns: 2fr 3fr; }

/* Image */
.steps-section .steps-media {
    position: relative;
    min-height: 0;
}
.steps-section .steps-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius, 8px);
}
.steps-section.ratio-fill .steps-image     { min-height: 22rem; }
.steps-section.ratio-portrait .steps-image { height: auto; aspect-ratio: 4 / 5; }
.steps-section.ratio-square .steps-image   { height: auto; aspect-ratio: 1 / 1; }
.steps-section.ratio-landscape .steps-image{ height: auto; aspect-ratio: 16 / 9; }

/* Steps list */
.steps-section .steps-list {
    list-style: none;
    margin: 0;
    padding: 0;
    align-self: center;
}
.steps-section.align-stretch .steps-list { align-self: center; }
.steps-section .step {
    display: flex;
    align-items: stretch;
    gap: 1.5rem;
}
.steps-section .step-marker {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 2.5rem;
}
.steps-section .step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    color: var(--color-navy);
    background: var(--color-pink);
}
.steps-section.marker-circle .step-number  { border-radius: 50%; }
.steps-section.marker-rounded .step-number { border-radius: var(--border-radius, 8px); }

/* Marker colours */
.steps-section.bg-cyan .step-number,
.steps-section.bg-azure .step-number {
    background: var(--color-white) !important; color: var(--color-navy) !important; 
}
.steps-section.marker-pink .step-number   { background: var(--color-pink); color: var(--color-navy); }
.steps-section.marker-cyan .step-number   { background: var(--color-cyan); color: var(--color-navy); }
.steps-section.marker-azure .step-number  { background: var(--color-azure); color: var(--color-navy); }
.steps-section.marker-purple .step-number { background: var(--color-purple); color: var(--color-white); }
.steps-section.marker-navy .step-number   { background: var(--color-navy); color: var(--color-white); }

/* Connector line */
.steps-section.has-line .step:not(:last-child) .step-marker::after {
    content: "";
    flex: 1 1 auto;
    width: 3px;
    margin: .5rem 0;
    border-radius: 3px;
    background: var(--color-pink);
}
.steps-section.has-line.marker-cyan .step:not(:last-child) .step-marker::after   { background: var(--color-cyan); }
.steps-section.has-line.marker-azure .step:not(:last-child) .step-marker::after  { background: var(--color-azure); }
.steps-section.has-line.marker-purple .step:not(:last-child) .step-marker::after { background: var(--color-purple); }
.steps-section.has-line.marker-navy .step:not(:last-child) .step-marker::after   { background: var(--color-navy); }
/* keep the line visible on tinted backgrounds */
.steps-section.has-line.bg-azure.marker-azure .step:not(:last-child) .step-marker::after,
.steps-section.has-line.bg-cyan.marker-cyan .step:not(:last-child) .step-marker::after,
.steps-section.has-line.bg-azure.marker-cyan .step:not(:last-child) .step-marker::after,
.steps-section.has-line.bg-cyan.marker-azure .step:not(:last-child) .step-marker::after {
    background: var(--color-white);
}

.steps-section .step-text {
    flex: 1;
    min-width: 0;
    padding-top: .15rem;
}
.steps-section .step:not(:last-child) .step-text { padding-bottom: 1.5rem; }
.steps-section .step-title {
    margin: 0 0 .5rem;
    font-size: 1.25rem;
    line-height: 1.3;
    color: var(--color-navy);
}
.steps-section .step-content { color: var(--color-navy); }
.steps-section .step-content > *:last-child { margin-bottom: 0; }

/* Tablet & mobile */
@media (max-width: 991.98px) {
    .steps-section .steps-header { margin-bottom: 2.5rem; }

    .steps-section .steps-inner,
    .steps-section.split-40-60 .steps-inner,
    .steps-section.split-60-40 .steps-inner,
    .steps-section.image-right.split-40-60 .steps-inner,
    .steps-section.image-right.split-60-40 .steps-inner {
        grid-template-columns: 1fr;
        row-gap: 2rem;
    }
    .steps-section.image-right .steps-media,
    .steps-section.image-right .steps-list { order: 0; }

    .steps-section.mobile-steps-first .steps-list  { order: 1; }
    .steps-section.mobile-steps-first .steps-media { order: 2; }

    .steps-section .steps-list { align-self: start; }
    .steps-section.ratio-fill .steps-image { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
}

@media (max-width: 575.98px) {
    .steps-section .step { gap: 1rem; }
    .steps-section .step-marker,
    .steps-section .step-number { width: 2.25rem; }
    .steps-section .step-number { height: 2.25rem; font-size: 1.1rem; }
    .steps-section .step-title { font-size: 1.125rem; }
}
