:root {
    /* 1. Set your image's native aspect ratio (Width ÷ Height) */
    /* E.g., a 1920x1080 image is 1920/1080 = 1.777 */
    --img-aspect-ratio: calc(2908 / 1940); 

    /* 2. Set the percentage of the image the smoke takes up on the left */
    /* 0.4 = 40%. This means the right 60% (0.6) is "clear sky" */
    --plume-pct: 0.4;
    --safe-pct: calc(1 - var(--plume-pct)); 
}

.landing-container {
    position: relative;
    width: 100%;
    
    /* Extract the height into a variable so the math can see it */
    --container-height: clamp(60svh, 80vw, 100svh);
    height: var(--container-height);
    background-color: var(--nav-color);
    
    /* Prevent potential horizontal scrolling from edge-case math */
    overflow: hidden; 
}

.landing-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* This anchors the image to the right, which is crucial for the math */
    object-position: 100% 50%; 
}

.landing-quote-container {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    text-align: left;
    padding: calc(1.2em + 30px) 0;

    /* --- THE CALCULATION MAGIC --- */

    /* 1. Find the hidden rendered width of the image */
    --rendered-img-width: max(100%, calc(var(--container-height) * var(--img-aspect-ratio)));

    /* 2. Calculate where the smoke ends by measuring from the right edge */
    --plume-right-edge: calc(100% - (var(--safe-pct) * var(--rendered-img-width)));

    /* 3. Add a visual buffer space between the smoke and the text */
    --buffer: 4vw; 

    /* 4. Set a minimum margin for mobile (when the smoke is entirely cropped out) */
    --min-margin: calc(5% + 10px);

    /* left = Pick whichever is larger: the min margin, or the smoke's edge + buffer */
    left: max(var(--min-margin), calc(var(--plume-right-edge) + var(--buffer)));

    /* width = 100% minus the left position, minus a standard right margin */
    --right-margin: 5%;
    width: calc(100% - max(var(--min-margin), calc(var(--plume-right-edge) + var(--buffer))) - var(--right-margin));
}

/* Your existing font and text styles remain completely unchanged */
.f-landing {
    font-family: 'Cubano', Montserrat, 'Red Hat Text', Verdana, Geneva, Tahoma, sans-serif;
}

.landing-quote {
    margin: 0;
    font-size: clamp(16px, calc(3vh + 4vw), 6em);
    color: var(--bhs-red);
    text-shadow:    0 0px 2px rgba(0, 0, 0, 0.12),   /* Layer 1: Tiny, immediate dark edge to separate from the image */
                    0 1px 5px rgba(0, 0, 0, 0.08),   /* Layer 2: Soft, mid-range depth */
                    0 1px 12px rgba(0, 0, 0, 0.03);
    position: relative;
}

.landing-quote::before {
    content: '"';
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    text-align: right;
}

.landing-quote-attribution {
    margin: 0;
    font-size: clamp(15px, calc(1.5vh + 2vw), 3em);
    color: var(--bhs-faded-blue);
    opacity: 0.7;
    text-shadow:    0 0px 2px rgba(0, 0, 0, 0.12),   /* Layer 1: Tiny, immediate dark edge to separate from the image */
                    0 1px 5px rgba(0, 0, 0, 0.08),   /* Layer 2: Soft, mid-range depth */
                    0 1px 12px rgba(0, 0, 0, 0.03);
    text-align: right;
    position: absolute;
    bottom: 0;
    right: 0;
}




.lower-content {
    width: 100%;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.chunk {
    width: clamp(350px, 80vw, 1200px);
    /* outline: 1px solid red; */
    margin: 50px 0;
    
    display: flex;
    flex-direction: row;
    align-items: stretch; /* This forces the image container to stretch to the text's height */
}
.lower-content .chunk:nth-child(even) {
    flex-direction: row-reverse;
}

.chunk-img-container {
    position: relative; /* This traps the absolute positioned image inside this div */
    width: 40%; /* Sets the width footprint for the image */
    flex-shrink: 0; /* Prevents the image container from shrinking too much */
}

.chunk img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fills the space nicely, cropping any overflow without distorting */
    object-position: center; /* Centers the crop point */
    border-radius: 5px;
}

.chunk.portrait .chunk-img-container {
    width: 25%; /* Thinner footprint for tall images */
}

.chunk .chunk-text {
    flex: 1; /* Takes up the remaining 60% of the space */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Optional: Vertically centers the text alongside the image */
    margin: 0 0 0 20px;
}
.lower-content .chunk:nth-child(even) .chunk-text {
    margin: 0 20px 0 0;
}

.chunk-text h2 {
    font-family: 'Cubano', Montserrat, 'Red Hat Text', Verdana, Geneva, Tahoma, sans-serif;
    font-size: 3em;
    margin: 0 0 7px 0;
    color: var(--bhs-blue)
}

.chunk-text p {
    font-family: 'Red Hat Text', Verdana, Geneva, Tahoma, sans-serif;
    font-size: 1.1em;
    margin: 0 0 10px 0;
}
.chunk p.link-subtext {
    margin: 4px 0 12px 0;
    font-size: .8em;
    color:rgb(53, 53, 53);
    text-align: center;

}

.chunk-text .chunk-link {
    padding: 10px;
    width: 100%;
    text-align: center;
    font-size: 1.1em;
    box-sizing: border-box;
    border-radius: 5px;

    color: white;
    background-color: color-mix(in srgb, var(--bhs-red) 100%, rgb(0, 0, 0) 12%);

    transition: background-color .1s;

    text-decoration: none;

    margin-top: 9px;

    font-family: Montserrat, 'Red Hat Text', 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.chunk-text .chunk-link:hover {
    background-color: color-mix(in srgb, var(--bhs-red) 100%, rgb(0, 0, 0) 2%);
}

@media (max-width: 850px) {
    .chunk {
        flex-direction: column !important;
        width: 90vw; /* Allows the chunk to take up more screen width on mobile */
        margin: 20px auto; /* Centers it nicely */
    }

    .chunk-img-container {
        width: 100%; /* Image takes full width of the container */
        height: 50vw;
        max-height: 450px; /* You must set a height here since the text is no longer beside it */
        min-height: 180px;
        flex-shrink: 0; 
        object-fit: cover;
    }

    .chunk .chunk-text {
        margin: 5px 0 0 0 !important; /* Adjust margins for top/bottom stacking */
    }
}