/* ************************************ */
/* Main block and variables */
/* ************************************ */

.cmw-Y25.y25-hero-block {
    /* Variables for layout and spacing */
    --cmw-width: min(83%, 1200px); /* Max width for the container */
    --cmw-eyebrow-margin-bottom: 1.33333rem; /* Space below eyebrow text */
    --cmw-heading-margin-bottom: 0.88889rem; /* Space below heading */
    --cmw-button-margin-top: 2.66667rem; /* Space above buttons */
    --cmw-padding-top: 6.66667rem; /* Top padding without media */
    --cmw-padding-bottom: 6.66667rem; /* Bottom padding without media */
    --cmw-padding-top-when-media: 4.44444rem; /* Top padding with media */
    --cmw-padding-bottom-when-media: 4.44444rem; /* Bottom padding with media */
    --cmw-gap-between-details-and-media: 2.66667rem; /* Space between text and media */

    /* Default styles */
    background-color: white; /* Background color */
    background-size: cover; /* Cover the background */
    background-repeat: no-repeat; /* No background repeat */
    background-position: center center; /* Centered background */
    width: 100%; /* Full width */
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    z-index: 0;
}

.cmw-Y25.y25-hero-block.cmw-hero-in-archive {
    --cmw-padding-top: var(--cmw-xl);
    --cmw-padding-bottom: var(--cmw-xl);
}

/* ************************************ */
/* Container Styling */
/* ************************************ */

.cmw-Y25.y25-hero-block .y25-hero-container {
    width: var(--cmw-width);
    padding-top: var(--cmw-padding-top);
    padding-bottom: var(--cmw-padding-bottom);
    margin-inline: auto;
    gap: var(--cmw-gap-between-details-and-media);
    display: flex;
    z-index: 1;
}
/* Style for the background image */
.cmw-Y25.y25-hero-block > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Swap sections */
.cmw-Y25.y25-hero-block .y25-hero-container.cmw-swap-sections {
    flex-direction: row-reverse;
}

/* Adjust padding when media is present */
.cmw-Y25.y25-hero-block .y25-hero-container {
    padding-top: var(--cmw-padding-top-when-media);
    padding-bottom: var(--cmw-padding-bottom-when-media);
}

/* Restore default padding when no media */
.cmw-Y25.y25-hero-block .y25-hero-container.cmw-no-media {
    padding-top: var(--cmw-padding-top);
    padding-bottom: var(--cmw-padding-bottom);
}

/* ************************************ */
/* Text and Details Section */
/* ************************************ */

/* Align details section vertically */
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details {
    align-content: center;
}

/* Narrower details section when no media */
.cmw-Y25.y25-hero-block .y25-hero-container.cmw-no-media .cmw-details {
    max-width: 65%; /* Restrict width for large screens */
}

/* Space below text elements */
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details .cmw-eyebrow-large {
    margin-bottom: var(--cmw-eyebrow-margin-bottom);
}
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details .cmw-heading {
    display: block;
    margin-bottom: var(--cmw-heading-margin-bottom);
    font-weight: 300;
    font-size: var(--cmw-h1-font-size);
    line-height: var(--cmw-h1-line-height);
}

/* Headline styles */
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details.cmw-bold-headline .cmw-heading {
    font-weight: 800;
    line-height: 100%;
    font-size: clamp(2.66667rem, 1.85rem + 3.725vw, 5.11111rem); /* Using clamp to ensure the font size scales responsively */
}
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details.cmw-blue-headline h1 {
    color: var(--cmw-Primary-Blue) !important;
}

/* ************************************ */
/* Media Styling */
/* ************************************ */

.cmw-Y25.y25-hero-block .y25-hero-container .cmw-media figure {
    display: flex;
    justify-content: end;
    align-items: flex-start;
    position: relative;
    margin: 0;
    width: 100%;
}

.cmw-Y25.y25-hero-block .y25-hero-container.cmw-swap-sections .cmw-media figure {
    justify-content: start;
}

.cmw-Y25.y25-hero-block .y25-hero-container .cmw-media figure img,
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-media figure video {
    border-radius: 24px;
    max-width: 100%;
    height: auto;
}

