/* ✅ إصلاح العرض في الأجهزة مثل Galaxy Tab S7 - Portrait Mode */
@media screen and (min-width: 600px) and (max-width: 950px) and (orientation: portrait) {

  /* ✅ إصلاح الشبكة الرئيسية */
  .desk-games-grid,
  .recent-games-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
    padding: 20px 15px 10px 15px !important;
    margin-top: 100px !important; /* لإزاحة الألعاب تحت الإعلان */
  }

  .desk-games-grid .game-thumb,
  .recent-game-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  /* ✅ إضافة هامش بين الشبكة والقائمة الجانبية */
  .desk-homepage-wrapper,
  .game-shell-container,
  .single-game-container {
    width: 100% !important;
    padding: 10px 15px !important;
    box-sizing: border-box;
  }

  /* ✅ شبكة تصنيفات الألعاب */
  .desk-categories-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    padding: 10px 15px !important;
  }

  .desk-category-box {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  /* ✅ إخفاء الإعلانات الجانبية */
  .sidebar,
  .left-sidebar-ads,
  .right-sidebar-ads,
  .desk-sidebar,
  .desk-right-ads {
    display: none !important;
  }

  /* ✅ الإعلان العلوي */
  .ad-slot-home {
    display: block !important;
    text-align: center !important;
    padding-top: 20px !important;
    z-index: 10 !important;
    position: relative !important;
  }
}
/* ✅ تحسين تصميم صفحة التصنيف لأجهزة التابلت مثل Galaxy Tab S7 - Portrait Mode */
@media screen and (min-width: 600px) and (max-width: 950px) and (orientation: portrait) {
    

  /* ✅ شبكة الألعاب */
  .desk-category-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* من 5 إلى 3 */
    gap: 15px !important;
    padding: 10px 15px !important;
    box-sizing: border-box;
  }

  .desk-category-grid .game-thumb {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  /* ✅ كروت الكاتيجوري أسفل الألعاب */
  .catpage-categories-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    padding: 10px 15px !important;
    box-sizing: border-box;
  }

  .catpage-category-box {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    padding: 10px 5px !important;
  }

  /* ✅ الإعلان في الوسط */
  .cat-display-ad,
  .cat-multi-ad {
    width: 100% !important;
    text-align: center !important;
    margin: 20px 0 !important;
  }

  /* ✅ وصف الكاتيجوري */
  .catpage-description-section {
    padding: 10px 15px !important;
  }

  .catpage-description-box {
    width: 100% !important;
    padding: 10px;
    background: #111827;
    color: white;
    border-radius: 10px;
  }
}
@media screen and (min-width: 600px) and (max-width: 950px) and (orientation: portrait) {

  /* ✅ الحاوية الرئيسية */
  .single-game-wrapper {
    display: flex;
    flex-direction: column;
    padding: 10px 15px;
  }

  /* ✅ محتوى اللعبة */
  .game-shell-container {
    width: 100% !important;
  }

  .game-shell-box {
    width: 100% !important;
    padding: 10px !important;
    box-sizing: border-box;
  }

  /* ✅ إطار اللعبة */
  .iframe-inner {
    height: calc(100vh - 220px) !important;
  }

  /* ✅ الإعلان الكبير */
  .adsense-desktop-728 {
    width: 100% !important;
    text-align: center;
    margin: 15px 0;
  }

  .adsense-desktop-728 ins {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* ✅ الكاتيجوري تحت اللعبة */
  .singlepage-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 15px;
  }

  .singlepage-category-box {
    padding: 10px 5px;
    font-size: 14px;
  }

  /* ✅ الشريط الجانبي */
  .game-sidebar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
  }

  .sidebar-games .sidebar-item {
    width: 30%;
  }

  /* ✅ صندوق الوصف */
  .game-desc-box {
    flex-direction: column;
    padding: 10px 15px;
  }

  .desc-thumb,
  .desc-content {
    width: 100% !important;
  }
}
@media screen and (min-width: 600px) and (max-width: 950px) and (orientation: portrait) {
  
  /* ✅ إخفاء أي شريط جانبي بالكامل حتى لو ثابت */
  aside.sidebar,
  .left-sidebar,
  .main-left-sidebar,
  .desk-left-sidebar,
  .desk-sidebar,
  .left-sidebar-ads,
  .sidebar,
  #sidebar,
  .game-sidebar {  /* ✅ أضف هذا السطر هنا */
    display: none !important;
    width: 0 !important;
    max-width: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
  }

  /* ✅ إجبار الحاوية على أخذ العرض الكامل */
  body,
  .site,
  .main-content,
  .single-game-wrapper,
  .game-shell-container,
  .game-shell-box {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }
    /* ✅ إجبار المحتوى على البدء من اليسار بالكامل */
  .site,
  .main-content,
  .game-shell-container,
  .single-game-wrapper,
  .single-game-container,
  .game-shell-box {
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
}



  /* ✅ إصلاح السايد بار الأيمن كذلك */
  .right-sidebar,
  .desk-right-ads,
  .sidebar-right,
  .right-sidebar-ads {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
  }
@media screen and (min-width: 600px) and (max-width: 950px) and (orientation: portrait) {
  /* ✅ إخفاء كل عناصر الشريط الجانبي بشكل كامل */
  .game-sidebar,
  .adsense-sidebar-box,
  .sidebar-games {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* ✅ إجبار المحتوى الرئيسي على أخذ عرض كامل */
  .single-game-wrapper,
  .game-shell-container,
  .game-shell-box {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 10px !important;
    display: block !important;
  }
}
@media screen and (min-width: 600px) and (max-width: 950px) and (orientation: portrait) {

  /* ✅ إخفاء الشريط الجانبي كليًا */
  .game-sidebar,
  .adsense-sidebar-box,
  .sidebar-games,
  .sidebar,
  aside.sidebar,
  .left-sidebar,
  .left-sidebar-ads,
  .right-sidebar,
  .right-sidebar-ads,
  .desk-sidebar,
  .desk-right-ads,
  .sidebar-right {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    position: absolute !important;
    left: -9999px !important;
  }

  /* ✅ إصلاح الحاويات الرئيسية للمحتوى */
  body,
  .site,
  .main-content,
  .single-game-wrapper,
  .game-shell-container,
  .game-shell-box {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    float: none !important;
    padding: 0 15px !important;
    display: block !important;
  }

  /* ✅ إصلاح بداية المحتوى لتفادي تراكب السايدبار */
  .site,
  .main-content,
  .single-game-wrapper,
  .game-shell-container,
  .game-shell-box {
    margin-left: 0 !important;
    padding-left: 0 !important;
  }

  /* ✅ إصلاح ارتفاع iframe */
  .iframe-inner {
    height: calc(100vh - 220px) !important;
  }
}
@media screen and (min-width: 600px) and (max-width: 950px) and (orientation: portrait) {
  
  /* ✅ إذا كان عندنا sidebar ثابت على اليسار */
  .single-game-wrapper,
  .game-shell-container,
  .game-shell-box,
  .singlepage-categories-grid,
  .bottom-nav-wrapper,
  .catpage-categories-grid,
  .desk-category-grid,
  .desk-homepage-wrapper,
  .desc-content,
  .game-desc-box {
    padding-left: 40px !important; /* لتعويض الأيقونات الجانبية */
  }

  /* ✅ وللتأكد أن المحتوى ما يكون تحتها */
  .mobile-left-sidebar,
  .fixed-left-sidebar,
  .desktop-left-iconbar {
    z-index: 999 !important;
  }

  /* ✅ اجبار كل العناصر على الظهور من يسار فعليًا */
  .main-content,
  .site,
  .single-game-container {
    margin-left: 0 !important;
  }
}
@media screen and (min-width: 600px) and (max-width: 950px) and (orientation: portrait) {
  
  /* ✅ إصلاح التراكب بسبب الشريط الجانبي الثابت */
  .game-desc-box,
  .desc-thumb,
  .desc-content,
  .game-comments-box,
  .game-footer,
  .related-games,
  .related-item,
  .bottom-nav-wrapper,
  .singlepage-categories-grid,
  .catpage-categories-grid,
  .desk-category-grid,
  .game-comments-box{
    padding-left: 40px !important;
    box-sizing: border-box !important;
  }
  

  /* ✅ في حال بعض العناصر عندها padding داخلي، نخليهم يرتبوا أنفسهم */
  .game-desc-box,
  .game-footer {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ✅ صورة الوصف */
  .desc-thumb img {
    max-width: 100% !important;
    height: auto !important;
  }
}

