.wp-block-acf-potter-sl,
.potter-sl {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
    font-family: Figtree, sans-serif;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.potter-sl--split-bg {
    background-image: var(--potter-sl-bg-desktop);
}

@media (max-width: 768px) {
    .potter-sl--split-bg {
        background-image: var(--potter-sl-bg-mobile);
    }
}

.potter-sl__overlay {
    position: relative;
    width: 100%;
    padding: 40px 24px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: radial-gradient(circle at 30% 10%, rgba(255, 255, 255, 0.06), transparent 55%),
                radial-gradient(circle at 70% 90%, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5));
    color: #ffffff;
    box-sizing: border-box;
    flex: 1 1 auto;
}

.potter-sl__overlay--steps {
    flex: 0 0 auto;
    justify-content: flex-start;
    background: #1a0e08;
    padding-top: 32px;
    padding-bottom: 48px;
}

.potter-sl__overlay--steps::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgb(226 188 141 / 55%) 50%, transparent 100%);
    pointer-events: none;
}

.potter-sl__container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
    height: 100%;
}

.potter-sl__inner {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
}

.potter-sl__header {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.potter-sl__header-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    /* gap: 16px; */
    max-width: 100%;
}

.potter-sl__header-logo {
    flex-shrink: 0;
    line-height: 0;
}

.potter-sl__header-logo img {
    display: block;
    max-height: 96px;
    width: auto;
    height: auto;
}

.potter-sl__header-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
}

.potter-sl__header-text,
.potter-sl__header-text.entry-content {
    flex: 0 1 auto;
    color: #ffffff;
    line-height: 1.1;
    font-size: 32px;
    font-weight: 800;
}

.potter-sl__header-text p {
    color: #ffffff !important;
    font-size: 25px !important;
    letter-spacing: 2px !important;
}

.potter-sl__header-text.entry-content :where(h1, h2, h3, h4, h5, h6, p) {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-transform: none;
}

.potter-sl__header-text.entry-content p + p {
    margin-top: 0.5em;
}

.potter-sl__header-subtext {
    color: #ffffff;
    text-transform: none;
    line-height: 1.2;
    white-space: nowrap;
}

.potter-sl__top {
    text-align: left;
}

.potter-sl__top-left {
    width: 100%;
}

.potter-sl__top-right {
    display: none;
}

.potter-sl__top-right-img {
    display: block;
    width: 100%;
    height: auto;
    will-change: transform;
    transform-origin: center center;
}

.potter-sl__top-right-img--anim {
    animation: potterSlZoomBounce 8s ease-in-out infinite;
}

@keyframes potterSlZoomBounce {
    0%   { transform: scale(1); }
    14%  { transform: scale(1.14); }  
    22%  { transform: scale(1.08); } 
    30%  { transform: scale(1.12); }  
    38%  { transform: scale(1.10); }  
    64%  { transform: scale(1.10); }  

    70%  { transform: scale(1.16); }  
    76%  { transform: scale(1.08); } 
    80%  { transform: scale(1.10); }  
    100% { transform: scale(1.00); } 
}

.potter-sl__top-white,
.potter-sl__green-top {
    font-size: 55px;
    font-weight: 700;
    line-height: 1.4;
    max-width: 607px;
}

.potter-sl__top-white {
    margin-bottom: 8px;
}

.potter-sl__bottom {
    text-align: center;
}

.potter-sl__bottom-highlight {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 4px;
    margin-top: 50px;
}

.potter-sl__top-left .potter-sl__bottom-white {
    margin: 12px 0 0;
    max-width: 607px;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.85);
}

.potter-sl__btn,
.potter-sl__btn--top {
    display: inline-block;
    padding: 18px 60px;
    border-radius: 999px;
    text-decoration: none !important;
    color: #ffffff;
    font-weight: 800;
    font-size: 20px;
    text-transform: uppercase;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.5);
}

.potter-sl__btn:hover,
.potter-sl__btn:focus,
.potter-sl__btn:focus-visible,
.potter-sl__btn--top:hover,
.potter-sl__btn--top:focus,
.potter-sl__btn--top:focus-visible {
    background-color: #69b32f;
    color: #ffffff;
    text-decoration: none !important;
}

.potter-sl__btn--top {
    margin-top: 20px;
}

