/* =========================================================
   Mobile overrides (Alostaz) - FINAL MERGED
   File: mobile.css

   ✅ Merged:
   1) old mobile.css
   2) mobile-only.css converted from .is-mobile => media query
   3) rtl-mobile tweaks merged (no .is-mobile dependency)

   Works purely by screen width (best for performance & Lighthouse)
========================================================= */

/* =========================================================
   Mobile: <= 768px
========================================================= */
@media (max-width: 768px){

  /* ===============================
     General / Touch
  =============================== */
  img{ max-width: 100%; height: auto; }

  .game-card,
  .category-btn,
  .download-btn,
  .cta-button{
    -webkit-tap-highlight-color: transparent;
  }

  .game-card:active{ transform: scale(0.99); }
  .category-btn:active{ transform: scale(0.97); }

  /* ===============================
     Cards
  =============================== */
  .game-card{ margin-bottom: 15px; }

  .game-image{ height: 180px; }

  .game-title{
    font-size: 18px; /* merged preferred value */
  }

  .game-description{
    font-size: 14px;
    line-height: 1.5;
  }

  .download-btn{
    padding: 10px;
    font-size: 15px;
    text-align: center;
  }

  /* ===============================
     Featured / Sections
  =============================== */
  .featured-content h3{ font-size: 20px; }
  .featured-content p{ font-size: 14px; }

  .section-title h2{ font-size: 22px; }

  /* ===============================
     Hero
  =============================== */
  .hero h2{ font-size: 24px; }
  .hero p{ font-size: 15px; }

  /* ===============================
     RTL improvements on mobile
     (was: rtl mobile file with .is-mobile)
  =============================== */
  [dir="rtl"] .game-card{
    text-align: right;
  }

  [dir="rtl"] .game-meta{
    flex-direction: row-reverse;
  }

  [dir="rtl"] .game-platform{
    flex-direction: row-reverse;
  }

  [dir="rtl"] .footer-links a:hover{
    padding-left: 8px;
    padding-right: 0;
  }

  [dir="rtl"] .search-box i{
    right: 15px;
    left: auto;
  }

  [dir="rtl"] .search-box input{
    padding: 10px 15px 10px 40px;
  }

  [dir="rtl"] .mobile-menu-toggle{
    right: 15px;
    left: auto;
  }

  [dir="rtl"] .nav-menu.active{
    right: 0;
    left: 0;
  }

  /* Footer RTL fixes */
  [dir="rtl"] .footer-column h3::after{
    right: 0;
    left: auto;
  }

  [dir="rtl"] .cta-button,
  [dir="rtl"] .download-btn{
    text-align: center;
  }

  [dir="rtl"] .footer-links{
    padding-right: 0;
  }

  [dir="rtl"] .footer-links li{
    margin-right: 0;
  }
}

/* =========================================================
   Very small phones: <= 360px
========================================================= */
@media (max-width: 360px){

  .hero{ padding: 40px 15px; }

  .hero h2{ font-size: 22px; }

  /* Grid becomes 1 column */
  .games-grid{ grid-template-columns: 1fr; }

  /* extra */
  .game-image{ height: 150px; }

  .game-content{ padding: 15px; }
}


body.author .gam-wrap{
  direction: ltr;          /* يمنع LTR داخل iframe من زقّ RTL */
  text-align: center;
}


