/**
 * Testimonials Section Styles - Horizontal Carousel
 * Clean horizontal scrolling cards with alternating dark/light backgrounds
 */

/* Testimonials Section */
.testimonials-section {
    padding: 100px 0;
    background: #fff;
    position: relative;
    overflow: hidden;
}

/* Background Image - SEO Optimized with lazy loading */
.testimonials-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    opacity: 1;
    pointer-events: none;
}

/* Ensure content is above background */
.testimonials-section > .container-fluid {
    position: relative;
    z-index: 1;
}

/* Carousel Wrapper */
.testimonials-carousel-wrapper {
    position: relative;
    margin-top: 60px;
    padding: 0 60px;
}

/* Carousel Container */
.testimonials-carousel {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding: 20px 0 40px;
}

.testimonials-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Carousel Item */
.testimonial-carousel-item {
    flex: 0 0 auto;
    width: 420px;
    scroll-snap-align: start;
}

/* Card */
.testimonial-card-carousel {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 40px 35px;
    height: 100%;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.testimonial-card-carousel:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

/* Dark Card Variant */
.testimonial-carousel-item.is-dark .testimonial-card-carousel {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
    border-color: #495057;
    color: #fff;
}

.testimonial-carousel-item.is-dark .testimonial-quote i {
    color: rgba(255, 255, 255, 0.15);
}

.testimonial-carousel-item.is-dark .testimonial-name {
    color: #fff;
}

.testimonial-carousel-item.is-dark .testimonial-position {
    color: #adb5bd;
}

.testimonial-carousel-item.is-dark .testimonial-content-text {
    color: #e9ecef;
}

.testimonial-carousel-item.is-dark .testimonial-rating-stars i {
    color: #ffc107;
}

.testimonial-carousel-item.is-dark .testimonial-avatar-default {
    background: linear-gradient(135deg, #00a8cc 0%, #0077b6 100%);
}

/* Quote Icon */
.testimonial-quote {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 60px;
    line-height: 1;
    color: rgba(0, 168, 204, 0.12);
    pointer-events: none;
}

/* Author Header */
.testimonial-author-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

/* Avatar */
.testimonial-avatar-wrap {
    flex-shrink: 0;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #00a8cc;
}

.testimonial-avatar-default {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dee2e6 0%, #adb5bd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

/* Author Meta */
.testimonial-author-meta {
    flex: 1;
}

.testimonial-name {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.testimonial-position {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

/* Content Text */
.testimonial-content-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.8;
    color: #495057;
    margin-bottom: 25px;
    overflow-y: auto;
}

.testimonial-content-text p {
    margin-bottom: 15px;
}

.testimonial-content-text p:last-child {
    margin-bottom: 0;
}

/* Rating Stars */
.testimonial-rating-stars {
    display: flex;
    gap: 5px;
}

.testimonial-rating-stars i {
    font-size: 16px;
    color: #ffc107;
}

.testimonial-rating-stars .far {
    color: #dee2e6;
}

/* Pagination Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    padding: 20px 0;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dee2e6;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    border: none;
    padding: 0;
}

.carousel-dot:hover {
    background: #adb5bd;
    transform: scale(1.2);
}

.carousel-dot.active {
    background: linear-gradient(135deg, #00a8cc 0%, #0077b6 100%);
    width: 40px;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 168, 204, 0.3);
}

.carousel-dot.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    transform: translateY(-50%) scale(1.2);
    opacity: 0.3;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: translateY(-50%) scale(1.2);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-50%) scale(1.5);
        opacity: 0;
    }
}

/* Empty State */
.testimonials-empty {
    text-align: center;
    padding: 80px 20px;
    background: #f8f9fa;
    border-radius: 20px;
}

.testimonials-empty-icon {
    font-size: 80px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.testimonials-empty h3 {
    font-size: 24px;
    font-weight: 700;
    color: #495057;
    margin-bottom: 12px;
}

.testimonials-empty p {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .testimonial-carousel-item {
        width: 380px;
    }
}

@media (max-width: 992px) {
    .testimonial-carousel-item {
        width: 350px;
    }

    .testimonials-carousel-wrapper {
        padding: 0 50px;
    }
}

@media (max-width: 768px) {
    .testimonials-section {
        padding: 60px 0;
    }

    .testimonials-carousel-wrapper {
        padding: 0 45px;
        margin-top: 40px;
    }

    .testimonial-carousel-item {
        width: 320px;
    }

    .testimonial-card-carousel {
        padding: 30px 25px;
        min-height: 350px;
    }

    .testimonial-quote {
        font-size: 50px;
        top: 25px;
        right: 25px;
    }

    .testimonial-avatar,
    .testimonial-avatar-default {
        width: 50px;
        height: 50px;
    }

    .testimonial-avatar-default {
        font-size: 20px;
    }

    .testimonial-name {
        font-size: 16px;
    }

    .testimonial-position {
        font-size: 13px;
    }

    .testimonial-content-text {
        font-size: 14px;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .testimonials-empty {
        padding: 60px 20px;
    }

    .testimonials-empty-icon {
        font-size: 60px;
    }

    .testimonials-empty h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .testimonials-carousel-wrapper {
        padding: 0 40px;
    }

    .testimonial-carousel-item {
        width: 280px;
    }

    .testimonial-card-carousel {
        padding: 25px 20px;
    }

    .carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* Smooth scroll animation */
@media (prefers-reduced-motion: no-preference) {
    .testimonials-carousel {
        scroll-behavior: smooth;
    }
}

/* Card entrance animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.testimonial-carousel-item {
    animation: slideInRight 0.6s ease-out;
}

.testimonial-carousel-item:nth-child(1) {
    animation-delay: 0s;
}

.testimonial-carousel-item:nth-child(2) {
    animation-delay: 0.1s;
}

.testimonial-carousel-item:nth-child(3) {
    animation-delay: 0.2s;
}

.testimonial-carousel-item:nth-child(4) {
    animation-delay: 0.3s;
}

.testimonial-carousel-item:nth-child(5) {
    animation-delay: 0.4s;
}
