/* =========================================================
   بخش سوالات متداول - طراحی مدرن، مینیمال، سه‌بعدی
   ========================================================= */

.up-faq-section {
    width: 100%;
    padding: 60px 0;
    background: linear-gradient(180deg, #f8f9fc 0%, #f4f6f9 100%);
    position: relative;
    overflow: hidden;
}

/* افکت نور پس‌زمینه */
.up-faq-section::before {
    content: '';
    position: absolute;
    top: -150px;
    right: -150px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(72, 55, 243, 0.08), transparent 70%);
    pointer-events: none;
}

.up-faq-section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.06), transparent 70%);
    pointer-events: none;
}

.up-faq-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 25px;
    position: relative;
    z-index: 2;
}

/* =========================================
   هدر
   ========================================= */
.up-faq-header {
    text-align: center;
    margin-bottom: 45px;
}

.up-faq-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ede9ff, #e0daff);
    color: #4837F3;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 25px;
    margin-bottom: 18px;
    box-shadow:
        0 4px 12px rgba(72, 55, 243, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.up-faq-badge svg {
    stroke: #4837F3;
}

.up-faq-title {
    font-size: 34px;
    font-weight: 800;
    color: #222 !important;
    margin: 0 0 12px;
    line-height: 1.3;
    background: linear-gradient(135deg, #1a1a2e, #4837F3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.up-faq-subtitle {
    font-size: 15px;
    color: #777;
    margin: 0;
    line-height: 1.7;
}

/* =========================================
   لیست سوالات
   ========================================= */
.up-faq-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* =========================================
   آیتم سوال
   ========================================= */
.up-faq-item {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.04),
        0 0 0 1.5px rgba(72, 55, 243, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* نوار رنگی سمت راست */
.up-faq-item::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #4837F3, #FF6B35);
    border-radius: 0 4px 4px 0;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.up-faq-item.is-open {
    box-shadow:
        0 15px 40px rgba(72, 55, 243, 0.12),
        0 0 0 1.5px rgba(72, 55, 243, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.up-faq-item.is-open::before {
    height: calc(100% - 40px);
}

.up-faq-item:hover:not(.is-open) {
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.06),
        0 0 0 1.5px rgba(72, 55, 243, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

/* =========================================
   دکمه سوال
   ========================================= */
.up-faq-question {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 22px 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: right;
    font-family: inherit;
    transition: all 0.3s;
    position: relative;
}

.up-faq-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(145deg, #f7f8fc, #eef0fa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4837F3;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        3px 3px 8px rgba(72, 55, 243, 0.08),
        -2px -2px 5px rgba(255, 255, 255, 0.95),
        inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.up-faq-icon svg {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    stroke: #4837F3;
}

.up-faq-item.is-open .up-faq-icon {
    background: linear-gradient(135deg, #4837F3, #6b5bff);
    box-shadow:
        6px 6px 15px rgba(72, 55, 243, 0.35),
        -2px -2px 5px rgba(255, 255, 255, 0.9),
        inset 0 0 0 1px rgba(255, 255, 255, 0.15);
    transform: rotate(180deg);
}

.up-faq-item.is-open .up-faq-icon svg {
    stroke: #fff;
}

/* حذف خط عمودی از آیکون در حالت باز (فقط دایره دیده شود) */
.up-faq-item.is-open .up-faq-icon svg line:first-child {
    transform: scale(0);
    transform-origin: center;
}

.up-faq-question-text {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    color: #222 !important;
    line-height: 1.5;
    transition: color 0.3s;
    text-align: right;
}

.up-faq-item:hover .up-faq-question-text {
    color: #4837F3 !important;
}

.up-faq-item.is-open .up-faq-question-text {
    color: #4837F3 !important;
}

/* =========================================
   پاسخ
   ========================================= */
.up-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.up-faq-item.is-open .up-faq-answer {
    max-height: 600px;
}

.up-faq-answer-inner {
    padding: 0 25px 25px 77px;
    color: #666 !important;
    font-size: 14.5px;
    line-height: 1.9;
    position: relative;
}

/* خط تزئینی قبل از پاسخ */
.up-faq-answer-inner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 60px;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, #e6e8f5, transparent);
    border-radius: 2px;
}

.up-faq-answer-inner p {
    margin: 0 0 12px;
}

.up-faq-answer-inner p:last-child {
    margin-bottom: 0;
}

.up-faq-answer-inner a {
    color: #4837F3;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1.5px solid rgba(72, 55, 243, 0.3);
    transition: all 0.2s;
}

.up-faq-answer-inner a:hover {
    border-bottom-color: #4837F3;
}

.up-faq-answer-inner strong {
    color: #222;
    font-weight: 700;
}

.up-faq-answer-inner ul,
.up-faq-answer-inner ol {
    padding-right: 20px;
    margin: 10px 0;
}

.up-faq-answer-inner li {
    margin-bottom: 6px;
}

/* =========================================
   ریسپانسیو
   ========================================= */
@media (max-width: 992px) {
    .up-faq-section {
        padding: 45px 0;
    }

    .up-faq-container {
        padding: 0 20px;
    }

    .up-faq-title {
        font-size: 28px;
    }

    .up-faq-header {
        margin-bottom: 35px;
    }
}

@media (max-width: 768px) {
    .up-faq-section {
        padding: 35px 0;
    }

    .up-faq-container {
        padding: 0 15px;
    }

    .up-faq-title {
        font-size: 22px;
    }

    .up-faq-subtitle {
        font-size: 13.5px;
    }

    .up-faq-badge {
        font-size: 12px;
        padding: 6px 14px;
    }

    .up-faq-list {
        gap: 10px;
    }

    .up-faq-question {
        padding: 16px 18px;
        gap: 12px;
    }

    .up-faq-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .up-faq-icon svg {
        width: 14px;
        height: 14px;
    }

    .up-faq-question-text {
        font-size: 14px;
    }

    .up-faq-answer-inner {
        padding: 0 18px 18px 60px;
        font-size: 13px;
        line-height: 1.8;
    }

    .up-faq-answer-inner::before {
        right: 46px;
    }

    .up-faq-item::before {
        top: 15px;
    }

    .up-faq-item.is-open::before {
        height: calc(100% - 30px);
    }
}

@media (max-width: 480px) {
    .up-faq-title {
        font-size: 20px;
    }

    .up-faq-question {
        padding: 14px 14px;
    }

    .up-faq-icon {
        width: 30px;
        height: 30px;
    }

    .up-faq-question-text {
        font-size: 13.5px;
    }

    .up-faq-answer-inner {
        padding: 0 14px 16px 50px;
        font-size: 12.5px;
    }

    .up-faq-answer-inner::before {
        right: 38px;
    }
}