/* Style for embaded video */
.cmw-Y25.y25-hero-block .y25-hero-container.cmw-embeded .cmw-media figure,
.cmw-Y25.y25-hero-block .y25-hero-container.cmw-embeded .cmw-media figure .wp-block-embed__wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: clip;
}

/* ************************************ */
/* Button Styling */
/* ************************************ */

/* Button container alignment */
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details .cmw-custom-button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: var(--cmw-button-margin-top);
    border: none;
}

/* Button styles */
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details .cmw-custom-button a {
    font-size: 0.88889rem;
    font-style: normal;
    font-weight: 700;
    line-height: 100%;
    display:inline-flex;
    height: 2.66667rem;
    padding: 0.44444rem 1.11111rem;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    border: none;
}

/* WordPress-specific buttons */
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details .cmw-custom-button .wp-block-button__link,
.wp-block-column.cmw-details .wp-element-button {
    border-radius: 3px;
    box-sizing: border-box;
}

/* White text button */
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details .cmw-custom-button .cmw-text-white {
    color: white !important;
}
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details .cmw-custom-button .cmw-text-white.wp-block-button__link:hover,
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details .cmw-custom-button .cmw-text-white.wp-block-button__link:focus-visible {
    background: var(--cmw-special-branding-color, var(--cmw-Secondary-Blue)) !important;
    border: none !important;
}

/* Blue text button */
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details .cmw-custom-button .cmw-text-blue {
    color: #0072CE !important;
}
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details .cmw-custom-button .cmw-text-blue.wp-block-button__link:hover,
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details .cmw-custom-button .cmw-text-blue.wp-block-button__link:focus-visible {
    color: var(--cmw-Secondary-Blue) !important;
}


/* ************************************ */
/* Responsive Styling */
/* ************************************ */

@media (max-width: 834px) {
    .cmw-Y25.y25-hero-block .y25-hero-container {
        /* Update variables for smaller screens */
        --cmw-eyebrow-margin-bottom: 0.88889rem;
        --cmw-heading-margin-bottom: 0.44444rem;
        --cmw-button-margin-top: 1.77778rem;
        --cmw-padding-top: 4.44444rem;
        --cmw-padding-bottom: 4.44444rem;
        --cmw-gap-between-details-and-media: 1.77778rem;
    }

    .cmw-Y25.y25-hero-block.cmw-hero-in-archive {
        --cmw-padding-top: var(--cmw-l);
        --cmw-padding-bottom: var(--cmw-l);
    }

    /* Container height when media is present */
    .cmw-Y25.y25-hero-block .y25-hero-container {
        height: fit-content;
    }
    /* Container height when no media present */
    .cmw-Y25.y25-hero-block .y25-hero-container.cmw-no-media {
        height: auto;
    }

    .cmw-Y25.y25-hero-block .y25-hero-container,
    .cmw-Y25.y25-hero-block .y25-hero-container.cmw-swap-sections {
        flex-direction: column; /* Stack content vertically */
        flex-wrap: nowrap !important;
    }

    /* Full-width details for smaller screens */
    .cmw-Y25.y25-hero-block .y25-hero-container .cmw-details,
    .cmw-Y25.y25-hero-block .y25-hero-container.cmw-no-media .cmw-details {
        min-width: 100%;
    }

    /* Ensure media appears above details */
    .cmw-Y25.y25-hero-block .y25-hero-container .cmw-media {
        order: 1 !important;
    }
    .cmw-Y25.y25-hero-block .y25-hero-container .cmw-details {
        order: 2 !important;
    }

    .cmw-Y25.y25-hero-block .y25-hero-container .cmw-media figure {
        justify-content: start;
    }
}

.client-story-secondary-button {
	background: #ffffff00 !important;
	color: black !important;
	border-radius: var(--5xs, 0.25rem);
	border: 1px solid var(--Primary-Blue, #0072CE) !important;
}

.client-story-secondary-button:hover {
	background: #ffffff00 !important;
	color: black !important;
	border: 1px solid var(--Primary-Blue, #0072CE) !important;
}

.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details .cmw-custom-button .wp-block-button__link.cmw-cta-gradient:hover,
.cmw-Y25.y25-hero-block .y25-hero-container .cmw-details .cmw-custom-button .wp-block-button__link.cmw-cta-gradient:focus-visible {
	background: linear-gradient(90deg, #267877 100%, #126362 183.14%) !important;
}

