/* =========================================================
   رادیک وب - استایل بخش نظرات مشتریان
   فایل: assets/css/testimonials.css
   پیشوند: ts-
   نسخه: 1.0
   ========================================================= */

/* ═══════════════════════════════════════════════════════════
   ۱. بخش اصلی
   ═══════════════════════════════════════════════════════════ */
.ts-section {
    position: relative;
    padding: 70px 0 60px;
    background: var(--rw-body-bg, #F8FAFC);
    direction: rtl;
    overflow: hidden;
}

.ts-section::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, 
        rgba(37, 99, 235, 0.04) 0%, 
        transparent 65%);
    border-radius: 50%;
    pointer-events: none;
    transform: translateY(-50%);
}

.ts-section::after {
    content: "";
    position: absolute;
    top: 30%;
    right: -150px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, 
        rgba(37, 99, 235, 0.03) 0%, 
        transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.ts-container {
    position: relative;
    z-index: 2;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════
   ۲. هدر بخش
   ═══════════════════════════════════════════════════════════ */
.ts-header {
    text-align: center;
    margin-bottom: 45px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ts-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.1), 
        rgba(30, 58, 138, 0.08));
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 30px;
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--rw-primary, #2563EB);
    margin-bottom: 15px;
    align-self: center;
    animation: tsFadeIn 0.7s ease 0.1s both;
}

.ts-badge i {
    font-size: 13px;
    color: var(--rw-primary, #2563EB);
}

.ts-title {
    font-family: 'Lalezar-ExtraBold', sans-serif;
    font-size: 34px;
    font-weight: 800;
    color: var(--rw-heading, #1E3A8A);
    margin: 0 0 10px;
    line-height: 1.3;
    letter-spacing: 0.5px;
    text-align: center;
    width: 100%;
    animation: tsFadeIn 0.7s ease 0.2s both;
}

.ts-subtitle {
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 14px;
    color: var(--rw-muted, #6B7280);
    margin: 0 auto;
    line-height: 1.8;
    max-width: 600px;
    text-align: center;
    display: block;
    animation: tsFadeIn 0.7s ease 0.3s both;
}

@keyframes tsFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   ۳. گرید نظرات
   ═══════════════════════════════════════════════════════════ */
.ts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* ═══════════════════════════════════════════════════════════
   ۴. کارت نظر
   ═══════════════════════════════════════════════════════════ */
.ts-card {
    position: relative;
    padding: 32px 24px 26px;
    background: var(--rw-card-bg, #FFFFFF);
    border-radius: 20px;
    text-align: right;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.03);
    animation: tsCardIn 0.6s ease both;
}

.ts-card[data-index="0"] { animation-delay: 0.1s; }
.ts-card[data-index="1"] { animation-delay: 0.2s; }
.ts-card[data-index="2"] { animation-delay: 0.3s; }
.ts-card[data-index="3"] { animation-delay: 0.4s; }
.ts-card[data-index="4"] { animation-delay: 0.5s; }
.ts-card[data-index="5"] { animation-delay: 0.6s; }

@keyframes tsCardIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.ts-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 45px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.06);
    border-color: var(--rw-primary, #2563EB);
}

/* ═══════════════════════════════════════════════════════════
   ۵. آیکون نقل قول
   ═══════════════════════════════════════════════════════════ */
.ts-quote-icon {
    position: absolute;
    top: 18px;
    left: 22px;
    font-size: 50px;
    color: var(--rw-primary, #2563EB);
    opacity: 0.08;
    line-height: 1;
    pointer-events: none;
    transition: all 0.4s ease;
}

.ts-card:hover .ts-quote-icon {
    opacity: 0.15;
    transform: scale(1.1) rotate(-8deg);
}

.ts-quote-icon i {
    color: inherit;
    font-size: inherit;
}

/* ═══════════════════════════════════════════════════════════
   ۶. ستاره‌های امتیاز
   ═══════════════════════════════════════════════════════════ */
.ts-rating {
    display: flex;
    gap: 3px;
    margin-bottom: 15px;
    direction: ltr;
    justify-content: flex-end;
}

.ts-rating i {
    font-size: 14px;
    line-height: 1;
}

.ts-rating .rw-filled {
    color: #FBBF24;
}

.ts-rating .rw-empty {
    color: rgba(0, 0, 0, 0.15);
}

/* ═══════════════════════════════════════════════════════════
   ۷. متن نظر
   ═══════════════════════════════════════════════════════════ */
.ts-content {
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 13px;
    line-height: 2;
    color: var(--rw-text, #1F2937);
    margin: 0 0 20px;
    position: relative;
    z-index: 2;
    min-height: 80px;
    text-align: right;
}

/* ═══════════════════════════════════════════════════════════
   ۸. اطلاعات مشتری
   ═══════════════════════════════════════════════════════════ */
.ts-author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 2;
}

.ts-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        var(--rw-primary, #2563EB), 
        var(--rw-secondary, #1E3A8A));
    color: #fff;
    font-family: 'Lalezar-ExtraBold', sans-serif;
    font-size: 22px;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: all 0.3s ease;
}

.ts-card:hover .ts-avatar {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.ts-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.ts-author-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ts-author-name {
    font-family: 'Lalezar-ExtraBold', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--rw-heading, #1E3A8A);
    margin: 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.ts-card:hover .ts-author-name {
    color: var(--rw-primary, #2563EB);
}

.ts-author-role {
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 11px;
    color: var(--rw-muted, #6B7280);
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════
   ۹. خط تزئینی
   ═══════════════════════════════════════════════════════════ */
.ts-line {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, 
        var(--rw-primary, #2563EB), 
        var(--rw-secondary, #1E3A8A));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ts-card:hover .ts-line {
    width: 100%;
}

.ts-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--rw-muted, #6B7280);
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════
   ۱۰. ریسپانسیو
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .ts-section { padding: 60px 0 50px; }
    .ts-title { font-size: 30px; }
    .ts-grid { gap: 18px; }
    .ts-card { padding: 28px 20px 22px; }
    .ts-content { font-size: 12px; line-height: 1.9; }
}

@media (max-width: 900px) {
    .ts-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 600px) {
    .ts-section { padding: 50px 0 40px; }
    .ts-container { padding: 0 14px; }
    .ts-header { margin-bottom: 35px; }
    .ts-title { font-size: 22px; }
    .ts-subtitle { font-size: 12px; padding: 0 10px; }
    .ts-badge { font-size: 11px; padding: 6px 14px; }
    
    .ts-grid { grid-template-columns: 1fr; gap: 14px; }
    .ts-card { padding: 26px 18px 20px; border-radius: 16px; }
    .ts-quote-icon { font-size: 40px; top: 15px; left: 18px; }
    .ts-rating i { font-size: 12px; }
    .ts-content { font-size: 12px; line-height: 1.9; min-height: auto; margin-bottom: 16px; }
    .ts-avatar { width: 46px; height: 46px; font-size: 20px; }
    .ts-author-name { font-size: 14px; }
    .ts-author-role { font-size: 10px; }
    .ts-author { gap: 12px; padding-top: 14px; }
}

@media (max-width: 380px) {
    .ts-section { padding: 40px 0 35px; }
    .ts-container { padding: 0 10px; }
    .ts-title { font-size: 18px; }
    .ts-card { padding: 22px 14px 18px; }
    .ts-content { font-size: 11px; }
    .ts-avatar { width: 40px; height: 40px; font-size: 18px; }
    .ts-author-name { font-size: 13px; }
}