/* Customer Section Animation Styles */

/* Base styles for customer section */
.customer {
    position: relative;
    will-change: transform, opacity;
    overflow: hidden;
}

/* Initial hidden states */
.customer .text-center h2 {
    opacity: 0;
    transform: translateY(80px) scale(0.8) rotateX(15deg);
    will-change: transform, opacity;
}

.customer .text-center p {
    opacity: 0;
    transform: translateY(60px) scale(0.9) rotateX(10deg);
    will-change: transform, opacity;
}

/* Testimonial cards initial states */
.customer .bg-white.p-8.rounded-lg.shadow-lg {
    opacity: 0;
    transform: translateY(120px) scale(0.85) rotateY(20deg);
    will-change: transform, opacity, box-shadow;
    transition: all 0.5s ease;
    backface-visibility: hidden;
    perspective: 1000px;
    position: relative;
}

/* Star ratings initial state */
.customer .flex.items-center.mb-4 {
    opacity: 0;
    transform: translateX(-50px) scale(0.7);
    will-change: transform, opacity;
}

/* Testimonial text initial state */
.customer .text-gray-700.mb-4 {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    will-change: transform, opacity;
}

/* Customer names initial state */
.customer .text-gray-900.font-bold {
    opacity: 0;
    transform: translateY(30px) translateX(20px) scale(0.9);
    will-change: transform, opacity;
}

