
/* ============================================
   categories.php - أنماط متجاوبة بالكامل
   ============================================ */

/* Hero Section */
.categories-hero {
    background: linear-gradient(135deg, #f4511e, #e03a00);
    padding: 60px 20px;
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.categories-hero-content h1 {
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: 800;
}

.categories-hero-content p {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.categories-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
}

.stat-label {
    font-size: 14px;
    opacity: 0.85;
}

/* Breadcrumb - للجوال */
.categories-breadcrumb {
    display: none;
    padding: 15px 0;
    font-size: 14px;
    color: #666;
}

.categories-breadcrumb a {
    color: #f4511e;
    text-decoration: none;
}

.categories-breadcrumb i {
    margin: 0 8px;
    font-size: 12px;
    color: #ccc;
}

/* الحاوية الرئيسية */
.categories-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* تنسيق الـ Layout */
.categories-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

/* القسم الرئيسي */
.categories-main {
    width: 100%;
}

.section-header {
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    color: #f4511e;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-right: 4px solid #f4511e;
    padding-right: 16px;
}

.section-desc {
    color: #666;
    margin-top: 10px;
    font-size: 14px;
}

/* شبكة التصنيفات - المتجاوبة */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

/* بطاقة التصنيف */
.category-card {
    background: white;
    border-radius: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.1);
    border-color: #f4511e;
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(244,81,30,0.08), rgba(244,81,30,0.15));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px auto 15px;
}

.category-icon i {
    font-size: 36px;
    color: #f4511e;
}

.category-name {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #333;
    padding: 0 10px;
}

.category-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 8px;
    font-size: 12px;
    color: #888;
    flex-wrap: wrap;
    padding: 0 10px;
}

.category-stats span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.category-link {
    background: #fafafa;
    padding: 12px;
    margin-top: 15px;
    border-top: 1px solid #eee;
    color: #f4511e;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.category-card:hover .category-link {
    background: #f4511e;
    color: white;
}

.category-link i {
    transition: transform 0.3s ease;
}

.category-card:hover .category-link i {
    transform: translateX(-5px);
}

/* ============================================
   العمود الجانبي (Sidebar)
   ============================================ */
.categories-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-card {
    background: white;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f4511e;
}

.sidebar-header i {
    font-size: 20px;
    color: #f4511e;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: #333;
}

/* قائمة أفضل المطاعم */
.top-restaurants-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.top-restaurant-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fafafa;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.top-restaurant-item:hover {
    background: #fff5f0;
    transform: translateX(-5px);
}

.restaurant-avatar {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.restaurant-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: contain;
    background: white;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f4511e, #e03a00);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.restaurant-info {
    flex: 1;
}

.restaurant-info h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.rating i {
    color: gold;
}

.rating .reviews {
    color: #999;
}

.arrow-icon {
    color: #ccc;
    font-size: 12px;
    transition: all 0.3s ease;
}

.top-restaurant-item:hover .arrow-icon {
    color: #f4511e;
    transform: translateX(-3px);
}

/* بطاقة الإحصائيات */
.stats-content {
    display: flex;
    align-items: center;
    justify-content: space-around;
    text-align: center;
}

.stat-box {
    flex: 1;
}

.stat-big {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #f4511e;
}

.stat-text {
    font-size: 13px;
    color: #666;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: #eee;
}

/* بطاقة النصيحة */
.tip-card {
    background: linear-gradient(135deg, #fff8f0, #fff0e6);
    border: 1px solid #ffe0cc;
}

.tip-card p {
    color: #f4511e;
    font-size: 14px;
    line-height: 1.6;
}

/* بطاقة التطبيق */
.app-card {
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
}

.app-card i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #f4511e;
}

.app-card h3 {
    color: white;
    font-size: 18px;
    margin-bottom: 8px;
}

