/* --------------------------------------
   1. BASE STYLES & KINETIC PARALLAX
-------------------------------------- */
#carouselKinetic .carousel {
    max-height: 100vh !important;
    overflow: hidden;
    position: relative;
}

#carouselKinetic .carousel-item {
    height: 100%;
    min-height: 400px;
    background-color: #333;
    position: relative;
}

#carouselKinetic .carousel-item {
    height: 100%;
    min-height: 400px;
    background-color: #333;
    position: relative;
}

#carouselKinetic .carousel-item img {
    object-fit: cover;
    width: 100%;
    height: 100vh;  
    transition: transform 0.6s ease-in-out;
}

.carousel-item.active img {
    transform: translateX(0%);
}

.carousel-item-next:not(.carousel-item-start) img,
.carousel-item-prev:not(.carousel-item-end) img {
    transform: translateX(5%);
}

#carouselKinetic .carousel-item-start img {
    transform: translateX(-5%);
}

#carouselKinetic .carousel-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* --------------------------------------
   2. CAPTION STYLING & POSITION
-------------------------------------- */
.carousel-caption {
    z-index: 2;
    top: 35%;
    left: 8%;
    right: auto;
    text-align: left;
    max-width: 100%;
}

.carousel-caption h5 {
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    border-right: 0.15em solid white;
}

.carousel-caption p {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    font-weight: 300;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9);
    opacity: 0;
    transform: translateY(20px);
    color: #fff;
}

/* --------------------------------------
   3. TEXT ANIMATIONS
-------------------------------------- */
@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: white;
    }
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hide-caret {
    to {
        border-color: transparent;
    }
}

.carousel-item.active .carousel-caption h5 {
    animation:
        typing 2.5s steps(100, end) forwards,
        blink-caret 0.75s step-end 3 alternate,
        hide-caret 0.1s linear 1.5s forwards;
}

.carousel-item.active .carousel-caption p {
    animation: slideUpFade 0.6s ease-out forwards;
    animation-delay: 1.8s;
}

/* --------------------------------------
   4. INDICATORS & CONTROLS
-------------------------------------- */
.carousel-indicators {
    bottom: 10%;
    z-index: 2;
    justify-content: flex-start;
    left: 8%;
    margin-right: 0;
    margin-left: 0;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid white;
    margin-right: 8px;
    opacity: 1;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.carousel-indicators .active {
    background-color: #ffffff;
}

.carousel-control-prev,
.carousel-control-next {
    opacity: 0.8;
    transition: opacity 0.3s ease;
    width: 5%;
}

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

/* --------------------------------------
   5. RESPONSIVE FIXES
-------------------------------------- */
@media (max-width: 991px) {
    .carousel-caption {
        bottom: 20%;
        left: 5%;
        max-width: 90%;
    }

    .carousel-caption h5 {
        font-size: 2rem;
        border-right: none;
        white-space: normal;
        width: 100%;
    }

    .carousel-caption p {
        font-size: 1rem;
        animation-delay: 0s;
        opacity: 1;
        transform: none;
    }

    .carousel-indicators {
        bottom: 8%;
        left: 50%;
        transform: translateX(-50%);
        justify-content: center;
    }

    .carousel-item img {
        height: 60vh;
    }
}

@media (max-width: 576px) {
    .carousel-caption {
        bottom: 15%;
        left: 5%;
        right: 5%;
        text-align: center;
    }

    .carousel-caption h5 {
        font-size: 1.6rem;
    }

    .carousel-caption p {
        font-size: 0.9rem;
    }

    #carouselKinetic .carousel-item img {
        height: 50vh !important;
    }
}