/* Elite Testimonial Showcase Pro - Advanced Styles */
/* Professional Grade Design with Creative Animations */
/* @version 2.1.0 - Built by EliteDev Studio */

:root {
    --elite-primary: #2c3e50;
    --elite-secondary: #3498db;
    --elite-accent: #e74c3c;
    --elite-gold: #f39c12;
    --elite-paper: #f8f9fa;
    --elite-paper-dark: #ecf0f1;
    --elite-text: #2c3e50;
    --elite-text-light: #7f8c8d;
    --elite-shadow: 0 10px 30px rgba(0,0,0,0.15);
    --elite-shadow-hover: 0 20px 60px rgba(0,0,0,0.25);
    --elite-border-radius: 20px;
    --elite-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Elite Loading States */
.elite-carousel-loading {
    opacity: 0.6;
    pointer-events: none;
}

.elite-carousel-loading .testimonial-item {
    transform: scale(0.95);
    opacity: 0.3;
}

/* Main Container - Professional Layout */
.modern-testimonial-carousel,
.elite-testimonial-carousel {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    overflow: hidden;
    padding: 20px 60px;
    border-radius: var(--elite-border-radius);
    background: linear-gradient(135deg, var(--elite-paper) 0%, var(--elite-paper-dark) 100%);
    box-shadow: var(--elite-shadow);
    transition: var(--elite-transition);
}

.elite-loaded {
    opacity: 1 !important;
    animation: eliteSlideUp 0.8s ease-out;
}

.testimonial-loaded {
    opacity: 1 !important;
}

.testimonial-loaded .testimonial-item {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
    filter: none !important;
}

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

/* Container with Advanced Grid System */
.testimonial-container {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 30px;
    padding: 20px 0;
}

/* Individual Testimonial Items - Premium Design */
.testimonial-item {
    flex: 0 0 calc(33.333% - 20px);
    min-width: 0;
    opacity: 1;
    transform: scale(1) translateY(0);
    transition: var(--elite-transition);
    filter: none;
    position: relative;
}

/* Dynamic column sizing */
.modern-testimonial-carousel[data-columns="1"] .testimonial-item {
    flex: 0 0 100%;
}

.modern-testimonial-carousel[data-columns="2"] .testimonial-item {
    flex: 0 0 calc(50% - 15px);
}

.modern-testimonial-carousel[data-columns="3"] .testimonial-item {
    flex: 0 0 calc(33.333% - 20px);
}

.modern-testimonial-carousel[data-columns="4"] .testimonial-item {
    flex: 0 0 calc(25% - 22.5px);
}

.modern-testimonial-carousel[data-columns="5"] .testimonial-item {
    flex: 0 0 calc(20% - 24px);
}

.testimonial-item.active,
.testimonial-item.in-view {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
    z-index: 10;
}

.testimonial-item.adjacent-prev,
.testimonial-item.adjacent-next {
    opacity: 0.8;
    transform: scale(0.96) translateY(10px);
    filter: blur(0.5px);
}

/* Premium Card Design */
.testimonial-content {
    background: 
        linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,249,250,0.95) 100%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='paperTexture' patternUnits='userSpaceOnUse' width='100' height='100'%3E%3Crect width='100' height='100' fill='%23ffffff'/%3E%3Cpath d='M20 20h2v2h-2zm10 0h2v2h-2zm10 0h2v2h-2zm10 0h2v2h-2zm10 0h2v2h-2zm-40 10h2v2h-2zm10 0h2v2h-2zm10 0h2v2h-2zm10 0h2v2h-2zm10 0h2v2h-2z' fill='%23f8f9fa' opacity='0.3'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23paperTexture)'/%3E%3C/svg%3E");
    border-radius: var(--elite-border-radius);
    padding: 35px;
    box-shadow: 
        var(--elite-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    color: var(--elite-text);
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 2px solid rgba(52, 152, 219, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

/* Elegant Quote Mark */
.testimonial-content::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 25px;
    font-size: 80px;
    font-family: 'Georgia', serif;
    color: var(--elite-secondary);
    opacity: 0.15;
    line-height: 1;
    font-weight: bold;
    z-index: 1;
}

/* Decorative Elements */
.testimonial-content::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--elite-secondary), var(--elite-gold));
    border-radius: 0 var(--elite-border-radius) 0 100%;
    opacity: 0.05;
    z-index: 1;
}

/* Content Text with Advanced Typography */
.testimonial-text {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    min-height: 110px;
    word-wrap: break-word;
    hyphens: auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    color: var(--elite-text);
}

/* Author Section - Premium Layout */
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(52, 152, 219, 0.1);
    position: relative;
    z-index: 2;
}

/* Professional Author Photo */
.author-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--elite-secondary);
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    transition: var(--elite-transition);
    position: relative;
    overflow: hidden;
}

.author-photo.loaded {
    opacity: 1;
    transform: scale(1);
}

.author-photo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--elite-paper) 0%, var(--elite-paper-dark) 100%);
    border: 3px solid var(--elite-secondary);
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--elite-text-light);
    transition: var(--elite-transition);
}

.author-photo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: var(--elite-transition);
    opacity: 0;
}

.testimonial-content:hover .author-photo::before {
    animation: photoShine 2s ease-in-out;
}

@keyframes photoShine {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); opacity: 0; }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); opacity: 1; }
}

/* Author Information */
.author-info h4 {
    margin: 0 0 5px 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--elite-text);
    font-family: 'Inter', sans-serif;
}

.author-position {
    font-size: 14px;
    color: var(--elite-text-light);
    margin: 0;
    font-weight: 500;
}

