/**
 * Testimonials Slider Styles
 */

.testimonials-slider {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.testimonials-container {
    position: relative;
    height: 500px;
    /* Fixed height to prevent any layout jumping */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Content starts from the top to prevent clipping on overflow */
.testimonial-slide {
    justify-content: flex-start !important;
}

.testimonial-slide.active {
    opacity: 1;
    visibility: visible;
    /* Removed position: relative to maintain fixed container height */
}

.testimonial-slide p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    text-align: center;
}

.testimonial-author {
    font-weight: bold;
    font-style: normal;
    text-align: center;
    margin-top: 1.5rem;
    color: inherit;
}

/* Slider Controls */
.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: inherit;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    min-width: 50px;
    max-width: 50px;
    min-height: 50px;
    max-height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.slider-btn.toggle-pause {
    font-size: 1.2rem;
    margin-left: 0.5rem;
}

.slider-btn.toggle-pause span {
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:active {
    transform: scale(0.95);
}

.slider-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Slider Dots */
.slider-dots {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.dot.active {
    background: rgba(255, 255, 255, 0.9);
    width: 14px;
    height: 14px;
    border-color: rgba(255, 255, 255, 0.5);
}

/* Custom Scrollbar */
.testimonial-slide::-webkit-scrollbar {
    width: 5px;
}

.testimonial-slide::-webkit-scrollbar-track {
    background: transparent;
}

.testimonial-slide::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.testimonial-slide::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .testimonials-slider {
        padding: 1rem 0.5rem;
    }

    .testimonials-container {
        height: 450px;
        /* More compact for tablets */
    }

    .testimonial-slide {
        padding: 0.5rem 1rem;
    }

    .testimonial-slide p {
        font-size: 0.95rem;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .slider-controls {
        gap: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .testimonials-container {
        height: 450px;
        /* Fits better in mobile full view */
    }

    .testimonial-slide p {
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 1.25rem;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

    .dot.active {
        width: 12px;
        height: 12px;
    }
}

/* Animation for slide transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonial-slide.active {
    animation: fadeIn 0.6s ease-in-out;
}