/* Mobile Testimonials V2 - Modern Carousel Design */
/* This file only affects mobile view, desktop remains untouched */

@media (max-width: 768px) {
    /* Hide desktop testimonials */
    .testimonials-section.desktop-only {
        display: none !important;
    }
    
    /* Show mobile testimonials */
    .mobile-testimonials.mobile-only {
        display: block !important;
        padding: 60px 0 80px;
        background: #f8f9fa;
        position: relative;
        overflow: hidden;
    }

    /* Mobile testimonials header */
    .mobile-testimonials-header {
        text-align: center;
        padding: 0 20px 30px;
    }

    .mobile-testimonials-header h1 {
        font-size: 28px;
        font-weight: 700;
        color: #324e8a;
        margin-bottom: 10px;
        font-family: 'Poppins', sans-serif;
    }

    .mobile-testimonials-header p {
        font-size: 14px;
        color: #666;
        line-height: 1.5;
    }

    /* Carousel container */
    .mobile-testimonials-carousel {
        position: relative;
        width: 100%;
        overflow: hidden;
        padding: 0 15px;
    }

    /* Carousel track */
    .mobile-testimonials-track {
        display: flex;
        transition: transform 0.3s ease;
        gap: 15px;
    }

    /* Individual testimonial card - new design */
    .mobile-testimonial-slide {
        flex: 0 0 calc(100% - 30px);
        background: white;
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        padding: 25px;
        position: relative;
        min-height: 280px;
        display: flex;
        flex-direction: column;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mobile-testimonial-slide.expanded {
        min-height: auto;
        box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
        margin-bottom: 20px; /* Add space between expanded cards */
    }

    /* Quote icon */
    .mobile-testimonial-quote {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        opacity: 0.1;
        color: #324e8a;
        font-size: 60px;
        line-height: 1;
        font-family: Georgia, serif;
    }

    /* Stars rating */
    .mobile-testimonial-rating {
        display: flex;
        gap: 2px;
        margin-bottom: 15px;
        font-size: 16px;
    }

    .mobile-testimonial-rating span {
        color: #FFD700;
    }

    /* Testimonial text preview */
    .mobile-testimonial-preview {
        font-size: 15px;
        line-height: 1.6;
        color: #333;
        margin-bottom: 15px;
        flex-grow: 0;
        font-style: italic;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        position: relative;
    }
    
    /* Add gradient fade at bottom of preview */
    .mobile-testimonial-preview::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 30px;
        background: linear-gradient(to bottom, transparent, white);
        pointer-events: none;
    }
    
    .mobile-testimonial-slide.expanded .mobile-testimonial-preview::after {
        display: none;
    }

    /* Full testimonial text */
    .mobile-testimonial-text {
        font-size: 15px;
        line-height: 1.6;
        color: #333;
        margin-bottom: 20px;
        flex-grow: 1;
        font-style: italic;
        display: none;
    }

    /* Show full text when expanded */
    .mobile-testimonial-slide.expanded .mobile-testimonial-preview {
        display: none;
    }

    .mobile-testimonial-slide.expanded .mobile-testimonial-text {
        display: block;
    }
    
    /* When any card is expanded, adjust carousel behavior */
    .mobile-testimonials-carousel {
        overflow: hidden;
        position: relative;
    }
    
    /* Ensure expanded cards are fully visible within the carousel */
    .mobile-testimonial-slide.expanded {
        z-index: 1;
        position: relative;
    }

    /* Read more indicator */
    .mobile-read-more {
        font-size: 14px;
        color: #324e8a;
        font-weight: 600;
        text-align: center;
        padding: 10px 20px;
        margin: 10px -10px 0 -10px;
        background: rgba(50, 78, 138, 0.05);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-read-more:active {
        background: rgba(50, 78, 138, 0.1);
        transform: scale(0.98);
    }

    .mobile-testimonial-slide.expanded .mobile-read-more {
        background: rgba(50, 78, 138, 0.08);
        margin-top: 15px;
    }
    
    /* Make preview text clickable */
    .mobile-testimonial-preview {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    /* Client info section */
    .mobile-testimonial-client {
        display: flex;
        align-items: center;
        gap: 15px;
        padding-top: 20px;
        border-top: 1px solid #eee;
    }

    /* Client image */
    .mobile-client-image {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        overflow: hidden;
        flex-shrink: 0;
        background: #f0f0f0;
    }

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

    .mobile-client-image .placeholder-image {
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #324e8a 0%, #5A4FCF 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 24px;
        font-weight: 600;
    }

    /* Client details */
    .mobile-client-details {
        flex: 1;
    }

    .mobile-client-name {
        font-size: 16px;
        font-weight: 600;
        color: #324e8a;
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .mobile-client-role {
        font-size: 13px;
        color: #666;
        line-height: 1.3;
    }

    /* Carousel navigation dots */
    .mobile-testimonials-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 25px;
    }

    .mobile-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ddd;
        border: none;
        padding: 0;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mobile-dot.active {
        width: 24px;
        border-radius: 4px;
        background: #324e8a;
    }

    /* Touch interaction feedback */
    .mobile-testimonials-carousel {
        -webkit-tap-highlight-color: transparent;
        touch-action: pan-y pinch-zoom;
    }

    /* Swipe hint */
    .mobile-swipe-hint {
        text-align: center;
        margin-top: 15px;
        font-size: 12px;
        color: #999;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }

    .mobile-swipe-hint svg {
        width: 20px;
        height: 20px;
        animation: swipeHint 2s ease-in-out infinite;
    }

    @keyframes swipeHint {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(5px); }
    }

    /* Ensure proper spacing with navigation */
    .mobile-testimonials {
        margin-bottom: 65px; /* Space for bottom nav */
    }
}

/* Ensure desktop is not affected */
@media (min-width: 769px) {
    .mobile-testimonials.mobile-only,
    .mobile-testimonials-v2 {
        display: none !important;
    }
}
