/* ========= HERO CAROUSEL WRAPPER ========= */
.hero-carousel {
    position: relative;
    height: 80vh;            /* Full height for carousel */
    min-height: 450px;
    overflow: hidden;
}

/* Make inner carousel items full height */
.hero-carousel .carousel-item {
    height: 100%;
}

/* ========= CAROUSEL IMAGE STYLING ========= */
.hero-carousel .carousel-item img {
    width: 100%;
    height: 100%;            /* Ensures image fills carousel height */
    object-fit: cover;
}

/* ========= FULL DARK OVERLAY ON CAROUSEL ========= */
.hero-carousel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 5;
}

/* ========= SEARCH BOX POSITIONING ========= */
.search-overlay {
    position: absolute;
    top: 50%;
    left: 5%;               /* 🔥 Align left side */
    width: 90%;
    transform: translateY(-50%); /* Vertically center */
    text-align: left;       /* 🔥 Left align text */
    z-index: 10;
    color: white;
}

/* Title Styling */
.search-overlay h2 {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

/* ========= SEARCH BOX CONTAINER ========= */
.search-container {
    background: transparent !important;
    padding: 25px;
    border-radius: 12px;
    backdrop-filter: none !important;
    width: 100%;
}

/* ========= INPUT FIELD ========= */
.search-container .form-control {
    padding: 12px 18px;
    background: #ffffff !important;
    border: 1px solid #ccc;
    border-radius: 6px 0 0 6px;
    color: #000 !important;
}

/* ========= LIVE SEARCH RESULT ========= */
.live-results {
    background: #ffffff !important;
    color: #000 !important;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 5px;
    padding: 10px;
    text-align: left !important;
}

/* SEARCH BUTTON */
.search-container button {
    border-radius: 0 6px 6px 0;
}

/* Search Title Overlay Background */
h2.search_moto {
    border-radius: 10px;
    padding: 10px 20px;
}

/* ========================================================= */
/* ===================== RESPONSIVE ====================== */
/* ========================================================= */

/* Devices below 992px */
@media (max-width: 991px) {
    .hero-carousel {
        height: 60vh;          /* Adjust for tablets */
        min-height: 380px;
    }

    .hero-carousel .carousel-item img {
        object-fit: cover;
        height: 100%;
    }

    .search-overlay {
        top: 50%;
        left: 5%;              /* Ensure left alignment */
        width: 90%;
    }

    h2.search_moto {
        font-size: 24px;
        padding: 8px 16px;
    }

    .search-container {
        padding: 18px;
    }

    .input-inline {
        flex-direction: column;
        gap: 12px;
    }

    .search-container .form-control {
        width: 100%;
        border-radius: 6px !important;
    }

    .search-container button {
        width: 100%;
        border-radius: 6px !important;
    }
}

/* Devices below 576px (Small Phones) */
@media (max-width: 575px) {
    .hero-carousel {
        height: 50vh;         /* Small phone height */
        min-height: 330px;
    }

    .hero-carousel .carousel-item img {
        height: 100%;
    }

    .search-overlay {
        top: 55%;              /* Adjust overlay position */
        max-width: 95%;
    }

    h2.search_moto {
        font-size: 20px;
        line-height: 28px;
        padding: 6px 14px;
    }

    .search-container {
        padding: 15px;
        border-radius: 10px;
    }

    .search-container .form-control {
        font-size: 14px;
        padding: 10px 14px;
    }

    .search-container button {
        font-size: 14px;
        padding: 10px 14px;
    }

    .live-results {
        font-size: 14px;
    }
}

/* Extra small devices (320px) */
@media (max-width: 400px) {
    .hero-carousel {
        height: 50vh;
        min-height: 300px;
    }

    .hero-carousel .carousel-item img {
        height: 100%;
    }

    h2.search_moto {
        font-size: 18px;
    }

    .search-overlay {
        top: 58%;              /* Adjust overlay position */
    }
}
