/**
 * Professional Testimonials Section CSS
 * Advanced carousel and grid layouts with smooth animations
 */

/* Testimonials Section */
.testimonials-section {
    position: relative;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95) 0%, 
        rgba(10, 10, 15, 0.95) 50%, 
        rgba(0, 0, 0, 0.95) 100%);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.testimonials-section .container {
    position: relative;
    z-index: 2;
}

/* Testimonial Controls */
.testimonial-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0 3rem;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.testimonial-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.testimonial-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

.testimonial-filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(102, 126, 234, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
}

.testimonial-filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.testimonial-filter-btn .filter-icon {
    font-size: 1.1em;
}

.testimonial-view-controls {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.testimonial-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-view-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.testimonial-view-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Testimonials Carousel */
.testimonials-carousel-container {
    position: relative;
    margin: 3rem 0;
}

.testimonials-carousel {
    display: flex;
    overflow: hidden;
    scroll-behavior: smooth;
    gap: 2rem;
    padding: 0 1rem;
}

.testimonial-card {
    min-width: 450px;
    max-width: 450px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimonial-card:hover::before {
    opacity: 1;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.quote-icon {
    margin-bottom: 1rem;
}

.quote-icon svg {
    color: #667eea;
    opacity: 0.8;
}

.testimonial-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.testimonial-rating .star {
    color: #fbbf24;
    transition: all 0.3s ease;
}

.testimonial-rating .star.empty {
    color: rgba(255, 255, 255, 0.3);
}

.testimonial-rating .rating-text {
    margin-left: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    margin: 0 0 1.5rem;
    position: relative;
}

.project-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project-type .type-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 500;
}

.project-type .type-value {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Client Info */
.testimonial-client {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.client-avatar {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(102, 126, 234, 0.3);
    background: rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.client-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.testimonial-card:hover .client-avatar {
    border-color: rgba(102, 126, 234, 0.6);
    transform: scale(1.05);
}

.client-details h4 {
    margin: 0 0 0.25rem;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
}

.client-details p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* Carousel Navigation */
.carousel-navigation {
    position: absolute;
    top: 50%;
    left: -20px;
    right: -20px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    transform: translateY(-50%);
}

.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    pointer-events: all;
}

.carousel-nav:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    color: #ffffff;
    transform: scale(1.1);
}

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

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.carousel-indicator.active {
    background: #667eea;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.carousel-indicator:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Testimonials Grid */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.testimonial-grid-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.testimonial-grid-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.testimonial-grid-item .testimonial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-type-badge {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.testimonial-grid-item .testimonial-text {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.testimonial-grid-item .testimonial-client {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-grid-item .client-avatar {
    width: 40px;
    height: 40px;
}

/* No Testimonials Message */
.no-testimonials-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
    margin: 3rem 0;
}

.no-testimonials-content {
    max-width: 400px;
    padding: 2rem;
}

.no-testimonials-content svg {
    margin: 0 auto 1.5rem;
    opacity: 0.6;
    color: rgba(255, 255, 255, 0.5);
}

.no-testimonials-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.no-testimonials-content p {
    margin-bottom: 2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .testimonial-card {
        min-width: 380px;
        max-width: 380px;
    }
}

@media (max-width: 768px) {
    .testimonial-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1rem;
    }
    
    .testimonial-filters {
        justify-content: center;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }
    
    .testimonial-filter-btn {
        white-space: nowrap;
    }
    
    .testimonial-view-controls {
        align-self: center;
    }
    
    .testimonial-card {
        min-width: 320px;
        max-width: 320px;
        padding: 1.5rem;
    }
    
    .carousel-navigation {
        left: -10px;
        right: -10px;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .testimonial-card {
        min-width: 280px;
        max-width: 280px;
        padding: 1rem;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    .client-details h4 {
        font-size: 0.9rem;
    }
    
    .client-details p {
        font-size: 0.8rem;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .testimonial-card {
        background: #000000;
        border: 2px solid #ffffff;
    }
    
    .testimonial-filter-btn {
        background: #000000;
        border: 2px solid #ffffff;
        color: #ffffff;
    }
    
    .testimonial-filter-btn.active {
        background: #ffffff;
        color: #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .testimonial-card,
    .testimonial-filter-btn,
    .carousel-nav {
        transition: none;
        animation: none;
    }
    
    .testimonial-card:hover,
    .testimonial-grid-item:hover {
        transform: none;
    }
    
    .testimonials-carousel {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {
    .testimonial-controls,
    .carousel-navigation,
    .carousel-indicators {
        display: none;
    }
    
    .testimonials-carousel {
        display: block;
    }
    
    .testimonial-card {
        min-width: auto;
        max-width: none;
        width: 100%;
        margin-bottom: 2rem;
        break-inside: avoid;
    }
}