/**
 * S3 Gfx Portfolio - Testimonials Section Styles
 * Responsive horizontal scrolling testimonial carousel
 */

/* ── Testimonial Container ──────────────────────────────────── */
#testimonial-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 1rem 0;
}

/* ── Testimonial Track ────────────────────────────────────── */
#testimonial-track {
    display: flex;
    width: max-content;
    will-change: transform;
}

/* ── Infinite Marquee Animation (use clientScroll keyframe from custom.css) ── */

/* Pause on hover */
#testimonial-container:hover ~ #testimonial-track,
#testimonial-container:hover #testimonial-track {
    animation-play-state: paused !important;
}

/* ── Testimonial Card ──────────────────────────────────────── */
.testimonial-card {
    width: 380px;
    flex-shrink: 0;
    padding: 0 0.75rem;
}

.testimonial-card .glass-card {
    background: rgba(15, 15, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.testimonial-card .glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(139, 92, 246, 0.3);
}

/* ── Avatar ───────────────────────────────────────────────── */
.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

/* ── Star Rating ──────────────────────────────────────────── */
.testimonial-stars {
    display: flex;
    gap: 0.125rem;
}

.testimonial-stars i {
    font-size: 0.875rem;
}

/* ── Review Text ─────────────────────────────────────────── */
.testimonial-card .text-text-secondary {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── Responsive Breakpoints ───────────────────────────────── */

/* Desktop - Show multiple cards */
@media (min-width: 1280px) {
    .testimonial-card {
        width: 400px;
    }
}

/* Tablet - Show 2 cards */
@media (max-width: 1024px) {
    .testimonial-card {
        width: 340px;
    }
    
    #testimonial-track {
        gap: 1.25rem;
    }
}

/* Mobile - Show 1 card */
@media (max-width: 640px) {
    .testimonial-card {
        width: 300px;
    }
    
    #testimonial-track {
        gap: 1rem;
    }
    
    .testimonial-card .glass-card {
        padding: 1.25rem;
    }
    
    .testimonial-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }
}

/* ── Pause Indicator (optional) ─────────────────────────── */
#testimonial-container:hover .testimonial-pause-hint {
    opacity: 1;
}

.testimonial-pause-hint {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    padding: 0.5rem;
    border-radius: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.testimonial-pause-hint i {
    color: white;
    font-size: 1rem;
}

/* ── Loading State ───────────────────────────────────────── */
.testimonial-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.testimonial-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(139, 92, 246, 0.3);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── No Testimonials State ──────────────────────────────── */
.testimonial-empty {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.6);
}

.testimonial-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}


/* Testimonial Container */
/* Container */
#testimonial-container {
    position: relative;
    overflow: hidden;
}

/* LEFT SOFT FADE */
#testimonial-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 100%;
    z-index: 10;
    pointer-events: none;

    background: linear-gradient(
        to right,
        rgba(10,10,20,0.85) 0%,
        rgba(10,10,20,0.55) 25%,
        rgba(10,10,20,0.25) 55%,
        rgba(10,10,20,0.08) 75%,
        transparent 100%
    );

    backdrop-filter: blur(10px);
}

/* RIGHT SOFT FADE */
#testimonial-container::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    z-index: 10;
    pointer-events: none;

    background: linear-gradient(
        to left,
        rgba(10,10,20,0.85) 0%,
        rgba(10,10,20,0.55) 25%,
        rgba(10,10,20,0.25) 55%,
        rgba(10,10,20,0.08) 75%,
        transparent 100%
    );

    backdrop-filter: blur(10px);
}

#testimonial-container {
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
/* Light mode: remove dark fade overlays and mask */
[data-theme="light"] #testimonial-container::before,
[data-theme="light"] #testimonial-container::after {
    display: none;
}
[data-theme="light"] #testimonial-container {
    -webkit-mask-image: none;
    mask-image: none;
}
