/* ========================================
   testimonials.css - آراء العملاء
   ======================================== */

/* ===== قسم الآراء ===== */
.testimonials-section {
    padding: 60px 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.testimonials-header {
    text-align: center;
    margin-bottom: 50px;
}

.testimonials-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 800;
}

.testimonials-header h1 .highlight {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.testimonials-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== إحصائيات ===== */
.testimonials-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.stat-box {
    background: white;
    padding: 25px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.stat-box .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #3498db;
    line-height: 1.2;
}

.stat-box .stat-label {
    font-size: 0.95rem;
    color: #666;
    margin-top: 5px;
}

.stat-box .stat-icon {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 10px;
    display: block;
}

/* ===== فلتر الآراء ===== */
.testimonials-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    background: white;
    color: #555;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.filter-btn:hover {
    border-color: #3498db;
    color: #3498db;
}

.filter-btn.active {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    border-color: #3498db;
    color: white;
    box-shadow: 0 4px 15px rgba(52,152,219,0.3);
}

/* ===== شبكة الآراء ===== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* ===== بطاقة الرأي ===== */
.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #f0f0f0;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.12);
    border-color: #3498db;
}

.testimonial-card.featured {
    border: 2px solid #3498db;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
}

.testimonial-card .featured-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(243,156,18,0.3);
}

/* ===== رأس البطاقة ===== */
.testimonial-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 15px;
}

.client-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid #3498db;
    background: #f0f7ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.client-avatar .avatar-placeholder {
    font-size: 2rem;
    color: #3498db;
    font-weight: 700;
}

.client-info {
    flex: 1;
}

.client-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2px;
}

.client-position {
    font-size: 0.85rem;
    color: #888;
}

/* ===== التقييم ===== */
.rating-stars {
    display: flex;
    gap: 3px;
    margin: 5px 0 12px;
}

.rating-stars .star {
    color: #ddd;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.rating-stars .star.active {
    color: #f39c12;
}

.rating-stars .star.half {
    position: relative;
}

.rating-stars .star.half::before {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #f39c12;
}

/* ===== المحتوى ===== */
.testimonial-content {
    flex: 1;
}

.testimonial-content .quote-icon {
    color: #3498db;
    font-size: 1.5rem;
    opacity: 0.3;
    margin-bottom: 10px;
    display: block;
}

.testimonial-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    margin: 0;
}

/* ===== تاريخ الرأي ===== */
.testimonial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.testimonial-date {
    font-size: 0.8rem;
    color: #999;
}

.testimonial-verified {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #27ae60;
    font-weight: 600;
}

.testimonial-verified i {
    font-size: 0.9rem;
}

/* ===== حالة عدم وجود نتائج ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

.no-results i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
    display: block;
}

.no-results h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.no-results p {
    color: #888;
    font-size: 1rem;
}

/* ===== تحميل ===== */
.testimonials-loading {
    text-align: center;
    padding: 60px 20px;
}

.testimonials-loading i {
    font-size: 2.5rem;
    color: #3498db;
    animation: spin 1s linear infinite;
    display: block;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== زر عرض المزيد ===== */
.load-more-container {
    text-align: center;
    margin-top: 20px;
}

.btn-load-more {
    padding: 14px 40px;
    background: white;
    border: 2px solid #3498db;
    color: #3498db;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.btn-load-more:hover {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    box-shadow: 0 5px 20px rgba(52,152,219,0.3);
    transform: translateY(-2px);
}

.btn-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== إضافة رأي ===== */
.add-testimonial-section {
    margin-top: 60px;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

.add-testimonial-section h2 {
    text-align: center;
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.add-testimonial-section .subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 30px;
}

.testimonial-form .form-group {
    margin-bottom: 20px;
}

.testimonial-form label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.testimonial-form input,
.testimonial-form textarea,
.testimonial-form select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.testimonial-form input:focus,
.testimonial-form textarea:focus,
.testimonial-form select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52,152,219,0.1);
}

.testimonial-form textarea {
    resize: vertical;
    min-height: 120px;
}

.testimonial-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.testimonial-form .rating-select {
    display: flex;
    gap: 10px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.testimonial-form .rating-select input {
    display: none;
}

.testimonial-form .rating-select label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.testimonial-form .rating-select label:hover,
.testimonial-form .rating-select label:hover ~ label,
.testimonial-form .rating-select input:checked ~ label {
    color: #f39c12;
}

.btn-submit-testimonial {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.btn-submit-testimonial:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(52,152,219,0.3);
}

.btn-submit-testimonial:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== رسائل التنبيه ===== */
.testimonial-alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

.testimonial-alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.testimonial-alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== استجابة ===== */
@media (max-width: 992px) {
    .testimonials-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .testimonials-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .testimonials-section {
        padding: 40px 0;
    }
    
    .testimonials-header h1 {
        font-size: 2rem;
    }
    
    .testimonials-header p {
        font-size: 1rem;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .testimonial-card {
        padding: 25px;
    }
    
    .testimonials-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-box {
        padding: 20px 15px;
    }
    
    .stat-box .stat-number {
        font-size: 2rem;
    }
    
    .testimonial-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .add-testimonial-section {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .testimonials-header h1 {
        font-size: 1.6rem;
    }
    
    .testimonials-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-box {
        padding: 15px 10px;
    }
    
    .stat-box .stat-number {
        font-size: 1.6rem;
    }
    
    .testimonial-card {
        padding: 20px;
    }
    
    .client-avatar {
        width: 50px;
        height: 50px;
    }
    
    .client-name {
        font-size: 1rem;
    }
    
    .testimonials-filter {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}