/* ============================================================
   📱 Phone-friendly website — assets/mobile-fit.css   (v1.405.0)
   Only screens up to 720px wide change (the same width the site's
   own phone bar uses). Computers and tablets look exactly the same.
   Nothing is removed: every button is still there.
   ============================================================ */
@media (max-width: 720px) {
  /* 1 · the phone bar (Home · Courses · WhatsApp · Call · Menu) stays at the bottom.
     sticky-header.css makes every <nav> "sticky", which pushed this bar to the very
     end of the page, so phones never saw it. */
  nav.apply-bar { position: fixed !important; top: auto !important; bottom: 0 !important; left: 0; right: 0; }

  /* 2 · header in ONE row */
  .site-header { overflow: visible !important; }
  .site-header .header-inner { flex-wrap: nowrap !important; gap: 6px !important; padding-top: 6px !important; padding-bottom: 6px !important; min-height: 58px; align-items: center; }
  .site-header .brand { flex: 0 1 auto; min-width: 0; }
  .site-header .brand-logo-chip { padding: 4px 8px !important; border-radius: 10px !important; }
  .site-header .brand-logo { height: 30px !important; width: auto !important; max-width: 118px; }
  .site-header .header-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
  .site-header .mode-toggle { width: 36px !important; height: 36px !important; min-width: 36px; padding: 0 !important; font-size: 16px !important; }
  .site-header .lang-switch { margin: 0 !important; }
  .site-header .lang-switch select { height: 36px; padding: 0 6px !important; font-size: 13px !important; max-width: 64px; border-radius: 9px; }
  .site-header .portal-btn { height: 36px !important; width: 36px !important; min-width: 36px; padding: 0 !important; justify-content: center; border-radius: 10px !important; }
  .site-header .portal-btn-txt { display: none !important; }
  .site-header .burger { width: 40px; height: 40px; flex: none; }

  /* 3 · the ☰ menu opens as a solid, full-screen, easy-to-read panel */
  #mainNav.main-nav.open { position: fixed !important; left: 0; right: 0; top: 58px; bottom: auto; height: calc(100vh - 58px); height: calc(100dvh - 58px);
    margin: 0 !important; border-radius: 0 !important; background: var(--bg, #0B1A33) !important; -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25); padding: 10px 14px 96px !important; overflow-y: auto; z-index: 9999; }
  #mainNav.main-nav.open > a, #mainNav.main-nav.open .nav-drop > a { font-size: 17px !important; padding: 14px 12px !important; border-bottom: 1px solid rgba(127, 127, 127, .18); color: var(--text, #fff) !important; opacity: 1 !important; }
  #mainNav.main-nav.open .drop-panel a { padding: 12px 14px !important; font-size: 15.5px; color: var(--text, #fff) !important; }

  /* 4 · one ＋ button holds the small tools (back to top, 👁 Aa, 🎨 theme, 🎙 voice) */
  body.mf-on #backTop, body.mf-on #a11yBtn, body.mf-on #themeFab, body.mf-on #ariaBtn { display: none !important; }
  body.mf-on.mf-tray-open #backTop, body.mf-on.mf-tray-open #a11yBtn, body.mf-on.mf-tray-open #themeFab, body.mf-on.mf-tray-open #ariaBtn {
    display: flex !important; position: fixed !important; left: auto !important; right: 16px !important; top: auto !important;
    width: 48px !important; height: 48px !important; min-width: 48px !important; padding: 0 !important; border-radius: 50% !important;
    align-items: center; justify-content: center; z-index: 10001; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
  body.mf-on.mf-tray-open #ariaBtn  { bottom: calc(var(--mob-bar-h, 68px) + 140px) !important; }
  body.mf-on.mf-tray-open #a11yBtn  { bottom: calc(var(--mob-bar-h, 68px) + 196px) !important; overflow: hidden; }
  body.mf-on.mf-tray-open #themeFab { bottom: calc(var(--mob-bar-h, 68px) + 252px) !important; }
  body.mf-on.mf-tray-open #backTop  { bottom: calc(var(--mob-bar-h, 68px) + 308px) !important; }
  #mfHelp { display: none; }
  body.mf-on #mfHelp { display: flex; align-items: center; justify-content: center; position: fixed; right: 16px; bottom: calc(var(--mob-bar-h, 68px) + 84px);
    width: 48px; height: 48px; border-radius: 50%; border: 0; background: #0B1A33; color: #fff; font-size: 22px; line-height: 1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3); z-index: 10002; cursor: pointer; }
  [data-theme="light"] body.mf-on #mfHelp { background: #0B1A33; }
  body.mf-on .chat-launcher { right: 16px !important; bottom: calc(var(--mob-bar-h, 68px) + 16px) !important; }

  /* 5 · courses page: short rows, 4 per subject + "Show all" */
  .domain-block .course-grid { gap: 10px !important; grid-template-columns: 1fr !important; }
  .domain-block .course-card { display: grid !important; grid-template-columns: 84px 1fr; align-items: stretch; border-radius: 14px !important; overflow: hidden; min-height: 0; }
  .domain-block .course-card .course-thumb { height: auto !important; min-height: 84px; aspect-ratio: auto !important; margin: 0 !important; border-radius: 0 !important; }
  .domain-block .course-card .course-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .domain-block .course-card .course-thumb .thumb-name, .domain-block .course-card .thumb-badge { display: none !important; }
  .domain-block .course-card .course-thumb .thumb-ic { font-size: 30px; }
  .domain-block .course-card .course-body { padding: 10px 12px !important; }
  .domain-block .course-card h4 { font-size: 15.5px !important; line-height: 1.3 !important; margin: 2px 0 4px !important; }
  .domain-block .course-card .course-body p, .domain-block .course-card .course-go { display: none !important; }
  .domain-block .course-card .course-meta { font-size: 12.5px; gap: 8px; }
  .domain-block.mf-short .course-card:nth-child(n+5) { display: none !important; }
  .mf-more { display: block; width: 100%; margin: 10px 0 24px; padding: 13px; border-radius: 12px; border: 1px solid var(--gold, #C8960C); background: transparent; color: var(--gold, #C8960C); font: 700 15px Inter, system-ui, sans-serif; cursor: pointer; }
  .filter-row, .filter-chips, .chip-row { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }

  /* 6 · search box hint text readable */
  input::placeholder, textarea::placeholder { color: #6b7280 !important; opacity: 1 !important; }
  [data-theme] input::placeholder { color: #6b7280 !important; }
}
