/* Enhanced Testimonials Component Styles */
:root {
    --primary-blue: #1E40AF;
    --light-blue: #3B82F6;
    --accent-blue: #60A5FA;
    --text-dark: #111827;
    --text-light: #6B7280;
    --text-muted: #9CA3AF;
    --bg-light: #F8FAFC;
    --bg-gradient: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    --white: #FFFFFF;
    --border-radius: 16px;
    --border-radius-lg: 20px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.testimonials-section {
    padding: 5rem 0;
    background: var(--bg-gradient);
    position: relative;
    overflow: hidden;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(30, 64, 175, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.testimonials-section.animate-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

.testimonials-content {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 3rem;
    align-items: center;
    min-height: 500px;
    position: relative;
    z-index: 1;
}

.testimonials-header {
    position: relative;
}

.testimonials-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--light-blue);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.testimonials-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.badge-icon {
    font-size: 1rem;
}

.testimonials-title {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-dark);
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
}

.testimonials-title br {
    display: block;
}

@media (max-width: 768px) {
    .testimonials-title br {
        display: none;
    }
}

.testimonials-nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    width: 52px;
    height: 52px;
    border: 2px solid #E5E7EB;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-bounce);
    color: var(--text-light);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.nav-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--light-blue), var(--accent-blue));
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.nav-btn:hover {
    border-color: var(--light-blue);
    color: var(--white);
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow);
}

.nav-btn:hover::before {
    opacity: 1;
}

.nav-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.nav-btn:disabled:hover::before {
    opacity: 0;
}

.nav-btn:focus-visible {
    outline: 2px solid var(--light-blue);
    outline-offset: 4px;
}

.testimonials-carousel {
    position: relative;
    height: 420px;
    perspective: 1200px;
    padding: 0 20px;
}

.testimonial-block {
    position: absolute;
    top: -80px;
    left: -20px;
    width: calc(55% + 100px);
    height: calc(100% + 160px);
    z-index: -1;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(145deg, #1E40AF 0%, #3B82F6 50%, #60A5FA 100%);
    box-shadow: 0 25px 50px rgba(30, 64, 175, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    opacity: 0.9;
    transform: rotate(-1deg);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: rotate(-1deg) translateY(0px); }
    50% { transform: rotate(-1deg) translateY(-10px); }
}

.testimonial-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(120px) rotateY(20deg) scale(0.95);
    transition: var(--transition);
    pointer-events: none;
    filter: blur(1px);
}

.testimonial-card.active {
    opacity: 1;
    transform: translateX(0) rotateY(0) scale(1);
    pointer-events: auto;
    filter: blur(0);
    z-index: 2;
}

.testimonial-card.prev {
    opacity: 0.4;
    transform: translateX(-60px) rotateY(-15deg) scale(0.9);
    filter: blur(0.5px);
    z-index: 1;
}

.card-content {
    background: var(--white);
    padding: 2.8rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
}

.card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--light-blue) 50%, var(--accent-blue) 100%);
}

.card-content::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(96, 165, 250, 0.05) 100%);
    border-radius: 50%;
    opacity: 0.6;
}

.testimonial-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 4px solid var(--bg-light);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.testimonial-card.active .testimonial-avatar {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.testimonial-rating {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 2px;
}

.testimonial-rating .star {
    font-size: 1.2rem;
    color: #D1D5DB;
    transition: var(--transition);
}

.testimonial-rating .star.filled {
    color: #F59E0B;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.testimonial-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 2rem;
    flex-grow: 1;
    position: relative;
    font-style: italic;
    quotes: '"' '"';
}

.testimonial-text::before {
    content: open-quote;
    position: absolute;
    top: -0.8rem;
    left: -0.8rem;
    font-size: 5rem;
    color: var(--light-blue);
    opacity: 0.15;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-text::after {
    content: close-quote;
    position: absolute;
    bottom: -1.5rem;
    right: -0.5rem;
    font-size: 3rem;
    color: var(--light-blue);
    opacity: 0.1;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-author {
    border-top: 1px solid #F3F4F6;
    padding-top: 1.5rem;
    position: relative;
}

.testimonial-author::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, var(--light-blue), transparent);
}

.author-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.author-title {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .testimonials-section {
        padding: 3rem 0;
    }

    .testimonials-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .testimonials-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }

    .testimonials-nav {
        justify-content: center;
    }

    .testimonials-carousel {
        height: 380px;
        padding: 0 10px;
    }

    .card-content {
        padding: 2.2rem;
    }

    .testimonial-text {
        font-size: 1.05rem;
        line-height: 1.7;
    }

    .testimonial-block {
        width: calc(70% + 80px);
        top: -60px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .testimonials-section {
        padding: 2.5rem 0;
    }

    .testimonials-content {
        gap: 2rem;
    }

    .testimonials-carousel {
        height: 350px;
        padding: 0 5px;
    }

    .card-content {
        padding: 1.8rem;
    }

    .nav-btn {
        width: 44px;
        height: 44px;
    }

    .testimonial-avatar {
        width: 60px;
        height: 60px;
    }

    .testimonials-title {
        font-size: 1.9rem;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .testimonial-block {
        width: calc(80% + 60px);
        top: -40px;
        left: -10px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .testimonial-card,
    .nav-btn,
    .testimonial-avatar,
    .testimonials-badge,
    .testimonial-block {
        animation: none;
        transition: none;
    }

    .testimonial-block {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card-content {
        border: 2px solid currentColor;
    }

    .testimonials-badge {
        border: 2px solid currentColor;
    }

    .nav-btn {
        border: 2px solid currentColor;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .testimonials-section {
        --text-dark: #F9FAFB;
        --text-light: #D1D5DB;
        --bg-light: #1F2937;
        --white: #374151;
        background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    }
}

/* Print styles */
@media print {
    .testimonials-section {
        break-inside: avoid;
        padding: 2rem 0;
    }

    .testimonials-nav,
    .testimonial-block {
        display: none;
    }

    .testimonial-card {
        position: static;
        opacity: 1;
        transform: none;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }

    .testimonials-carousel {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}