.bbp-search-form{
margin-bottom:20px !important;
}


/* فیلد متن */
#bbp_search {
    width:200px !important;
    height: 40px !important;
    border: 1px solid #ddd !important;
    border-radius:5px !important; /* گوشه‌های راست گرد */
    padding: 0 10px !important;
    width: 180px !important;
      font-family: Vazir, Tahoma, "DejaVu Sans", helvetica, arial, freesans, sans-serif;
    box-sizing: border-box !important; /* بسیار مهم برای محاسبه دقیق ارتفاع */
    vertical-align: middle !important; /* تراز کردن در راستای عمودی */
    line-height: 38px !important; /* هماهنگی با ارتفاع برای تراز متن */
}

/* دکمه جستجو */
#bbp_search_submit {
     height: 40px !important;
    
    background: #2563eb !important;
    color: #fff !important;
    border:none;
    border-radius: 5px !important; /* گوشه‌های چپ گرد */
    padding: 0 20px !important;
    cursor: pointer !important;
    font-family: Vazir, Tahoma, "DejaVu Sans", helvetica, arial, freesans, sans-serif;
    box-sizing: border-box !important; /* بسیار مهم برای محاسبه دقیق ارتفاع */
    vertical-align: middle !important; /* تراز کردن در راستای عمودی */
    line-height: 38px !important; /* هماهنگی با ارتفاع برای تراز متن */
}


/* حالت هاور دکمه */
#bbpress-forums #bbp-search-form #bbp_search_submit:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}




/* مدرن کردن لیست انجمن‌ها */
#bbpress-forums ul.bbp-forums, 
#bbpress-forums ul.bbp-topics {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}



/* استایل دادن به هر ردیف */
#bbpress-forums li.bbp-body ul.forum, 
#bbpress-forums li.bbp-body ul.topic {
    padding: 15px;
    transition: all 0.3s;
}

#bbpress-forums li.bbp-body ul.forum:hover, 
#bbpress-forums li.bbp-body ul.topic:hover {
    background-color: #fcfcfc;
}

/* دکمه‌های انجمن */
.bbp-submit-wrapper button {
    background-color: #007bff !important;
    border: none !important;
    color: #fff !important;
    padding: 10px 25px !important;
    border-radius: 8px !important;
    cursor: pointer;
}


/* ۱. نوسازی محفظه اصلی انجمن */
#bbpress-forums {
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    padding: 20px;
    border-radius: 15px;
}

/* ۲. شیک‌سازی ردیف‌های انجمن و موضوعات */
#bbpress-forums ul.bbp-forums, 
#bbpress-forums ul.bbp-topics {
    border: 1px solid #f0f0f0 !important;
    border-radius: 5px !important;
    margin-bottom: 20px !important;
    overflow: hidden;
}



#bbpress-forums li.bbp-body ul.forum, 
#bbpress-forums li.bbp-body ul.topic {
    border-top: 1px solid #f5f5f5 !important;
    padding: 20px !important;
    display: flex;
    align-items: center;
}



/* حذف ویرگول‌های زشت بین زیردسته‌ها */
#bbpress-forums .bbp-forums-list li:after {
    content: "" !important;
}

/* ۴. آواتارها و اطلاعات آخرین ارسال */
.bbp-topic-freshness-author img.avatar {
    border-radius: 50% !important;
    margin-left: 10px;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bbp-topic-meta {
    font-size: 12px;
    color: #999;
}



/* استایل لینک عنوان اصلی انجمن */
#bbpress-forums .bbp-forum-title {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #1e293b !important; /* رنگ تیره متین */
    text-decoration: none !important;
    display: inline-block !important;
    margin-bottom: 8px !important;
    transition: all 0.3s ease !important;
}

/* حالت هاور عنوان اصلی */
#bbpress-forums .bbp-forum-title:hover {
    color: #2563eb !important; /* تغییر رنگ به آبی برند در هنگام هاور */
    transform: translateX(-5px) !important; /* یک جابجایی نرم به سمت چپ */
}

/* اگر می‌خواهی یک آیکون ثابت قبل از همه عنوان‌های اصلی باشد */
#bbpress-forums .bbp-forum-info .bbp-forum-title:before {
    content: "💬"; /* یا هر اموجی/آیکونی که دوست داری */
    margin-left: 10px;
    font-size: 16px;
    vertical-align: middle;
}

