/* Viewport-Responsive Hero Custom Properties */
:root {
    --hero-height-min: 600px;
    --hero-height-preferred: 60vh;
    --hero-height-max: 700px;
    --hero-content-width-min: 320px;
    --hero-content-width-preferred: 35%;
    --hero-content-width-max: 600px;
    --hero-callout-width-min: 350px;
    --hero-callout-width-preferred: 25vw;
    --hero-callout-width-max: 450px;
    --hero-callout-height-min: 180px;
    --hero-callout-height-preferred: 15vh;
    --hero-callout-height-max: 230px;
}

/* Base wrapper styles for all heroes */
.hero-section-wrapper {
    width: 100%;
    position: relative;
    z-index: 5; /* Ensure this is lower than header z-index */
}

/* Secondary hero wrapper styles - curved bottom and background */
.hero-section-wrapper.secondary {
    background-color: var(--color-white);
    border-bottom-left-radius: 300% 150px;
    border-bottom-right-radius: 300% 150px;
    clip-path: inset(0 0 -150px 0); /* Ensures the curved edge is visible */
    z-index: 15; /* Ensure this is lower than header z-index */
}

/* Hero Section Base */
.hero-section {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: visible; 
    /* Viewport-responsive padding with bounds */
    padding-bottom: clamp(40px, 8vh, 80px);
    padding-top: clamp(80px, 12vh, 140px);
    /* Ensure full viewport coverage on larger screens */
    min-height: 100vh;
    background-color: var(--color-white);
}

.hero-container {
    position: relative;
    width: 100%;
}

/* Hero Image */
.hero-image-container {
    position: relative;
    width: 100%;
    z-index: 1;
}

.hero-image {
    width: 100%;
    margin: 0;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-image-container .mobile-image {
    display: none;
}

/* Hero Top Section */
.hero-top {
    position: relative;
    height: clamp(var(--hero-height-min), var(--hero-height-preferred), var(--hero-height-max));
    margin-bottom: 30px;
}

/* Carousel */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--color-nav-gray);
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    margin: 0;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Carousel Indicator */
.carousel-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.indicator-wrapper {
    cursor: pointer;
}

.indicator-wrapper svg {
    display: block;
}

.indicator-line {
    transition: all 0.3s ease-in-out;
    pointer-events: all;
}

/* Hero Carousel Disclaimer */
.hero-carousel-disclaimer {
    position: absolute;
    bottom: 20px; /* Adjust as needed */
    font-size: 1.0rem; /* 10px */
    line-height: 1.2rem; /* 12px */
    color: var(--color-white);
    transition: all 0.3s ease-in-out;
    z-index: 10;
}

/* Position classes */
.hero-carousel-disclaimer.position-left {
    right: 5%;
}

.hero-carousel-disclaimer.position-right {
    left: 3%;
}

/* Fade animation */
.hero-carousel-disclaimer.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Hero Content */
.hero-content {
    position: absolute;
    top: 50%;
    right: 15%;
    transform: translateY(-50%);
    /* Viewport-responsive width with bounds */
    width: clamp(var(--hero-content-width-min), var(--hero-content-width-preferred), var(--hero-content-width-max));
    color: white;
    z-index: 2;
    text-align: center;
    /* Smooth transitions for positioning */
    transition: opacity 0.3s ease-in-out, left 0.5s ease-in-out, right 0.5s ease-in-out;
}

/* Hero Content - Left Positioning */
.hero-content.position-left {
    left: 15%;
    right: auto;
}

/* Hero Content - Right Positioning (default) */
.hero-content.position-right {
    right: 15%;
    left: auto;
}

/* Hero Content - Fade states for transitions */
.hero-content.fade-out {
    opacity: 0;
}

.hero-content.fade-in {
    opacity: 1;
}

