/* GLOBAL RESET & FLEXBOX FOOTER LAYOUT */
html,
body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.height-class {
    max-height: 227px;
}

.min-height-constraint {
    min-height: 40px;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: var(--bs-body-color);
}

main {
    flex: 1 0 auto;
    width: 100%;
}

/* NAVBAR ADJUSTMENTS */
.navbar-section {
    width: 100%;
    min-height: 180px;
}

/* CAROUSEL RESPONSIVENESS */
#myCarousel {
    position: relative;
    margin-bottom: 3rem;
}

#myCarousel .carousel-item {
    position: relative;
    height: 60vh;
    min-height: 400px;
    max-height: 600px;
}

#myCarousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}




/* Scalable desktop typography with high-contrast text shadow */
.paragraph-carousel {
    font-size: clamp(1.125rem, 2vw + 0.5rem, 1.75rem);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

/* FEATURETTE / IMAGE WITH TEXT FIXES */
.imagewithText-cont {
    margin-top: 3rem;
    margin-bottom: 3rem;
    width: 100%;
}

.imagewithText-cont img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* RESPONSIVE TYPOGRAPHY & SPACING */
.featurette-divider {
    margin: 3rem 0;
}

@media (min-width: 768px) {
    .featurette-heading {
        font-size: 2.5rem;
    }
}

@media (min-width: 992px) {
    .featurette-heading {
        font-size: 3rem;
    }
}


/* MOBILE & ACCESSIBILITY FIX (KEEPING TEXT OVER IMAGE) */
@media (max-width: 767.98px) {

    /* DO NOT set display: flex here directly; let Bootstrap manage display: none vs active */
    #myCarousel .carousel-item {
        height: auto;
        min-height: 420px;
        max-height: none;
    }
    .min-height-constraint {
        min-height: 60px;
    }

    /* Target ONLY the active slide to use flexbox overlay logic */
    #myCarousel .carousel-item.active,
    #myCarousel .carousel-item-next,
    #myCarousel .carousel-item-prev {
        display: flex !important;
        flex-direction: column;
        justify-content: flex-end;
    }

    /* Absolute positioning pins image in background to support text overlay */
    #myCarousel .carousel-item>img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

        .carousel-control-prev,
        .carousel-control-next,
        .carousel-indicators {
            z-index: 10;
            pointer-events: auto !important;
        }
    /* Gradient backdrop behind caption guarantees text contrast over light images */
    #myCarousel .carousel-caption {
        position: relative;
        z-index: 2;
        right: 0;
        left: 0;
        bottom: 10px;
        width: 100%;
        padding: 2.5rem 1rem 2rem;
        margin: 0;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.5) 60%);/**/
        color: #ffffff;
        border-radius: 20px;
    }

    #myCarousel .carousel-caption h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .paragraph-carousel {
        font-size: 1rem;
        line-height: 1.4;
    }
}

/* Responsive Featurette Heading Adjustments */
.featurette-heading {
    font-size: 2.5rem;
    /* Down from 2.5rem - 3rem on mobile */
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

@media (max-width: 767.98px) {

    /* Tighten paragraph text size and spacing */
    .imagewithText-cont p {
        font-size: 0.95rem;
        line-height: 1.4;
        color: #4a5568;
    }
        /* Responsive Featurette Heading Adjustments */
        .featurette-heading {
            font-size: 1.65rem;
            /* Down from 2.5rem - 3rem on mobile */
            line-height: 1.25;
            margin-bottom: 0.75rem;
        }
}