/* Reviews Carousel Styles */

.reviews-carousel-wrapper {
    width: 100%;
    position: relative;
}

.reviews-carousel-swiper {
    padding: 40px 0;
    width: 100%;
}

/* Equal-height cards.
   Swiper sizes each slide to its own content by default, so a short review
   makes a short card. Stretching the wrapper and letting the card fill the
   slide makes every card in view match the tallest one. */
.reviews-carousel-swiper .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.reviews-carousel-swiper .swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
}

.reviews-carousel-swiper .swiper-slide > .review-card {
    width: 100%;
    flex: 1 1 auto;
}

/* Review Card Styles */
.review-card {
    background-color: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

/* Review Header & Reviewer Info */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.reviewer-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.reviewer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.reviewer-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reviewer-name {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin: 0;
    line-height: 1.2;
}

.review-time {
    font-size: 13px;
    color: #999999;
    margin: 0;
    line-height: 1.2;
}

/* Review Rating */
.review-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.stars {
    display: flex;
    gap: 2px;
    font-size: 16px;
}

.star {
    color: #ffc107;
    line-height: 1;
}

.star.empty {
    color: #e0e0e0;
}

.rating-number {
    font-size: 13px;
    color: #999999;
    font-weight: 500;
}

/* Review Text */
.review-text {
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
    margin: 0 0 20px 0;
    flex: 1 0 auto;
}

/* Read More Link */
.read-more {
    color: #999999;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
    display: inline-block;
    margin-top: auto;
    align-self: flex-start;
}

.read-more:hover {
    color: #000000;
}

/* Navigation Arrows */
.swiper-button-prev,
.swiper-button-next {
    width: 40px;
    height: 40px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
    color: #000000;
    font-size: 20px;
    z-index: 10;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    content: '';
    font-size: 20px;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background-color: #f5f5f5;
    border-color: #999999;
}

.swiper-button-prev:disabled,
.swiper-button-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.swiper-button-prev {
    left: 10px;
}

.swiper-button-next {
    right: 10px;
}

/* Pagination Dots */
.swiper-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 20px;
}

.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background-color: #999999;
    width: 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .swiper-button-prev,
    .swiper-button-next {
        width: 36px;
        height: 36px;
    }

    .review-card {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .swiper-button-prev,
    .swiper-button-next {
        width: 32px;
        height: 32px;
        top: 10px;
    }

    .swiper-button-prev {
        left: 0;
    }

    .swiper-button-next {
        right: 0;
    }

    .review-card {
        padding: 20px;
    }

    .reviewer-image {
        width: 45px;
        height: 45px;
    }

    .reviewer-name {
        font-size: 15px;
    }

    .review-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .reviews-carousel-swiper {
        padding: 30px 0 50px;
    }

    .review-card {
        padding: 15px;
    }

    .reviewer-info {
        gap: 12px;
    }

    .reviewer-image {
        width: 40px;
        height: 40px;
    }

    .reviewer-name {
        font-size: 14px;
    }

    .review-time {
        font-size: 12px;
    }

    .stars {
        font-size: 14px;
    }

    .review-text {
        font-size: 12px;
        line-height: 1.5;
        margin-bottom: 15px;
    }

    .swiper-pagination {
        padding-top: 30px;
    }

    .swiper-button-prev {
        left: -20px;
    }

    .swiper-button-next {
        right: -20px;
    }
}

/* Loading state */
.reviews-carousel-swiper.swiper-container-autoplay .swiper-slide {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Accessibility */
.swiper-button-prev:focus-visible,
.swiper-button-next:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

.read-more:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
}