/* توضیحات زیرِ عنوان اصلی (اگر فعال است) */
#bbpress-forums .bbp-forum-content {
    font-size: 13px !important;
    color: #64748b !important;
    line-height: 1.6 !important;
    margin-bottom: 10px !important;
    display: block !important;
}

#bbpress-forums .bbp-forums-list {
    display: flex !important;
    flex-wrap: wrap !important;
    /* فاصله عمودی و افقی بین ستون‌ها و ردیف‌ها */
    gap: 10px 20px !important; 
    margin-top: 10px !important;
    padding: 0 !important;
    list-style: none !important;
    border-left: none !important;
}

#bbpress-forums .bbp-forums-list li {
    /* محاسبه عرض: ۵۰ درصد منهای نیمی از گپ برای اینکه دقیق جا شوند */
    flex: 0 0 calc(50% - 10px) !important; 
    max-width: calc(50% - 10px) !important;
    background: #f5f5f5 !important;
    border-radius: 5px !important;
    padding: 5px 10px !important; /* کمی پدینگ داخلی برای زیبایی */
    margin: 0 !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
}

#bbpress-forums .bbp-forums-list li:hover {
    background: #eee;
}


/* اضافه کردن یک آیکون کوچک قبل از نام زیردسته برای زیبایی */
#bbpress-forums .bbp-forums-list li a:before {
    content: "📁"; /* یا هر آیکون دیگری */
    margin-left: 8px;
    font-size: 12px;
    opacity: 0.7;
}

#bbpress-forums .bbp-forums-list li a {
    color: #475569 !important;
    text-decoration: none !important;
    display: inline-block;
    transition: 0.2s;
}

#bbpress-forums .bbp-forums-list li a:hover {
    color: #2563eb !important;
    transform: translateX(-3px); /* جابجایی کوچک هنگام هاور */
}





/* استایل کلی محفظه Breadcrumb */
.bbp-breadcrumb {
    margin-bottom: 20px !important;
    background: #f8fafc !important;
    /* پدینگ بالا 10 و پایین را به 8 یا کمتر رساندیم */
    padding: 10px 15px 10px 15px !important; 
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    line-height: 1 !important; /* جلوگیری از کش آمدن ارتفاع توسط متن */
    display: block !important; /* تغییر از فلکس به بلاک برای کنترل دقیق‌تر */
}

.bbp-breadcrumb p {
    margin: 0 !important; /* حذف مارجین احتمالی پاراگراف‌های داخلی */
    padding: 0 !important;
}

/* استایل لینک‌های داخل مسیر */
.bbp-breadcrumb a {
    color: #2563eb !important; /* رنگ آبی برند که در جستجو استفاده کردیم */
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.2s !important;
}

.bbp-breadcrumb a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

/* استایل جداکننده (Separator) */
.bbp-breadcrumb-sep {
    margin: 0 10px !important;
    color: #94a3b8 !important;
    font-weight: bold !important;
    /* تغییر ظاهر جداکننده به فلش */
    font-size: 12px !important;
}

/* استایل متن آخرین بخش (جایی که الان هستیم) */
.bbp-breadcrumb-current {
    color: #64748b !important;
    font-weight: normal !important;
}








#bbpress-forums .bbp-forums-list {
    border-right:0 !important;
}

li.bbp-forum-freshness, li.bbp-topic-freshness {
    text-align: right !important;
   
}

.bbp-forum-title{font-size:14px !important;}










/* باکس اصلی هر پاسخ */
#bbpress-forums div.bbp-reply-header {
    background-color: #f8fafc !important;
     border: 1px solid #e2e8f0 !important;
     border-bottom:0 !important;
    padding: 8px 15px !important;
    font-size: 12px !important;
    color: #64748b !important;
   
}

#bbpress-forums .bbp-body div.hentry {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
   border-top:0;
    margin-bottom: 20px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    overflow: hidden !important;
}


/* ستون نویسنده */
.bbp-reply-author {
    width: 120px !important;
    padding: 20px 10px !important;
    text-align: center !important;
}

.bbp-reply-author img.avatar {
    border-radius: 50% !important;
    border: 3px solid #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    margin-bottom: 10px !important;
    width: 60px !important;
    height: 60px !important;
}