.hero-content h1 {
    /* Viewport-responsive margin scaling */
    margin: 0 0 clamp(25px, 5vh, 50px);
    font-size: var(--font-size-h1);
    line-height: var(--font-lh-h1);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content h1 .big {
    font-size: var(--font-size-h1-big);
    line-height: var(--font-lh-h1-big);
    position: relative;
    font-weight: 700;
    margin: 20px 0;
    display: inline-block;
    padding: 0;
}

.hero-content h1 .big .blue-text {
    color: var(--color-blue);
}

.hero-content h1 .big .hero-border-top,
.hero-content h1 .big .hero-border-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 6px;
    color: var(--color-blue);
}

.hero-content h1 .big .hero-border-top {
    top: 0;
}

.hero-content h1 .big .hero-border-bottom {
    bottom: 0;
}

.hero-content h2 {
    margin: 0;
    font-size: var(--font-size-h2);
    line-height: var(--font-lh-h2);
    color: var(--color-yellow);
    font-weight: 600;
}

.hero-content p {
    margin: 0 0 20px;
    font-size: var(--font-size-body);
    line-height: var(--font-lh-body);
}

/* Hero Bottom Section */
.hero-bottom {
    padding: 120px 0 120px;
    background-color: var(--wp--preset--color--background);
    position: relative;
    z-index: 4; /* Ensure proper stacking with other sections */
}

.text-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 945px;
    margin: 0px auto;
    padding: 50px 0;
    position: relative;
}

.text-content::before,
.text-content::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3.5px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.text-content::before {
    top: 0;
    background-image: url('/wp-content/uploads/static/tapered-top-border-blue.svg');
}

.text-content::after {
    bottom: 0;
    background-image: url('/wp-content/uploads/static/tapered-bottom-border-blue.svg');
}

.left-text-container,
.right-text-container {
    position: relative;
    flex: 1;
    height: 100%;
}

.left-text {
    text-align: right;
    padding-right: 160px;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    margin: 0;
    font-size: var(--font-size-h3);
    line-height: var(--font-lh-h3);
}

.right-text {
    text-align: left;
    padding-left: 160px;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    margin: 0;
    font-size: var(--font-size-h3);
    line-height: var(--font-lh-h3);
}

.left-text.active,
.right-text.active {
    opacity: 1;
}

.center-images-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.center-image {
    width: 299px;
    height: 322px;
    margin: 0;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -55%);
    z-index: 2;
    background: var(--wp--preset--color--background);
    box-shadow: 0 0 0 20px var(--wp--preset--color--background);
    opacity: 0;
    transition: opacity 0.1s ease-out delay(0.4s);
}

.center-image.active {
    opacity: 1;
}

.center-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding-bottom: 0;
}

.disclaimer-text-container {
    position: absolute;
    bottom: -110px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.disclaimer-text-container .disclaimer-text{
    font-size: 10px;
}

/* Hero Copy Section */
.hero-copy {
    padding: 0px 0 20px;
    background-color: var(--color-white);
    position: relative;
    margin-top: 0px;
    z-index: 4; 
}

.copy-content {
    max-width: 1177px;
    margin: 0 auto;
    padding: 0;
    text-align: center;
}

/* Scope image-title-container to hero only */
.hero-copy .image-title-shadow-wrapper {
    position: relative;
    max-width: 1140px;
    margin: 0 auto 35px;
    filter: drop-shadow(0px 6px 12px rgba(0, 0, 0, 0.5));
}

.hero-copy .image-title-container {
    position: relative;
    background-color: var(--color-red);
    width: 100%;
    height: 115px;
    clip-path: var(--clip-path-headline-bowl);
}

.hero-copy .image-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    margin: 0;
    color: var(--color-white);
    font-size: var(--font-size-h2-bow);
    line-height: var(--font-lh-h2-bow);
    font-weight: 600;
    text-align: center;
    width: 100%;
}

/* Removed .background-image-svg class in favor of clip-path solution */

.red-title {
    margin: 0 0 25px;
    color: var(--color-red);
    font-size: var(--font-size-h3);
    line-height: var(--font-lh-h3);
    font-weight: 700;
}

.bold-copy {
    margin: 0 0 25px;
    font-size: var(--font-size-important-text);
    line-height: var(--font-lh-important-text);
    font-weight: 700;
}

