/* Enhanced styling for reviews section */

/* Overall section styling */
.customer-reviews {
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
    max-width: 1400px;
    margin: 0 auto;
}

.reviews-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* Summary styling */
.reviews-summary {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 16px;
    padding: 2rem;
    margin: 0 auto 3rem;
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    max-width: 1200px;
}

.average-rating {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 2.5rem;
}

.rating-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(59, 130, 246, 0.2);
    min-width: 200px;
    max-width: 280px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rating-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.rating-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.stars-container {
    color: #f59e0b;
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stars-container i {
    filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.3));
    margin: 0 0.1rem;
}

.rating-count {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    font-weight: 500;
}

.rating-count span {
    margin: 0 0.4rem;
    font-weight: 700;
    color: #fff;
}

/* Rating distribution styling */
.rating-distribution {
    flex: 1;
    width: 100%;
    max-width: 600px;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.rating-bar-container {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
}

.rating-bar-container:last-child {
    margin-bottom: 0;
}

.rating-bar-container:hover {
    transform: translateX(5px);
    background: rgba(59, 130, 246, 0.1);
}

.rating-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 40px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.rating-label i {
    color: #f59e0b;
    font-size: 0.9rem;
}

.rating-bar {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
}

.rating-fill {
    height: 100%;
    background: linear-gradient(to right, #3b82f6, #60a5fa);
    border-radius: 6px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
}

.rating-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2));
    border-radius: 6px;
}

.rating-percent {
    width: 45px;
    text-align: right;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    transition: all 0.3s ease;
}

.rating-bar-container:hover .rating-percent {
    color: #fff;
    transform: scale(1.05);
}

.filter-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.rating-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    width: 100%;
}

.btn-filter {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-filter:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.btn-filter.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-write-review {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-write-review:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-write-review::before {
    content: "\f303";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* New Testimonials Carousel */
.testimonials-carousel {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 2rem;
    overflow: hidden;
}

.testimonials-carousel .loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: var(--primary-color);
    font-size: 2rem;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.testimonial-slide {
    flex: 0 0 100%;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem;
}

.testimonial-card {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 1.8rem;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(15, 23, 42, 0.8);
}

.testimonial-header {
    display: flex;
    margin-bottom: 1.2rem;
    align-items: flex-start;
    gap: 1rem;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.testimonial-info {
    flex: 1;
}

.testimonial-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.testimonial-stars {
    color: #f59e0b;
    font-size: 0.9rem;
    display: flex;
    gap: 0.15rem;
    margin-bottom: 0.5rem;
}

.testimonial-verified {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.testimonial-content {
    flex: 1;
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    font-size: 0.95rem;
}

.testimonial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.reviewer-info {
    display: flex;
    flex-direction: column;
}

.reviewer-name {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.review-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.helpful-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.helpful-stats {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.helpful-button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.helpful-button i {
    color: var(--primary-color);
}

.helpful-button:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.helpful-button.marked {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.testimonial-nav {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.testimonial-nav:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.testimonial-nav.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.testimonial-indicators {
    display: flex;
    gap: 0.5rem;
}

.testimonial-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.25s ease;
    cursor: pointer;
}

.testimonial-indicator.active {
    background: var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .average-rating {
        flex-direction: column;
        align-items: center;
    }
    
    .rating-card {
        margin-bottom: 1.5rem;
        width: 100%;
    }
    
    .rating-distribution {
        width: 100%;
        max-width: 100%;
    }
    
    .filter-controls {
        align-items: center;
        margin-top: 2rem;
    }
    
    .rating-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .customer-reviews {
        padding: 3rem 0;
    }
    
    .testimonials-carousel {
        width: 95%;
    }
    
    .testimonial-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .reviews-summary {
        padding: 1.5rem;
    }
    
    .rating-number {
        font-size: 2.5rem;
    }
    
    .stars-container {
        font-size: 1rem;
    }
    
    .rating-distribution {
        padding: 1.2rem;
    }
    
    .rating-label {
        width: 35px;
        font-size: 0.9rem;
    }
    
    .rating-bar-container {
        padding: 0.4rem 0.5rem;
        gap: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .rating-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn-filter {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
}

@media (max-width: 480px) {
    .reviews-summary {
        padding: 1.2rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .rating-number {
        font-size: 2.2rem;
    }
    
    .rating-stars {
        font-size: 0.9rem;
    }
    
    .btn-filter {
        font-size: 0.75rem;
        padding: 0.5rem 0.8rem;
    }
    
    .rating-label {
        width: 30px;
        font-size: 0.85rem;
    }
    
    .rating-percent {
        width: 40px;
        font-size: 0.85rem;
    }
    
    .testimonial-avatar {
        width: 40px;
        height: 40px;
    }
    
    .testimonial-title {
        font-size: 1.05rem;
    }
    
    .testimonial-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .helpful-container {
        width: 100%;
        justify-content: space-between;
    }
}

/* Loading Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.fa-spin {
    animation: spin 1s linear infinite;
} 