/**
 * FAQ Plugin - Frontend Styles
 * Clean & Modern Design
 * Version: 2.0.0
 */

/* ==========================================
   متغیرهای CSS (از تنظیمات)
   ========================================== */
.faq-section {
    --faq-primary: #3b82f6;
    --faq-text: #374151;
    --faq-text-light: #6b7280;
    --faq-bg: #ffffff;
    --faq-border: #e5e7eb;
    --faq-radius: 8px;
    
    direction: rtl;
    text-align: right;
    font-family: inherit;
    margin: 30px 0;
}

/* ==========================================
   کانتینر
   ========================================== */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================
   عنوان
   ========================================== */
.faq-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--faq-text);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--faq-primary);
    display: inline-block;
}

/* ==========================================
   آیتم‌های FAQ
   ========================================== */
.faq-item {
    background: var(--faq-bg);
    border: 1px solid var(--faq-border);
    border-radius: var(--faq-radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq-item:hover {
    border-color: var(--faq-primary);
}

.faq-item.active {
    border-color: var(--faq-primary);
}

/* ==========================================
   سوال
   ========================================== */
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    gap: 15px;
    user-select: none;
}

.faq-question-text {
    font-weight: 500;
    color: var(--faq-text);
    font-size: 1rem;
    line-height: 1.5;
}

/* ==========================================
   آیکون
   ========================================== */
.faq-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--faq-primary);
    font-size: 20px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* ==========================================
   پاسخ
   ========================================== */
.faq-answer-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer-wrapper {
    max-height: 1000px;
}

.faq-answer {
    padding: 0 20px 20px 20px;
    color: var(--faq-text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* ==========================================
   ریسپانسیو
   ========================================== */
@media (max-width: 600px) {
    .faq-question {
        padding: 14px 16px;
    }
    
    .faq-answer {
        padding: 0 16px 16px 16px;
    }
    
    .faq-title {
        font-size: 1.25rem;
    }
}

/* ==========================================
   Dark Mode
   ========================================== */
@media (prefers-color-scheme: dark) {
    .faq-section {
        --faq-bg: #1f2937;
        --faq-border: #374151;
        --faq-text: #f3f4f6;
        --faq-text-light: #9ca3af;
    }
}
