/* ============================================================
   FLASHCARD STYLE TESTIMONIALS
   ============================================================ */

/* Testimonials Section */
.testimonials-section {
    position: relative;
    padding: 4rem 0;
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 50%, #0f1419 100%);
    overflow: hidden;
}

/* Testimonials Container */
.testimonials-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    min-height: 450px;
    padding: 2rem 0;
}

/* Testimonials Slider */
#testimonialsSlider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    position: relative;
    min-height: 400px;
}

/* Flashcard Testimonial Card */
.testimonial-card {
    position: absolute;
    width: 100%;
    max-width: 700px;
    height: 380px;
    opacity: 0;
    transform: translateX(100px) rotateY(45deg);
    pointer-events: none;
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    perspective: 1000px;
}

.testimonial-card.active {
    position: relative;
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
    pointer-events: auto;
    z-index: 10;
}

.testimonial-card.prev {
    transform: translateX(-100px) rotateY(-45deg);
    opacity: 0;
}

/* Flashcard Inner Content */
.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.15) 0%, rgba(52, 152, 219, 0.15) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 107, 157, 0.3);
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 107, 157, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
}

/* Gradient overlay for depth */
.flashcard-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 107, 157, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Testimonial Quote Mark */
.testimonial-quote {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 3rem;
    color: rgba(255, 107, 157, 0.2);
    font-family: Georgia, serif;
    line-height: 1;
}

/* Testimonial Text */
.testimonial-text {
    position: relative;
    z-index: 2;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ffffff;
    font-style: italic;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* Testimonial Author Section */
.testimonial-author {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d 0%, #3498db 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 700;
    font-size: 1rem;
    color: #ff6b9d;
    margin-bottom: 0.25rem;
}

.author-title {
    font-size: 0.85rem;
    color: #b8c5d1;
    font-style: normal;
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.star {
    color: #ffd700;
    font-size: 0.9rem;
}

/* Navigation Buttons */
.testimonial-nav-btn {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.2), rgba(52, 152, 219, 0.2));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 107, 157, 0.4);
    color: #ff6b9d;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 32px rgba(255, 107, 157, 0.15);
    flex-shrink: 0;
}

.testimonial-nav-btn:hover {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.3), rgba(52, 152, 219, 0.3));
    border-color: rgba(255, 107, 157, 0.6);
    transform: scale(1.15);
    box-shadow: 
        0 12px 48px rgba(255, 107, 157, 0.25),
        0 0 30px rgba(255, 107, 157, 0.3);
}

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

.testimonial-prev {
    order: 1;
}

.testimonial-next {
    order: 3;
}

/* Testimonial Indicators */
.testimonial-indicators {
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 5;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 107, 157, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 107, 157, 0.5);
}

.indicator.active {
    background: #ff6b9d;
    box-shadow: 0 0 15px rgba(255, 107, 157, 0.5);
    transform: scale(1.3);
}

.indicator:hover {
    background: rgba(255, 107, 157, 0.6);
}

/* Bouncing Balls Animation Container */
.bouncing-balls-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Individual Bouncing Ball */
.bouncing-ball {
    position: absolute;
    bottom: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    animation: bounce 1.5s infinite;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.ball-1 {
    left: 10%;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    animation-delay: 0s;
}

.ball-2 {
    left: 25%;
    background: linear-gradient(135deg, #3498db, #5dade2);
    animation-delay: 0.2s;
}

.ball-3 {
    left: 40%;
    background: linear-gradient(135deg, #e74c3c, #ff7675);
    animation-delay: 0.4s;
}

.ball-4 {
    left: 55%;
    background: linear-gradient(135deg, #fd79a8, #ff6b9d);
    animation-delay: 0.6s;
}

.ball-5 {
    left: 70%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    animation-delay: 0.8s;
}

.ball-6 {
    left: 85%;
    background: linear-gradient(135deg, #ff7675, #e74c3c);
    animation-delay: 1s;
}

/* Bounce Animation */
@keyframes bounce {
    0% {
        bottom: 0;
        animation-timing-function: cubic-bezier(0.33, 0.66, 0.66, 1);
    }
    50% {
        bottom: 80px;
        animation-timing-function: cubic-bezier(0.33, 0, 0.66, 0.33);
    }
    100% {
        bottom: 0;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .testimonials-container {
        gap: 1.5rem;
        padding: 1.5rem 0;
        min-height: 400px;
    }
    
    .testimonial-nav-btn {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
    
    #testimonialsSlider {
        max-width: 700px;
        min-height: 350px;
    }
    
    .testimonial-card {
        height: 350px;
    }
    
    .flashcard-inner {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .testimonials-section {
        padding: 3rem 0;
    }
    
    .testimonials-container {
        gap: 1rem;
        flex-wrap: wrap;
        padding: 1rem 0;
        min-height: 350px;
    }
    
    .testimonial-prev,
    .testimonial-next {
        order: unset;
    }
    
    .testimonial-nav-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    #testimonialsSlider {
        max-width: 100%;
        min-height: 300px;
        order: 3;
    }
    
    .testimonial-card {
        height: 300px;
        max-width: 100%;
    }
    
    .flashcard-inner {
        padding: 1.5rem;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    .author-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .testimonial-indicators {
        bottom: -2.5rem;
    }
}

@media (max-width: 480px) {
    .testimonials-section {
        padding: 2rem 0;
    }
    
    .testimonials-container {
        gap: 0.75rem;
        padding: 0.75rem 0;
        min-height: 300px;
    }
    
    .testimonial-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    #testimonialsSlider {
        min-height: 260px;
    }
    
    .testimonial-card {
        height: 280px;
    }
    
    .flashcard-inner {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .testimonial-quote {
        font-size: 2rem;
        right: 1rem;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    .author-avatar {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .author-name {
        font-size: 0.9rem;
    }
    
    .author-title {
        font-size: 0.8rem;
    }
    
    .testimonial-indicators {
        bottom: -2rem;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
    
    .bouncing-ball {
        width: 16px;
        height: 16px;
    }
}

/* Accessibility */
.testimonial-nav-btn:focus {
    outline: 2px solid rgba(255, 107, 157, 0.5);
    outline-offset: 2px;
}

.testimonial-nav-btn:focus:not(:focus-visible) {
    outline: none;
}

/* Smooth scroll behavior */
@media (prefers-reduced-motion: reduce) {
    .testimonial-card,
    .testimonial-nav-btn,
    .bouncing-ball {
        animation: none !important;
        transition: none !important;
    }
}