.bbp-reply-author .bbp-author-name {
    display: block !important;
    font-weight: bold !important;
    font-size: 13px !important;
    margin: 5px 0 !important;
    word-break: break-word !important;
}

/* حذف کلمه 'مدیر' یا رتبه‌های زیر نام که ظاهر را شلوغ می‌کنند (اختیاری) */
.bbp-reply-author .bbp-author-role {
    font-size: 11px !important;
    color: #94a3b8 !important;
    font-style: normal !important;
}


/* محتوای پاسخ */
.bbp-reply-content {
    margin-right: 140px !important; /* فاصله از ستون نویسنده */
    padding: 20px !important;
    border-right: 1px solid #f1f5f9 !important;

    line-height: 1.8 !important;
    color: #334155 !important;
    text-align: justify !important;
}



/* دکمه‌های مدیریتی و پاسخ */
.bbp-reply-header .bbp-admin-links a, 
.bbp-reply-header a.bbp-reply-permalink {
    color: #94a3b8 !important;
    text-decoration: none !important;
    margin-right: 10px !important;
}

.bbp-reply-header .bbp-admin-links a:hover {
    color: #2563eb !important;
}


/* کاهش فاصله در هدر لیست پاسخ‌ها */
#bbpress-forums li.bbp-header {
    padding: 8px 15px !important; /* کاهش پدینگ بالا و پایین */
    background: #f1f5f9 !important; /* یک خاکستری بسیار ملایم */
    border: 1px solid #e2e8f0 !important;
    border-bottom: none !important;
    border-radius: 5px 5px 0 0 !important;
    text-transform: none !important;
    font-size: 13px !important;
    color: #475569 !important;
}

/* تراز کردن متون داخل هدر */
#bbpress-forums li.bbp-header .bbp-reply-author, 
#bbpress-forums li.bbp-header .bbp-reply-content {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}

/* حذف حاشیه اضافی پایین هدر که فاصله کاذب ایجاد می‌کند */
#bbpress-forums div.bbp-reply-header {
    margin-bottom:0px !important;
}


#bbpress-forums ul.bbp-forums, #bbpress-forums ul.bbp-lead-topic, #bbpress-forums ul.bbp-replies, #bbpress-forums ul.bbp-search-results, #bbpress-forums ul.bbp-topics{ border:none !important;}

#bbpress-forums div.bbp-forum-content, #bbpress-forums div.bbp-reply-content, #bbpress-forums div.bbp-topic-content {margin-left:0px !important;}

.bbp-footer{
    display:none !important;
}




/* استایل بخش شمارش صفحات و نوشته‌ها */
.bbp-pagination-count {
    display: inline-block !important;
    background: #f1f5f9 !important; /* خاکستری روشن هماهنگ با هدر */
    color: #475569 !important; /* رنگ متن تیره ملایم */
    padding: 5px 15px !important;
    border-radius: 5px !important; /* حالت کپسولی */
    font-size: 12px !important;
    border: 1px solid #e2e8f0 !important;
    margin: 15px 0 !important;
    font-weight: 500 !important;
}

/* اگر در صفحه‌ای هستی که دکمه‌های صفحه (1, 2, 3) هم وجود دارد */
.bbp-pagination-links {
    margin-bottom: 20px !important;
}

.bbp-pagination-links a, 
.bbp-pagination-links span.current {
    padding: 5px 12px !important;
    border-radius: 6px !important;
    border: 1px solid #e2e8f0 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    margin-right: 5px !important;
}

.bbp-pagination-links span.current {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb !important;
}





/* --- استایل اختصاصی فقط برای فرم ورود --- */

/* محدود کردن استایل به کانتینر فرم ورود */
.bbp-login-form fieldset.bbp-form {
    border: 1px solid #e2e8f0 !important;
    padding: 25px !important;
    border-radius: 5px !important;
    background: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    max-width: 450px;
    margin: 20px auto !important;
}

/* تیتر مخصوص فرم ورود */
.bbp-login-form fieldset.bbp-form legend {
    font-weight: bold !important;
    font-size: 18px !important;
    color: #1e293b !important;
    padding: 0 15px !important;
    background: #fff !important;
    border: none !important;
}

/* فیلدها و لیبل‌های داخل فرم ورود */
.bbp-login-form label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    font-size: 14px !important;
}

