/* ==========================================================================
   STATE-OF-THE-ART CAROUSEL & BANNER DESIGN SYSTEM
   ========================================================================== */

.carousel {
    position: relative;
    overflow: hidden;
    /* border-radius: 24px; */
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.15);
    /* margin-bottom: 30px; */
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Set dynamic height with smooth responsiveness */
.carousel-item {
    height: 38rem;
    background-color: #0b0f19;
    overflow: hidden;
}

/* Ken Burns (Slow zoom-in) animation on active slide image */
.carousel-item > img {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    height: 38rem;
    object-fit: cover;
    transition: transform 12s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(0.7) contrast(1.1) saturate(1.1);
}

.carousel-item.active > img {
    transform: scale(1.08);
}

/* Beautiful Rich Gradient Overlay over the slide images for text clarity */
.carousel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(75deg, 
        rgba(15, 23, 42, 0.9) 0%, 
        rgba(15, 23, 42, 0.6) 40%, 
        rgba(99, 102, 241, 0.15) 70%,
        rgba(237, 138, 31, 0.15) 100%
    );
    z-index: 1;
}

/* Glassmorphism Floating Caption Cards */
.carousel-caption {
    position: absolute;
    bottom: 5rem;
    left: 8%;
    right: auto;
    z-index: 10;
    width: 48%;
    max-width: 600px;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 6px solid #ed8a1f !important; /* Vivid secondary branding accent */
    border-radius: 20px;
    padding: 35px !important;
    text-align: left;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animate captions when active */
.carousel-item.active .carousel-caption {
    transform: translateY(0);
    opacity: 1;
}

.carousel-caption h5 {
    font-family: 'Outfit', sans-serif !important;
    font-size: 2.35rem !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    color: #ffffff;
    margin-top: 10px;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    text-shadow: none !important;
}

.carousel-caption p {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    color: #e2e8f0 !important;
    font-size: 1.05rem !important;
    line-height: 1.6 !important;
    margin-bottom: 0 !important;
    text-shadow: none !important;
}

/* Pill-shaped Floating Active Indicators */
.carousel-indicators {
    bottom: 2rem;
    justify-content: flex-end;
    margin-right: 8%;
    margin-left: 8%;
    gap: 8px;
    z-index: 15;
}

.carousel-indicators li {
    width: 28px;
    height: 6px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.7;
    cursor: pointer;
}

.carousel-indicators li.active {
    width: 45px;
    background-color: #ed8a1f; /* Secondary gold accent color */
    opacity: 1;
    box-shadow: 0 0 10px rgba(237, 138, 31, 0.5);
}

/* Sleek Round Modern Navigation Arrow Buttons */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 15;
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--color-primary-dark, #073368);
    opacity: 1 !important;
    box-shadow: 0 8px 20px rgba(7, 51, 104, 0.4);
}

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

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

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

/* ==========================================================================
   RESPONSIVE OVERRIDES
   ========================================================================== */

@media (max-width: 991px) {
    .carousel-item {
        height: 32rem;
    }
    .carousel-item > img {
        height: 32rem;
    }
    .carousel-caption {
        width: 75%;
        left: 5%;
        bottom: 4rem;
        padding: 25px !important;
    }
    .carousel-caption h5 {
        font-size: 1.8rem !important;
    }
}

@media (max-width: 767px) {
    .carousel-item {
        height: 28rem;
    }
    .carousel-item > img {
        height: 28rem;
    }
    .carousel-caption {
        width: 90%;
        left: 5%;
        bottom: 3rem;
        padding: 20px !important;
        border-radius: 14px;
    }
    .carousel-caption h5 {
        font-size: 1.45rem !important;
    }
    .carousel-caption p {
        font-size: 0.95rem !important;
    }
    .carousel-control-prev,
    .carousel-control-next {
        display: none; /* Hide arrows on small mobile devices to save space */
    }
}
