/* Testimonials Section Styles */

.testimonials {
    background: var(--color-gray-50);
}

.testimonials-slider {
    position: relative;
    margin-bottom: var(--spacing-3xl);
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.testimonials-track {
    display: flex;
    transition: transform var(--transition-slow);
}

.testimonial-card {
    min-width: 100%;
    padding: var(--spacing-xl);
}

.testimonial-content {
    background: var(--color-white);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.testimonial-content::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: var(--spacing-xl);
    font-size: 4rem;
    color: var(--color-primary);
    font-family: serif;
    line-height: 1;
}

.testimonial-rating {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
    justify-content: center;
}

.star {
    font-size: var(--font-size-lg);
    color: #fbbf24;
}

.testimonial-text {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    color: var(--color-gray-700);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    font-style: italic;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    justify-content: center;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.avatar-initials {
    color: var(--color-white);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
}

.author-info {
    text-align: left;
}

.author-name {
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-900);
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-base);
}

.author-position {
    font-size: var(--font-size-sm);
    color: var(--color-gray-600);
}

.testimonials-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.testimonials-btn {
    background: var(--color-white);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-full);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.testimonials-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.testimonials-btn:active {
    transform: scale(0.95);
}

.testimonials-dots {
    display: flex;
    gap: var(--spacing-sm);
}

.testimonials-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--color-gray-300);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.testimonials-dot:hover {
    background: var(--color-gray-400);
    transform: scale(1.2);
}

.testimonials-dot.active {
    background: var(--color-primary);
    transform: scale(1.3);
}

.testimonials-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    background: var(--color-white);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-gray-200);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-lg);
    position: relative;
    transition: transform var(--transition-fast);
}

.stat-item:hover {
    transform: translateY(-4px);
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background: var(--color-gray-200);
}

.stat-number {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    display: block;
    line-height: 1;
}

.stat-label {
    color: var(--color-gray-600);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
}

/* Анимации для отзывов */
@keyframes testimonialSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonial-card.active .testimonial-content {
    animation: testimonialSlideIn 0.6s ease-out;
}

/* Адаптивность */
@media (max-width: 768px) {
    .testimonial-card {
        padding: var(--spacing-md);
    }
    
    .testimonial-content {
        padding: var(--spacing-lg);
    }
    
    .testimonial-content::before {
        font-size: 3rem;
        left: var(--spacing-md);
    }
    
    .testimonial-text {
        font-size: var(--font-size-base);
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .author-info {
        text-align: center;
    }
    
    .author-avatar {
        width: 50px;
        height: 50px;
    }
    
    .testimonials-controls {
        gap: var(--spacing-md);
    }
    
    .testimonials-btn {
        width: 40px;
        height: 40px;
    }
    
    .testimonials-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
        padding: var(--spacing-lg);
    }
    
    .stat-item {
        padding: var(--spacing-md);
    }
    
    .stat-item:nth-child(odd)::after {
        display: none;
    }
    
    .stat-item:nth-child(1)::after,
    .stat-item:nth-child(2)::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60%;
        height: 1px;
        background: var(--color-gray-200);
    }
    
    .stat-number {
        font-size: var(--font-size-3xl);
    }
}

@media (max-width: 480px) {
    .testimonials-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item:nth-child(1)::after,
    .stat-item:nth-child(2)::after,
    .stat-item:nth-child(3)::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60%;
        height: 1px;
        background: var(--color-gray-200);
    }
    
    .stat-item:last-child::after {
        display: none;
    }
    
    .testimonial-content {
        padding: var(--spacing-md);
    }
    
    .testimonials-controls {
        flex-wrap: wrap;
    }
}

/* Темная тема для отзывов */
@media (prefers-color-scheme: dark) {
    .testimonials {
        background: var(--color-dark-bg, #1f2937);
    }
    
    .testimonial-content {
        background: var(--color-dark-surface, #374151);
        color: var(--color-dark-text, #f9fafb);
    }
    
    .testimonial-text {
        color: var(--color-dark-text-secondary, #d1d5db);
    }
    
    .author-name {
        color: var(--color-dark-text, #f9fafb);
    }
    
    .author-position {
        color: var(--color-dark-text-secondary, #9ca3af);
    }
    
    .testimonials-stats {
        background: var(--color-dark-surface, #374151);
        border-color: var(--color-dark-border, #4b5563);
    }
    
    .stat-label {
        color: var(--color-dark-text-secondary, #9ca3af);
    }
    
    .testimonials-btn {
        background: var(--color-dark-surface, #374151);
        border-color: var(--color-primary);
        color: var(--color-primary);
    }
    
    .testimonials-btn:hover {
        background: var(--color-primary);
        color: var(--color-white);
    }
}

/* Улучшения доступности */
.testimonials-btn:focus,
.testimonials-dot:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.testimonials-slider:focus-within .testimonials-track {
    /* Приостанавливаем автопрокрутку при фокусе */
    animation-play-state: paused;
}

/* Уменьшение анимаций для пользователей с ограниченными возможностями */
@media (prefers-reduced-motion: reduce) {
    .testimonials-track {
        transition: none;
    }
    
    .testimonial-content {
        animation: none;
    }
    
    .testimonials-btn,
    .testimonials-dot,
    .stat-item {
        transition: none;
    }
}