.bbp-login-form input[type="text"], 
.bbp-login-form input[type="password"] {
    width: 100% !important; /* تمام عرض فقط برای فرم ورود */
    height: 45px !important;
    padding: 10px 15px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 5px !important;
    background-color: #f8fafc !important;
    box-sizing: border-box !important;
}

.bbp-login-form input[type="text"]:focus, 
.bbp-login-form input[type="password"]:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1) !important;
}

/* دکمه مخصوص ورود */
.bbp-login-form #user-submit.button.submit {
    width: 100% !important;
    height: 48px !important;
    background-color: #2563eb !important;
    color: #fff !important;
    border-radius: 8px !important;
    font-weight: bold !important;
}

/* جدا کردن بخش مرا به خاطر بسپار از تداخل */
.bbp-login-form .bbp-remember-me {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 20px !important;
}




/* کادر زرد هشدار بالای ادیتور */
#bbpress-forums div.bbp-template-notice.info {
    background-color: #f0f8ff !important;
    border: 0px solid #cee1ef !important;
    border-right: 4px solid #cee1ef !important; /* نوار رنگی سمت راست */
    color: #28587b !important;
    border-radius: 5px !important;
    padding: 15px !important;
    font-size: 13px !important;
    margin-bottom: 20px !important;
}






/* تنظیم کلی ظرف برای چیدمان راست به چپ */
#bbpress-forums #bbp-user-wrapper {
    display: flex !important;
    flex-direction: row !important; /* چیدمان افقی */
    direction: rtl !important;      /* راست‌چین کردن کل محفظه */
    gap: 15px;
    align-items: flex-start;
    width: 100%;
}

/* ستون سمت راست (منو و آواتار) */
#bbp-single-user-details {
    width: 200px !important;
    flex-shrink: 0; /* مانع از کوچک شدن منو می‌شود */
    background: #f8fafc;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    order: 1; /* اطمینان از قرارگیری در اولین جایگاه سمت راست در RTL */
}

/* ستون سمت چپ (محتوای اصلی) */
#bbp-user-body {
    flex-grow: 1; /* اشغال بقیه فضا در سمت چپ */
    background: #fff;
    padding: 25px;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    min-height: 450px;
    order: 2;
    margin: 0 !important;
}

/* اصلاح استایل دکمه‌های منو */
#bbp-single-user-details ul li a {
    display: block;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 5px;
    color: #475569 !important;
    text-decoration: none !important;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    text-align: right; /* متن دکمه‌ها راست‌چین */
}

#bbp-single-user-details ul li.current a {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb;
}

/* هماهنگی برای موبایل */
@media (max-width: 768px) {
    #bbpress-forums #bbp-user-wrapper {
        flex-direction: column !important;
    }
    #bbp-single-user-details, #bbp-user-body {
        width: 100% !important;
    }
}


/* اصلاح نمایش لیست موضوعات در پروفایل کاربر */
#bbp-user-body ul.bbp-topics {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

#bbp-user-body .bbp-body ul {
    display: flex !important;
    flex-wrap: wrap;
    width: 100% !important;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 15px 0 !important;
}

#bbp-user-body li.bbp-topic-title {
    width: 50% !important; /* عنوان موضوع */
    float: right !important;
    text-align: right;
}

#bbp-user-body li.bbp-topic-voice-count,
#bbp-user-body li.bbp-topic-reply-count {
    width: 10% !important; /* تعداد شرکت‌کننده‌ها و پاسخ‌ها */
    float: right !important;
    text-align: center;
}

#bbp-user-body li.bbp-topic-freshness {
    width: 30% !important; /* بخش آخرین نوشته */
    float: right !important;
    text-align: left;
}

/* نمایش اجباری متن‌ها اگر مخفی شده باشند */
.bbp-topic-title a, .bbp-topic-freshness a {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* اصلاح نهایی نمایش لیست پاسخ‌ها و موضوعات در پروفایل */
#bbp-user-body .bbp-replies, 
#bbp-user-body .bbp-topics {
    display: block !important;
    width: 100% !important;
}

#bbp-user-body li.bbp-body ul {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    width: 100% !important;
    padding: 15px 10px !important;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}

/* تنظیم عرض ستون‌های پاسخ */
#bbp-user-body .bbp-reply-title {
    width: 70% !important;
    float: right !important;
    text-align: right;
}