@media (max-width: 1023px) {
    /* Mobile: image below text, centered content */
    .potter-sl__top {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 18px;
    }

    .potter-sl__top-left {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .potter-sl__top-right {
        display: block;
        width: 100%;
        max-width: 520px;
        order: 2; /* ensure below text */
    }

    .potter-sl__top-right-img {
        margin-top: 34px;
        height: 300px;
        width: auto;
        margin-left: auto;
        margin-right: auto;
    }

    .potter-sl__top-white,
    .potter-sl__green-top {
        font-size: 35px;
        font-weight: 700;
        line-height: 1.3;
        max-width: 607px;
        text-align: center;
    }

    .potter-sl__top-left .potter-sl__bottom-white {
        font-size: 16px;
        text-align: center;
        margin-top: 10px;
    }

    .potter-sl__bottom-highlight {
        font-size: 28px;
        line-height: 1.2;
        text-shadow: 1px 1px 0 #696969d9;
    }

    .potter-sl__btn--top {
        align-self: center;
    }
}

@media (min-width: 1024px) {
    .potter-sl__overlay {
        padding: 56px 60px 40px;
    }

    .potter-sl__overlay--steps {
        padding-top: 48px;
        padding-bottom: 64px;
    }

    .potter-sl__top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 32px;
    }

    .potter-sl__top-left {
        flex: 0 1 640px;
    }

    .potter-sl__top-right {
        display: block;
        flex: 0 1 520px;
    }

    .potter-sl__top-right-img {
        max-width: 350px;
    }

    .potter-sl {
        min-height: 620px;
    }
}

.ast-page-builder-template .entry-content[data-ast-blocks-layout] > *:not(.wp-block-group):where(:not(.uagb-is-root-container):not(.spectra-is-root-container)) > * {
    max-width: unset;
}

a:hover, a:focus {
    color: white !important;
}

/* Full-width block layout */
body:has(.wp-block-acf-potter-sl) .ast-separate-container .ast-article-single,
body:has(.wp-block-acf-potter-sl) .ast-separate-container #primary,
.qp-has-potter-sl .ast-separate-container .ast-article-single,
.qp-has-potter-sl .ast-separate-container #primary {
    padding: 0 !important;
    margin: 0 !important;
}

body:has(.wp-block-acf-potter-sl) #content > .ast-container,
.qp-has-potter-sl #content.site-content > .ast-container,
.qp-has-potter-sl .site-content > .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body:has(.wp-block-acf-potter-sl) .entry-content[data-ast-blocks-layout] > *,
.qp-has-potter-sl .entry-content > * {
    max-width: unset;
}

/* Steps */
.potter-sl .steps {
    width: 100%;
    margin-top: 0;
}

.potter-sl .steps__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.potter-sl .step {
    width: 100%;
    display: flex;
}

.potter-sl .step__card {
    position: relative;
    width: 100%;
    max-width: 386px;
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 386 / 415;
    height: auto;
    box-sizing: border-box;
    flex: 1 1 auto;
}

.potter-sl .step__card > img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center center;
}

.potter-sl .step__body {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 48px 0 94px;
    text-align: center;
    pointer-events: none;
    box-sizing: border-box;
}

.potter-sl .step:nth-child(1) .step__body {
    top: 21px;
}

.potter-sl .step:nth-child(2) .step__body {
    top: 47px;
}

.potter-sl .step:nth-child(3) .step__body {
    top: 47px;
}

.potter-sl .step__badge {
    position: relative;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    background: radial-gradient(circle, #3a1a04 0%, #200303 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Nunito", sans-serif;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    border: 2px solid #e2bc8d;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.potter-sl .step__content {
    position: relative;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.potter-sl .step__name {
    margin: 0;
    padding: 0;
    width: 100%;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #200303;
    text-align: center;
}

.potter-sl .step__desc {
    margin: 0;
    padding: 0;
    width: 100%;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.45;
    color: #200303;
    text-align: center;
}

@media (max-width: 1023px) {
    .potter-sl .steps__grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .potter-sl .step {
        max-width: 386px;
        margin-left: auto;
        margin-right: auto;
    }

    .potter-sl .step__body {
        padding: 0 27px 0 63px;
    }

    .potter-sl .step:nth-child(1) .step__card {
        aspect-ratio: 386 / 460;
    }
    .potter-sl .step:nth-child(2) .step__card {
        aspect-ratio: 386 / 460;
    }
    .potter-sl .step:nth-child(3) .step__card {
        aspect-ratio: 386 / 480;
    }

    .potter-sl .step:nth-child(2) .step__card > img,
    .potter-sl .step:nth-child(3) .step__card > img {
        height: 100%;
    }

    .potter-sl .step__name {
        font-size: 22px;
    }

    .potter-sl .step__desc {
        font-size: 15px;
    }
}