/* 1. The Container */
.bnf-home-hero {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 600px;
}

/* 2. The Carousel - MUST fill the parent */
.bnf-home-hero .carousel,
.bnf-home-hero .carousel-inner,
.bnf-home-hero .carousel-item {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    z-index: 1;
}

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

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

/* 3. The Search Overlay - THIS defines the height of the hero */
.hero-search-overlay {
    position: relative !important;
    z-index: 5;
    width: 100%;
    max-width: 1100px;
    padding-top: 100px;
    padding-bottom: 100px;
    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: 700px;
        /* Give more room on tablets */
    }

    .hero-search-overlay {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

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

    /* Background image layer */
    .bnf-home-hero .carousel,
    .bnf-home-hero .carousel-inner,
    .bnf-home-hero .carousel-item {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 100% !important;
        z-index: 1;
    }

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

    /* The Search Overlay container */
    .hero-search-overlay {
        position: relative !important;
        z-index: 5;
        width: 100%;
        max-width: 1200px;
        margin-top: 10px;
        margin-right: 3%;
        padding: 0 15px;
        pointer-events: none;
        display: flex;
        justify-content: flex-start;

    }

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

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

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