#bbp-user-body .bbp-reply-content {
    width: 100% !important;
    display: block !important;
    margin-top: 10px;
    color: #64748b;
    font-size: 12px;
}

#bbp-user-body .bbp-reply-post-date {
    width: 25% !important;
    text-align: left;
    font-size: 11px;
    color: #94a3b8;
}

/* حذف استایل‌های مزاحم از تم */
#bbp-user-body ul.bbp-replies li.bbp-header,
#bbp-user-body ul.bbp-topics li.bbp-header {
    background: #f1f5f9 !important;
    border-radius: 8px;
    font-weight: bold;
}






/* استایل‌دهی به باکس محتوای سمت چپ */
#bbp-user-body {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 5px !important;
    padding: 10px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    min-height: 500px;
}

/* استایل تیترهای داخل محتوا (مثل پروفایل و انجمن‌ها) */
#bbp-user-body h2 {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #1e293b !important;
    margin-bottom: 20px !important;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* مرتب کردن لیست اطلاعات (ثبت‌نام شده، وب‌سایت و ...) */
#bbp-user-body p {
    margin-bottom: 15px !important;
    font-size: 14px;
    color: #475569;
    line-height: 1.8;
}

/* استایل دادن به بخش "نقش در انجمن" برای جذابیت بیشتر */
.bbp-user-nicename {
    display: inline-block;
    background: #f1f5f9;
    padding: 2px 12px;
    border-radius: 6px;
    color: #2563eb;
    font-weight: bold;
}

/* اصلاح چیدمان جداول موضوعات و پاسخ‌ها که قبلاً درست کردیم */
#bbp-user-body .bbp-topics, 
#bbp-user-body .bbp-replies {
    border: none !important;
    margin-top: 20px !important;
}








/* استایل کلی سایدبار انجمن */
.bbp-sidebar, #bbp-sidebar-container, .bbp-custom-sidebar {
   
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* استایل هر ابزارک به صورت مجزا */
.bbp-sidebar .widget, 
.bbp-custom-sidebar .widget,
div[class*="bbp_widget"] {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    padding:0 10px 10px 10px !important;
    border-radius: 5px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
    margin-bottom: 5px !important;
}

/* استایل تیتر ابزارک‌ها */
.bbp-sidebar .widget-title, 
.bbp-custom-sidebar .widget-title,
.bbp-sidebar h3 {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #1e293b !important;
    margin-bottom: 15px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #f1f5f9 !important;
    display: block;
}

/* استایل لیست‌های داخل ابزارک (مثل آخرین موضوعات) */
.bbp-sidebar ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.bbp-sidebar ul li {
    padding: 8px 0 !important;
    border-bottom: 1px dashed #f1f5f9;
    font-size: 13px;
    line-height: 1.6;
}

.bbp-sidebar ul li:last-child {
    border-bottom: none;
}


/* استایل اختصاصی برای باکس آمار انجمن با کلاس صحیح */
.widget_display_stats {
    background: #eff6ff !important; /* آبی ملایم */
    border: 1px solid #dbeafe !important;
    padding: 20px !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.05) !important;
}

/* تراز کردن تیتر */
.widget_display_stats .widget-title {
    color: #1e40af !important;
    font-size: 16px !important;
    border-bottom: 2px solid #dbeafe !important;
    padding-bottom: 10px !important;
    margin-bottom: 15px !important;
}

