/***************************
 SPINNER (SAFE)
****************************/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease-out, visibility .3s linear;
    z-index: 99999;
}

#spinner.show {
    opacity: 1;
    visibility: visible;
}


/***************************
 CAROUSEL – CLEAN & FIXED
****************************/

/* Base carousel item */
.carousel-item {
    position: relative;
    min-height: 90vh;
    overflow: hidden;
}

/* Carousel image */
.carousel-item img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dark overlay */
.carousel-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

/* Caption container */
.carousel-caption {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Caption text safety */
.carousel-caption p {
    max-width: 700px;
    margin: 0 auto 35px auto;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Headings */
.carousel-caption h1 {
    line-height: 1.2;
}

/***************************
 CAROUSEL CONTROLS
****************************/
.carousel-control-prev,
.carousel-control-next {
    width: 90px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bs-primary);
    opacity: 1;
}

.carousel-control-prev {
    left: 0;
    border-radius: 0 50px 50px 0;
}

.carousel-control-next {
    right: 0;
    border-radius: 50px 0 0 50px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--bs-secondary);
    transition: .6s;
}

/***************************
 CAROUSEL INDICATORS
****************************/
#carouselId .carousel-indicators li {
    width: 30px;
    height: 10px;
    background: var(--bs-primary);
    margin: 10px;
    border-radius: 30px;
    opacity: 1;
}

#carouselId .carousel-indicators li:hover {
    background: var(--bs-secondary);
}


/***************************
 RESPONSIVE FIXES
****************************/
@media (max-width: 992px) {
    .carousel-item {
        min-height: 500px;
    }

    .carousel-caption h1 {
        font-size: 40px !important;
    }

    .carousel-caption p {
        font-size: 16px !important;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        min-height: 400px;
    }

    .carousel-caption h1 {
        font-size: 28px !important;
    }

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