/* ================================ */
/* ✅ RESPONSIVE BOOTSTRAP CAROUSEL */
/* ================================ */

/* ------- Base (desktop/tablet) ------- */
.carousel-item {
    position: relative;
    width: 100%;
    height: 70vh;
    /* Hero height for desktop */
    min-height: 500px;
    /* Ensures visual balance */
    overflow: hidden;
    transition: transform 0.6s ease-in-out, opacity 0.4s ease;
    background-color: #fff;
}

.carousel-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fill container without distortion */
    object-position: center;
    /* Keep subject centered */
}

/* ------- Controls & Indicators ------- */
.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    z-index: 10;
    opacity: 0.8;
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 16px;
    height: 16px;
    background-size: 16px 16px;
    background-position: center;
    background-repeat: no-repeat;
}

.carousel-indicators {
    bottom: 10px;
    margin: 0;
    justify-content: center;
    padding-left: 0;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    margin: 0 4px;
    border-radius: 50%;
    background: #ccc;
    opacity: 0.6;
    border: 0;
}

.carousel-indicators button.active {
    background: #fff;
    opacity: 1;
}

/* ------- Captions ------- */
.carousel-caption {
    position: absolute;
    left: 5%;
    right: 5%;
    bottom: 30px;
    z-index: 2;
    /* above overlay */
    padding: 15px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 4px;
    text-align: center;
    color: #fff;
}

.carousel-caption h1,
.carousel-caption h2 {
    font-size: 28px !important;
    line-height: 36px !important;
    margin-bottom: 10px;
}

.carousel-caption p {
    font-size: 18px !important;
    line-height: 26px !important;
    margin-bottom: 0;
}

/* ------- Medium screens (≤991px) ------- */
@media (max-width: 991px) {
    .carousel-item {
        height: 55vh;
        min-height: 350px;
    }

    .carousel-caption h1,
    .carousel-caption h2 {
        font-size: 22px !important;
        line-height: 30px !important;
    }

    .carousel-caption p {
        font-size: 15px !important;
        line-height: 22px !important;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 32px;
        height: 32px;
    }
}

/* ------- Tablets & small screens (≤768px) ------- */
@media (max-width: 768px) {
    .carousel-item {
        height: 45vh;
        min-height: 300px;
    }

    .carousel-caption {
        bottom: 15px;
        padding: 10px;
        background: rgba(0, 0, 0, 0.3);
    }

    .carousel-caption h1,
    .carousel-caption h2 {
        font-size: 20px !important;
        line-height: 28px !important;
    }

    .carousel-caption p {
        font-size: 14px !important;
        line-height: 20px !important;
    }
}

/* ------- Small phones (≤430px wide) ------- */
/* Show entire image: no crop */
@media (max-width: 430px) {
    .carousel-item {
        height: auto;
        /* let it expand naturally */
        min-height: unset;
    }

    .carousel-item img {
        position: relative;
        width: 100%;
        height: auto;
        object-fit: contain;
        /* shows full image */
        object-position: center;
    }

    .carousel-caption {
        position: static;
        background: rgba(0, 0, 0, 0.5);
        margin-top: 10px;
    }

    .carousel-caption h1,
    .carousel-caption h2 {
        font-size: 18px !important;
        line-height: 24px !important;
    }

    .carousel-caption p {
        font-size: 13px !important;
        line-height: 18px !important;
    }

    .carousel-control-prev,
    .carousel-control-next {
        display: none;
        /* optional: hide on very small phones */
    }
}