/* ============================================
   Auto-Carousel Enhancements
   ============================================ */

/* Ensure carousel auto-rotates properly */
#demo {
    position: relative;
}

#demo .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

#demo .carousel-item {
    display: none;
    position: relative;
    width: 100%;
}

#demo .carousel-item.active {
    display: block;
}

/* Smooth fade transition */
#demo.carousel-fade .carousel-item {
    opacity: 0;
    transition-property: opacity;
    transition-duration: 0.6s;
}

#demo.carousel-fade .carousel-item.active {
    opacity: 1;
}

/* Image display settings */
#demo .carousel-item img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    display: block;
}

/* Desktop image display */
.destop-show {
    display: block !important;
}

.mobile-show {
    display: none !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #demo .carousel-item img {
        height: 50vh;
    }
    
    .destop-show {
        display: none !important;
    }
    
    .mobile-show {
        display: block !important;
    }
}

/* Indicator animation */
#demo .carousel-indicators li {
    cursor: pointer;
    transition: all 0.3s ease;
}

#demo .carousel-indicators li.active {
    background-color: #fff;
}

/* Pause carousel on hover (optional) */
#demo:hover {
    /* Carousel will pause when hovering */
}

/* Carousel controls accessibility */
#demo .carousel-control-prev,
#demo .carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

#demo .carousel-control-prev:hover,
#demo .carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

#demo .carousel-control-prev {
    left: 20px;
}

#demo .carousel-control-next {
    right: 20px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Mobile controls adjustment */
@media (max-width: 576px) {
    #demo .carousel-control-prev,
    #demo .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    #demo .carousel-control-prev {
        left: 10px;
    }
    
    #demo .carousel-control-next {
        right: 10px;
    }
}
