/* BD Testimonials Widget CSS - Version 2.0
 * Salva questo file come: wp-content/plugins/bad-dog-elementor-addons/assets/testimonials/style.css
 */

 .bd-testimonials-section-v2 {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

.bd-testimonials-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    color: #555;
    margin-bottom: 80px;
    text-align: center;
    line-height: 1.2;
}

.bd-testimonials-container-v2 {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bd-testimonials-track-v2 {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

/* Card Styles */
.bd-testimonial-card-v2 {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    overflow: hidden;
    backface-visibility: hidden;
    
    /* Default inactive state */
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0.7;
    z-index: 1;
}

/* Active Card */
.bd-testimonial-card-v2.bd-active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    z-index: 10;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* Card Front - Default State */
.bd-card-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 30px;
}

/* Card Back - Hover State */
.bd-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Show content on hover for non-active cards */
.bd-testimonial-card-v2:not(.bd-active):hover .bd-card-front {
    opacity: 0;
}

.bd-testimonial-card-v2:not(.bd-active):hover .bd-card-back {
    opacity: 1;
}

/* Active card always shows back content */
.bd-testimonial-card-v2.bd-active .bd-card-front {
    opacity: 0;
}

.bd-testimonial-card-v2.bd-active .bd-card-back {
    opacity: 1;
}

/* Grayscale effect for inactive cards */
.bd-testimonial-card-v2:not(.bd-active) {
    filter: grayscale(100%);
}

.bd-testimonial-card-v2.bd-active {
    filter: grayscale(0%);
}

/* Header */
.bd-testimonial-header-v2 {
    text-align: center;
    margin-bottom: 30px;
}

.bd-check-mark {
    width: 40px;
    height: 40px;
    background: #8b5a3c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin: 0 auto 20px;
}

.bd-testimonial-name-v2 {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 10px 0;
}

.bd-testimonial-role-v2 {
    font-size: 16px;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bd-social-icon-v2 {
    width: 16px;
    height: 16px;
}

/* Avatar */
.bd-testimonial-avatar-v2 {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bd-testimonial-avatar-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Social Post Content */
.bd-social-post-v2 {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #8b5a3c;
    margin-bottom: 20px;
}

.bd-social-header-v2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.bd-social-avatar-v2 {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.bd-social-avatar-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bd-social-info-v2 {
    flex: 1;
}

.bd-social-name-v2 {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.bd-social-handle-v2 {
    font-size: 12px;
    color: #718096;
}

.bd-social-text-v2 {
    font-size: 14px;
    line-height: 1.5;
    color: #4a5568;
    margin-bottom: 15px;
}

.bd-social-footer-v2 {
    font-size: 12px;
    color: #8b5a3c;
    font-weight: 500;
}

/* Standard Testimonial Content */
.bd-testimonial-content-v2 {
    text-align: center;
}

.bd-testimonial-text-v2 {
    font-size: 16px;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 20px;
}

.bd-testimonial-company-v2 {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

/* Verified Badge */
.bd-verified-v2 {
    color: #38a169;
    font-size: 12px;
    font-weight: 600;
}

/* Drag Button */
.bd-drag-button-v2 {
    position: absolute;
    z-index: 5;
    cursor: grab;
    width: 60px;
    height: 60px;
    background: #8b5a3c;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(139, 90, 60, 0.3);
    
    /* Hidden by default */
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.bd-testimonial-card-v2:hover .bd-drag-button-v2 {
    opacity: 1;
    transform: scale(1);
}

.bd-drag-button-v2:hover {
    background: #7a4d34;
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(139, 90, 60, 0.4);
}

/* Drag button positions */
.bd-drag-top-left { top: 10px; left: 10px; }
.bd-drag-top-center { top: 10px; left: 50%; transform: translateX(-50%); }
.bd-drag-top-right { top: 10px; right: 10px; }

.bd-drag-middle-left { top: 50%; left: 10px; transform: translateY(-50%); }
.bd-drag-middle-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.bd-drag-middle-right { top: 50%; right: 10px; transform: translateY(-50%); }

.bd-drag-bottom-left { bottom: 10px; left: 10px; }
.bd-drag-bottom-center { bottom: 10px; left: 50%; transform: translateX(-50%); }
.bd-drag-bottom-right { bottom: 10px; right: 10px; }

/* Navigation Arrows */
.bd-nav-arrow-v2 {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 20;
    color: #4a5568;
}

.bd-nav-arrow-v2:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    background: #f8f9fa;
}

.bd-nav-prev-v2 {
    left: -80px;
}

.bd-nav-next-v2 {
    right: -80px;
}

/* Avatar as background */
.bd-card-front.avatar-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
    z-index: -1;
    opacity: 1;
    border-radius: inherit;
}

.bd-card-front.avatar-bg .bd-testimonial-name-v2,
.bd-card-front.avatar-bg .bd-testimonial-role-v2,
.bd-card-front.avatar-bg .bd-social-icon-v2 {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Animation for initial load */
.bd-testimonials-section-v2 {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.2s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Smooth card transitions */
.bd-testimonial-card-v2[style*="transform"] {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .bd-nav-prev-v2 { left: -60px; }
    .bd-nav-next-v2 { right: -60px; }
}

@media (max-width: 768px) {
    .bd-testimonials-section-v2 {
        padding: 20px 15px;
    }
    
    .bd-testimonials-title {
        margin-bottom: 60px;
        font-size: 2rem;
    }
    
    .bd-testimonials-container-v2 {
        height: 450px;
    }
    
    .bd-testimonial-card-v2 {
        width: 300px;
        height: 400px;
    }
    
    .bd-testimonial-avatar-v2 {
        width: 150px;
        height: 150px;
    }
    
    .bd-card-front,
    .bd-card-back {
        padding: 30px 25px;
    }
    
    .bd-nav-arrow-v2 {
        display: none;
    }
    
    .bd-drag-button-v2 {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .bd-testimonial-card-v2 {
        width: 280px;
        height: 380px;
    }
    
    .bd-card-front,
    .bd-card-back {
        padding: 25px 20px;
    }
    
    .bd-testimonial-name-v2 {
        font-size: 18px;
    }
    
    .bd-testimonial-role-v2 {
        font-size: 13px;
    }
    
    .bd-social-post-v2 {
        padding: 15px;
    }
}