/* ============================================
   Horizontal Auto-Scrolling Testimonials
   Premium Glass Morphism Design
   ============================================ */

/* Container & Layout */
.horizontal-testimonials {
    position: relative;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.5rem 0;
    overflow: visible;
    min-height: 320px;
}

.testimonials-viewport {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Scrolling Track */
.testimonials-track {
    display: flex;
    gap: 24px;
    padding: 10px 24px;
    height: 100%;
    align-items: center;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.testimonials-track.scrolling {
    animation: scroll-testimonials var(--scroll-duration, 48s) linear infinite;
}

.testimonials-track.paused {
    animation-play-state: paused !important;
}

@keyframes scroll-testimonials {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(calc(-100% - 24px), 0, 0);
    }
}

/* Individual Testimonial Card */
.testimonial-item {
    flex: 0 0 420px;
    height: 240px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.02) 100%);
    border-radius: 16px;
    padding: 18px;
    padding-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transform: translateZ(0);
    overflow: hidden;
}

.testimonial-item:hover {
    transform: translateY(-4px) scale(1.02);
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.04) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 12px 48px rgba(99, 102, 241, 0.2),
        0 0 80px rgba(99, 102, 241, 0.1),
        inset 0 0 40px rgba(99, 102, 241, 0.05);
}

/* Shimmer Effect on Hover */
.testimonial-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: all 0.6s;
    transform: skewX(-25deg);
}

.testimonial-item:hover::before {
    left: 100%;
}

/* Quote Text */
.testimonial-quote {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    flex-grow: 1;
    position: relative;
    z-index: 2;
    font-weight: 400;
}

.testimonial-quote .highlight {
    color: #60A5FA;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
    background: linear-gradient(135deg, #60A5FA, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Author Section */
.testimonial-author {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1));
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.testimonial-item:hover .author-avatar img {
    transform: scale(1.1);
}

.author-info {
    flex-grow: 1;
}

.author-name {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2px;
    line-height: 1.4;
}

.author-title {
    font-size: 13px;
    color: rgba(148, 163, 184, 0.8);
    line-height: 1.3;
}

/* Footer Section */
.testimonial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

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

.star {
    font-size: 14px;
    color: #FBBF24;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
    transition: all 0.3s ease;
}

.testimonial-item:hover .star {
    transform: scale(1.1);
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
}

/* Metrics */
.testimonial-metrics {
    display: flex;
    gap: 12px;
}

.metric {
    font-size: 15px;
    color: rgba(148, 163, 184, 0.7);
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.metric:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.metric-value {
    color: #60A5FA;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(96, 165, 250, 0.3);
}

/* Navigation Controls */
.testimonials-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    position: relative;
    z-index: 10;
}

.control-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.control-dot:hover,
.control-dot.active {
    background: #60A5FA;
    border-color: #60A5FA;
    box-shadow:
        0 0 20px rgba(96, 165, 250, 0.6),
        0 0 40px rgba(96, 165, 250, 0.3);
    transform: scale(1.2);
}

.control-dot.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Edge Fade Effects */
.testimonials-viewport::before,
.testimonials-viewport::after {
    content: '';
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.testimonials-viewport::before {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.1), transparent);
}

.testimonials-viewport::after {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.1), transparent);
}

/* Responsive Design */

/* Large screens */
@media screen and (max-width: 1200px) {
    .testimonial-item {
        flex: 0 0 380px;
        height: 230px;
    }

    .testimonials-viewport {
        height: 250px;
    }

    .horizontal-testimonials {
        min-height: 300px;
    }
}

@media screen and (max-width: 1024px) {
    .testimonial-item {
        flex: 0 0 340px;
        height: 220px;
    }

    .testimonials-viewport {
        height: 240px;
    }

    .testimonial-quote {
        font-size: 15px;
        line-height: 1.5;
    }

    .author-name {
        font-size: 14px;
    }

    .author-title {
        font-size: 12px;
    }

    .author-avatar {
        width: 36px;
        height: 36px;
    }
}

/* Tablets */
@media screen and (max-width: 768px) {
    .horizontal-testimonials {
        padding: 1rem 0;
        min-height: 280px;
    }

    .testimonials-viewport {
        height: 220px;
        border-radius: 16px;
    }

    .testimonial-item {
        flex: 0 0 300px;
        height: 200px;
        padding: 16px;
        border-radius: 12px;
    }

    .testimonial-quote {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 12px;
    }

    .author-name {
        font-size: 13px;
    }

    .author-title {
        font-size: 11px;
        line-height: 1.2;
    }

    .testimonial-author {
        margin-bottom: 12px;
    }

    .star {
        font-size: 12px;
    }

    .metric {
        font-size: 11px;
        padding: 3px 6px;
    }

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

    .testimonials-controls {
        margin-top: 16px;
    }
}

/* Mobile phones */
@media screen and (max-width: 480px) {
    .horizontal-testimonials {
        padding: 1rem 10px;
        min-height: 260px;
    }

    .testimonials-viewport {
        height: 200px;
        border-radius: 12px;
    }

    .testimonial-item {
        flex: 0 0 260px;
        height: 180px;
        padding: 14px;
        border-radius: 10px;
    }

    .testimonials-track {
        gap: 16px;
        padding: 8px 16px;
    }

    .testimonial-quote {
        font-size: 13px;
        line-height: 1.4;
        margin-bottom: 10px;
    }

    .author-name {
        font-size: 12px;
    }

    .author-title {
        font-size: 10px;
    }

    .testimonial-author {
        margin-bottom: 10px;
    }

    .star {
        font-size: 11px;
    }

    .metric {
        font-size: 10px;
        padding: 2px 5px;
    }

    .control-dot {
        width: 8px;
        height: 8px;
    }

    .testimonials-controls {
        margin-top: 12px;
        gap: 8px;
    }
}

/* Ultra-small screens */
@media screen and (max-width: 360px) {
    .testimonial-item {
        flex: 0 0 240px;
        height: auto;
        min-height: 160px;
    }

    .horizontal-testimonials {
        min-height: 240px;
    }

    .testimonials-viewport {
        height: 180px;
    }
}