* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.testimonial-section {
    background: #000;
    color: #fff;
    padding: 80px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -0.02em;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px 0;
}

.carousel-container {
    flex: 1;
    overflow: visible;
    cursor: grab;
    border-radius: 16px;
    position: relative;
}

.carousel-container:active {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease-in-out;
    gap: 20px;
    padding: 0 10px;
}

.testimonial-card {
    flex: 0 0 calc(50% - 10px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    position: relative;
    transform-origin: center;
}

.testimonial-card:hover {
    transform: translateY(-8px) scale(1.05);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.testimonial-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #fff;
    line-height: 1.4;
}

.testimonial-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.testimonial-author {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    margin-top: auto;
}

.star-rating {
    margin-top: 12px;
    display: flex;
    gap: 4px;
}

.star {
    color: #fbbf24;
    font-size: 1.2rem;
}

.carousel-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-shrink: 0;
    z-index: 20;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #3b82f6;
    transform: scale(1.2);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Hidden slides for infinite loop */
.testimonial-card.clone {
    pointer-events: none;
}

/* Media Queries */

/* Tablet - 768px */
@media (max-width: 768px) {
    .testimonial-section {
        padding: 60px 0;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .section-title {
        font-size: 2.5rem;
        margin-bottom: 40px;
    }
    
    .carousel-wrapper {
        gap: 16px;
        margin-bottom: 30px;
        padding: 15px 0;
    }
    
    .carousel-container {
        overflow: hidden;
    }
    
    .carousel-btn {
        width: 44px;
        height: 44px;
    }
    
    .carousel-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .testimonial-card {
        flex: 0 0 100%;
        min-height: 240px;
        margin-right: 0;
    }
    
    .carousel-track {
        gap: 0;
        padding: 0;
    }
    
    .testimonial-card:hover {
        transform: translateY(-4px) scale(1.02);
    }
    
    .testimonial-content h3 {
        font-size: 1.25rem;
    }
    
    .testimonial-content p {
        font-size: 0.95rem;
    }
}

/* Mobile - 360px */
@media (max-width: 360px) {
    .testimonial-section {
        padding: 40px 0;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .carousel-wrapper {
        gap: 12px;
        margin-bottom: 24px;
        padding: 10px 0;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .testimonial-card {
        padding: 24px;
        min-height: 220px;
        border-radius: 12px;
    }
    
    .testimonial-card:hover {
        transform: translateY(-2px) scale(1.01);
    }
    
    .testimonial-content h3 {
        font-size: 1.125rem;
        margin-bottom: 12px;
    }
    
    .testimonial-content p {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }
    
    .testimonial-author {
        font-size: 0.8rem;
    }
    
    .carousel-dots {
        gap: 8px;
        margin-top: 30px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}

/* Animation keyframes */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.testimonial-card {
    animation: slideIn 0.6s ease-out;
}

/* Focus states for accessibility */
.carousel-btn:focus,
.dot:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Smooth scrolling behavior */
html {
    scroll-behavior: smooth;
}

/* Loading state */
.carousel-track {
    will-change: transform;
}

/* Performance optimizations */
.testimonial-card {
    will-change: transform;
    transform: translateZ(0);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .testimonial-card {
        border-color: rgba(255, 255, 255, 0.5);
        background: rgba(255, 255, 255, 0.1);
    }
    
    .carousel-btn {
        border-color: rgba(255, 255, 255, 0.5);
        background: rgba(255, 255, 255, 0.2);
    }
}
