/**
 * EvalShare Homepage Modern Design
 * 现代感设计 + 单行评价 + 新增模块
 * @version 2.2.0
 */

/* ==================== Stats Counter Section ==================== */
.es-stats-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--es-secondary) 0%, #1e1e3f 50%, var(--es-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.es-stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(78, 205, 196, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.es-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    position: relative;
    z-index: 1;
}

.es-stat-card {
    text-align: center;
    padding: 32px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.es-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.es-stat-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.es-stat-card:hover::before {
    opacity: 1;
}

.es-stat-card__number {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    display: inline;
}

.es-stat-card__suffix {
    font-size: 32px;
    font-weight: 700;
    color: var(--es-primary);
    margin-left: 2px;
}

.es-stat-card__label {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-top: 12px;
}

.es-stat-card__desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

/* ==================== Testimonials - Modern Single Line ==================== */
.es-testimonials {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--es-bg-secondary) 0%, var(--es-bg) 100%);
    overflow: hidden;
}

.es-testimonials__carousel {
    margin-top: 48px;
    position: relative;
}

.es-testimonials__carousel::before,
.es-testimonials__carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 200px;
    z-index: 2;
    pointer-events: none;
}

.es-testimonials__carousel::before {
    left: 0;
    background: linear-gradient(90deg, var(--es-bg-secondary) 0%, transparent 100%);
}

.es-testimonials__carousel::after {
    right: 0;
    background: linear-gradient(270deg, var(--es-bg-secondary) 0%, transparent 100%);
}

.es-testimonials__track {
    overflow: hidden;
    padding: 20px 0;
}

.es-testimonials__row {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scroll-testimonials 30s linear infinite;
}

.es-testimonials__track:hover .es-testimonials__row {
    animation-play-state: paused;
}

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

/* 紧凑型评价卡片 */
.es-testimonial--compact {
    background: white;
    border-radius: 16px;
    padding: 24px 28px;
    border: 1px solid var(--es-border);
    min-width: 340px;
    max-width: 340px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.es-testimonial--compact::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--es-primary), var(--es-primary-dark));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.es-testimonial--compact:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: rgba(255, 107, 53, 0.2);
}

.es-testimonial--compact:hover::before {
    opacity: 1;
}

.es-testimonial__quote-mark {
    font-size: 48px;
    line-height: 1;
    color: var(--es-primary);
    opacity: 0.15;
    font-family: Georgia, serif;
    margin-bottom: -20px;
    position: relative;
    z-index: 0;
}

.es-testimonial--compact .es-testimonial__text {
    font-size: 15px;
    color: var(--es-text);
    line-height: 1.5;
    margin: 0 0 16px 0;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.es-testimonial__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.es-testimonial__author-name {
    font-weight: 600;
    color: var(--es-text);
}

.es-testimonial__divider {
    color: var(--es-text-muted);
}

.es-testimonial__company {
    color: var(--es-primary);
    font-weight: 500;
}

/* 移动端评价 */
.es-testimonials__mobile {
    display: none;
    margin-top: 32px;
    padding: 0 16px;
}

.es-testimonials__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .es-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .es-stat-card {
        padding: 24px 16px;
    }
    
    .es-stat-card__number {
        font-size: 36px;
    }
    
    .es-testimonial--compact {
        min-width: 300px;
        max-width: 300px;
        padding: 20px 24px;
    }
}

@media (max-width: 768px) {
    .es-stats-section {
        padding: 40px 0;
    }
    
    .es-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 16px;
    }
    
    .es-stat-card {
        padding: 20px 12px;
        border-radius: 12px;
    }
    
    .es-stat-card__number {
        font-size: 28px;
    }
    
    .es-stat-card__suffix {
        font-size: 20px;
    }
    
    .es-stat-card__label {
        font-size: 13px;
        margin-top: 8px;
    }
    
    .es-stat-card__desc {
        font-size: 11px;
    }
    
    .es-testimonials {
        padding: 60px 0;
    }
    
    .es-testimonials__carousel {
        display: none;
    }
    
    .es-testimonials__mobile {
        display: block;
    }
    
    .es-testimonials__grid {
        grid-template-columns: 1fr;
    }
    
    .es-testimonial--compact {
        min-width: auto;
        max-width: 100%;
        padding: 20px;
    }
    
    .es-testimonial--compact .es-testimonial__text {
        white-space: normal;
        font-size: 14px;
    }
}

@media (max-width: 375px) {
    .es-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .es-stat-card {
        padding: 16px 8px;
    }
    
    .es-stat-card__number {
        font-size: 24px;
    }
}

/* ==================== 增强动画 ==================== */
@media (prefers-reduced-motion: no-preference) {
    .es-stat-card {
        opacity: 0;
        transform: translateY(20px);
        animation: fade-up 0.6s ease forwards;
    }
    
    .es-stat-card:nth-child(1) { animation-delay: 0.1s; }
    .es-stat-card:nth-child(2) { animation-delay: 0.2s; }
    .es-stat-card:nth-child(3) { animation-delay: 0.3s; }
    .es-stat-card:nth-child(4) { animation-delay: 0.4s; }
    
    @keyframes fade-up {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
