/*
 * Consistent static-page heroes.
 * Scoped to six custom templates; product, category, blog and case-study layouts
 * remain untouched.
 */

body.hp-audit-static-hero :is(
    .hpc-hero,
    .hp-hero,
    .rp-hero,
    .tc-hero,
    .rtn-hero,
    .dp-hero
) {
    padding-top: 24px !important;
    padding-bottom: 36px !important;
}

body.hp-audit-static-hero :is(
    .hpc-container,
    .hp-hero-inner,
    .rp-hero-inner,
    .tc-hero-inner,
    .rtn-hero-inner,
    .dp-container
) > nav.hp-site-breadcrumb {
    margin-top: 0 !important;
    margin-bottom: 22px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

body.hp-audit-static-hero :is(
    .hpc-hero__inner,
    .hp-hero-body,
    .rp-hero-body,
    .tc-hero-body,
    .rtn-hero-body,
    .dp-hero__inner
) {
    align-items: flex-start !important;
    gap: 48px !important;
    margin-top: 0 !important;
}

body.hp-audit-static-hero :is(
    .hpc-hero__content,
    .hp-hero-text,
    .rp-hero-text,
    .tc-hero-text,
    .rtn-hero-text,
    .dp-hero__content
) {
    box-sizing: border-box;
    flex: 1 1 0 !important;
    max-width: 540px !important;
    min-width: 0;
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 28px !important;
}

body.hp-audit-static-hero :is(
    .hpc-hero__content,
    .hp-hero-text,
    .rp-hero-text,
    .tc-hero-text,
    .rtn-hero-text,
    .dp-hero__content
) > h1 {
    margin-top: 0 !important;
}

body.hp-audit-static-hero :is(
    .hpc-hero__image,
    .hp-hero-img,
    .rp-hero-img,
    .tc-hero-img,
    .rtn-hero-img,
    .dp-hero__image
) {
    box-sizing: border-box;
    flex: 1 1 0 !important;
    width: 100% !important;
    max-width: 520px !important;
    min-width: 0;
    height: 340px;
    margin: 0 !important;
    overflow: hidden !important;
    align-items: center !important;
    justify-content: center !important;
}

body.hp-audit-static-hero :is(
    .hpc-hero__image,
    .hp-hero-img,
    .rp-hero-img,
    .tc-hero-img,
    .rtn-hero-img,
    .dp-hero__image
) > img {
    position: static !important;
    top: auto !important;
    left: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: 500px !important;
    height: 340px !important;
    max-height: 340px !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    transform-origin: center !important;
}

@media (max-width: 900px) {
    body.hp-audit-static-hero :is(
        .hpc-hero__inner,
        .hp-hero-body,
        .rp-hero-body,
        .tc-hero-body,
        .rtn-hero-body,
        .dp-hero__inner
    ) {
        gap: 28px !important;
    }

    body.hp-audit-static-hero :is(
        .hpc-hero__image,
        .hp-hero-img,
        .rp-hero-img,
        .tc-hero-img,
        .rtn-hero-img,
        .dp-hero__image
    ) {
        height: 300px;
    }

    body.hp-audit-static-hero :is(
        .hpc-hero__image,
        .hp-hero-img,
        .rp-hero-img,
        .tc-hero-img,
        .rtn-hero-img,
        .dp-hero__image
    ) > img {
        height: 300px !important;
        max-height: 300px !important;
    }
}

@media (max-width: 768px) {
    body.hp-audit-static-hero :is(
        .hpc-hero,
        .hp-hero,
        .rp-hero,
        .tc-hero,
        .rtn-hero,
        .dp-hero
    ) {
        padding-top: 24px !important;
        padding-bottom: 32px !important;
        height: auto !important;
        min-height: 0 !important;
    }

    body.hp-audit-static-hero :is(
        .hpc-container,
        .hp-hero-inner,
        .rp-hero-inner,
        .tc-hero-inner,
        .rtn-hero-inner,
        .dp-container
    ) > nav.hp-site-breadcrumb {
        margin-bottom: 20px !important;
        padding-top: 9px !important;
    }

    body.hp-audit-static-hero :is(
        .hpc-hero__inner,
        .hp-hero-body,
        .rp-hero-body,
        .tc-hero-body,
        .rtn-hero-body,
        .dp-hero__inner
    ) {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding-top: 0 !important;
        gap: 20px !important;
    }

    body.hp-audit-static-hero :is(
        .hpc-hero__content,
        .hp-hero-text,
        .rp-hero-text,
        .tc-hero-text,
        .rtn-hero-text,
        .dp-hero__content
    ) {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    body.hp-audit-static-hero :is(
        .hpc-hero__image,
        .hp-hero-img,
        .rp-hero-img,
        .tc-hero-img,
        .rtn-hero-img,
        .dp-hero__image
    ) {
        max-width: 100% !important;
        height: 240px;
        margin-top: 8px !important;
    }

    body.hp-audit-static-hero :is(
        .hpc-hero__image,
        .hp-hero-img,
        .rp-hero-img,
        .tc-hero-img,
        .rtn-hero-img,
        .dp-hero__image
    ) > img {
        width: 100% !important;
        max-width: 440px !important;
        height: 240px !important;
        max-height: 240px !important;
    }
}