.regular-copy {
    margin: 0 0 25px;
    font-size: var(--font-size-important-text);
    line-height: var(--font-lh-important-text);
    font-weight: 400;
}

/* Hero Secondary Styles */
.hero-secondary {
    position: relative;
    height: 375px;
    padding: 220px 0 0px; /* Add back some bottom padding to ensure content doesn't overlap mask */
    background-color: var(--color-nav-gray);
    color: var(--color-white);
    margin-bottom: -100px; /* Pull the next content section up to hide the overlap */
    z-index: 1;
    min-height: unset;
    /* Safari-specific layout fixes */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Ensure proper box model calculation */
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

/* Add a separate container for the bottom mask effect */
.hero-secondary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px; /* Match subnav panel height */
    background-color: var(--color-nav-gray);
    -webkit-mask-image: url(#subnav-shape-mask);
    mask-image: url(#subnav-shape-mask);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: bottom center;
    mask-position: bottom center;
    transform: translateY(149px); /* Position the mask at the bottom edge */
    z-index: 2;
}

/* Blue variant for hero-secondary */
.hero-secondary.blue {
    background: var(--color-blue-gradient);
    padding-top: 270px;
    height: 540px;
    margin-bottom: -210px;
    /* Safari-specific fixes */
    -webkit-transform: translateZ(0); /* Force hardware acceleration */
    transform: translateZ(0);
    /* Ensure proper height calculation in Safari */
    min-height: 540px;
    max-height: 540px;
    /* Alternative gradient approach for Safari */
    background: -webkit-linear-gradient(to bottom, #29AAE1, #1C7399);
    background: linear-gradient(to bottom, #29AAE1, #1C7399);
}

/* Remove the old ::after pseudo element for blue variant */
.hero-secondary.blue::after {
    display: none;
}

/* Bottom curve container - positioned relative to main wrapper */
.bottom-curve-container {
    position: absolute;
    bottom: -34px;
    left: 0;
    right: 0;
    height: 35px;
    overflow: hidden;
    z-index: 3;
    /* Safari-specific positioning fix */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.bottom-curve {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    -webkit-mask-image: url(#subnav-shape-mask);
    mask-image: url(#subnav-shape-mask);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: bottom center;
    mask-position: bottom center;
    z-index: 3;
    /* Safari-specific mask rendering fix */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.bottom-curve-container:not(.blue) .bottom-curve {
    background-color: var(--color-yellow);
}

.bottom-curve-container.blue .bottom-curve {
    background-color: var(--color-blue-dark);
    /* Safari-specific background fix */
    background: -webkit-linear-gradient(to bottom, #1C7399, #1C7399);
    background: linear-gradient(to bottom, #1C7399, #1C7399);
    /* Ensure consistent positioning with regular variant */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.hero-content-secondary {
    position: relative;
    max-width: 1177px;
    margin: 0 auto;
    padding: 0 30px 20px; /* Reduce bottom padding since we've added it to the parent */
    text-align: center;
    z-index: 3; /* Ensure content stays above the mask */
}

.hero-secondary.blue .hero-content-secondary {
    max-width: unset;
    padding: 0 0 20px;
}

.title-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    width: 100%;
}

/* Hero Secondary Title Styles - Scoped to secondary heroes only */
.hero-secondary .hero-title {
    margin: 0 auto;
    font-size: var(--font-size-hero-headline);
    line-height: var(--font-lh-hero-headline);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-transform: uppercase;
}

.hero-secondary .hero-title .small {
    font-size: var(--font-size-hero-headline);
    line-height: var(--font-lh-hero-headline);
    color: var(--color-yellow);
    margin: 0;
}

.hero-secondary .hero-title .big {
    color: var(--color-white);
    font-size: var(--font-size-hero-headline-big);
    line-height: var(--font-lh-hero-headline-big);
    position: relative;
    font-weight: 600;
    margin: 40px auto;
    display: inline-block;
    text-align: center;
    width: auto; /* Allow width to be determined by content */
    padding: 0 20px; /* Add slight padding for visual spacing */
    min-width: 800px;
}

.hero-secondary .hero-title .big::before,
.hero-secondary .hero-title .big::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 8.4px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    width: 100%; /* Ensure border covers full width of text */
    color: var(--color-blue); /* Default color for HCP */
}

.hero-secondary .hero-title .big::before {
    top: -25px;
    background-image: url('/wp-content/uploads/static/tapered-top-border-hero-secondary-blue.svg');
    background-position: center top;
}

.hero-secondary .hero-title .big::after {
    bottom: -25px;
    background-image: url('/wp-content/uploads/static/tapered-bottom-border-hero-secondary-blue.svg');
    background-position: center bottom;
}

/* Blue variant for hero-title */
.hero-secondary.blue .hero-title .small {
    color: var(--color-white);
    font-size: var(--font-size-hero-headline-blue);
    line-height: var(--font-lh-hero-headline-blue);
    margin-top: 20px;
}

.hero-secondary.blue .hero-title .big {
    font-size: var(--font-size-hero-headline-big-blue);
    line-height: var(--font-lh-hero-headline-big-blue);
    margin-top: 0;
    font-weight: 700;
}

.hero-secondary.blue .hero-title .big::before {
    background-image: none
}

.hero-secondary.blue .hero-title .big::after {
    background-image: none;
}

/* Responsive Styles */
@media screen and (max-width: 1599px) {
    /* Adjust viewport scaling for smaller large screens */
    :root {
        --hero-height-preferred: 55vh;
        --hero-height-max: 600px;
        --hero-callout-width-preferred: 23vw;
        --hero-callout-height-preferred: 12vh;
    }

    .hero-top {
        position: relative;
        height: clamp(450px, var(--hero-height-preferred), var(--hero-height-max));
        margin-bottom: 30px;
    }

    .hero-content{
        top: 55%;
        right: 10%;
    }

    .hero-content.position-left {
        left: 7%;
        right: auto;
    }

    .hero-content.position-right {
        right: 7%;
        left: auto;
    }

    .hero-content p{
        margin: 0 0 10px
    }

    .hero-content h1{
        margin: 0 0 20px;
    }

    .hero-content-inner {
        padding: 13% 0 7%;
    }

    .hero-content-inner h1 {
        line-height: 8.5rem;
    }

    .hero-content-inner p {
        line-height: 2.4rem;
    }

    .hero-content-top p{
        width: 350px;
    }
    
    .hero-content-top p:last-of-type {
        width: 430px;
    }

    .hero-callout {
        /* Override with specific values for this breakpoint */
        width: clamp(300px, 23vw, 370px);
        height: clamp(150px, 12vh, 185px);
    }

    .hero-callout .callout-link a {
        line-height: 3.6rem;
    }

    .hero-content-bottom p {
        line-height: 1.5rem;
    }
}

@media screen and (max-width: 1365px) {
    /* Further adjust viewport scaling for medium screens */
    :root {
        --hero-height-preferred: 50vh;
        --hero-height-max: 525px;
        --hero-callout-width-preferred: 20vw;
    }

    .hero-content-inner {
        padding: 15% 0 4%;
    }

    .hero-content-inner h1 {
        line-height: 6.5rem;
        width: 85%;
        margin: 0 auto 2%;
    }

    .hero-content-inner p {
        line-height: 2.2rem;
    }

    .hero-content-top p{
        width: 260px;
    }
    
    .hero-content-top p:last-of-type {
        width: 320px;
    }

    .hero-callout {
        width: clamp(240px, 20vw, 300px);
        height: clamp(125px, 10vh, 150px);
        /* Adjust positioning for smaller viewport */
        top: calc(var(--hero-height-preferred) + 5vh);
    }

    .hero-callout.fixed {
        margin-top: var(--header-height);
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    .hero-callout::after {
        bottom: 7px;
        width: 16px;
        height: 6px;
    }

    .hero-callout .callout-link a {
        line-height: 2.4rem;
    }

    .hero-content-bottom p {
        line-height: 1.5rem;
    }

    /* Hero Copy responsive */
    .hero-copy .image-title {
        font-size: calc(var(--font-size-h2));
    }
    
    .red-title {
        font-size: calc(var(--font-size-h3));
    }
    
    .bold-copy,
    .regular-copy {
        font-size: var(--font-size-important-text);
        line-height: var(--font-lh-important-text);
    }

    .hero-copy .background-image-svg {
        height: 100px;
        max-width: 1000px;
        background-size: 100% 98px;
    }
}

@media screen and (max-width: 1024px) {
    /* Adjust viewport scaling for tablet/small desktop */
    :root {
        --hero-height-preferred: 45vh;
        --hero-height-max: 450px;
        --hero-height-min: 400px;
    }

    .hero-section {
        /* Remove full height constraint on tablet */
        /* Safari-specific fix - avoid min-height: auto */
        min-height: 400px;
        padding-top: 60px;
        /* Safari-specific rendering fixes */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    /* Keep the original carousel layout but adjust positioning */
    .hero-top {
        position: relative;
        height: clamp(var(--hero-height-min), var(--hero-height-preferred), var(--hero-height-max));
        margin-bottom: 30px;
    }

    /* Fix hero content positioning - keep it overlaid on carousel */
    .hero-content {
        position: absolute;
        top: 50%;
        right: 5%;
        transform: translateY(-50%);
        color: white;
        z-index: 2;
        text-align: center;
    }

    .hero-content.position-left {
        left: 5%;
        right: auto;
    }

    .hero-content h1 {
        margin: 0 0 clamp(15px, 3vh, 30px);
        font-size: 2.2rem;
        line-height: 2.7rem;
    }

    .hero-content h1 .big {
        font-size: 4.6rem;
        line-height: 6.0rem;
        margin: 8px 0 15px;
    }

    .hero-content h2 {
        font-size: 1.8rem;
        line-height: 2.4rem;
    }

    .hero-content p {
        font-size: 1.45rem;
        line-height: 2.0rem;
        margin: 0 0 15px;
    }

    /* Fix bottom section to maintain carousel functionality */
    .hero-bottom {
        padding: 120px 0 80px;
    }

    .bottom-content {
        padding: 0 40px;
    }

    /* Keep the original desktop layout for text-content but adjust spacing */
    .text-content {
        display: flex;
        align-items: center;
        justify-content: center;
        max-width: 800px;
        margin: 0px auto;
        padding: 40px 0;
        position: relative;
    }

    .left-text-container,
    .right-text-container {
        position: relative;
        flex: 1;
        height: 100%;
    }

    .left-text {
        text-align: right;
        padding-right: 120px;
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 100%;
        opacity: 0;
        transition: opacity 0.5s ease-in-out;
        margin: 0;
    }

    .right-text {
        text-align: left;
        padding-left: 120px;
        position: absolute;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
        width: 100%;
        opacity: 0;
        transition: opacity 0.5s ease-in-out;
        margin: 0;
    }

    .left-text.active,
    .right-text.active {
        opacity: 1;
    }

    .center-images-container {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 2;
    }

    .center-image {
        width: 200px;
        height: 230px;
        margin: 0;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 2;
        background: var(--wp--preset--color--background);
        box-shadow: 0 0 0 15px var(--wp--preset--color--background);
        opacity: 0;
        transition: opacity 0.1s ease-out delay(0.4s);
    }

    .center-image.active {
        opacity: 1;
    }

    .center-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        padding-bottom: 30px;
    }

    .disclaimer-text-container {
        bottom: -85px;
    }

    /* Hero Copy responsive */
    .copy-content {
        padding: 0 40px;
    }
    
    .hero-copy .image-title {
        font-size: calc(var(--font-size-h2-bow) - 8px);
    }
    
    .hero-copy .background-image-svg {
        height: 95px;
        max-width: 950px;
        background-size: 100% 74px;
    }

    /* Hero Secondary responsive */
    .hero-secondary {
        padding: 130px 0px 0;
        position: relative;
        overflow: visible;
        height: auto;
        margin-bottom: 0;
        z-index: 2;
    }

    /* Ensure mask remains visible at 1024px breakpoint */
    .hero-secondary::after {
        height: 50px;
        transform: translateY(40px);
        -webkit-mask-size: 100% 100%;
        mask-size: 100% 100%;
        z-index: 2;
    }

    .hero-secondary.blue {
        padding-top: 80px;
        height: 400px;
        min-height: 400px;
        max-height: 400px;
    }
}

@media (max-width: 767px) {
    /* Optimize viewport scaling for mobile */
    :root {
        --hero-height-preferred: 40vh;
        --hero-height-max: 400px;
        --hero-height-min: 300px;
        --hero-content-width-preferred: 80%;
        --hero-content-width-max: 350px;
    }

    /* Mobile responsive styles for secondary hero wrappers only */
    .hero-section-wrapper.secondary {
        border-bottom-left-radius: 300% 50px;
        border-bottom-right-radius: 300% 50px;
        clip-path: inset(0 0 -50px 0);
    }

    .hero-section {
        /* Mobile-optimized padding and remove full height */
        padding-top: clamp(40px, 8vh, 60px);
        padding-bottom: clamp(60px, 4vh, 40px);
    }

    .carousel-indicator {
        bottom: 390px;
    }

    /* Mobile layout: stack hero-top and hero-content vertically */
    .hero-top {
        position: relative;
        height: auto;
        margin-bottom: 30px;
    }

    /* Change hero-content from absolute to relative positioning */
    .hero-content {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        transform: none;
        width: 100%;
        margin: 0 auto;
        background-color: var(--color-nav-gray);
        z-index: 2;
        text-align: center;
        padding: 20px 0 40px;
    }

    /* On mobile, positioning classes don't apply */
    .hero-content.position-left,
    .hero-content.position-right {
        left: auto;
        right: auto;
    }

    .hero-content h1 {
        margin: 0 20px clamp(15px, 3vh, 25px);
        font-size: 2.0rem;
        line-height: 2.6rem;
    }

    .hero-content h1 .big {
        font-size: 5.4rem;
        line-height: 8.1rem;
        margin: 8px 0 15px;
        white-space: nowrap;
    }

    .hero-content h2 {
        font-size: 1.6rem;
        line-height: 2.2rem;
        color: var(--color-yellow);
    }

    .hero-content p {
        font-size: 1.2rem;
        line-height: 1.6rem;
        margin: 0 0 15px;
    }

    /* Fix hero-bottom positioning to come after hero-content */
    .hero-bottom {
        padding: 0px 0 10px;
        margin-top: 0;
        position: relative;
        z-index: 1;
    }

    .hero-callout {
        position: relative;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        margin: 30px auto 0;
        border-radius: 8px;
        position: static;
        margin: 30px auto 0;
    }

    .bottom-content {
        padding: 0;
    }

    /* Simplify text-content layout for mobile */
    .text-content {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: relative;
        max-width: 100%;
        margin: 0;
        padding: 40px 0 20px 0;
    }
    .center-images-container {
        order: 0;
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        z-index: 2;
        margin: 0 0 20px 0;
        pointer-events: none;
    }
    .left-text-container {
        order: 1;
        margin-top: 180px; /* space for the absolute image */
    }
    .right-text-container {
        order: 2;
        margin-top: 0px;
    }

    .left-text,
    .right-text {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        width: 100%;
        padding: 0;
        text-align: center;
        opacity: 1;
        transition: none;
        margin: 0;
        font-size: var(--font-size-h3);
        line-height: var(--font-lh-h3);
    }

    /* Hide inactive text on mobile for cleaner layout */
    .left-text:not(.active),
    .right-text:not(.active) {
        display: none;
    }

    .center-image {
        width: 200px;
        height: 230px;
        margin: 0 auto 20px;
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        z-index: 2;
        background: var(--wp--preset--color--background);
        box-shadow: 0 0 0 10px var(--wp--preset--color--background);
        opacity: 1;
        transition: none;
    }

    /* Hide inactive images on mobile */
    .center-image:not(.active) {
        display: none;
    }

    .center-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        padding-bottom: 20px;
    }

    /* Hero Copy responsive */
    .hero-copy {
        padding: 0;
        margin-top: 0;
    }
    
    .copy-content {
        padding: 0 20px;
    }
    
    .hero-copy .image-title {
        font-size: 2.0rem;
        line-height: 2.6rem;
        max-width: 285px;
    }
    
    .hero-copy .background-image-svg {
        height: 135px;
        max-width: 600px;
        background-size: 100% 135px;
    }
    
    .red-title {
        font-size: var(--font-size-h3);
        line-height: var(--font-lh-h3);
        padding: 0 5%
    }
    
    .bold-copy,
    .regular-copy {
        font-size: var(--font-size-important-text);
        line-height: var(--font-lh-important-text);
        padding: 0 4%
    }

    /* Hero Secondary responsive */
    .hero-secondary {
        padding: 160px 0px 0;
        position: relative;
        overflow: visible;
        height: auto;
        margin-bottom: 0;
        z-index: 2;
    }

    .hero-secondary::after {
        height: 30px;
        transform: translateY(30px);
        -webkit-mask-size: 100% 100%;
        mask-size: 100% 100%;
        z-index: 2;
    }

    .title-container {
        margin-bottom: 0;
    }

    .hero-secondary .hero-title .big {
        margin: 20px auto;
        min-width: unset;
    }
    .hero-secondary .hero-title .big::before{
        top:-15px;
    }
    .hero-secondary .hero-title .big::after{
        bottom:-15px;
    }

    .hero-secondary.blue .hero-title.deflate-together .big{
        font-size: 6.0rem;
        line-height: 7.0rem;
        margin: 20px 0;
    }

    /* Natural flow for carousel containers and slides on mobile only */
    .hero-carousel,
    .carousel-slides {
        position: relative;
        width: 100%;
        height: auto;
    }
    .carousel-slide {
        position: relative;
        width: 200%;
        height: auto;
        opacity: 0;
        transition: opacity 0.5s ease-in-out;
        margin: 0;
        top: auto;
        left: -15%;
    }
    
    /* Mobile slide positioning for different content positions */
    .carousel-slide.mobile-slide-left {
        left: -80%;
    }
    
    .carousel-slide.mobile-slide-right {
        left: -15%;
    }
    .carousel-slide.active {
        opacity: 1;
    }
    .carousel-slide img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .carousel-slide {
        display: none;
    }
    .carousel-slide.active {
        display: block;
    }

    .hero-carousel-disclaimer {
        position: relative;
        margin: 0 auto;
        text-align: center;
        white-space: nowrap;
    }

    .hero-carousel-disclaimer p{
        position: relative;
        margin: 5px auto 0;
        text-align: center;
        white-space: nowrap;
    }

    .hero-carousel-disclaimer p{
        font-size: 1.0rem;
        line-height: 1.2rem;
    }

    .text-content::before,
    .text-content::after {
        display: none;
    }
    .left-text-container::before {
        content: '';
        display: block;
        width: 100%;
        height: 8px;
        background-repeat: no-repeat;
        background-size: 100% 100%;
        background-image: url('/wp-content/uploads/static/tapered-top-border-blue.svg');
        margin-bottom: 10px;
    }
    .right-text-container::after {
        content: '';
        display: block;
        width: 100%;
        height: 8px;
        background-repeat: no-repeat;
        background-size: 100% 100%;
        background-image: url('/wp-content/uploads/static/tapered-bottom-border-blue.svg');
        margin-top: 10px;
    }

    .disclaimer-text-container {
        bottom: -20px;
    }

    .hero-copy .image-title-shadow-wrapper {
        filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.5));
    }

    .hero-copy .image-title-container {
        height: 90px;
        clip-path: var(--clip-path-mobile-headline);
    }

    .hero-copy .image-title {
        font-size: var(--font-size-h2-bow-mobile);
        line-height: var(--font-lh-h2-bow-mobile);
    }

    .bottom-curve-container.blue {
        bottom: -19px;
        height: 20px;
        /* Safari-specific positioning fix for mobile */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .bottom-curve-container.blue .bottom-curve {
        height: 50px;
        /* Safari-specific mask fix for mobile */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