/* Elite Navigation Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid var(--elite-secondary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    z-index: 100;
    transition: var(--elite-transition);
    box-shadow: var(--elite-shadow);
    color: var(--elite-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    overflow: hidden;
    position: relative;
}

.carousel-arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.2), transparent);
    transition: var(--elite-transition);
}

.carousel-arrow:hover {
    background: var(--elite-secondary);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--elite-shadow-hover);
    border-color: var(--elite-secondary);
}

.carousel-arrow:hover::before {
    left: 100%;
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

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

.prev-arrow {
    left: 20px;
}

.next-arrow {
    right: 20px;
}

.prev-arrow, .next-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: var(--elite-accent);
    color: var(--elite-light);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--elite-shadow);
    transition: var(--elite-transition);
    font-size: 24px;
    padding: 0;
}

/* Elite Dots Navigation */
.elite-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    padding: 20px;
}

.elite-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--elite-secondary);
    background: transparent;
    cursor: pointer;
    transition: var(--elite-transition);
    position: relative;
    overflow: hidden;
    padding: 0;
}

.elite-dot .dot-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--elite-secondary);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: var(--elite-transition);
}

.elite-dot.active .dot-inner {
    transform: translate(-50%, -50%) scale(1);
}

.elite-dot:hover {
    transform: scale(1.3);
    border-color: var(--elite-gold);
}

.elite-dot.active {
    background: var(--elite-secondary);
    border-color: var(--elite-secondary);
}

/* Premium Hover Effects */
.testimonial-content:hover {
    transform: translateY(-10px);
    box-shadow: var(--elite-shadow-hover);
    border-color: var(--elite-secondary);
}

.testimonial-content:hover::before {
    opacity: 0.25;
    transform: scale(1.1);
}

.testimonial-content:hover .author-photo {
    transform: scale(1.05);
    border-color: var(--elite-gold);
}

/* Advanced Responsive Design */
@media (max-width: 1200px) {
    .modern-testimonial-carousel,
    .elite-testimonial-carousel {
        max-width: 1000px;
        padding: 15px;
    }

    .testimonial-container {
        gap: 20px;
    }

    .testimonial-item {
        flex: 0 0 calc(50% - 10px);
    }

    .carousel-arrow {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .prev-arrow {
        left: 5px;
    }

    .next-arrow {
        right: 5px;
    }
}

@media (max-width: 768px) {
    .modern-testimonial-carousel,
    .elite-testimonial-carousel {
        margin: 20px auto;
        padding: 10px 50px;
    }

    .testimonial-container {
        gap: 0;
    }

    .testimonial-item {
        flex: 0 0 100%;
    }

    .testimonial-content {
        margin: 0 20px;
        padding: 30px;
        min-height: 280px;
        border-radius: 15px;
    }

    .testimonial-content::before {
        font-size: 60px;
        top: 15px;
        left: 20px;
    }

    .carousel-arrow {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .prev-arrow {
        left: 10px;
    }

    .next-arrow {
        right: 10px;
    }

    .author-photo {
        width: 50px;
        height: 50px;
    }

    .testimonial-text {
        font-size: 15px;
        -webkit-line-clamp: 3;
        min-height: 90px;
    }

    .author-info h4 {
        font-size: 16px;
    }

    .author-position {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .testimonial-content {
        padding: 25px;
        min-height: 260px;
        margin: 0 15px;
    }

    .testimonial-content::before {
        font-size: 50px;
        top: 12px;
        left: 15px;
    }

    .testimonial-text {
        font-size: 14px;
        -webkit-line-clamp: 3;
        min-height: 80px;
    }

    .author-photo {
        width: 45px;
        height: 45px;
    }

    .author-info h4 {
        font-size: 15px;
    }

    .author-position {
        font-size: 12px;
    }

    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .prev-arrow {
        left: 5px;
    }

    .next-arrow {
        right: 5px;
    }

    .elite-carousel-dots {
        margin-top: 30px;
        padding: 15px;
    }
}

/* Advanced Loading Animation */
.testimonial-item {
    animation: eliteSlideInUp 0.8s ease-out forwards;
    animation-delay: calc(var(--item-index, 0) * 0.1s);
}

@keyframes eliteSlideInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 0.6;
        transform: translateY(20px) scale(0.92);
    }
}

/* Performance Optimizations */
.modern-testimonial-carousel,
.elite-testimonial-carousel {
    will-change: transform;
    contain: layout style;
}

.testimonial-container {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

.testimonial-item {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* Accessibility Enhancements */
.carousel-arrow:focus,
.elite-dot:focus {
    outline: 3px solid var(--elite-secondary);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .testimonial-content {
        border-width: 3px;
        border-color: var(--elite-text);
    }

    .carousel-arrow {
        border-width: 3px;
    }

    .elite-dot {
        border-width: 3px;
    }
}

/* Print Styles */
@media print {
    .modern-testimonial-carousel,
    .elite-testimonial-carousel {
        box-shadow: none;
        background: white;
    }

    .carousel-arrow,
    .elite-carousel-dots {
        display: none;
    }

    .testimonial-item {
        opacity: 1 !important;
        transform: none !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Testimonial Popup */
.testimonial-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.testimonial-popup {
    background: var(--elite-paper);
    padding: 30px;
    border-radius: var(--elite-border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--elite-shadow);
    position: relative;
}

.testimonial-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--elite-accent);
    color: var(--elite-light);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
}

.testimonial-popup-content {
    margin-top: 20px;
}

.testimonial-popup-author {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.testimonial-popup-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
}

.testimonial-popup-author .author-info {
    display: flex;
    flex-direction: column;
}