/* =====================================
   INFO PAGE - دليل رقمي للمقاول الذاتي
   ===================================== */

/* المتغيرات - نفس ألوان الموقع */
:root {
    --primary-color: #1C9E97;
    --secondary-color: #2d3748;
    --accent-color: #4fd1c7;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --background-light: #f8fafc;
    --background-white: #ffffff;
    --border-color: #e2e8f0;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --error-color: #f56565;
    --ai-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --ai-gradient-hover: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    --ai-gradient-light: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

/* =====================================
   PAGINATION SYSTEM
   ===================================== */

   .pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    gap: 1rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pagination-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--ai-gradient);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: -1;
}

.pagination-btn:hover::before {
    width: 100%;
    height: 100%;
}

.pagination-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-btn.active {
    background: var(--ai-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination-btn.active::before {
    width: 100%;
    height: 100%;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 1rem;
    padding: 0.5rem 1rem;
    background: rgba(28, 158, 151, 0.1);
    border-radius: 20px;
}

.pagination-dots {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin: 0 0.5rem;
}

.pagination-dots::before {
    content: '...';
    color: var(--text-secondary);
    font-weight: 500;
}

    /* الوضع الليلي */
    @media (prefers-color-scheme: dark) {
        :root {
            --text-color: #2d3748;
            --bg-color: #1a202c;
            --card-bg: rgba(45, 55, 72, 0.95);
            --border-color: #4a5568;
        }
        
        body {
            background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%) !important;
            color: var(--text-color) !important;
        }
        
        .question-meta-header {
            border-color: var(--border-color) !important;
        }
        
        .sidebar-cards .card {
            background: var(--card-bg) !important;
            border-color: var(--border-color) !important;
        }
        
        .meta-item {
            color: var(--text-color) !important;
        }
        
        .back-to-guide {
            background: var(--card-bg) !important;
            color: var(--text-color) !important;
            border-color: var(--border-color) !important;
        }
        
        .mobile-control-btn {
            background: var(--card-bg) !important;
            color: var(--text-color) !important;
        }
        
        .question-content h1,
        .question-content h2,
        .question-content h3,
        .question-content h4,
        .question-content h5,
        .question-content h6,
        .question-content p,
        .question-content div {
            color: var(--text-color) !important;
        }
    }

/* تحسينات pagination للموبايل */
@media (max-width: 768px) {
    .pagination-container {
        margin: 1.5rem 0;
        flex-direction: column;
        gap: 1rem;
    }
    
    .pagination {
        padding: 0.6rem 1rem;
        gap: 0.3rem;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .pagination-info {
        font-size: 0.8rem;
        margin: 0;
        padding: 0.4rem 0.8rem;
    }
    
    /* إخفاء بعض الأزرار على الموبايل */
    .pagination-btn.mobile-hidden {
        display: none;
    }
}

@media (max-width: 480px) {
    .pagination {
        padding: 0.5rem 0.8rem;
    }
    
    .pagination-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .pagination-info {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}

/* ضبط الشريط الجانبي للعمل مع الهايدر الموحد - مثل faq.php */
.has-modern-header .sidebar {
    top: 70px !important;
    height: calc(100vh - 70px) !important;
    z-index: 999 !important;
}

.has-modern-header .sidebar.active {
    top: 60px !important;
    height: calc(100vh - 70px) !important;
}

/* ضبط المحتوى الرئيسي */
.has-modern-header .info-content-area {
    margin-right: 320px !important;
    transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@media (max-width: 1199px) {
    .has-modern-header .sidebar {
        transform: translateX(100%) !important;
        z-index: 1998 !important;
    }
    
    .has-modern-header .sidebar.show {
        transform: translateX(0) !important;
        z-index: 2001 !important;
    }
    
    .has-modern-header .info-content-area {
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
}

/* إصلاح مشكلة الفراغ العلوي - تم نقله إلى sidebar-info.css */

/* ضبط المساحة للزوار غير المسجلين */
.guest-layout {
    margin-top: 80px !important; /* مساحة للهايدر التقليدي */
}

.guest-layout .sidebar {
    height: calc(100vh - 80px) !important;
    z-index: 999 !important;
}

.guest-layout .sidebar.active {
    top: 140px !important;
    height: calc(100vh - 80px) !important;
}

.guest-layout .info-content-area {
    margin-right: 320px !important;
    transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@media (max-width: 1199px) {
    .guest-layout .sidebar {
        transform: translateX(100%) !important;
        z-index: 1998 !important;
    }
    
    .guest-layout .sidebar.show {
        transform: translateX(0) !important;
        z-index: 2001 !important;
    }
    
    .guest-layout .info-content-area {
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
}

body {
font-family: 'Cairo', 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
}
.lang-ar {
direction: rtl;
text-align: right;
font-family: 'Cairo', 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
}

.lang-fr {
direction: ltr;
text-align: left;
font-family: 'Inter', 'Segoe UI', 'Arial', sans-serif;
}
/* إحصائيات الأقسام - تم نقلها إلى sidebar-info.css */

/* تنسيق زر قراءة المزيد */
.questions-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.question-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-inline: 0.5rem;
}

.question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.question-content {
    width: 100%;
}

/* تصميم رابط العنوان */
.question-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 12px;
}

.question-title-link:hover {
    text-decoration: none;
    color: inherit;
}

.question-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--ai-gradient);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.question-title-link:hover .question-title {
    color: var(--primary-color);
}

.question-preview {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1rem;
}

/* حاوي المعلومات والزر */
.question-meta-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.question-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.category-tag,
.read-count {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.category-tag i,
.read-count i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

/* زر قراءة المزيد */
.read-more-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.read-more-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
    text-decoration: none;
    color: white;
}

/* CSS للبطاقات الجانبية */
.main-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-header {
    position: relative;
    margin: 2rem 0;
    margin-right: 320px;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
    transition: all 0.3s ease;
}

.content-header:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.content-header h1 {
    color: #1C9E97;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.search-input-wrapper {
    position: relative;
    max-width: 600px;
    width: 100%;
}

.search-input-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(28, 158, 151, 0.1) 0%, rgba(0, 149, 119, 0.1) 100%);
    border-radius: 25px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.search-input-wrapper:hover::before {
    opacity: 1;
}

.search-input {
    width: 100%;
    padding: 1rem 4rem 1rem 1.5rem;
    border: 2px solid rgba(28, 158, 151, 0.2);
    border-radius: 25px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: #1C9E97;
    box-shadow: 0 0 0 3px rgba(28, 158, 151, 0.1), 0 4px 20px rgba(0, 0, 0, 0.08);
    background: white;
}

.search-input:hover {
    border-color: rgba(28, 158, 151, 0.4);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #1C9E97 0%, #009577 100%);
    color: white;
    border: none;
    border-radius: 20px;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(28, 158, 151, 0.3);
}

.search-btn:hover {
    background: linear-gradient(135deg, #009577 0%, #138275 100%);
    box-shadow: 0 4px 12px rgba(28, 158, 151, 0.4);
    transform: translateY(-50%) scale(1.05);
}

.search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.search-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

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

/* ضمان ظهور content-header في جميع الأحجام */
.content-header {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: border-box;
}

/* تعويض ارتفاع الهايدر إذا كان fixed */
body {
    padding-top: 0;
}

/* تحسين البحث في الجوال */
@media (max-width: 768px) {
    .content-header {
        margin-top: 60px !important; /* إضافة مساحة للهايدر الموحد في الجوال */
        margin-right: 0 !important;
    }
    
    .search-input-wrapper {
        max-width: 100%;
        margin: 0 1rem;
    }
    
    .search-input {
        width: 100%;
        box-sizing: border-box;
    }
    
    .search-container {
        padding: 0 1rem;
    }
}

.info-content-area {
    flex: 1;
    margin-right: 320px;
    padding: 2rem;
    background: transparent;
    min-height: calc(100vh - 200px);
    position: relative;
    display: flex;
    gap: 2rem;
}

.main-questions-content {
    flex: 1;
    min-width: 0;
    max-width: 800px;
}

.sidebar-cards {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
    flex-shrink: 0;
}

.sidebar-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-card h3 {
    background: var(--ai-gradient);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-card.featured h3 {
    background: var(--ai-gradient);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-item {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(28, 158, 151, 0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.card-item:last-child {
    border-bottom: none;
}

.card-item:hover {
    background: rgba(28, 158, 151, 0.05);
    text-decoration: none;
    color: inherit;
    transform: translateX(5px);
}

.card-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-item-summary {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.card-item-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-item-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-item-meta i {
    color: var(--primary-color);
}

/* تجاوب الجوال */
@media (max-width: 1200px) {
    .sidebar {
        transform: translateX(100%) !important;
        z-index: 1998 !important;
        transition: all 0.3s ease !important;
        display: block !important;
        top: 0 !important;
        height: 100vh !important;
    }
    
    .sidebar.show {
        transform: translateX(0) !important;
        z-index: 2001 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .sidebar:not(.show) {
        transform: translateX(100%) !important;
        z-index: 1998 !important;
    }
    
    .mobile-sidebar-toggle {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .content-header {
        margin: 1.5rem 0;
        padding: 1.5rem;
        border-radius: 16px;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .info-content-area {
        margin-right: 0;
        padding: 1rem;
        flex-direction: column;
        min-height: auto;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .main-questions-content {
        max-width: 100%;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .sidebar-cards {
        width: 100%;
        margin-top: 2rem;
        position: static;
    }
    
    /* إصلاح مشكلة الهامش الإضافي على الجوال */
    .questions-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 768px) {
    .content-header {
        padding: 1rem;
        border-radius: 12px;
        margin: 1rem 0;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .content-header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .content-header h1 i {
        font-size: 1.5rem;
        padding: 0.4rem;
        border-radius: 8px;
    }

    .search-input-wrapper {
        max-width: 100%;
    }

    .search-input {
        padding: 0.8rem 3.5rem 0.8rem 1.2rem;
        font-size: 0.9rem;
    }

    .search-input::placeholder {
        font-size: 0.85rem;
    }

    .search-btn {
        width: 2.2rem;
        height: 2.2rem;
        right: 0.4rem;
    }
    
    .info-content-area {
        padding: 0.5rem;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .sidebar-cards {
        gap: 1rem;
    }
    
    .card-item-title {
        font-size: 0.85rem;
    }
    
    .card-item-summary {
        font-size: 0.75rem;
    }
    
    /* إصلاح مشكلة الهامش الإضافي على الجوال الصغير */
    .questions-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .content-header {
        padding: 0.8rem;
        margin: 0.8rem 0;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .content-header h1 {
        font-size: 1.6rem;
    }
    
    .content-header h1 i {
        font-size: 1.2rem;
        padding: 0.3rem;
    }
    
    .search-input {
        padding: 0.7rem 3rem 0.7rem 1rem;
        font-size: 0.85rem;
    }

    .search-input::placeholder {
        font-size: 0.75rem;
    }
    
    .search-btn {
        width: 2rem;
        height: 2rem;
        right: 0.3rem;
    }
    
    /* إصلاح مشكلة الهامش الإضافي على الجوال الصغير جداً */
    .questions-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
}

/* تحسينات للجوال */
@media (max-width: 768px) {
    .question-card {
        padding: 16px;
        margin-bottom: 12px;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .question-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .question-preview {
        font-size: 0.9rem;
        margin-bottom: 12px;
        line-height: 1.5;
    }
    
    .question-meta-container {
        gap: 10px;
    }
    
    .question-meta {
        gap: 12px;
        flex-wrap: wrap !important;
        overflow: visible !important;
    }
    
    .category-tag,
    .read-count {
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* الزر في الجوال - أيقونة فقط مع نص مختصر */
    .read-more-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
        min-width: 36px;
    }
    
    .read-more-text {
        color: white !important;
        display: none;
    }
    
    .read-more-btn i {
        margin: 0;
        font-size: 0.9rem;
    }
}

/* للجوال الصغير جداً */
@media (max-width: 480px) {
    .question-card {
        padding: 12px;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .question-title {
        font-size: 1rem;
    }
    
    .question-preview {
        font-size: 0.85rem;
    }
    
    .question-meta-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }
    
    .question-meta {
        justify-content: flex-start;
        flex-wrap: wrap !important;
        gap: 8px;
        min-width: 0;
        flex: 1;
    }
    
    .category-tag,
    .read-count {
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    
    .read-more-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }
}

/* قاعدة نهائية للتأكد الكامل */
.question-meta {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}

.question-meta .category-tag,
.question-meta .read-count {
    display: inline-flex !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* =====================================
   NO RESULTS DESIGN - تصميم رسالة عدم وجود نتائج
   ===================================== */

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.no-results::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(28, 158, 151, 0.05) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.no-results-icon {
    margin-bottom: 2rem;
    position: relative;
}

.no-results-icon i {
    font-size: 4rem;
    color: var(--primary-color);
    background: var(--ai-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.no-results h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: var(--ai-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.no-results p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* زر الذهاب للدردشة للمستخدمين المسجلين */
.chat-redirect-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--ai-gradient);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.chat-redirect-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.chat-redirect-btn:hover::before {
    left: 100%;
}

.chat-redirect-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.chat-redirect-btn i {
    font-size: 1.2rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* تحسينات للجوال */
@media (max-width: 768px) {
    .no-results {
        padding: 3rem 1.5rem;
        margin: 1.5rem 0;
        border-radius: 20px;
    }
    
    .no-results-icon i {
        font-size: 3rem;
    }
    
    .no-results h3 {
        font-size: 1.5rem;
    }
    
    .no-results p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .chat-redirect-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        gap: 0.5rem;
    }
    
    .chat-redirect-btn i {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .no-results {
        padding: 2rem 1rem;
        margin: 1rem 0;
        border-radius: 16px;
    }
    
    .no-results-icon i {
        font-size: 2.5rem;
    }
    
    .no-results h3 {
        font-size: 1.3rem;
    }
    
    .no-results p {
        font-size: 0.95rem;
        margin-bottom: 1.2rem;
    }
    
    .chat-redirect-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.95rem;
        gap: 0.4rem;
    }
    
    .chat-redirect-btn i {
        font-size: 1rem;
    }
}

/* =====================================
   CHAT MODAL - نافذة الدردشة المنبثقة
   ===================================== */

.chat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.chat-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.4s ease-out;
    overflow: hidden;
}

.chat-modal-header {
    background: var(--ai-gradient);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.chat-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-modal-header i {
    font-size: 1.2rem;
}

.chat-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.chat-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.chat-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.welcome-message {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(28, 158, 151, 0.1) 0%, rgba(0, 149, 119, 0.1) 100%);
    border-radius: 15px;
    border: 1px solid rgba(28, 158, 151, 0.2);
    margin-bottom: 1rem;
}

.welcome-avatar {
    width: 50px;
    height: 50px;
    background: var(--ai-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.welcome-text h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.welcome-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    max-width: 80%;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.assistant {
    align-self: flex-start;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
    overflow: hidden;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.message.user .message-avatar {
    background: var(--primary-color);
}

.message.assistant .message-avatar {
    background: var(--ai-gradient);
}

.message-content {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message.user .message-content {
    background: var(--primary-color);
    color: white;
}

.message-text {
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin: 0;
}

.message.loading .message-content {
    background: #f0f0f0;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 0.5rem 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.system-message {
    text-align: center;
    background: #fff3cd !important;
    border: 1px solid #ffeaa7;
    color: #856404 !important;
    margin: 0 auto;
    max-width: 100% !important;
}

.chat-input-container {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.chat-form {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    resize: none;
    max-height: 120px;
    min-height: 40px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(28, 158, 151, 0.1);
}

.send-btn {
    background: var(--ai-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.send-btn:active {
    transform: scale(0.95);
}

.chat-modal-footer {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.points-info, .chat-cost {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.points-info i, .chat-cost i {
    color: var(--primary-color);
}

/* نافذة النقاط غير كافية */
.insufficient-points-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.insufficient-points-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.4s ease-out;
}

.insufficient-points-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    color: white;
    font-size: 2rem;
}

.insufficient-points-content h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.insufficient-points-content p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.insufficient-points-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--ai-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.btn-secondary {
    background: #f8f9fa;
    color: var(--text-secondary);
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: var(--text-primary);
}

/* تحسينات للجوال */
@media (max-width: 768px) {
    .chat-modal-content {
        width: 95%;
        height: 85vh;
        border-radius: 15px;
    }
    
    .chat-modal-header {
        padding: 1rem 1.5rem;
        border-radius: 15px 15px 0 0;
    }
    
    .chat-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .chat-messages {
        padding: 1rem;
    }
    
    .message {
        max-width: 90%;
    }
    
    .chat-input-container {
        padding: 1rem;
    }
    
    .chat-modal-footer {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    .insufficient-points-content {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .insufficient-points-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .chat-modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .chat-modal-header {
        border-radius: 0;
    }
    
    .chat-modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .message {
        max-width: 95%;
    }
    
    .message-content {
        padding: 0.6rem 0.8rem;
    }
    
    .chat-input {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
    
    .send-btn {
        width: 40px;
        height: 40px;
    }
}

/* إصلاح نهائي لمشكلة الـ sidebar على الجوال */
@media (max-width: 1200px) {
    /* إخفاء الـ sidebar بشكل كامل على الجوال */
    .sidebar {
        transform: translateX(100%) !important;
        z-index: 1998 !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* إظهار الـ sidebar عند إضافة class show */
    .sidebar.show {
        transform: translateX(0) !important;
        z-index: 2001 !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: all !important;
    }
    
    /* إخفاء الـ sidebar للزوار غير المسجلين */
    .guest-layout .sidebar {
        transform: translateX(100%) !important;
        z-index: 1998 !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    .guest-layout .sidebar.show {
        transform: translateX(0) !important;
        z-index: 2001 !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: all !important;
    }
    
    /* إخفاء الـ sidebar للمستخدمين المسجلين */
    .has-modern-header .sidebar {
        transform: translateX(100%) !important;
        z-index: 1998 !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    .has-modern-header .sidebar.show {
        transform: translateX(0) !important;
        z-index: 2001 !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: all !important;
    }
}

/* رسالة حد المحادثات داخل الدردشة */
.message.error-message .message-content {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #f39c12;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(243, 156, 18, 0.2);
}

.message.error-message .error-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #856404;
    font-size: 1.1rem;
}

.message.error-message .error-header strong {
    font-weight: 700;
}

.message.error-message p {
    color: #856404;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-weight: 500;
}

.message.error-message .error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.message.error-message .btn {
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.message.error-message .btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.message.error-message .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
    color: white;
}

.message.error-message .btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.message.error-message .btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
    color: white;
}

