/* =============================================
   TESTIMONIALS SECTION - Premium Gold Theme
   ============================================= */

/* Section Container */
.testimonials-section {
    padding: var(--space-8) 0;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
}

/* Subtle decorative background */
.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.testimonials-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-3);
    position: relative;
    z-index: 1;
}

/* Header */
.testimonials-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.testimonials-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.testimonials-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Carousel Container */
.testimonials-carousel {
    position: relative;
    overflow: hidden;
    padding: var(--space-3) 0;
}

/* Scrolling Track */
.testimonials-track {
    display: flex;
    gap: var(--space-4);
    animation: scroll-testimonials 45s linear infinite;
    will-change: transform;
}

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

/* Testimonial Card */
.testimonial-card {
    min-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Gold accent bar on hover */
.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.testimonial-card:hover::before {
    transform: scaleX(1);
}

.testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-gold);
}

/* Quote Icon */
.quote-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
    box-shadow: var(--shadow-gold);
}

.quote-icon svg {
    width: 22px;
    height: 22px;
    fill: white;
}

/* Alternative text quote */
.quote-text {
    color: var(--primary-gold);
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: var(--space-2);
    opacity: 0.6;
}

/* Testimonial Content */
.testimonial-content {
    margin-bottom: var(--space-3);
}

.testimonial-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: var(--space-3);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-link {
    color: var(--primary-gold);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-block;
    margin-bottom: var(--space-3);
}

.read-more-link:hover {
    text-decoration: underline;
}

/* Star Rating */
.rating {
    display: flex;
    gap: 3px;
    margin-bottom: var(--space-2);
}

.star {
    color: var(--primary-gold);
    font-size: 1rem;
}

/* Author Section */
.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-light);
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    overflow: hidden;
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.author-college,
.author-course {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.author-role {
    font-size: 0.8125rem;
    color: var(--text-gold);
    font-weight: 500;
}

/* Scroll Animation */
@keyframes scroll-testimonials {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-400px * 10 - 320px));
    }
}

/* Fade Edges */
.testimonials-carousel::before,
.testimonials-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.testimonials-carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-tertiary), transparent);
}

.testimonials-carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-tertiary), transparent);
}

/* =============================================
   DARK MODE
   ============================================= */
[data-theme="dark"] .testimonials-section {
    background: var(--bg-primary);
}

[data-theme="dark"] .testimonials-section::before {
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
}

[data-theme="dark"] .testimonial-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .testimonial-card:hover {
    border-color: var(--primary-gold);
    box-shadow: var(--shadow-gold);
}

[data-theme="dark"] .testimonial-text {
    color: var(--text-secondary);
}

[data-theme="dark"] .author-name {
    color: var(--text-primary);
}

[data-theme="dark"] .testimonials-carousel::before {
    background: linear-gradient(to right, var(--bg-primary), transparent);
}

[data-theme="dark"] .testimonials-carousel::after {
    background: linear-gradient(to left, var(--bg-primary), transparent);
}

[data-theme="dark"] .testimonials-header h2 {
    color: #FFFFFF;
}

[data-theme="dark"] .testimonials-header p {
    color: #E5E5E5;
}

[data-theme="dark"] .testimonial-text {
    color: #E5E5E5;
}

[data-theme="dark"] .author-name {
    color: #FFFFFF;
}

[data-theme="dark"] .author-college,
[data-theme="dark"] .author-course {
    color: #D4D4D4;
}

[data-theme="dark"] .author-role {
    color: #FFD700;
}

[data-theme="dark"] .testimonial-author {
    border-top-color: rgba(255, 215, 0, 0.2);
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 1024px) {
    .testimonial-card {
        min-width: 340px;
    }
}

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

    .testimonials-header h2 {
        font-size: 1.625rem;
    }

    .testimonial-card {
        min-width: 300px;
        padding: var(--space-3);
    }

    .testimonials-carousel::before,
    .testimonials-carousel::after {
        width: 60px;
    }

    @keyframes scroll-testimonials {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-320px * 10 - 280px));
        }
    }
}

@media (max-width: 480px) {
    .testimonial-card {
        min-width: 280px;
    }

    .quote-icon {
        width: 40px;
        height: 40px;
    }

    .quote-icon svg {
        width: 18px;
        height: 18px;
    }

    .testimonial-text {
        font-size: 0.875rem;
    }

    @keyframes scroll-testimonials {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-300px * 10 - 240px));
        }
    }
}

/* =============================================
   CARD ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.testimonial-card {
    animation: fadeInUp 0.5s ease-out backwards;
}

.testimonial-card:nth-child(1) {
    animation-delay: 0.1s;
}

.testimonial-card:nth-child(2) {
    animation-delay: 0.15s;
}

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

.testimonial-card:nth-child(4) {
    animation-delay: 0.25s;
}

.testimonial-card:nth-child(5) {
    animation-delay: 0.3s;
}

.testimonial-card:nth-child(6) {
    animation-delay: 0.35s;
}

/* Hover effects */
.testimonial-card:hover .quote-icon {
    transform: scale(1.05);
}

.star {
    transition: transform 0.2s ease;
    display: inline-block;
}

.testimonial-card:hover .star {
    animation: starPulse 0.5s ease;
}

@keyframes starPulse {

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

    50% {
        transform: scale(1.2);
    }
}