/* Testimonials Carousel - Desktop Original, Mobile Fixed */

/* Base Testimonials Container */
.testimonials-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 40px 70px; /* Add horizontal padding to prevent button overlap */
}

/* Testimonials Wrapper - Original Desktop Layout */
.testimonials-wrapper {
    display: flex;
    width: 300%;
    /* Animation removed — JS drives auto-advance. Keep transition for manual moves. */
    transition: transform 0.7s ease-in-out;
}

/* Testimonial Group - Original Desktop Layout */
.testimonial-group {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
}

/* Individual Testimonial Box - Original Desktop Layout */
.testimonial-box {
    flex: 0 0 30%;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    text-align: center;
    margin: 0 10px;
}

.testimonial-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* Progress Bar Container */
.progress-bar-container {
    width: 100%;
    height: 4px;
    background-color: #f0f0f0;
    border-radius: 2px;
    margin-top: 15px;
    overflow: hidden;
    position: relative;
}

/* Progress Bar */
.progress-bar {
    height: 100%;
    background-color: #6B8E23;
    width: 100%;
    position: absolute;
    left: -100%;
    animation: progress 15s linear infinite;
}

@keyframes progress {
    0% { left: -100%; }
    100% { left: 0%; }
}

/* Testimonial Content Styling */
.testimonial-box h3 {
    color: #174D38;
    margin: 10px 0;
    font-size: 18px;
}

.testimonial-box p {
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.testimonial-box span {
    color: #666;
    font-size: 14px;
    display: block;
}

/* Mobile Responsive Styles (aligned with JS transform slider) */
@media screen and (max-width: 992px) {
    .testimonials-container {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        padding: 20px 58px;
    }

    .testimonials-wrapper {
        width: 300% !important;
        display: flex !important;
        transition: transform 0.7s ease-in-out;
        overflow: hidden;
    }

    .testimonial-group {
        flex: 0 0 33.3333% !important;
        max-width: 33.3333% !important;
        width: 33.3333% !important;
        display: flex !important;
        justify-content: center !important;
        padding: 0 8px !important;
    }

    .testimonial-group .testimonial-box {
        display: none;
    }

    .testimonial-group .testimonial-box.is-active {
        display: block;
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 18px !important;
        box-sizing: border-box;
    }

    .testimonial-box p {
        font-size: 15px;
        line-height: 1.55;
        word-break: normal;
    }

    .testimonial-box h3 {
        font-size: 17px;
        line-height: 1.35;
    }
}

@media screen and (max-width: 768px) {
    .testimonials-container {
        padding: 15px 52px;
    }
}

@media screen and (max-width: 480px) {
    .testimonials-container {
        padding: 10px 46px;
    }

    .testimonial-group {
        padding: 0 6px !important;
    }

    .testimonial-group .testimonial-box.is-active {
        padding: 16px !important;
    }

    .testimonial-box p {
        font-size: 14px;
        line-height: 1.5;
    }

    .testimonial-box h3 {
        font-size: 16px;
    }
}

/* CSS keyframes removed to avoid conflicting with JS-driven control */

/* Navigation Buttons */
.testimonial-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(23, 77, 56, 0.9);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 2001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    pointer-events: auto;
}

.testimonial-nav-btn:hover {
    background-color: #6B8E23;
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.testimonial-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.testimonial-prev-btn {
    left: 15px;
}

.testimonial-next-btn {
    right: 15px;
}

/* Disable animation when manually navigating */
.testimonials-wrapper.manual-control {
    animation: none !important;
}

/* Mobile Navigation Buttons */
@media screen and (max-width: 992px) {
    .testimonial-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .testimonial-prev-btn {
        left: 8px;
    }
    
    .testimonial-next-btn {
        right: 8px;
    }
}

@media screen and (max-width: 768px) {
    .testimonials-container {
        padding: 15px 55px;
    }
}

@media screen and (max-width: 480px) {
    .testimonials-container {
        padding: 10px 50px;
    }
    
    .testimonial-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .testimonial-prev-btn {
        left: 5px;
    }
    
    .testimonial-next-btn {
        right: 5px;
    }
}