/* تنظیم لیست آمار */
.bbp-stats {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ردیف‌های تکی (ترکیب dt و dd) */
.bbp-stats dt {
    float: right !important;
    width: 70% !important;
    font-size: 13px !important;
    color: #1e40af !important;
    line-height: 30px !important;
    margin: 0 0 10px 0 !important;
}

.bbp-stats dd {
    float: left !important;
    width: 30% !important;
    text-align: left !important;
    margin: 0 0 10px 0 !important;
}

/* استایل عدد داخل دایره سفید */
.bbp-stats dd strong {
    background: #fff !important;
    color: #2563eb !important;
    padding: 2px 10px !important;
    border-radius: 5px !important;
    font-size: 13px !important;
    display: inline-block !important;
    min-width: 35px !important;
    text-align: center !important;
    border: 1px solid #dbeafe !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

/* پاکسازی فلوت‌ها برای جلوگیری از به هم ریختگی */
.bbp-stats::after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}





/* استایل کلی لیست آخرین موضوعات */
ul.bbp-topics-widget {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* استایل هر ردیف موضوع */
ul.bbp-topics-widget li {
    position: relative;
    padding: 12px 12px 12px 10px !important; /* فضا برای آیکون سمت راست */
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

/* استایل لینک عنوان */
ul.bbp-topics-widget li a.bbp-forum-title {
    color: #475569 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    display: block;
    font-weight: 400;
    transition: color 0.2s ease;
}

/* حالت هوور (وقتی ماوس روی ردیف می‌رود) */
ul.bbp-topics-widget li:hover {
    background-color: #f8fafc;
    padding-right: 15px !important; /* یک حرکت کوچک به چپ */
}

ul.bbp-topics-widget li:hover a.bbp-forum-title {
    color: #2563eb !important;
}

ul.bbp-topics-widget li:hover::after {
    opacity: 1;
    transform: scale(1.2);
}

/* حذف خط آخرین مورد */
ul.bbp-topics-widget li:last-child {
    border-bottom: none;
}




/* حل ریشه‌ای مشکل ریسپانسیو تاپیک‌ها */
@media screen and (max-width: 768px) {
    
    /* ۱. بازنشانی کانتینرهای اصلی */
    .bbp-replies, .bbp-topics, .bbp-body, .bbp-thread-wrapper {
        display: block !important;
        width: 100% !important;
    }

    /* ۲. تبدیل هر سطر پاسخ به یک فلکس‌باکس عمودی */
    li.bbp-body ul.item-replies, 
    li.bbp-body ul.item-topics, 
    ul.bbp-replies, 
    ul.bbp-topics {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        padding: 0 !important;
    }

    /* ۳. اصلاح بخش نویسنده (آواتار و نام) */
    .bbp-reply-author {
        width: 100% !important;
        float: none !important;
        padding: 15px !important;
        display: flex !important;
        flex-direction: row !important; /* آواتار و نام در یک خط */
        align-items: center !important;
        gap: 15px !important;
        background: #f8fafc !important;
        border-bottom: 1px solid #e2e8f0 !important;
        text-align: right !important;
    }

    .bbp-reply-author img.avatar {
        width: 45px !important;
        height: 45px !important;
        margin: 0 !important;
    }

    /* ۴. اصلاح بخش محتوای متن */
    .bbp-reply-content {
        width: 100% !important;
        float: none !important;
        padding: 20px 15px !important;
        margin: 0 !important;
        display: block !important;
        box-sizing: border-box !important; /* جلوگیری از بیرون زدن پدینگ */
        word-wrap: break-word !important; /* شکستن کلمات خیلی طولانی */
        overflow-wrap: break-word !important;
    }

    /* ۵. مخفی کردن هدرهای جدول که فضا اشغال می‌کنند */
    li.bbp-header, li.bbp-footer {
        display: none !important;
    }

    /* ۶. اصلاح دکمه‌های مدیریتی پایین هر پاسخ */
    .bbp-admin-links {
        padding: 10px 15px !important;
        float: none !important;
        text-align: left !important;
        background: #fff !important;
        border-top: 1px dashed #eee !important;
    }

    /* ۷. جلوگیری از اسکرول افقی کل صفحه */
    body, html {
        overflow-x: hidden !important;
        width: 100% !important;
    }
}

/* اصلاح نمایش کدها و نقل‌قول‌ها در موبایل */
@media screen and (max-width: 480px) {
    pre, code {
        white-space: pre-wrap !important;
        word-break: break-all !important;
    }
}


/* یکسان‌سازی کامل حالت لاگین و غیر لاگین */
body.logged-in #bbpress-forums, 
body.logged-in #bbp-user-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    left: auto !important;
    right: auto !important;
}

/* اصلاح بدنه محتوا در حالت لاگین برای موبایل */
@media screen and (max-width: 768px) {
    body.logged-in #bbp-user-body, 
    body.logged-in .bbp-reply-content,
    body.logged-in .bbp-reply-author {
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

}

/* حذف هرگونه فضای خالی که توسط استایل‌های پیش‌فرض وردپرس برای لاگین ایجاد می‌شود */
.logged-in .site-content, 
.logged-in .content-area {
    padding-left: 0 !important;
    padding-right: 0 !important;
}