/* Testimonials Section Styles - Enhanced 3D Interactive Carousel */
.testimonials {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    position: relative;
    overflow: hidden;
    perspective: 1500px;
}

.testimonials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="testimonial-pattern" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="2" fill="%23d4af37" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23testimonial-pattern)"/></svg>');
    opacity: 0.3;
}

.testimonials .section-title {
    color: var(--white);
}

.testimonials .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.testimonials .section-title::after {
    background: linear-gradient(90deg, var(--gold), var(--light-gold));
}

/* Enhanced 3D Carousel Container */
.testimonials-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    height: 600px;
    perspective: 1500px;
    perspective-origin: center center;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

/* Enhanced 3D Testimonial Cards */
.testimonial-card {
    position: absolute;
    width: 380px;
    height: 480px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 50%, var(--gold) 100%);
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    overflow: hidden;
    transform-style: preserve-3d;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    backface-visibility: hidden;
    left: 50%;
    top: 50%;
    margin-left: -190px;
    margin-top: -240px;
}

/* Smooth transition class */
.testimonial-card.transitioning {
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}



/* Card Background Pattern */
.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="card-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="5" cy="15" r="0.5" fill="%23d4af37" opacity="0.2"/></pattern></defs><rect width="100" height="100" fill="url(%23card-pattern)"/></svg>');
    border-radius: var(--border-radius);
    z-index: 1;
}

/* Tweet Image Container */
.tweet-background {
    position: relative;
    z-index: 2;
    width: 280px;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 3px solid var(--gold);
    margin-top: 10px;
}

.tweet-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--white);
    transition: var(--transition);
}

/* Card Overlay for Bottom Info */
.card-overlay {
    position: relative;
    z-index: 3;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    margin-top: 15px;
}

/* Trainee Info */
.trainee-info {
    position: relative;
    z-index: 3;
    text-align: center;
    width: 100%;
}

.trainee-name {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    letter-spacing: 1px;
}

/* View Tweet Button */
.view-tweet-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: var(--white);
    padding: 15px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(26, 95, 63, 0.4);
    border: 2px solid var(--gold);
    position: relative;
    overflow: hidden;
}

.view-tweet-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    transition: left 0.5s ease;
}

.view-tweet-btn:hover::before {
    left: 100%;
}

.view-tweet-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(26, 95, 63, 0.6);
    background: linear-gradient(135deg, var(--gold), var(--dark-gold));
    border-color: var(--white);
}

.view-tweet-btn i {
    font-size: 1.2rem;
    transition: var(--transition);
}

.view-tweet-btn:hover i {
    transform: scale(1.2);
}

/* 3-Card Display System - Always show 3 cards */
/* Default state for cards not in 3-card view */
.testimonial-card:not(.active):not(.prev):not(.next) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateX(0) translateZ(-500px) scale(0.3) !important;
}

/* Show only 3 cards at a time */
.testimonial-card.active,
.testimonial-card.prev,
.testimonial-card.next {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    display: flex !important;
}

/* Center Card (Active/Focus) */
.testimonial-card.active {
    transform: translateX(0) translateZ(100px) rotateY(0deg) scale(1.1) !important;
    opacity: 1 !important;
    z-index: 10 !important;
    filter: brightness(1.1) blur(0px) saturate(1.2) !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 15px 30px rgba(212, 175, 55, 0.3) !important;
}

/* Left Background Card */
.testimonial-card.prev {
    transform: translateX(-280px) translateZ(-200px) rotateY(35deg) scale(0.8) !important;
    opacity: 0.6 !important;
    z-index: 5 !important;
    filter: brightness(0.7) blur(3px) saturate(0.8) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
}

/* Right Background Card */
.testimonial-card.next {
    transform: translateX(280px) translateZ(-200px) rotateY(-35deg) scale(0.8) !important;
    opacity: 0.6 !important;
    z-index: 5 !important;
    filter: brightness(0.7) blur(3px) saturate(0.8) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
}

/* Enhanced Hover Effects */
.testimonial-card.active:hover {
    transform: translateX(0) translateZ(120px) rotateY(0deg) scale(1.15) !important;
    filter: brightness(1.2) blur(0px) saturate(1.3) !important;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 20px 40px rgba(212, 175, 55, 0.4) !important;
}

.testimonial-card.prev:hover {
    transform: translateX(-250px) translateZ(-150px) rotateY(30deg) scale(0.85) !important;
    opacity: 0.8 !important;
    filter: brightness(0.8) blur(2px) saturate(0.9) !important;
}

.testimonial-card.next:hover {
    transform: translateX(250px) translateZ(-150px) rotateY(-30deg) scale(0.85) !important;
    opacity: 0.8 !important;
    filter: brightness(0.8) blur(2px) saturate(0.9) !important;
}

.testimonial-card:hover .tweet-image {
    transform: scale(1.1);
}

.testimonial-card:hover .card-overlay {
    background: linear-gradient(
        135deg,
        rgba(26, 95, 63, 0.9) 0%,
        rgba(45, 122, 95, 0.8) 50%,
        rgba(212, 175, 55, 0.9) 100%
    );
}

/* Carousel Controls */
.carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 5;
}

