/**
 * Modern Testimonials Section CSS
 * Professional design with advanced animations and effects
 */

/* CSS Variables */
:root {
    --testimonial-primary: var(--primary-color, #667eea);
    --testimonial-secondary: var(--secondary-color, #764ba2);
    --testimonial-gradient: linear-gradient(135deg, var(--testimonial-primary) 0%, var(--testimonial-secondary) 100%);
    --testimonial-accent: #f093fb;
    --testimonial-text: #2d3748;
    --testimonial-text-light: #718096;
    --testimonial-bg: #ffffff;
    --testimonial-bg-alt: #f7fafc;
    --testimonial-border: #e2e8f0;
    --testimonial-shadow: 0 10px 25px rgba(102, 126, 234, 0.1);
    --testimonial-shadow-hover: 0 20px 40px rgba(102, 126, 234, 0.2);
    --testimonial-radius: 20px;
    --testimonial-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --testimonial-animation-duration: 0.6s;
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
    :root {
        --testimonial-text: #f7fafc;
        --testimonial-text-light: #a0aec0;
        --testimonial-bg: #1a202c;
        --testimonial-bg-alt: #2d3748;
        --testimonial-border: #4a5568;
        --testimonial-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
        --testimonial-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.4);
    }
}

/* Main Section - Professional Background like Pricing */
.testimonials-section {
    position: relative;
    padding: 120px 0;
    background: linear-gradient(135deg, var(--testimonial-primary) 0%, var(--testimonial-secondary) 50%, #f093fb 100%);
    overflow: hidden;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-100px); }
}

/* Floating Elements */
.testimonials-floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.testimonials-floating-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.testimonials-floating-shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.testimonials-floating-shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 20%;
    right: 15%;
    animation-delay: 2s;
}

.testimonials-floating-shape:nth-child(3) {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.testimonials-section .container {
    position: relative;
    z-index: 2;
}

/* Section Header - Professional Style */
.testimonials-header {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 80px;
}

.testimonials-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 12px 24px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonials-badge:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.testimonials-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: white;
    margin-bottom: 24px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ffffff, #e0e7ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.testimonials-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Testimonials Container */
.testimonials-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

/* Testimonials Slider */
.testimonials-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--testimonial-radius);
}

.testimonials-track {
    display: flex;
    transition: transform var(--testimonial-transition);
    will-change: transform;
}

.testimonial-slide {
    min-width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Testimonial Card - Glass Morphism Design */
.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    overflow: hidden;
    transform-style: preserve-3d;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--testimonial-gradient);
    transform: scaleX(0);
    transition: transform var(--testimonial-transition);
    transform-origin: left;
}

.testimonial-card:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.testimonial-card:hover::before {
    transform: scaleX(1);
}

.testimonial-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.testimonial-card:hover::after {
    left: 100%;
}

/* Quote Mark */
.quote-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 30px;
    display: block;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Testimonial Text */
.testimonial-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: white;
    margin-bottom: 40px;
    font-style: italic;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Author Section */
.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.author-avatar-wrapper {
    position: relative;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover .author-avatar {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

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

.author-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.author-position {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Rating */
.testimonial-rating {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
}

.testimonial-rating .fas.fa-star {
    color: #ffd700;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.testimonial-rating .fas.fa-star:not(.filled) {
    color: rgba(255, 255, 255, 0.3);
}

.testimonial-card:hover .testimonial-rating .fas.fa-star.filled {
    transform: scale(1.2);
}

/* Navigation */
.testimonials-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-top: 60px;
}

.testimonial-nav-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.testimonial-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    z-index: -1;
}

.testimonial-nav-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.testimonial-nav-btn:hover::before {
    transform: scale(1);
}

.testimonial-nav-btn i {
    position: relative;
    z-index: 2;
}

.testimonial-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Dots Indicator */
.testimonials-dots {
    display: flex;
    gap: 15px;
    align-items: center;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(10px);
}

.testimonial-dot.active {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.3);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.testimonial-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Auto-play Indicator */
.auto-play-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 0.85rem;
    color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.auto-play-indicator:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.auto-play-indicator.paused {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}

/* Progress Bar */
.testimonial-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--testimonial-gradient);
    transition: width var(--testimonial-transition);
    border-radius: 0 3px 0 0;
}

/* Animations */
@keyframes testimonialFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes testimonialSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes testimonialPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.testimonial-card.animate-in {
    animation: testimonialFadeIn var(--testimonial-animation-duration) ease-out;
}

.testimonial-slide.slide-in {
    animation: testimonialSlideIn var(--testimonial-animation-duration) ease-out;
}

.testimonial-dot.pulse {
    animation: testimonialPulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .testimonials-section {
        padding: 80px 0;
    }
    
    .testimonials-title {
        font-size: 2.5rem;
    }
    
    .testimonials-subtitle {
        font-size: 1.1rem;
    }
    
    .testimonial-card {
        padding: 30px 25px;
        margin: 0 10px;
    }
    
    .testimonial-text {
        font-size: 1.1rem;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .author-details {
        text-align: center;
    }
    
    .author-avatar {
        width: 60px;
        height: 60px;
    }
    
    .testimonials-navigation {
        gap: 20px;
        margin-top: 40px;
    }
    
    .testimonial-nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .auto-play-indicator {
        position: static;
        margin: 0 auto 30px;
        display: inline-flex;
    }
    
    .testimonials-floating-shape {
        display: none;
    }
}

@media (max-width: 480px) {
    .testimonials-title {
        font-size: 2rem;
    }
    
    .testimonial-card {
        padding: 25px 20px;
    }
    
    .quote-icon {
        font-size: 2.5rem;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    .testimonials-badge {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .auto-play-indicator {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    .testimonials-section {
        background: white !important;
        padding: 40px 0;
    }
    
    .testimonials-section::before,
    .testimonials-floating-elements {
        display: none !important;
    }
    
    .testimonials-navigation,
    .auto-play-indicator {
        display: none;
    }
    
    .testimonial-card {
        background: white !important;
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    .testimonials-title,
    .testimonial-text,
    .author-name,
    .author-position {
        color: black !important;
        text-shadow: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .testimonial-card {
        border: 2px solid var(--testimonial-text);
    }
    
    .testimonial-nav-btn {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .testimonial-card:hover {
        transform: none;
    }
    
    .testimonials-track {
        transition: none;
    }
}

/* Focus Styles for Accessibility */
.testimonial-nav-btn:focus,
.testimonial-dot:focus,
.auto-play-indicator:focus {
    outline: 3px solid var(--testimonial-primary);
    outline-offset: 2px;
}

/* Loading State */
.testimonials-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

.testimonials-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--testimonial-border);
    border-top: 4px solid var(--testimonial-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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