.custom-page-hero{
	overflow: hidden;
	position: relative;
}

:is(.home) .custom-page-hero {
    margin: var(--row-gap) auto;
}

.custom-page-hero.alignfull{
    width: 100%;
    max-width: 100%;
}

.custom-page-hero-slide{
    position: relative;
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 50% minmax(0, 1fr);
    grid-auto-flow: dense;
    align-items: center;
    justify-content: center;
    max-width: var(--wide-width);
}

.custom-page-hero-slide:not(:has(.custom-page-hero-media)) {
    padding-top: 0;
}

.custom-page-hero-slide:not(:has(.custom-page-hero-media)) .custom-page-hero-wrapper {
    width: 100%;
}

.custom-page-hero-slide:not(:has(.custom-page-hero-media)) {
    grid-template-columns: minmax(0, 1fr);
}

.custom-page-hero:is([data-push-media="1"]) .custom-page-hero-slide {
    max-width: 100%;
}

.custom-page-hero-inner {
    display: flex;
    flex-direction: column;
    column-gap: var(--column-gap);
    row-gap: var(--title-and-body-gap);
}

.custom-page-hero-inner-title,
.custom-page-hero-inner-content{
    display: flex;
    flex-direction: column;
    gap: var(--body-and-buttons-gap);
}

.custom-page-hero .custom-page-hero-title h1{
    font: var(--font-headline-0);
    letter-spacing: -0.03em;
    max-width: 120rem;

    @media not all and (min-width: 768px) {
      font-size: 5.6rem;
      text-wrap: balance;
    }
}

.custom-page-hero .custom-page-hero-title :is(h1, strong) {
    font-weight: var(--secondary-font-weight);
    margin-bottom: 0;

    @media (max-width: 767px) {
        font: var(--font-headline-2);
        overflow-wrap: break-word;
    }
}

.custom-page-hero .custom-page-hero-media{
    pointer-events: none;
    width: 100%;
    height: 100%;
    margin-top: auto;
}

.custom-page-hero .custom-page-hero-image {
    width: 100%;
    height: 100%;
    max-height: 60rem;
}

.custom-page-hero .custom-page-hero-slide:has(.custom-page-hero-image-bleed) {
    max-width: 100%;
    padding: var(--block-margin) 0;
    display: flex;
    align-items: center;
}

.custom-page-hero .custom-page-hero-slide:has(.custom-page-hero-image-bleed) .custom-page-hero-wrapper {
    padding: 0;
    width: 100%;
    max-width: var(--wide-width);
    margin: 0 auto;
}

.custom-page-hero .custom-page-hero-slide:has(.custom-page-hero-image-bleed) .custom-page-hero-media {
    margin: auto;
}

.custom-page-hero .custom-page-hero-slide:has(.custom-page-hero-image-center) {
    padding: var(--block-margin) 0;   
}

.custom-page-hero .custom-page-hero-slide:has(.custom-page-hero-image-center) .custom-page-hero-wrapper {
    padding: 0;
}

.custom-page-hero .custom-page-hero-slide:has(.custom-page-hero-image-center) .custom-page-hero-media {
    display: flex;
    align-items: center;
}

.custom-page-hero-image img,
.custom-page-hero-video-player img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom;

    @media (min-width: 768px) and (max-width: 992px) {
        object-position: center;
    }
}

.custom-page-hero-wrapper{
    margin: 0;
    padding: var(--block-margin) 0;
    position: relative;
}

:is(.custom-page-hero-inner, .custom-page-hero-inner-title, .custom-page-hero-inner-content)>*:last-child{
    margin-bottom: 0;
}

.custom-page-hero-breadcrumbs{
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    column-gap: 0.5rem;
    row-gap: var(--item-row-gap);

    @media (max-width: 767px) {
        row-gap: 0.8rem;
    }
}

.custom-page-hero-breadcrumbs li{
    display: flex;
    list-style: none;
    align-items: baseline;
}

.custom-page-hero-breadcrumbs li:not(:first-child):before{
    content: '';
    display: block;
    width: 0.8rem;
    height: 0.8rem;
    margin: 0 0.8rem 0 0;
    border-top: 0.2rem solid;
    border-right: 0.2rem solid;
    transform: translateY(-0.2rem) rotateZ(45deg);
    flex-shrink: 0;
}

.custom-page-hero-breadcrumbs li a{
    text-decoration-color: transparent;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.custom-page-hero-breadcrumbs li a:hover{
    text-decoration-color: var(--link-color);
    color: var(--link-color);
    transition: all 0.3s ease;
}

.custom-page-hero-breadcrumbs li:last-child{
    font-weight: 700;
}

.custom-page-hero-content p {
    font-size: 1.8rem;
    line-height: 1.5;
}

.custom-page-hero-content p:is(:only-child, :last-child) {
    margin-bottom: 0;
}

.custom-page-hero-buttons{
    display: flex;
    flex-wrap: wrap;
    gap: var(--buttons-gap);
    align-items: center;
}

@media (max-width: 767px){
    .custom-page-hero {
        max-width: var(--wide-width);
    }
    
    .custom-page-hero-breadcrumbs li:is(:last-child):not(:first-child, :nth-child(2), :nth-child(3))::before {
        margin-left: 0;
    }

    .custom-page-hero-slide {
        grid-template-columns: minmax(0, 1fr);
        row-gap: var(--item-row-gap);
    }

    .custom-page-hero .custom-page-hero-slide:has(.custom-page-hero-image) .custom-page-hero-wrapper {
        padding: 4rem 0 0;
    }

    .custom-page-hero .custom-page-hero-slide:has(.custom-page-hero-image-bleed) {
        display: flex;
        flex-direction: column;
    } 
}

@media (min-width: 768px){
    .custom-page-hero[data-media-position="right"] .custom-page-hero-media{
        order: 2;
        display: flex;
        align-items: flex-end;
    }

    .custom-page-hero .custom-page-hero-slide:has(.custom-page-hero-image-bleed){
        display: grid;
    }

    .custom-page-hero .custom-page-hero-slide:has(.custom-page-hero-image-bleed) .custom-page-hero-wrapper{
        width: auto;
        max-width: 100%;
    }

    .custom-page-hero[data-media-position="left"] .custom-page-hero-slide:has(.custom-page-hero-image-bleed) .custom-page-hero-wrapper{
        margin-right: calc( 50vw - var(--wide-width) / 2 );;
    }

    .custom-page-hero[data-media-position="right"] .custom-page-hero-slide:has(.custom-page-hero-image-bleed) .custom-page-hero-wrapper{
        margin-left: calc( 50vw - var(--wide-width) / 2 );;
    }

    .custom-page-hero-inner[data-columns="2"]{
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .custom-page-hero-inner[data-columns="2"] .custom-page-hero-inner-title{
        align-self: start;
    }

    .custom-page-hero-inner[data-columns="2"] .custom-page-hero-inner-content{
        align-self: end;
    }

    .custom-page-hero-content:is([data-content-width="50"]) {
        max-width: calc(var(--wide-width) / 2);
    }

    .custom-page-hero-content:is([data-content-width="70"]) {
        max-width: calc(var(--wide-width) * 0.7);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .custom-page-hero {
        height: auto;
        padding-top: var(--item-row-gap);
    }

    .custom-page-hero .custom-page-hero-title h1 {
        font: var(--font-headline-4);
    }
}

@media (max-width: 991px) {
    .custom-page-hero .custom-page-hero-media {
        order: 2;
    }
}