/**
 * Carousel Enhancement Styles
 * Additional styles for the hero carousel component
 * Compatible with Bootstrap 4.5 and existing theme
 */

/* Performance optimizations */
.carousel-item {
    will-change: transform;
}

.carousel-image {
    will-change: transform;
    backface-visibility: hidden;
}

/* Accessibility improvements */
.carousel-control-prev:focus,
.carousel-control-next:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Loading states */
.carousel-image.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Error state */
.carousel-image.error {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.2rem;
}

/* Enhanced mobile responsiveness */
@media (max-width: 480px) {
    .carousel-title {
        font-size: 1.8rem !important;
    }
    
    .carousel-description {
        font-size: 0.9rem !important;
    }
    
    .carousel-actions .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .carousel-overlay {
        background: rgba(0, 0, 0, 0.8) !important;
    }
    
    .carousel-title,
    .carousel-description {
        text-shadow: none !important;
        font-weight: bold !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .carousel-fade .carousel-item {
        transition: none !important;
    }
    
    .carousel-title,
    .carousel-description,
    .carousel-actions {
        animation: none !important;
    }
}

/* Print styles */
@media print {
    #heroCarousel {
        display: none !important;
    }
}
