/**
 * Mobile Final Override - HIGHEST PRIORITY
 * Version: 25.1
 * هذا الملف يتحمل آخر حاجة ويلغي أي تعارضات
 * تم نقل كل CSS من functions.php هنا
 */

/* ═══════════════════════════════════════════════════════════
   ملاحظة: إخفاء الوسوم يتم التحكم فيه من الإعدادات
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   2. عمودين في الأقسام على الموبايل - إلغاء الشريط الأفقي
   ═══════════════════════════════════════════════════════════ */

/* منع السليدر على جميع الأحجام */
body.category .category-posts,
body.archive .category-posts,
body.search .category-posts,
body.tax .category-posts {
    transform: none !important;
    transition: none !important;
}

/* إزالة أي swiper/slick classes */
.category-posts.swiper,
.category-posts.swiper-container,
.category-posts.slick-slider,
.posts-grid.swiper,
.posts-grid.slick-slider {
    display: grid !important;
}

.swiper-wrapper,
.slick-list,
.slider-wrapper {
    display: contents !important;
}

@media (max-width: 768px) {
    
    /* إلغاء السليدر تماماً - جدول عمودين ثابت */
    body.category .category-posts,
    body.archive .category-posts,
    body.search .category-posts,
    body.tax .category-posts,
    .category-posts,
    .archive-posts,
    .posts-grid,
    .category-page .category-posts {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        
        /* إلغاء كل خصائص السليدر */
        flex-direction: unset !important;
        flex-wrap: unset !important;
        overflow: visible !important;
        overflow-x: visible !important;
        white-space: normal !important;
        scroll-snap-type: none !important;
        -webkit-overflow-scrolling: auto !important;
        
        /* منع التحول لـ flex */
        display: grid !important;
    }
    
    /* تنسيق المقالات - عمودي - منع السليدر */
    body.category .category-post-item,
    body.archive .category-post-item,
    body.search .category-post-item,
    body.tax .category-post-item,
    .category-posts .category-post-item,
    .posts-grid .post-item,
    .category-page .category-post-item {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        min-width: auto !important;
        max-width: 100% !important;
        margin: 0 !important;
        background: #fff !important;
        border-radius: 10px !important;
        overflow: hidden !important;
        border: 2px solid #e0e0e0 !important;
        
        /* منع خصائص السليدر */
        flex-shrink: 1 !important;
        scroll-snap-align: none !important;
    }
    
    /* الصورة - فوق */
    body.category .category-post-item .post-thumb,
    body.archive .category-post-item .post-thumb,
    .category-posts .category-post-item .post-thumb {
        width: 100% !important;
        height: 140px !important;
        min-height: 140px !important;
        max-height: 140px !important;
        flex-shrink: unset !important;
        border-radius: 0 !important;
    }
    
    /* العنوان - تحت */
    body.category .category-post-item .post-content-wrap,
    body.archive .category-post-item .post-content-wrap,
    .category-posts .category-post-item .post-content-wrap {
        padding: 12px !important;
        width: 100% !important;
        flex: unset !important;
    }
    
    body.category .category-post-item .post-title,
    body.archive .category-post-item .post-title,
    .category-posts .category-post-item .post-title {
        font-size: 13px !important;
        line-height: 1.4 !important;
    }
    
    /* ═══════════════════════════════════════════════════════════
       منع السليدر - إضافي
       ═══════════════════════════════════════════════════════════ */
    
    /* إخفاء أزرار السليدر نهائياً */
    .swiper-button-next,
    .swiper-button-prev,
    .slick-prev,
    .slick-next,
    .category-page .swiper-button-next,
    .category-page .swiper-button-prev,
    .category-page .slick-prev,
    .category-page .slick-next,
    .category-posts ~ .slider-nav,
    .posts-grid ~ .slider-nav,
    body.category .swiper-button-next,
    body.category .swiper-button-prev,
    body.archive .swiper-button-next,
    body.archive .swiper-button-prev {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* إخفاء dots السليدر نهائياً */
    .swiper-pagination,
    .slick-dots,
    .category-page .swiper-pagination,
    .category-page .slick-dots,
    .category-posts ~ .slider-dots,
    .posts-grid ~ .slider-dots,
    body.category .swiper-pagination,
    body.archive .swiper-pagination {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* ═══════════════════════════════════════════════════════════
       3. عمودين في "أحدث الأخبار" - إلغاء 3 أعمدة
       ═══════════════════════════════════════════════════════════ */
    
    /* الشكل الأول - كان 3 أعمدة */
    .grid-three-cols,
    .news-section-wrapper .grid-three-cols,
    .section-style1 .grid-three-cols {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    /* الشكل الثاني - عمودين */
    .grid-two-cols,
    .news-section-wrapper .grid-two-cols,
    .section-style2 .grid-two-cols {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    /* الشكل الثالث - الصف السفلي */
    .small-horizontal-strip,
    .news-section-wrapper .small-horizontal-strip {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    /* الجزء العلوي */
    .big-featured-box {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    
}

