/* استایل‌های عمومی FAQ */
.pfp-faq-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    direction: rtl;
}

/* هدر FAQ */
.pfp-faq-header {
    margin-bottom: 30px;
    text-align: center;
}

.pfp-faq-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
    text-align: center;
}

.pfp-faq-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* جستجو */
.pfp-search-container {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.pfp-search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.pfp-search-input:focus {
    outline: none;
    border-color: #3498db;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.pfp-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #7f8c8d;
    pointer-events: none;
}

/* فیلتر دسته‌بندی */
.pfp-category-filter select {
    padding: 12px 22px;
    /* فاصله بیشتر بالا و پایین */
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.8;
    /* نمایش کامل نقطه‌ها */
    background: #f8f9fa;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 170px;
    appearance: none;
    height: auto;
    display: inline-block;
    vertical-align: middle;
    box-sizing: border-box;
}

.pfp-category-filter select:focus {
    outline: none;
    border-color: #3498db;
    background: #fff;
}

/* محتوای FAQ */
.pfp-faq-content {
    margin-bottom: 40px;
}

.pfp-faq-category {
    margin-bottom: 30px;
}

.pfp-category-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px 20px;
    border-radius: 10px;
    border-left: 4px solid #3498db;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pfp-category-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.pfp-category-count {
    background: #3498db;
    color: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* آیتم‌های FAQ */
.pfp-faq-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pfp-faq-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pfp-faq-item:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
    transform: translateY(-1px);
}

.pfp-faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    transition: background-color 0.3s ease;
    user-select: none;
}

.pfp-faq-question:hover {
    background: #f8f9fa;
}

.pfp-faq-question h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    flex: 1;
}

.pfp-faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
    transition: all 0.3s ease;
    margin-right: 15px;
}

.pfp-faq-item.active .pfp-faq-toggle {
    transform: rotate(45deg);
    background: #3498db;
    color: #fff;
}

.pfp-faq-answer {
    display: none;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.pfp-faq-item.active .pfp-faq-answer {
    display: block;
    animation: slideDown 0.3s ease;
}

.pfp-faq-answer-content {
    padding: 20px;
    color: #495057;
    line-height: 1.6;
}

.pfp-faq-answer-content p {
    margin-bottom: 15px;
}

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

/* ویدیو */
.pfp-faq-video {
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.pfp-faq-video iframe {
    width: 100%;
    height: 315px;
    border: none;
    border-radius: 8px;
}

/* فرم ارسال سوال */
.pfp-question-form-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    margin-top: 40px;
}

.pfp-question-form-container h3 {
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 25px 0;
    text-align: center;
}

.pfp-question-form {
    max-width: 600px;
    margin: 0 auto;
}

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

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

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

.pfp-form-input,
.pfp-form-select,
.pfp-form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

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

.pfp-form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.pfp-form-submit {
    text-align: center;
    margin-top: 25px;
}

.pfp-submit-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

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

.pfp-submit-btn:active {
    transform: translateY(0);
}

.pfp-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pfp-form-message {
    margin-top: 15px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.pfp-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pfp-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* انیمیشن‌ها */
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    to {
        opacity: 1;
        max-height: 1000px;
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.pfp-faq-item {
    animation: fadeIn 0.3s ease;
}

/* حالت خالی */
.pfp-no-faqs {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 18px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

/* فیلتر شده */
.pfp-faq-item.hidden {
    display: none;
}

.pfp-faq-category.hidden {
    display: none;
}

/* نمایش واکنش‌گرا */
@media (max-width: 768px) {
    .pfp-faq-container {
        padding: 16px;
        margin: 10px 0;
        border-radius: 8px;
    }

    .pfp-faq-title {
        font-size: 24px;
    }

    .pfp-faq-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .pfp-search-container {
        max-width: none;
    }

    .pfp-category-filter select {
        min-width: auto;
        font-size: 14px;
        padding: 10px 18px;
        line-height: 1.8;
    }

    .pfp-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 15px;
    }

    .pfp-category-title {
        font-size: 18px;
    }

    .pfp-faq-question {
        padding: 15px;
    }

    .pfp-faq-question h4 {
        font-size: 15px;
    }

    .pfp-faq-answer-content {
        padding: 15px;
    }

    .pfp-question-form-container {
        padding: 20px;
    }

    .pfp-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .pfp-faq-video iframe {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .pfp-faq-container {
        padding: 12px;
    }

    .pfp-faq-title {
        font-size: 20px;
    }

    .pfp-search-input {
        font-size: 14px;
    }

    .pfp-faq-question {
        padding: 12px;
    }

    .pfp-faq-question h4 {
        font-size: 14px;
    }

    .pfp-submit-btn {
        width: 100%;
        padding: 12px 20px;
    }
}

/* حالت تاریک (بهبود یافته) */
@media (prefers-color-scheme: dark) {
    .pfp-faq-container {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }

    .pfp-faq-title,
    .pfp-category-title,
    .pfp-faq-question h4 {
        color: #ecf0f1;
    }

    .pfp-faq-item {
        background: #34495e;
        border-color: #4a5f7a;
    }

    .pfp-faq-question {
        background: #34495e;
    }

    .pfp-faq-question:hover {
        background: #3a536b;
    }

    .pfp-faq-answer {
        background: #3a4a5a;
        border-color: #55697f;
        color: #f1f3f5;
    }

    .pfp-faq-answer-content p {
        color: #f1f3f5;
    }

    .pfp-form-input,
    .pfp-form-select,
    .pfp-form-textarea {
        background: #34495e;
        border-color: #4a5f7a;
        color: #ecf0f1;
    }
}