/* css/carouselStyle.css */

/* Main container for the carousel */
.carousel-container {
    max-width: 1170px; /* Reintroduced max-width */
    width: 95%;       /* Responsive width below max-width */
    margin: 0 auto 2rem auto; /* Center horizontally, add bottom margin */
    position: relative;
    overflow: hidden;
    border-radius: 8px; /* Restore border-radius */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.8s 0.3s ease-out forwards;
}

/* Individual slide styling */
.carousel-slide {
    display: none;
    width: 100%;
    backface-visibility: hidden;
    /* Added background color for letterboxing */
    background-color: #f0f0f0; /* Light grey background, change as needed */
    /* Center the contained image */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image within a slide */
.carousel-slide img {
    width: 100%;
    height: 500px; /* Keep fixed height for consistent carousel size */
    display: block;
    object-fit: contain; /* Changed from cover to contain */
    transform-origin: center center;
    /* Ensure image doesn't exceed container width/height when contained */
    max-width: 100%;
    max-height: 100%;
}

/* Active slide state */
.carousel-slide.active {
    display: flex; /* Keep flex for centering */
    animation: slideFadeInFromRight 0.9s ease-out;
}

/* Apply Ken Burns effect ONLY to the image within the ACTIVE slide */
/* Ken Burns might look odd with 'contain', consider removing if it does */
.carousel-slide.active img {
    /* animation: kenburns 25s ease-in-out infinite alternate; */ /* Commented out Ken Burns */
}


/* Keyframes for slide-in animation with fade */
@keyframes slideFadeInFromRight {
    from {
        transform: translateX(50%);
        opacity: 0.3;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Keyframes for Ken Burns effect (subtle zoom) */
@keyframes kenburns {
    0% {
        transform: scale(1.0) translateX(0) translateY(0);
    }
    100% {
        transform: scale(1.1) translateX(-2%) translateY(1%);
    }
}

/* Keyframes for fade-in effect (used on container) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Navigation Dots */
.carousel-dots {
    text-align: center;
    padding: 10px 0;
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    z-index: 15;
}

.carousel-dots .dot {
    cursor: pointer;
    height: 11px;
    width: 11px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.5s ease, transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.carousel-dots .dot:hover,
.carousel-dots .dot.active {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.15);
}

/* Previous & Next Buttons */
.carousel-prev, .carousel-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: background-color 0.4s ease, transform 0.2s ease;
    border-radius: 50%;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5); /* Default dark background */
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-prev:hover, .carousel-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Optional: Slide Captions */
.carousel-caption {
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: #fff;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.65);
    padding: 10px 18px;
    border-radius: 5px;
    font-size: 1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .carousel-container {
        width: 95%; /* Keep relative width */
        /* max-width: none; No need to override if width is % */
        border-radius: 8px; /* Keep radius */
        margin-bottom: 1.5rem;
    }
    .carousel-slide img {
        height: 300px; /* Adjust height for mobile */
    }
    .carousel-dots {
        bottom: 10px;
    }
    .carousel-dots .dot {
        height: 9px;
        width: 9px;
    }
    .carousel-prev, .carousel-next {
        font-size: 16px;
        height: 38px;
        width: 38px;
        margin-top: -19px;
    }
    .carousel-prev { left: 15px; }
    .carousel-next { right: 15px; }

    .carousel-caption {
        font-size: 0.85rem;
        bottom: 38px;
        padding: 6px 12px;
    }
}

/* Note: These styles assume the image-carousel-component uses
   elements with classes like .carousel-container, .carousel-slide, .carousel-dots, .dot,
   .carousel-prev, .carousel-next internally AND that the prev/next buttons
   contain the appropriate Font Awesome <i> tags (e.g., <i class="fas fa-chevron-left"></i>). */
