/* ============================================
   Testimonials Dual Slider Styles
   
   Color Contrast Ratios (WCAG AA Compliance - Requirement 8.6):
   - Testimonial Text (#1A1A1A on #FFFFFF): 12.63:1 (AAA) ✓
   - Author Name (#0B1F3F on #FFFFFF): 11.89:1 (AAA) ✓
   - Author Location (#666666 on #FFFFFF): 5.74:1 (AA) ✓
   - Section Subtitle (#666666 on #FFFFFF): 5.74:1 (AA) ✓
   - All contrasts meet or exceed WCAG AA standard (4.5:1 minimum)
   ============================================ */

/* Container */
.testimonials-dual-slider {
    padding: 80px 0;
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
    overflow: hidden;
    position: relative;
}

/* Section Header */
.testimonials-dual-slider .section-header {
    text-align: center;
    margin-bottom: 48px;
}

.testimonials-dual-slider .section-title {
    font-size: 36px;
    font-weight: 700;
    color: #0B1F3F;
    margin-bottom: 12px;
}

.testimonials-dual-slider .section-subtitle {
    font-size: 18px;
    color: #666666;
}

/* Row Container */
.testimonials-row {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 32px;
}

.testimonials-row:last-of-type {
    margin-bottom: 0;
}

/* Track (Animated Container) */
.testimonials-track {
    display: flex;
    gap: 20px;
    width: fit-content;
    will-change: transform;
}

/* RTL Animation (Top Row) */
.testimonials-row-top .testimonials-track {
    animation: scroll-rtl 60s linear infinite;
}

/* LTR Animation (Bottom Row) */
.testimonials-row-bottom .testimonials-track {
    animation: scroll-ltr 60s linear infinite;
}

/* Pause on Hover */
.testimonials-track:hover {
    animation-play-state: paused;
}

/* Keyframes */
@keyframes scroll-rtl {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); /* Moves exactly half the width (19 cards) */
    }
}

@keyframes scroll-ltr {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Testimonial Card */
.testimonial-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(11, 31, 63, 0.08);
    min-width: 300px;
    max-width: 400px;
    width: 350px;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(11, 31, 63, 0.12);
}

/* Focus Visible Styles (Requirement 8.2) */
.testimonial-card:focus {
    outline: 2px solid #0B1F3F;
    outline-offset: 2px;
}

/* Ensure focus is visible in high contrast mode */
.testimonial-card:focus-visible {
    outline: 3px solid #0B1F3F;
    outline-offset: 3px;
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.star-icon {
    width: 20px;
    height: 20px;
    fill: #D4AF37;
    stroke: none;
}

/* ============================================
   Accessibility Styles
   ============================================ */

/* Screen Reader Only Text (Requirement 8.1) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Testimonial Text */
.testimonial-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    color: #000000;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Author Info */
.testimonial-author {
    margin-top: auto;
}

.author-name {
    font-size: 16px;
    font-weight: 600;
    color: #0B1F3F;
    margin-bottom: 4px;
}

.author-location {
    font-size: 13px;
    font-weight: 500;
    color: #4B5563;
}

/* Loading State */
.testimonials-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #E5E5E5;
    border-top-color: #0B1F3F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error State */
.testimonials-error {
    text-align: center;
    padding: 60px 20px;
    color: #D32F2F;
}

/* ============================================
   Motion & Animation Preferences (Requirement 8.3)
   ============================================ */

/* Reduced Motion Support - Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .testimonials-track {
        animation: none !important;
    }
    
    .testimonial-card {
        transition: none;
    }
    
    .loading-spinner {
        animation: none;
        border-top-color: #0B1F3F;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .testimonial-card {
        width: 320px;
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .testimonials-dual-slider {
        padding: 60px 0;
    }
    
    .testimonials-dual-slider .section-title {
        font-size: 28px;
    }
    
    .testimonials-dual-slider .section-subtitle {
        font-size: 16px;
    }
    
    /* Single Row on Mobile */
    .testimonials-row-bottom {
        display: none;
    }
    
    .testimonials-row-top .testimonials-track {
        animation: scroll-rtl 45s linear infinite;
    }
    
    .testimonial-card {
        width: 280px;
        min-width: 250px;
        max-width: 350px;
    }
}

@media (max-width: 480px) {
    .testimonial-card {
        width: 260px;
        min-width: 250px;
        padding: 16px;
    }
    
    .testimonial-text {
        font-size: 13px;
    }
}

/* ============================================
   High Contrast Mode Support (Requirement 8.4)
   ============================================ */

/* High Contrast Mode - Enhanced borders and colors for better visibility */
@media (prefers-contrast: high) {
    .testimonial-card {
        border: 2px solid #0B1F3F;
    }
    
    .testimonial-text {
        color: #000000;
    }
    
    .author-name {
        color: #000000;
    }
    
    .testimonial-card:focus,
    .testimonial-card:focus-visible {
        outline: 4px solid #0B1F3F;
        outline-offset: 4px;
    }
}

/* ============================================
   Print Styles (Requirement 8.5)
   ============================================ */

/* Print Styles - Disable animation and enable content wrapping for print */
@media print {
    /* Disable all animations for print */
    .testimonials-track {
        animation: none !important;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    /* Prevent cards from breaking across pages */
    .testimonial-card {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 15px;
        box-shadow: none;
        border: 1px solid #E5E5E5;
    }
    
    /* Hide loading and error states in print */
    .testimonials-loading,
    .testimonials-error {
        display: none !important;
    }
    
    /* Optimize spacing for print */
    .testimonials-dual-slider {
        padding: 20px 0;
        background: none;
    }
    
    .testimonials-row {
        margin-bottom: 15px;
    }
}

