/* Modern Testimonial Carousel Styles */
.testimonial-modern {
    position: relative;
    overflow: visible;
    padding: 2rem 0;
    background-color: transparent;
    width: 100%;
    margin: 0 auto;
}

.testimonial-modern-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 8rem;
    width: 100%;
}

/* Main carousel container */
.testimonial-modern-carousel {
    position: relative;
    width: 100%;
    overflow: visible;
    padding: 2rem 0;
    margin: 0 auto;
    max-width: 1000px;
}

/* Carousel track for sliding */
.testimonial-modern-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
    position: relative;
    height: 100%;
}

/* Individual slide */
.testimonial-modern-slide {
    flex: 0 0 100%;
    padding: 0 1.5rem;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: scale(0.92) translateY(10px);
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    pointer-events: none;
}

.testimonial-modern-slide.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    position: relative;
    pointer-events: auto;
    z-index: 2;
}

.testimonial-modern-slide.prev {
    opacity: 0;
    transform: scale(0.92) translateX(-30px);
    z-index: 1;
}

.testimonial-modern-slide.next {
    opacity: 0;
    transform: scale(0.92) translateX(30px);
    z-index: 1;
}

/* Testimonial card */
.testimonial-modern-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #e11d48, #f43f5e);
}

.testimonial-modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Testimonial content */
.testimonial-modern-content {
    flex-grow: 1;
    margin-bottom: 1.5rem;
    position: relative;
}

.testimonial-modern-content p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #4b5563;
    font-style: italic;
    position: relative;
    padding-left: 1.5rem;
}

.testimonial-modern-content p::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -0.5rem;
    font-size: 3rem;
    line-height: 1;
    color: #e11d48;
    opacity: 0.2;
    font-family: serif;
}

/* Customer info */
.testimonial-modern-customer {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.testimonial-modern-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
    border: 2px solid #f3f4f6;
}

.testimonial-modern-info h4 {
    font-weight: 600;
    font-size: 1.125rem;
    margin: 0 0 0.25rem;
    color: #111827;
}

.testimonial-modern-info p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* Rating stars */
.testimonial-modern-rating {
    display: flex;
    color: #fbbf24;
}

.testimonial-modern-star {
    width: 1.25rem;
    height: 1.25rem;
}

/* Navigation arrows */
.testimonial-modern-arrows {
    position: absolute;
    top: 50%;
    left: -4rem;
    right: -4rem;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.testimonial-modern-arrow {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #111827;
    transition: all 0.3s ease;
    pointer-events: auto;
    opacity: 0.95;
    z-index: 20;
    position: relative;
    flex-shrink: 0;
    min-width: 3rem;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.testimonial-modern-arrow:hover {
    background-color: #e11d48;
    color: white;
    opacity: 1;
}

.testimonial-modern-arrow svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Navigation dots */
.testimonial-modern-nav {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.testimonial-modern-dots {
    display: flex;
    gap: 0.5rem;
}

.testimonial-modern-dot {
    width: 2.5rem;
    height: 0.25rem;
    border-radius: 0.125rem;
    background-color: #e5e7eb;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-modern-dot:hover {
    background-color: #9ca3af;
}

.testimonial-modern-dot.active {
    background-color: #e11d48;
    width: 3rem;
}

/* Responsive styles */
@media (min-width: 1400px) {
    .testimonial-modern-container {
        max-width: 1600px;
        padding: 0 10rem;
    }

    .testimonial-modern-arrows {
        left: -5rem;
        right: -5rem;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .testimonial-modern-container {
        padding: 0 8rem;
    }

    .testimonial-modern-arrows {
        left: -4rem;
        right: -4rem;
    }
}

@media (max-width: 1199px) {
    .testimonial-modern-container {
        max-width: 1000px;
        padding: 0 6rem;
    }

    .testimonial-modern-arrows {
        left: -3rem;
        right: -3rem;
    }
}

@media (max-width: 1024px) {
    .testimonial-modern-container {
        padding: 0 5rem;
    }

    .testimonial-modern-arrows {
        left: -2.5rem;
        right: -2.5rem;
    }
}

@media (max-width: 768px) {
    .testimonial-modern-container {
        padding: 0 4rem;
    }

    .testimonial-modern-card {
        padding: 1.5rem;
    }

    .testimonial-modern-content p {
        font-size: 1rem;
    }

    .testimonial-modern-arrows {
        left: -2rem;
        right: -2rem;
    }

    .testimonial-modern-arrow {
        width: 2.5rem;
        height: 2.5rem;
    }

    .testimonial-modern-arrow svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

@media (max-width: 640px) {
    .testimonial-modern-container {
        padding: 0 3rem;
    }

    .testimonial-modern-arrows {
        left: -1.5rem;
        right: -1.5rem;
    }

    .testimonial-modern-arrow {
        width: 2.25rem;
        height: 2.25rem;
        background-color: rgba(255, 255, 255, 0.9);
    }
}

@media (max-width: 480px) {
    .testimonial-modern-container {
        padding: 0 2rem;
    }

    .testimonial-modern-arrows {
        left: -1rem;
        right: -1rem;
    }

    .testimonial-modern-arrow {
        width: 2rem;
        height: 2rem;
        background-color: rgba(255, 255, 255, 0.95);
    }

    .testimonial-modern-arrow svg {
        width: 1rem;
        height: 1rem;
    }
}

/* Animations for slide transitions */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeOutLeft {
    0% {
        opacity: 1;
        transform: scale(1) translateX(0);
    }

    100% {
        opacity: 0;
        transform: scale(0.92) translateX(-30px);
    }
}

@keyframes fadeOutRight {
    0% {
        opacity: 1;
        transform: scale(1) translateX(0);
    }

    100% {
        opacity: 0;
        transform: scale(0.92) translateX(30px);
    }
}

@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: scale(0.92) translateX(-30px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: scale(0.92) translateX(30px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

.testimonial-modern-slide.active.animate-in {
    animation: fadeInScale 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.testimonial-modern-slide.active.animate-in-left {
    animation: fadeInLeft 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.testimonial-modern-slide.active.animate-in-right {
    animation: fadeInRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.testimonial-modern-slide.animate-out-left {
    animation: fadeOutLeft 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.testimonial-modern-slide.animate-out-right {
    animation: fadeOutRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Accessibility - respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    .testimonial-modern-track,
    .testimonial-modern-slide,
    .testimonial-modern-dot,
    .testimonial-modern-card {
        transition: none !important;
    }

    .testimonial-modern-slide.active,
    .testimonial-modern-slide.active.animate-in,
    .testimonial-modern-slide.active.animate-in-left,
    .testimonial-modern-slide.active.animate-in-right,
    .testimonial-modern-slide.animate-out-left,
    .testimonial-modern-slide.animate-out-right {
        animation: none !important;
    }
}