/* Enhanced hover effects for testimonial cards */
.customer .bg-white.p-8.rounded-lg.shadow-lg:hover {
    transform: scale(1.05) translateY(-15px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

/* Star hover effects */
.customer .lucide-star {
    transition: all 0.3s ease;
    cursor: pointer;
    will-change: transform;
}

.customer .lucide-star:hover {
    transform: scale(1.3) rotate(360deg);
    color: #fbbf24;
}

/* Text hover effects */
.customer .text-gray-700:hover {
    transform: translateX(10px);
    color: #374151;
}

.customer .text-gray-900.font-bold:hover {
    transform: translateX(15px) scale(1.05);
    color: #dc2626;
}

/* Border animation on hover */
.customer .border-l-4:hover {
    border-left-width: 8px;
    transition: border-left-width 0.3s ease;
}

/* Click feedback */
.customer .bg-white.p-8.rounded-lg.shadow-lg:active {
    transform: scale(0.95);
}

/* Word animation styles */
.customer .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    will-change: transform, opacity;
}

/* Floating animation for stars */
.customer .lucide-star.floating {
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Enhanced visual feedback with gradients */
.customer .bg-white.p-8.rounded-lg.shadow-lg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(239, 68, 68, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
}

.customer .bg-white.p-8.rounded-lg.shadow-lg:hover::before {
    opacity: 1;
}

/* Ensure content stays above overlay */
.customer .bg-white.p-8.rounded-lg.shadow-lg > * {
    position: relative;
    z-index: 2;
}

/* Star rating container enhancements */
.customer .flex.items-center.mb-4 {
    gap: 4px;
}

/* Individual star enhancements */
.customer .lucide-star {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Testimonial text enhancements */
.customer .text-gray-700.mb-4 {
    line-height: 1.8;
    transition: all 0.4s ease;
}

/* Customer name enhancements */
.customer .text-gray-900.font-bold {
    transition: all 0.4s ease;
    position: relative;
}

.customer .text-gray-900.font-bold::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    transition: width 0.3s ease;
}

.customer .text-gray-900.font-bold:hover::after {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .customer .bg-white.p-8.rounded-lg.shadow-lg:hover {
        transform: scale(1.03) translateY(-10px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    }
    
    .customer .lucide-star:hover {
        transform: scale(1.2) rotate(180deg);
    }
    
    .customer .text-gray-700:hover {
        transform: translateX(5px);
    }
    
    .customer .text-gray-900.font-bold:hover {
        transform: translateX(10px) scale(1.03);
    }
}

@media (max-width: 640px) {
    .customer .bg-white.p-8.rounded-lg.shadow-lg:hover {
        transform: scale(1.02) translateY(-8px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
    
    .customer .lucide-star:hover {
        transform: scale(1.15) rotate(90deg);
    }
    
    .customer .text-gray-700:hover {
        transform: translateX(3px);
    }
    
    .customer .text-gray-900.font-bold:hover {
        transform: translateX(8px) scale(1.02);
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .customer .text-center h2,
    .customer .text-center p,
    .customer .bg-white.p-8.rounded-lg.shadow-lg,
    .customer .flex.items-center.mb-4,
    .customer .text-gray-700.mb-4,
    .customer .text-gray-900.font-bold,
    .customer .lucide-star,
    .customer .word {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
    
    .customer .bg-white.p-8.rounded-lg.shadow-lg:hover,
    .customer .lucide-star:hover,
    .customer .text-gray-700:hover,
    .customer .text-gray-900.font-bold:hover {
        transform: none !important;
    }
    
    .customer .bg-white.p-8.rounded-lg.shadow-lg:active {
        transform: none !important;
    }
    
    .customer .floating {
        animation: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .customer .bg-white.p-8.rounded-lg.shadow-lg {
        border: 2px solid currentColor;
    }
    
    .customer .bg-white.p-8.rounded-lg.shadow-lg:hover {
        border-color: #dc2626;
        background-color: #fef2f2;
    }
    
    .customer .lucide-star {
        stroke-width: 3;
    }
    
    .customer .text-gray-700.mb-4 {
        color: #000000;
    }
    
    .customer .text-gray-900.font-bold {
        color: #000000;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .customer {
        color: #ffffff;
    }
    
    .customer .text-center h2 {
        color: #ffffff;
    }
    
    .customer .text-center p {
        color: #d1d5db;
    }
    
    .customer .bg-white.p-8.rounded-lg.shadow-lg {
        background-color: #374151 !important;
        color: #ffffff;
        border-color: #4b5563;
    }
    
    .customer .bg-white.p-8.rounded-lg.shadow-lg:hover {
        background-color: #4b5563 !important;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    }
    
    .customer .text-gray-700.mb-4 {
        color: #d1d5db !important;
    }
    
    .customer .text-gray-900.font-bold {
        color: #ffffff !important;
    }
    
    .customer .text-gray-900.font-bold:hover {
        color: #fbbf24 !important;
    }
    
    .customer .lucide-star {
        color: #fbbf24;
    }
    
    .customer .border-l-4 {
        border-left-color: #dc2626;
    }
}

/* Print styles */
@media print {
    .customer .text-center h2,
    .customer .text-center p,
    .customer .bg-white.p-8.rounded-lg.shadow-lg,
    .customer .flex.items-center.mb-4,
    .customer .text-gray-700.mb-4,
    .customer .text-gray-900.font-bold,
    .customer .lucide-star,
    .customer .word {
        transform: none !important;
        opacity: 1 !important;
        box-shadow: none !important;
    }
    
    .customer .bg-white.p-8.rounded-lg.shadow-lg {
        border: 2px solid #000 !important;
        background: #fff !important;
        color: #000 !important;
    }
    
    .customer .text-gray-700.mb-4 {
        color: #000 !important;
    }
    
    .customer .text-gray-900.font-bold {
        color: #000 !important;
    }
    
    .customer .lucide-star {
        color: #000 !important;
    }
}

/* Loading states */
.customer.loading {
    opacity: 0.7;
    pointer-events: none;
}

.customer.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(220, 38, 38, 0.3);
    border-top: 3px solid #dc2626;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Shimmer effect for loading cards */
.customer .bg-white.p-8.rounded-lg.shadow-lg.loading {
    position: relative;
    overflow: hidden;
}

.customer .bg-white.p-8.rounded-lg.shadow-lg.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Focus states for accessibility */
.customer .bg-white.p-8.rounded-lg.shadow-lg:focus {
    outline: 3px solid #dc2626;
    outline-offset: 2px;
}

.customer .lucide-star:focus {
    outline: 2px solid #dc2626;
    outline-offset: 1px;
    border-radius: 2px;
}

/* Stagger animation classes for JavaScript control */
.customer-animate-in {
    animation: slideInUp 0.8s ease-out forwards;
}

.customer-animate-out {
    animation: slideOutDown 0.5s ease-in forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(120px) scale(0.85);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(120px) scale(0.85);
    }
}

/* Testimonial card enhancements */
.customer .bg-white.p-8.rounded-lg.shadow-lg {
    border-left: 4px solid #dc2626;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.customer .bg-white.p-8.rounded-lg.shadow-lg:hover {
    border-left-width: 8px;
    transform: scale(1.05) translateY(-15px) rotateY(2deg);
}

/* Star rating specific styles */
.customer .lucide-star.fill-current {
    color: #fbbf24;
    filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.3));
}

/* Text content improvements */
.customer .text-gray-700.mb-4.text-lg.leading-relaxed {
    font-size: 1.1rem;
    line-height: 1.8;
    letter-spacing: 0.025em;
}

/* Customer name styling */
.customer .text-gray-900.font-bold {
    font-weight: 700;
    letter-spacing: 0.025em;
}

/* Parallax container */
.customer .grid.grid-cols-1.md\\:grid-cols-2.gap-8 {
    perspective: 1000px;
}

/* Individual card parallax effect */
.customer .bg-white.p-8.rounded-lg.shadow-lg.parallax {
    transform-style: preserve-3d;
}

/* Smooth scrolling enhancement */
.customer {
    scroll-behavior: smooth;
}

/* Performance optimizations */
.customer * {
    will-change: auto;
}

.customer .bg-white.p-8.rounded-lg.shadow-lg {
    contain: layout style paint;
}

.customer .lucide-star {
    contain: layout style;
} 