/* Carousel Container - MUST have defined space */
.image-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    background: transparent;
}

/* Carousel Track - Flex container */
.image-carousel {
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.5s ease-in-out;
    width: 100%;
    height: auto;
    position: relative;
}

/* Individual Slides - CRITICAL: Must take full width */
.carousel-slide {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    display: block;
}

/* Images - CRITICAL: Must be visible and sized */
.carousel-slide img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block !important;
    border-radius: 8px;
    object-fit: contain;
    margin: 0;
    padding: 0;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Caption Styling */
.carousel-caption {
    padding: 15px 20px;
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background: transparent;
    margin-top: 10px;
    display: block;
    width: 100%;
}

/* Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 30px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    border-radius: 4px;
    line-height: 1;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

/* Dots Navigation */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    position: relative;
    z-index: 5;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.carousel-dot:hover {
    background: #999;
    transform: scale(1.2);
}

.carousel-dot.active {
    background: #333;
    transform: scale(1.3);
}

.carousel-dot:focus {
    outline: 2px solid #333;
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-btn {
        font-size: 24px;
        padding: 8px 12px;
    }

    .carousel-prev {
        left: 5px;
    }

    .carousel-next {
        right: 5px;
    }

    .carousel-caption {
        font-size: 14px;
        padding: 12px 15px;
    }

    .carousel-dots {
        padding: 15px 0;
        gap: 8px;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .carousel-btn {
        font-size: 20px;
        padding: 6px 10px;
    }

    .carousel-caption {
        font-size: 13px;
        padding: 10px;
    }

    .carousel-dots {
        gap: 6px;
    }

    .carousel-dot {
        width: 8px;
        height: 8px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    .image-carousel,
    .carousel-btn,
    .carousel-dot,
    .carousel-slide {
        transition: none !important;
    }
}

/* Print Styles */
@media print {

    .carousel-btn,
    .carousel-dots {
        display: none;
    }

    .image-carousel {
        display: block;
    }

    .carousel-slide {
        display: block;
        page-break-inside: avoid;
        min-width: 100%;
    }
}