/* Mobile home only: header and bottom navigation remain untouched. */
@media (max-width: 759px) {
  .home-screen { gap:22px; padding-bottom:88px; }

  /* Navigation remains clear and touch-friendly on small screens. */
  /* Anchor both physical edges instead of centering a calculated width.
     This prevents the RTL scrollbar from leaving an uneven gap on the left. */
  .bottom-nav,.is-authenticated .bottom-nav { z-index:60; left:max(12px,env(safe-area-inset-left)); right:max(12px,env(safe-area-inset-right)); width:auto; min-height:76px; bottom:max(10px,env(safe-area-inset-bottom)); transform:none; gap:2px; padding:8px 7px max(9px,env(safe-area-inset-bottom)); border-color:rgba(218,228,243,.94); border-radius:24px; box-shadow:0 14px 34px rgba(26,49,93,.18); }
  .bottom-nav a { min-height:57px; grid-template-rows:25px minmax(17px,auto); align-content:center; justify-items:center; gap:3px; padding:0 2px; border-radius:16px; }
  .bottom-nav a > svg { width:21px; height:21px; display:block; flex:none; stroke-width:1.9; }
  .bottom-nav a > span { font-size:clamp(.62rem,2.8vw,.72rem); line-height:1.3; }
  .bottom-nav a.active { background:#f1f6ff; }
  .bottom-nav a.active::after { bottom:-7px; }
  .bottom-nav .notification-badge { top:-2px; right:calc(50% - 19px); }
  body { padding-bottom:112px; }
  html { scrollbar-width:none; }
  html::-webkit-scrollbar { width:0; height:0; }
  /* Restore the original About Uniar card directly below the home banner. */
  .mobile-about-link { display:flex; }

  .home-event-banner { min-height:260px; grid-template-columns:1.05fr .95fr; gap:0; padding:22px 18px 0; border:0; border-radius:30px; background:radial-gradient(circle at 82% 22%,rgba(95,158,255,.35),transparent 30%),linear-gradient(135deg,#fff 0%,#edf4ff 62%,#cfe1ff 100%); box-shadow:0 18px 42px rgba(31,87,180,.13); }
  .home-event-banner .hero-copy { position:relative; z-index:2; padding-bottom:20px; }
  .home-event-banner .hero-copy::before { content:"\631 \648 \6cc \62f \627 \62f"; display:inline-flex; align-items:center; height:27px; padding:0 11px; border-radius:99px; color:#2369df; background:#e8f1ff; font-size:.68rem; font-weight:900; }
  .home-event-banner .hero-copy h1 { margin:12px 0 9px; font-size:clamp(1.25rem,5.6vw,1.65rem); line-height:1.65; }
  .home-event-banner .hero-copy h1 .hero-title-brand,.home-event-banner .hero-title-icon { display:none; }
  .home-event-banner .hero-copy p { max-height:48px; overflow:hidden; color:#5c6d8d; font-size:.75rem; line-height:1.9; }
  .home-event-banner .hero-copy .primary-button { min-height:42px; margin-top:12px; padding-inline:17px; font-size:.76rem; }
  .home-event-banner .hero-copy .primary-button__arrow { display:none; }
  .home-event-banner .hero-visual { position:relative; min-height:190px; overflow:visible; }
  .home-event-banner .hero-visual img { width:155%; transform:translate(-3%,5px); opacity:.92; }

  .home-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 2px; }
  .home-section-heading h2 { display:flex; align-items:center; gap:7px; margin:0; color:#10265b; font-size:1.05rem; }
  .home-section-heading h2 svg { width:21px; color:#1f72f5; }
  .home-section-heading button { border:0; color:#1e71ee; background:transparent; font:inherit; font-size:.72rem; font-weight:800; }
  .home-quick-heading { margin-bottom:-10px; }

  /* A true four-column grid: columns share only the space left after its gaps. */
  .feature-grid { width:100%; max-width:100%; min-width:0; grid-template-columns:repeat(4,minmax(0,1fr)); gap:clamp(6px,2vw,10px); overflow:clip; }
  .feature-card,.feature-ai { position:relative!important; width:100%; min-width:0!important; max-width:100%; min-height:0!important; height:auto!important; aspect-ratio:1 / 1.12; display:flex!important; flex-direction:column; align-items:center; justify-content:center; gap:0!important; overflow:hidden; padding:8px 3px!important; border:0; border-radius:clamp(20px,5vw,24px)!important; text-align:center; box-shadow:none!important; }
  /* Replace the older illustration layer only in this compact quick-access row. */
  #features .feature-card::before { display:none!important; }
  #features .feature-card > img { display:block!important; background:transparent!important; }
  .feature-card img,.feature-ai img { width:clamp(42px,13vw,54px)!important; height:clamp(42px,13vw,54px)!important; flex:0 0 auto; object-fit:contain; padding:0!important; border-radius:0!important; box-shadow:none!important; }
  .feature-card strong,.feature-ai strong,.feature-card small,.feature-ai small,.feature-card .arrow,.feature-ai .ai-arrow,.feature-ai .ai-badge,.feature-ai::after { display:none!important; }
  .home-quick-label { position:static; width:100%; min-width:0; display:block; margin-top:8px; overflow:hidden; color:#15295c; font-size:clamp(.57rem,2.3vw,.68rem); font-weight:900; letter-spacing:-.015em; line-height:1.35; white-space:nowrap; text-overflow:ellipsis; }
  /* RTL visual order for the quick-access cards. */
  #moreFeaturesCard { order:1; text-decoration:none; } #foodOrderCard { order:2; } #searchCard { order:3; } #hamnegarCard { order:4; text-decoration:none; } #eventsCard,#marketCard { display:none!important; }

  .home-today { padding:18px 15px 6px; border-radius:25px; background:#fff; box-shadow:0 12px 32px rgba(39,77,136,.08); }
  .home-today__list { margin-top:11px; }
  .home-today__item { width:100%; display:grid; grid-template-columns:auto 1fr 18px; align-items:center; gap:10px; padding:12px 0; border:0; border-bottom:1px solid #eaf0f8; color:#13265a; background:transparent; text-align:right; font:inherit; }
  .home-today__item:last-child { border-bottom:0; }
  .home-today__item--post { grid-template-columns:auto 48px minmax(0,1fr) 18px; }
  .home-today__image { width:48px; height:48px; overflow:hidden; border-radius:12px; background:#edf4ff; }
  .home-today__image img { width:100%; height:100%; object-fit:cover; }
  .home-today__item svg { width:18px; color:#89a0c8; }
  .home-today__copy { min-width:0; }
  .home-today__copy b,.home-today__copy small { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .home-today__copy b { font-size:.8rem; }
  .home-today__copy small { margin-top:4px; color:#71809a; font-size:.66rem; }
  .home-today__type { padding:6px 9px; border-radius:99px; color:#8260d7; background:#f3edff; font-size:.62rem; font-weight:800; }
  .home-today__type.is-event { color:#216be8; background:#eaf2ff; }
  .home-empty { margin:17px 0 12px; color:#7c89a0; font-size:.76rem; line-height:1.8; }

  .home-suggestions__grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .home-suggestions .home-section-heading { margin-bottom:14px; }
  .home-suggestion { min-height:132px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; padding:13px 12px 22px; border:0; border-radius:22px; color:#14275b; background:#fff; box-shadow:0 10px 26px rgba(35,75,139,.08); font:inherit; text-align:center; }
  .home-suggestion b { font-size:.76rem; }
  .home-suggestion small { color:#70809e; font-size:.64rem; line-height:1.7; }
  .home-suggestion--study > svg { width:39px; height:39px; padding:9px; border-radius:14px; color:#2875f4; background:#e8f1ff; }
  .home-suggestion__avatars { height:42px; display:flex; direction:ltr; }
  .home-suggestion__avatars span { width:40px; height:40px; margin-left:-8px; display:grid; place-items:center; border:2px solid #fff; border-radius:50%; color:#fff; background:linear-gradient(135deg,#91b7ff,#2b6ce8); background-size:cover; background-position:center; font-size:.7rem; font-weight:900; }
  .home-suggestion__avatars span.has-image { color:transparent; }
  /* In RTL, the about-card arrow is intentionally kept on the physical left. */
  .mobile-about-link > svg { order:3; margin-right:auto; margin-left:0; }
  .trust-card { display:none; }
}

@media (max-width:390px) {
  .feature-grid { gap:6px; }
  .feature-card,.feature-ai { aspect-ratio:1 / 1.14; min-height:0!important; height:auto!important; padding:7px 2px!important; }
  .feature-card img,.feature-ai img { width:clamp(40px,13vw,49px)!important; height:clamp(40px,13vw,49px)!important; }
  .home-quick-label { margin-top:6px; font-size:clamp(.55rem,2.25vw,.62rem); }
  .home-event-banner { min-height:244px; padding-inline:14px; }
  .home-event-banner .hero-copy h1 { font-size:1.17rem; }
  .home-event-banner .hero-visual img { width:164%; }
}