.carousel-btn {
    width: 60px;
    height: 60px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-green);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-hover);
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: var(--gold);
    color: var(--white);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 5;
}

.indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.indicator.active {
    background: var(--gold);
    transform: scale(1.3);
    border-color: var(--white);
}

.indicator:hover {
    background: var(--light-gold);
    transform: scale(1.1);
}

/* Touch/Swipe Support */
.carousel-container {
    touch-action: pan-y;
    user-select: none;
}

/* Remove duplicate transition rule - already defined above */

/* Mobile Responsive */
@media (max-width: 768px) {
    .testimonials {
        padding: 60px 0;
    }
    
    .testimonials-carousel {
        height: 400px;
        max-width: 100%;
        padding: 0 20px;
    }
    
    .testimonial-card {
        width: 280px;
        height: 380px;
        padding: 15px;
    }
    
    .tweet-background {
        width: 240px;
        height: 250px;
        margin-top: 5px;
    }
    
    .card-overlay {
        padding: 10px;
        margin-top: 10px;
    }
    
    .trainee-name {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .view-tweet-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        gap: 10px;
    }
    
    .view-tweet-btn i {
        font-size: 1rem;
    }
    
    /* Simplified positioning for mobile */
    .testimonial-card[data-index="1"] {
        transform: translateX(200px) scale(0.7);
        opacity: 0.4;
    }
    
    .testimonial-card[data-index="2"] {
        transform: translateX(-200px) scale(0.7);
        opacity: 0.4;
    }
    
    .testimonial-card[data-index="3"] {
        transform: translateX(400px) scale(0.5);
        opacity: 0.2;
    }
    
    .carousel-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .carousel-indicators {
        bottom: -50px;
    }
    
    .indicator {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .testimonials-carousel {
        height: 350px;
    }
    
    .testimonial-card {
        width: 250px;
        height: 320px;
        padding: 12px;
    }
    
    .tweet-background {
        width: 210px;
        height: 200px;
        margin-top: 5px;
    }
    
    .card-overlay {
        padding: 8px;
        margin-top: 8px;
    }
    
    .trainee-name {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .view-tweet-btn {
        padding: 10px 15px;
        font-size: 0.8rem;
        gap: 8px;
    }
    
    .view-tweet-btn i {
        font-size: 0.9rem;
    }
    
    .carousel-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    /* Stack cards vertically on very small screens */
    .testimonial-card[data-index="1"],
    .testimonial-card[data-index="2"],
    .testimonial-card[data-index="3"] {
        display: none;
    }
}

/* Enhanced 3D Animation Effects for 3-Card System - DISABLED to fix positioning */
/* Animations are disabled to prevent conflicts with positioning transforms */
/*
.testimonial-card.active {
    animation: float-active 6s ease-in-out infinite;
}

.testimonial-card.prev {
    animation: float-background-left 8s ease-in-out infinite;
}

.testimonial-card.next {
    animation: float-background-right 8s ease-in-out infinite;
}
*/

@keyframes float-active {
    0%, 100% { 
        transform: translateX(0) translateZ(100px) rotateY(0deg) scale(1.1) translateY(0px);
    }
    50% { 
        transform: translateX(0) translateZ(100px) rotateY(0deg) scale(1.1) translateY(-15px);
    }
}

@keyframes float-background-left {
    0%, 100% { 
        transform: translateX(-280px) translateZ(-200px) rotateY(35deg) scale(0.8) translateY(0px);
    }
    50% { 
        transform: translateX(-280px) translateZ(-200px) rotateY(35deg) scale(0.8) translateY(-8px);
    }
}

@keyframes float-background-right {
    0%, 100% { 
        transform: translateX(280px) translateZ(-200px) rotateY(-35deg) scale(0.8) translateY(0px);
    }
    50% { 
        transform: translateX(280px) translateZ(-200px) rotateY(-35deg) scale(0.8) translateY(-8px);
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotateX(0deg);
    }
    50% { 
        transform: translateY(-10px) rotateX(2deg);
    }
}

/* Smooth Rotation Animation - DISABLED to fix positioning */
/* 
.carousel-container {
    animation: subtle-rotate 20s linear infinite;
}

@keyframes subtle-rotate {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(0.5deg); }
}
*/

/* Enhanced Card Flip Effect */
.testimonial-card {
    transform-origin: center center -200px;
}

.testimonial-card:hover {
    animation: card-flip 0.8s ease-in-out;
}

@keyframes card-flip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(10deg) scale(1.05); }
    100% { transform: rotateY(0deg) scale(1.08); }
}

/* Glowing Effect for Active Card */
.testimonial-card.active::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, var(--gold), var(--light-gold), var(--gold));
    border-radius: 30px;
    z-index: -1;
    opacity: 0.3;
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.02);
    }
}

/* Auto-play progress indicator for active card */
.testimonial-card.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--light-gold));
    animation: carousel-progress 5s linear infinite;
    z-index: 10;
    border-radius: 0 0 25px 25px;
}

@keyframes carousel-progress {
    from { width: 0; }
    to { width: 100%; }
}

/* Particle Effect Background */
.testimonials::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: particles-float 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes particles-float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.6;
    }
}