.image-with-text-wrapper .image-with-text__container:not(.wrapper-spacing--h) {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: var(--padding-section-top) !important;
    margin-bottom: var(--padding-section-bottom) !important;
}

.image-with-text-wrapper .homepage-featured-content-box-inner {
    padding: 48px 24px;
}

.image-with-text-wrapper .homepage-content--image {
    padding: 0;
    margin: 0;
}

.image-with-text-wrapper .homepage-content--image.large--one-half {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
}

.image-with-text-wrapper .homepage-content--image .icon--placeholder {
    border: 0;
    height: 500px;
}

.image-with-text-wrapper .featured-row__subtext p {
    margin-top: 16px;
}

.image-with-text-wrapper .featured-row__subtext p:first-child {
    margin-top: 0;
}

.image-with-text-wrapper .rte {
    margin-bottom: 0;
}

.image-with-text-wrapper .rte:not(:last-child) {
    margin-bottom: 16px;
}

.image-with-text-wrapper .homepage-featured-box-btn {
    margin: 0;
}

.homepage-featured-box-btn {
    float: none;
}

.feature-row__text--right {
    flex-direction: row-reverse;
}

.feature-row__text--right .homepage-featured-content-box {
    left: 0;
}

/* --- Aspect Ratio Controls & Fixes --- */
.image-with-text-wrapper .img {
    aspect-ratio: 3 / 2;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.image-with-text-wrapper .img .responsive-image-wrapper,
.image-with-text-wrapper .img img,
.image-with-text-wrapper .img svg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    padding-top: 0 !important; /* Overrides native theme responsive image padding */
}

/* --- Twin Button Layout --- */
.hero-buttons-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}


@media (max-width: 809px) {
    .image-with-text-wrapper .image-with-text__container:not(.wrapper-spacing--h) {
        margin-top: 0 !important;
        margin-bottom: calc(var(--padding-section-bottom) * .75) !important;
    }

    /* Fixed Alignment Including H1 Override */
    .feature-row__text-alignment-mobile--left .homepage-featured-box-btn,
    .feature-row__text-alignment-mobile--left a,
    .feature-row__text-alignment-mobile--left div,
    .feature-row__text-alignment-mobile--left h1.homepage-sections--title,
    .feature-row__text-alignment-mobile--left h2.homepage-sections--title,
    .feature-row__text-alignment-mobile--left p {
        text-align: left !important;
    }
    .feature-row__text-alignment-mobile--center .homepage-featured-box-btn,
    .feature-row__text-alignment-mobile--center a,
    .feature-row__text-alignment-mobile--center div,
    .feature-row__text-alignment-mobile--center h1.homepage-sections--title,
    .feature-row__text-alignment-mobile--center h2.homepage-sections--title,
    .feature-row__text-alignment-mobile--center p {
        text-align: center !important;
    }
    .feature-row__text-alignment-mobile--right .homepage-featured-box-btn,
    .feature-row__text-alignment-mobile--right a,
    .feature-row__text-alignment-mobile--right div,
    .feature-row__text-alignment-mobile--right h1.homepage-sections--title,
    .feature-row__text-alignment-mobile--right h2.homepage-sections--title,
    .feature-row__text-alignment-mobile--right p {
        text-align: right !important;
    }

    .feature-row__text--right .homepage-featured-content-box {
        margin-top: 0;
    }
    .feature-row--overlapping .homepage-featured-content-box {
        background: unset;
        float: right;
    }
    .feature-row--no-overlapping .feature_row__image_wrapper {
        float: right;
    }

    /* Button Alignment Override */
    .feature-row__text-alignment-mobile--left .hero-buttons-wrapper { justify-content: flex-start !important; }
    .feature-row__text-alignment-mobile--center .hero-buttons-wrapper { justify-content: center !important; }
    .feature-row__text-alignment-mobile--right .hero-buttons-wrapper { justify-content: flex-end !important; }

    /* Hide Image Toggle */
    .hide-image-on-mobile .homepage-content--image {
        display: none !important;
    }
    .hide-image-on-mobile.feature-row--overlapping .feature_row__image_wrapper {
        position: relative !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        margin: 0 !important;
    }

    /* Square Image on Mobile */
    .image-with-text-wrapper .img {
        aspect-ratio: 1 / 1 !important;
    }
}

@media (min-width: 810px) {
    .image-with-text-wrapper .feature-row--no-overlapping .homepage-featured-content-box-inner {
        padding: 0;
        width: max-content;
        max-width: 75%;
        margin: 0 auto;
    }
    .image-with-text-wrapper .homepage-content--image .icon--placeholder {
        height: 550px;
    }
    
    /* Fixed Alignment Including H1 Override */
    .feature-row__text-alignment--left .homepage-featured-box-btn,
    .feature-row__text-alignment--left a,
    .feature-row__text-alignment--left div,
    .feature-row__text-alignment--left h1.homepage-sections--title,
    .feature-row__text-alignment--left h2.homepage-sections--title,
    .feature-row__text-alignment--left p {
        text-align: left !important;
    }
    .feature-row__text-alignment--center .homepage-featured-box-btn,
    .feature-row__text-alignment--center a,
    .feature-row__text-alignment--center div,
    .feature-row__text-alignment--center h1.homepage-sections--title,
    .feature-row__text-alignment--center h2.homepage-sections--title,
    .feature-row__text-alignment--center p {
        text-align: center !important;
    }
    .feature-row__text-alignment--right .homepage-featured-box-btn,
    .feature-row__text-alignment--right a,
    .feature-row__text-alignment--right div,
    .feature-row__text-alignment--right h1.homepage-sections--title,
    .feature-row__text-alignment--right h2.homepage-sections--title,
    .feature-row__text-alignment--right p {
        text-align: right !important;
    }

    /* Button Alignment Override */
    .feature-row__text-alignment--left .hero-buttons-wrapper { justify-content: flex-start !important; }
    .feature-row__text-alignment--center .hero-buttons-wrapper { justify-content: center !important; }
    .feature-row__text-alignment--right .hero-buttons-wrapper { justify-content: flex-end !important; }

    .image-with-text__container:not(.wrapper-spacing--h) .feature-row__text--right .homepage-featured-content-box {
        margin-left: 60px;
        border-radius: var(--block-border-radius);
    }
    .image-with-text__container:not(.wrapper-spacing--h) .feature-row__text--left .homepage-featured-content-box {
        margin-right: 60px;
        border-radius: var(--block-border-radius);
    }
    .feature-row--overlapping .feature-row__text--left .homepage-featured-content-box {
        border-top-left-radius: var(--block-border-radius);
        border-bottom-left-radius: var(--block-border-radius);
    }
    .feature-row--overlapping .feature-row__text--right .homepage-featured-content-box {
        border-top-right-radius: var(--block-border-radius);
        border-bottom-right-radius: var(--block-border-radius);
    }
    .feature-row--overlapping .homepage-featured-content-box {
        width: max-content;
        max-width: 50%;
    }
    .feature-row--overlapping .homepage-featured-content-box-inner {
        padding: 32px;
    }
    .feature-row--no-overlapping .feature_row__image_wrapper {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .feature-row--no-overlapping .homepage-featured-content-wrapper {
        display: flex;
    }
}