/* Ensure the slider container has a specific height */
#mainSlider .carousel-item {
    height: 85vh; /* 85% of the screen height */
    min-height: 500px;
    background-color: #000; /* Black background while image loads */
}

/* Make the image fill the area perfectly */
.hero-img {
    height: 85vh;
    min-height: 500px;
    object-fit: cover; /* This is the "magic" property that prevents stretching */
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Ensure the overlay covers the image */
.overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Darkens the image so text is readable */
    z-index: 0;
}

/* Make sure text stays on top */
.carousel-caption {
    z-index: 2;
}
