.app-only { display: none !important; }

@media (max-width: 900px) {
  html { -webkit-text-size-adjust: 100%; }
  body { background: #FAF8F4; }

  main { padding-bottom: calc(84px + env(safe-area-inset-bottom)) !important; }

  /* الأقسام تتنفس بعرض كامل بخلفياتها الأصلية — لا تحويلها لبطاقات معلّقة */
  main > section { margin: 0 !important; border-radius: 0 !important; }
  main > section > div { padding-top: 38px !important; padding-bottom: 38px !important; padding-inline: 18px !important; }
  .app-hero { border-radius: 0 0 22px 22px !important; overflow: hidden !important; box-shadow: 0 6px 20px -14px rgba(23,16,43,.3); }

  /* بصريّة هيرو القسم: الصورة أولاً بعرض كامل بلا انزياح أو دوران */
  .cat-hero-visual { order: -1; width: 100%; margin-bottom: 18px; }
  .cat-hero-visual > div { width: 100% !important; transform: none !important; margin: 0 auto; }
  .cat-hero-visual span[style*="position:absolute"] { display: none !important; }
  .cat-hero-visual img { margin-bottom: 0 !important; }

  /* نصوص بمقاس الهاتف */
  main h1 { font-size: 25px !important; line-height: 1.42 !important; }
  main h2 { font-size: 21px !important; line-height: 1.42 !important; letter-spacing: -.2px; }
  main h3 { font-size: 15.5px !important; }
  main p  { font-size: 14px !important; line-height: 1.9 !important; }

  /* الشبكات عمود واحد */
  main [style*="grid-template-columns"]:not(.app-quick) { grid-template-columns: 1fr !important; gap: 12px !important; }

  main a, main button { min-height: 44px; transition: transform .12s ease, opacity .12s ease; }
  main a:active, main button:active { transform: scale(.96); opacity: .85; }
  .app-quick > a:active { transform: scale(.94); }
  nav[aria-label] a:active svg { transform: scale(.9); }

  .bsn-gridbg, main canvas { display: none !important; }
  .desktop-only { display: none !important; }
  .app-only { display: block !important; }

  .app-quick { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 10px !important; }
  .app-quick > a { border-radius: 16px !important; }

  .app-search { display: flex !important; align-items: center; gap: 10px; background: #FFFFFF; border: 1px solid #E4DFD5; border-radius: 13px; padding: 13px 15px; }

  footer { display: none !important; }

  /* صفوف أفقية بسحب اللمس (خدماتنا، سابقة الأعمال) */
  .app-rail { display: flex !important; gap: 14px !important; overflow-x: auto !important; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; margin-inline: -18px !important; padding-inline: 18px !important; }
  .app-rail::-webkit-scrollbar { display: none; }
  .app-rail > * { scroll-snap-align: start; flex: 0 0 76% !important; min-width: 0 !important; }

  /* زرّا الأنظمة الجاهزة جنبًا إلى جنب */
  .app-btn-row { flex-wrap: nowrap !important; gap: 10px !important; }
  .app-btn-row > a { flex: 1 1 0 !important; padding-inline: 12px !important; font-size: 12.5px !important; white-space: nowrap; }

  /* بطاقات الشهادات: عرض كامل + حشوة أخف */
  section[aria-label="عملاؤنا"] [style*="width:{{ tWidth }}"],
  section[aria-label="عملاؤنا"] > div > div[style*="overflow:hidden"] > div > div { padding: 22px 20px !important; }

  /* دعوة ختامية: أزرار بعرض كامل تحت بعضها */
  section[aria-label="ابدأ"] > div > div:last-child { flex-direction: column !important; align-items: stretch !important; width: 100%; }
  section[aria-label="ابدأ"] > div > div:last-child > a { justify-content: center !important; }
}
