/* Reviews Carousel Layout and Animation Fixes - Full Width */
.reviews-carousel {
    position: relative;
    overflow: visible;
    min-height: 600px; /* Fixed minimum height to prevent shifting */
    padding: 60px 0; /* Vertical padding for spacing */
}

#parentReviewsCarousel {
    position: relative;
    overflow: visible; /* Allow arrows to show outside */
    padding: 0; /* No padding for full width */
    margin: 0; /* No margin for full width */
    max-width: none; /* Remove max-width constraints */
    min-height: 400px; /* Ensure adequate height for content */
}

/* Smooth transitions for all carousel changes */
#parentReviewsCarousel .carousel-item {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: 350px;
}

#parentReviewsCarousel .carousel-item .row {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    width: 100%;
}

/* Optimized review cards width */
#parentReviewsCarousel .col-md-8 {
    max-width: 80%; /* Optimized width for readability */
}

/* Balanced container adjustments */
.reviews-carousel .container {
    max-width: 1400px; /* Reasonable max width */
    padding-left: 15px;
    padding-right: 15px;
    margin: 0 auto;
}

/* Spacing between review cards */
#parentReviewsCarousel .review-card {
    margin: 20px 0;
}

/* Navigation positioning - fixed for both arrows */
#parentReviewsCarousel .carousel-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

#parentReviewsCarousel .carousel-nav .collage-nav-btn {
    pointer-events: auto;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
}

#parentReviewsCarousel .carousel-nav .collage-nav-btn.prev {
    left: -60px; /* Outside container */
}

#parentReviewsCarousel .carousel-nav .collage-nav-btn.next {
    right: -60px; /* Outside container */
}

/* Mobile specific fixes for reviews carousel - Full Width */
@media (max-width: 768px) {
    .reviews-carousel {
        min-height: 500px; /* Smaller fixed height for mobile */
    }
    
    #parentReviewsCarousel {
        min-height: 350px;
        padding: 0; /* No padding for full width */
        margin: 0; /* No margin for full width */
    }
    
    #parentReviewsCarousel .carousel-item {
        min-height: 300px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    /* Much wider cards on mobile for full-width */
    #parentReviewsCarousel .col-md-8 {
        max-width: 85%; /* Wider for full-width mobile */
    }
    
    /* Mobile container adjustments */
    .reviews-carousel .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Mobile arrow positioning */
    #parentReviewsCarousel .carousel-nav .collage-nav-btn.prev {
        left: -40px; /* Outside mobile container */
    }
    
    #parentReviewsCarousel .carousel-nav .collage-nav-btn.next {
        right: -40px; /* Outside mobile container */
    }
    
    /* Ensure proper carousel animation on mobile */
    #parentReviewsCarousel .carousel-inner {
        position: relative;
        width: 100%;
        overflow: hidden;
    }
    
    #parentReviewsCarousel .carousel-item {
        position: relative;
        display: none;
        float: left;
        width: 100%;
        margin-right: -100%;
        backface-visibility: hidden;
        transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    #parentReviewsCarousel .carousel-item.active {
        display: block;
    }
    
    /* Smooth animation transitions for mobile */
    #parentReviewsCarousel .carousel-item.active,
    #parentReviewsCarousel .carousel-item-next,
    #parentReviewsCarousel .carousel-item-prev {
        display: block;
    }
    
    #parentReviewsCarousel .carousel-item-next:not(.carousel-item-start),
    #parentReviewsCarousel .active.carousel-item-end {
        transform: translateX(100%);
    }
    
    #parentReviewsCarousel .carousel-item-prev:not(.carousel-item-end),
    #parentReviewsCarousel .active.carousel-item-start {
        transform: translateX(-100%);
    }
}

/* Better spacing for download button section */
.reviews-carousel + section .text-center {
    margin-top: 2rem !important;
    margin-bottom: 2rem;
}

.reviews-carousel .text-center.mt-5 {
    margin-top: 2rem !important; /* Closer to review card */
    padding: 0 20px;
}

/* Mobile download button spacing */
@media (max-width: 768px) {
    .reviews-carousel .text-center.mt-5 {
        margin-top: 1.5rem !important; /* Even closer on mobile */
    }
}

/* Carousel indicators hidden */
#parentReviewsCarousel .carousel-indicators {
    display: none !important;
}