.app-card p {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.app-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.app-btn {
    background: rgba(255,255,255,0.15);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.app-btn:hover {
    background: #f4511e;
    transform: translateY(-2px);
}

/* حالة عدم وجود بيانات */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 24px;
}

.empty-state i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #666;
}

.empty-data-small {
    text-align: center;
    padding: 30px;
    color: #999;
}

.empty-data-small i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .categories-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .categories-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .sidebar-card {
        margin-bottom: 0;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

/* Mobile (up to 767px) */
@media (max-width: 767px) {
    .categories-hero {
        padding: 40px 15px;
    }
    
    .categories-hero-content h1 {
        font-size: 26px;
    }
    
    .categories-hero-content p {
        font-size: 14px;
    }
    
    .categories-stats {
        gap: 25px;
        margin-top: 25px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .categories-breadcrumb {
        display: block;
    }
    
    .categories-container {
        padding: 0 16px 40px;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .section-desc {
        font-size: 13px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .category-icon {
        width: 65px;
        height: 65px;
        margin: 20px auto 12px;
    }
    
    .category-icon i {
        font-size: 28px;
    }
    
    .category-name {
        font-size: 15px;
    }
    
    .category-stats {
        font-size: 10px;
        gap: 10px;
    }
    
    .category-stats span {
        display: flex;
    }
    
    .category-link {
        font-size: 11px;
        padding: 10px;
    }
    
    .sidebar-header h3 {
        font-size: 16px;
    }
    
    .top-restaurant-item {
        padding: 10px;
    }
    
    .restaurant-info h4 {
        font-size: 13px;
    }
    
    .rating {
        font-size: 11px;
    }
    
    .stat-big {
        font-size: 26px;
    }
    
    .stat-text {
        font-size: 12px;
    }
    
    .app-card i {
        font-size: 40px;
    }
    
    .app-card h3 {
        font-size: 16px;
    }
}

/* Mobile Small (up to 480px) */
@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .category-card {
        display: flex;
        align-items: center;
        text-align: right;
        padding: 12px;
    }
    
    .category-icon {
        width: 55px;
        height: 55px;
        margin: 0;
        flex-shrink: 0;
    }
    
    .category-icon i {
        font-size: 24px;
    }
    
    .category-content {
        flex: 1;
        text-align: right;
        padding-right: 15px;
    }
    
    .category-name {
        font-size: 16px;
        margin-bottom: 5px;
    }
    
    .category-stats {
        justify-content: flex-start;
    }
    
    .category-link {
        display: none;
    }
    
    /* تعديل خاص للشاشات الصغيرة جداً */
    .category-card {
        flex-direction: row;
        text-align: right;
        padding: 15px;
    }
    
    .category-icon {
        margin: 0;
    }
    
    .category-name {
        text-align: right;
    }
    
    .category-stats {
        justify-content: flex-start;
    }
}

/* تعديل إضافي للشاشات الصغيرة جداً (380px) */
@media (max-width: 380px) {
    .categories-hero-content h1 {
        font-size: 22px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .category-card {
        padding: 12px;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
    }
    
    .category-icon i {
        font-size: 22px;
    }
    
    .category-name {
        font-size: 14px;
    }
    
    .category-stats {
        font-size: 9px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-big {
        font-size: 22px;
    }
}

/* تحسينات للشاشات الكبيرة */
@media (min-width: 1400px) {
    .categories-container {
        padding: 0 40px 60px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 30px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .category-card,
    .sidebar-card {
        background: #1e1e2e;
        border-color: #2a2a3a;
    }
    
    .category-name,
    .sidebar-header h3,
    .restaurant-info h4 {
        color: #eee;
    }
    
    .category-stats,
    .stat-text,
    .rating .reviews {
        color: #aaa;
    }
    
    .category-link {
        background: #2a2a3a;
        border-top-color: #3a3a4a;
    }
    
    .top-restaurant-item {
        background: #2a2a3a;
    }
    
    .empty-state,
    .empty-data-small {
        background: #1e1e2e;
    }
}