/* رفع مشکلات نمایش در موبایل */
@media (max-width: 1199px) {
    .bb-header-buttons .bb-header-btn .bb-btn-desc {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-direction: column;
        margin-right: 8px;
        min-width: 120px;
    }
    
    .bb-header-buttons .bb-header-btn {
        min-width: auto;
        margin-right: 15px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 8px 12px;
        transition: all 0.3s ease;
    }
    
    .bb-header-buttons .bb-header-btn:hover {
        background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    
    /* نمایش بخش کاربر در موبایل */
    .bb-icons .bb-flex-justify {
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: flex-end;
    }
    
    /* تنظیمات متن */
    .bb-btn-stitle {
        display: block !important;
        max-width: 120px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 12px;
        line-height: 1.2;
        color: #2d3748;
        font-weight: 600;
    }
    
    .bb-btn-title {
        font-size: 10px;
        line-height: 1.2;
        color: #718096;
        font-weight: 500;
    }
    
    /* دکمه‌های ورود/ثبت نام */
    .bb-btn-stitle .flex.gap-2 {
        display: flex !important;
        gap: 6px;
        align-items: center;
    }
    
    .bb-btn-stitle .flex.gap-2 a {
        font-size: 11px;
        padding: 4px 8px;
        white-space: nowrap;
        border-radius: 6px;
        transition: all 0.3s ease;
    }
    
    .bb-btn-stitle .flex.gap-2 a:first-child {
        background: #e53e3e;
        color: white;
        border: 1px solid #c53030;
    }
    
    .bb-btn-stitle .flex.gap-2 a:first-child:hover {
        background: #c53030;
        transform: translateY(-1px);
    }
    
    .bb-btn-stitle .flex.gap-2 a:last-child {
        background: #3182ce;
        color: white;
        border: 1px solid #2b6cb0;
    }
    
    .bb-btn-stitle .flex.gap-2 a:last-child:hover {
        background: #2b6cb0;
        transform: translateY(-1px);
    }
}

@media (max-width: 767px) {
    .bb-btn-stitle {
        max-width: 100px;
        font-size: 11px;
    }
    
    .bb-btn-stitle .flex.gap-2 {
        gap: 4px;
    }
    
    .bb-btn-stitle .flex.gap-2 a {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* اطمینان از نمایش در همه حالات */
.bb-btn-desc {
    display: flex !important;
}

.bb-btn-stitle {
    display: block !important;
}

/* استایل‌های اضافی برای منوی موبایل - نسخه کلاسیک و شیک */
.bb-main-menu-mobile {
    position: relative;
    z-index: 1000;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.bb-mobile-menu-container {
    box-shadow: -5px 0 25px rgba(0,0,0,0.2);
    direction: rtl;
    width: 50% !important;
    max-width: 280px !important;
    min-width: 250px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-left: 3px solid #667eea;
}

.bb-mobile-menu-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-bottom: 2px solid #553c9a;
}

.bb-mobile-nav {
    direction: rtl;
}

.bb-mobile-nav-item {
    position: relative;
}

.bb-mobile-nav-item a,
.bb-mobile-dropdown-toggle {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.bb-mobile-nav-item a:hover,
.bb-mobile-dropdown-toggle:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.bb-mobile-nav-item a:hover .bb-btn-stitle,
.bb-mobile-nav-item a:hover .bb-btn-title,
.bb-mobile-dropdown-toggle:hover span {
    color: white !important;
}

.bb-mobile-nav-item a:hover svg,
.bb-mobile-dropdown-toggle:hover svg {
    color: white !important;
    stroke: white;
}

.bb-mobile-dropdown-content {
    animation: slideDown 0.3s ease-out;
    direction: rtl;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bb-mobile-subdropdown-content {
    animation: slideDown 0.2s ease-out;
    direction: rtl;
    background: #edf2f7;
    border: 1px solid #cbd5e0;
}

.bb-mobile-subdropdown-content a {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
}

.bb-mobile-subdropdown-content a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    transform: none !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bb-dropdown-arrow.rotate-180 {
    transform: rotate(180deg);
}

.bb-mobile-subdropdown-toggle svg.rotate-180 {
    transform: rotate(180deg);
}

/* اطمینان از نمایش صحیح در موبایل */
@media (max-width: 991px) {
    .bb-main-menu-desk {
        display: none !important;
    }
    
    .bb-main-menu-mobile {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .bb-main-menu-mobile {
        display: none !important;
    }
}

/* برای موبایل‌های خیلی کوچک */
@media (max-width: 480px) {
    .bb-mobile-menu-container {
        width: 65% !important;
        max-width: 240px !important;
        min-width: 220px !important;
    }
    
    .bb-mobile-menu-content {
        padding: 12px !important;
    }
    
    .bb-mobile-nav-item a,
    .bb-mobile-dropdown-toggle {
        padding: 10px !important;
    }
    
    .bb-mobile-menu-header {
        padding: 12px !important;
    }
    
    .bb-header-buttons .bb-header-btn {
        margin-right: 10px;
        padding: 6px 10px;
    }
}

/* استایل‌های اضافی برای آیکون‌ها */
.header-icon {
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    border-radius: 10px;
    padding: 6px;
    transition: all 0.3s ease;
}

.bb-header-btn:hover .header-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scale(1.1);
}

/* استایل برای شماره‌های موجود در badge */
.bb-header-btn .absolute {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    border: 2px solid white;
    font-weight: bold;
}