/* Base carousel styles */
.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 60px; /* Add padding to make room for external arrows */
}

/* Inner wrapper that handles the overflow */
.carousel-inner {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.reviews-container {
    display: flex;
    transition: transform 0.3s ease-in-out;
    will-change: transform;
}

/* Responsive card widths - now using CSS custom properties for better JS control */
.review-card {
    flex: 0 0 100%; /* Mobile: 1 card per view - default fallback */
    min-width: 100%;
    box-sizing: border-box;
    padding: 0 10px; /* Add some spacing between cards */
    transition: flex 0.3s ease; /* Smooth transition when changing card width */
}

/* Dynamic card width controlled by JavaScript */
.carousel-container {
    --cards-per-view: 1;
}

.carousel-container .review-card {
    flex: 0 0 calc(100% / var(--cards-per-view));
    min-width: calc(100% / var(--cards-per-view));
}

/* Review card styling */
.review-card-inner {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #e5e5e5;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-card-inner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.review-card-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.review-card-text {
    flex-grow: 1;
    margin-bottom: 16px;
}

.review-card-text p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 0;
    font-style: italic;
}

.review-card-name {
    border-top: 1px solid #e5e5e5;
    padding-top: 16px;
}

.review-card-name span {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

/* Tablet: 2 cards per view */
@media (min-width: 768px) {
    .carousel-container:not([style*="--cards-per-view"]) .review-card {
        flex: 0 0 50%;
        min-width: 50%;
    }
}

/* Desktop: 3 cards per view */
@media (min-width: 1024px) {
    .carousel-container:not([style*="--cards-per-view"]) .review-card {
        flex: 0 0 33.333%;
        min-width: 33.333%;
    }
}

/* Navigation buttons - positioned outside */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: 2px solid rgba(0, 0, 0, 0.1);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: #FED42B;
    color: #333;
    border-color: #FED42B;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(254, 212, 43, 0.3);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 0; /* Positioned at the very edge of container */
}

.carousel-next {
    right: 0; /* Positioned at the very edge of container */
}

/* Hide navigation buttons if not needed */
@media (max-width: 767px) {
    .carousel-btn {
        display: none;
    }
}

/* Show buttons on larger screens */
@media (min-width: 768px) {
    .carousel-btn {
        display: block;
    }
}

/* Dots indicator */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

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

.carousel-dot.active {
    background: #FED42B;
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: #FED42B;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .carousel-container {
        padding: 0 5px; /* Minimal padding on mobile since arrows are hidden */
    }
    
    .review-card {
        padding: 0 5px; /* Reduce padding on mobile */
    }
    
    .review-card-inner {
        padding: 20px;
    }
    
    .review-card-text p {
        font-size: 15px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .carousel-btn:hover {
        box-shadow: 0 3px 10px rgba(254, 212, 43, 0.25);
    }
    
    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}

/* Tablet specific adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .carousel-container {
        padding: 0 50px; /* Slightly less padding on tablet */
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 17px;
    }
    
    .carousel-btn:hover {
        box-shadow: 0 3px 10px rgba(254, 212, 43, 0.25);
    }
    
    .review-card-inner {
        padding: 22px;
    }
}

/* Desktop specific adjustments */
@media (min-width: 1024px) {
    .carousel-container {
        padding: 0 60px; /* Full padding on desktop for external arrows */
    }
    
    .review-card {
        padding: 0 15px; /* More spacing on desktop */
    }
    
    .review-card-inner {
        padding: 28px;
    }
    
    .carousel-btn {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    .carousel-btn:hover {
        box-shadow: 0 4px 15px rgba(254, 212, 43, 0.35);
    }
    
    .review-card-text p {
        font-size: 17px;
    }
}

/* Accessibility */
.carousel-btn:focus,
.carousel-dot:focus {
    outline: 3px solid #FED42B;
    outline-offset: 2px;
}

.carousel-btn:focus {
    background: #FED42B;
    color: #333;
    border-color: #FED42B;
}

/* Smooth scrolling for reduced motion users */
@media (prefers-reduced-motion: reduce) {
    .reviews-container {
        transition: none !important;
    }
    
    .review-card-inner {
        transition: none !important;
    }
}
.reviews-container {
    padding-top:35px;
    padding-bottom:35px;
}

