/* ظرف اصلی و جستجو */
.nice-accordion, 
.faq-search-container {
    width: 500px;
    max-width: 760px; /* اندازه پیشنهادی برای دسکتاپ */
    margin: 0 auto;
    direction: rtl;
}

.faq-search-container {
    margin-bottom: 22px;
    width: 500px;
}

#faq-search-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e6e8ef;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
    font-size: 15px;
    color: #222;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
    text-align: right;
}

#faq-search-input:focus {
    border-color: #7c8cff;
    box-shadow: 0 0 0 4px rgba(124, 140, 255, 0.12);
    background: #fff;
}

/* ساختار کلی آیتم‌های آکاردئون */
.acc-item {
    background: #fff;
    border: 1px solid #edf0f5;
    border-bottom: none; /* حذف مرز بین آیتم‌ها */
    overflow: hidden;
    transition: all 0.25s ease;
}

.acc-item:first-child {
    border-radius: 18px 18px 0 0;
}

.acc-item:last-child {
    border-radius: 0 0 18px 18px;
    border-bottom: 1px solid #edf0f5; /* مرز آخر برای آیتم پایانی */
}

.acc-item.is-open {
    border-color: #cfd7ff;
    box-shadow: 0 10px 28px rgba(92, 107, 192, 0.10);
    z-index: 1; /* برای اینکه سایه روی بقیه بیفتد */
}

/* هدر آکاردئون - بخش اصلی تغییرات شما */
.acc-header {
    padding: 18px 20px;
    display: flex;
    flex-direction: row-reverse; /* جابجایی معکوس آیکون و متن برای RTL */
    align-items: center;
    justify-content: flex-end; /* چسباندن هر دو به سمت راست */
    gap: 12px;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(180deg, #ffffff 0%, #fcfcfd 100%);
}

.acc-title {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #1f2937;
    line-height: 1.7;
    text-align: right;
    flex: 0 1 auto; /* متن فقط به اندازه نیازش فضا بگیرد */
}

.acc-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f4f6fb;
    color: #6b7cff;
    transition: all 0.25s ease;
}

.acc-item.is-open .acc-icon {
    background: #eef1ff;
    color: #4f63ff;
    transform: rotate(180deg);
}

.acc-icon svg {
    width: 12px;
    height: 12px;
}

/* بدنه و محتوا */
.acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.acc-content {
    padding: 10px 20px 0px 20px;
    color: #4b5563;
    font-size: 14px;
    line-height: 2;
    border-top: 1px solid #f1f4f8;
    text-align: auto; /* وسط‌چین کردن پاسخ طبق درخواست شما */
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .nice-accordion, .faq-search-container {
        width: 95%;
    }
    .acc-title {
        font-size: 15px !important;
    }
}

.acc-header {
    -webkit-tap-highlight-color: transparent; /* حذف باکس آبی در اندروید و iOS */
    outline: none; /* حذف خط دور (Focus Ring) در مرورگرهای خاص */
    user-select: none; /* جلوگیری از انتخاب شدن متن هنگام لمس سریع */
}