.bnf-home-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* 2. The Carousel - MUST define the height */
.bnf-home-hero .carousel,
.bnf-home-hero .carousel-inner,
.bnf-home-hero .carousel-item {
    position: relative !important;
    width: 100%;
    height: auto !important;
    z-index: 1;
}

/* Fix for Owl Carousel inside Bootstrap Carousel */
.owl-stage-outer,
.owl-stage,
.owl-item {
    height: auto !important;
}

.bnf-home-hero .cover-img,
.bnf-home-hero .cover-img img {
    width: 100%;
    height: auto !important;
    object-fit: contain !important;
    display: block;
    border-radius: 0px 0px 32px 32px;
}

/* 3. The Search Overlay - Centered over the images */
.hero-search-overlay {
    position: absolute !important;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 100%;
    max-width: 1200px;
    padding-left: 15px;
    padding-right: 15px;
    pointer-events: none;
}


.hero-search-overlay>* {
    pointer-events: auto;

}

/* 4. Responsive adjustments */
@media (max-width: 992px) {
    .bnf-home-hero {
        min-height: 450px;
    }

    .hero-search-overlay {
        padding-top: 20px;
        padding-bottom: 20px;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

/* Only apply these rules to large screens */
/* Only apply these rules to large screens */
@media (min-width: 992px) {
    .bnf-home-hero {
        position: relative;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: start;
        overflow: hidden;
    }

    /* Background image layer */
    .bnf-home-hero .carousel,
    .bnf-home-hero .carousel-inner,
    .bnf-home-hero .carousel-item {
        position: relative !important;
        width: 100%;
        height: auto !important;
    }

    .bnf-home-hero .cover-img img {
        width: 100%;
        height: auto;
        object-fit: cover !important;
    }

    /* The Search Overlay container */
    .hero-search-overlay {
        position: absolute !important;
        top: 60%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 5;
        width: 100%;
        max-width: 1200px;
        margin: 0;
        pointer-events: none;
        display: flex;
        justify-content: center;
    }

    .hero-search-overlay>* {
        pointer-events: auto;
        width: 100%;
        max-width: 1200px;
    }
}

/* @media (min-width: 1440px) {
    .bnf-home-hero {
        height: auto;
        min-height: auto;
    }

    .bnf-home-hero .cover-img {
        height: auto;
    }

    .bnf-home-hero .cover-img img {
        height: auto !important;
    }

    .hero-search-overlay {
        margin: 0;
    }
} */

/*@media (max-width: 1439px) {
    .bnf-home-hero {
        position: relative;
        min-height: 500px;
    }

    .bnf-home-hero .cover-img img {
        width: 100%;
        height: auto;
    }
}

@media screen and (min-width: 992px) and (max-width: 1299px) {
    .hero-search-overlay {
        transform: scale(0.95);
        transform-origin: top;
    }

    .bnf-home-hero {
        background: #fff;
    }
} */