/* Carousel Styles */
.review-carousel {
    position: relative;
    overflow: visible; /* Changed from hidden to visible to prevent arrow cutoff */
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.review-carousel-container {
    width: 100%;
    padding: 0 10px 0 60px; /* left padding to prevent left-arrow overlapping image */
}

.review-slide {
    display: flex;
    gap: 30px;
    align-items: center;
    padding: 20px 0;
}

.carousel-arrows {
    position: absolute;
    width: calc(100% + 40px); /* Extend width to prevent arrow cutoff */
    top: 50%;
    left: -20px; /* Offset the increased width */
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    z-index: 2;
    pointer-events: none; /* Allows clicks to pass through except for arrows */
}

.carousel-arrow {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    pointer-events: auto; /* Re-enable pointer events just for arrows */
}

.carousel-arrow:hover {
    background-color: var(--primary-color);
    color: white;
}

.carousel-arrow.prev {
    margin-left: 10px;
}

.carousel-arrow.next {
    margin-right: 10px;
}

.review-section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.review-section-header h3 {
    font-size: 2rem;
    font-weight: 500;
    color: var(--primary-color);
}

/* Review text styling */
.review-text {
    flex: 1;
    padding-right: 60px; /* space to prevent overlap with right arrow */
}

.review-text blockquote {
    font-style: italic;
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
    margin: 12px 0;
    position: relative;
    padding-left: 10px;
    border-left: 3px solid var(--primary-color);
}

.review-author {
    font-size: 0.9rem;
    font-weight: 500;
    color: #777;
    text-align: right;
    margin-top: 8px;
}

/* Animation for slide transition */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Text centering utility */
.text-center {
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .review-slide {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }
    
    .review-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-right: 20px; /* smaller padding on mobile */
    }
    
    .review-text blockquote {
        border-left: none;
        padding-left: 0;
        text-align: center;
        font-size: 0.95rem;
        max-width: 280px;
    }
    
    .review-author {
        text-align: center;
    }
    
    .carousel-arrows {
        top: 30%;
        width: calc(100% + 30px);
        left: -15px;
    }

    /* reduce left padding on small screens so content stays centered */
    .review-carousel-container {
        padding-left: 20px;
    }
    
    .carousel-arrow {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .carousel-arrow.prev {
        margin-left: 5px;
    }
    
    .carousel-arrow.next {
        margin-right: 5px;
    }
}