/* Vertically center inner-page banner titles (all pages except homepage). */

body:not(.home) .rh_banner.rh_banner__image:not(.rh_banner__default_hide) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    position: relative;
    box-sizing: border-box;
}

body:not(.home) .rh_banner.rh_banner__image:not(.rh_banner__default_hide) .rh_banner__wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start;
    flex: 1 1 auto;
    width: 100%;
    margin: 0 auto;
    min-height: 30rem;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box;
}

/* Small devices: column layout needs justify-content for vertical centering. */
@media (max-width: 766px) {
    body:not(.home) .rh_banner.rh_banner__image:not(.rh_banner__default_hide) .rh_banner__wrap {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: flex-start !important;
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

@media (min-width: 767px) and (max-width: 1023px) {
    body:not(.home) .rh_banner.rh_banner__image:not(.rh_banner__default_hide) .rh_banner__wrap {
        flex-direction: row;
        justify-content: space-between;
    }
}

/*
 * Desktop static pages: fill the banner below the overlapping header and
 * nudge with the padding-top value verified in DevTools.
 */
@media (min-width: 1024px) {
    body:not(.home) .rh_header + .rh_banner.rh_banner__image:not(.rh_banner__default_hide) {
        position: relative !important;
    }

    body:not(.home) .rh_header + .rh_banner.rh_banner__image:not(.rh_banner__default_hide) .rh_banner__wrap {
        position: absolute !important;
        left: 0;
        right: 0;
        top: 11rem;
        bottom: 0;
        width: 100%;
        max-width: none;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        flex: none !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding-top: 41px !important;
        padding-bottom: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (min-width: 1280px) {
    body:not(.home) .rh_header + .rh_banner.rh_banner__image:not(.rh_banner__default_hide) .rh_banner__wrap {
        top: 10rem;
        padding-top: 41px !important;
    }
}

/* CMS pages: spacer banner already clears the header — center in full image banner. */
@media (min-width: 1024px) {
    body:not(.home) .rh_banner.rh_banner__default + .rh_banner.rh_banner__image:not(.rh_banner__default_hide) {
        position: relative !important;
    }

    body:not(.home) .rh_banner.rh_banner__default + .rh_banner.rh_banner__image:not(.rh_banner__default_hide) .rh_banner__wrap {
        position: absolute !important;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        flex: none !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        box-sizing: border-box !important;
    }
}
