/* Menxar mobile-only layout refinement. Desktop styles are intentionally untouched. */
@media (max-width: 700px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  .wrap { width: min(100% - 28px, 560px); }

  /* Compact announcement and a truly centred mobile brand. */
  .topline .topinner { min-height: 30px; height: 30px; padding-inline: 10px; }
  .header { height: 62px !important; min-height: 62px; }
  .header .nav { position: relative; min-height: 62px; height: 62px; display: flex; align-items: center; justify-content: center; padding-inline: 0; }
  .header .brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; margin: 0; }
  .header .brandmark { width: 38px; height: 38px; min-width: 38px; font-size: 20px; border-radius: 11px; }
  .header .brand > span:last-child { font-size: 15px; line-height: 1.05; letter-spacing: .07em; }
  .header .brand small { display: block; font-size: 7px; letter-spacing: .25em; margin-top: 4px; }
  .header .menu-toggle { display: block; position: absolute; right: 0; top: 50%; transform: translateY(-50%); z-index: 5; width: 42px; height: 42px; padding: 0; border: 1px solid #e4eaf5; border-radius: 10px; background: #fff; color: #102750; font-size: 23px; line-height: 1; }
  .header .navlinks { display: none; position: absolute; left: -14px; right: -14px; top: 62px; z-index: 50; max-height: calc(100dvh - 100px); overflow-y: auto; padding: 10px 18px 18px; background: #fff; border-top: 1px solid #edf1f7; box-shadow: 0 18px 30px rgba(16,39,80,.13); flex-direction: column; align-items: stretch; gap: 0; }
  .header .navlinks.open { display: flex; }
  .header .navlinks > a, .header .navlinks .nav-drop-trigger { min-height: 42px; display: flex; align-items: center; justify-content: flex-start; padding: 10px 8px; border-bottom: 1px solid #eef2f8; font-size: 13px; text-align: left; }
  .header .navlinks .navcta, .header .navlinks .customer-nav { justify-content: center; margin-top: 9px; border-radius: 9px; }

  /* Reduce oversized mobile hero whitespace and keep media balanced. */
  .menxar-home-hero { padding: 27px 0 14px !important; }
  .menxar-home-hero .platform-hero-grid { grid-template-columns: 1fr !important; gap: 8px !important; min-height: 0 !important; padding-bottom: 5px !important; }
  .menxar-home-hero .platform-copy h1, .platform-copy h1 { font-size: clamp(32px, 8.4vw, 39px) !important; line-height: 1.06 !important; letter-spacing: -.045em; margin: 14px 0 12px; }
  .menxar-home-hero .platform-copy > p, .platform-copy > p { font-size: 13px; line-height: 1.58; }
  .menxar-home-hero .platform-visual.menxar-hero-art, .platform-visual { height: 190px !important; min-height: 0 !important; margin-top: 9px; }
  .menxar-home-hero .platform-visual img { max-height: 100%; object-fit: cover; }
  .platform-hero { padding: 28px 0 20px !important; }
  .platform-proof { margin-top: 16px; }
  .menxar-home-hero .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 7px !important; padding: 8px !important; }
  .menxar-home-hero .trust-grid > * { min-width: 0; }

  /* Consistent two-card rows on mobile for course and benefit collections. */
  .platform-course-grid, .course-grid, .why-card-grid, .service-grid,
  .industry-cards, .cap-grid, .delivery-grid, .audience-grid,
  .trust-grid, .feature-card-grid, .benefit-grid, .learning-path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .learning-card { min-width: 0; border-radius: 13px; }
  .learning-card > img { height: 104px !important; object-fit: cover; }
  .learning-card-body { padding: 11px 11px 13px !important; }
  .learning-card h3 { font-size: 13px !important; line-height: 1.3; margin: 8px 0 5px; }
  .learning-card p { min-height: 0; font-size: 10px; line-height: 1.55; }
  .card-meta { font-size: 8px; }
  .course-tags { gap: 5px; flex-wrap: wrap; }
  .course-tags span { font-size: 8px; padding: 4px 6px; }
  .why-card { min-width: 0; }
  .why-card-image { height: 125px !important; }
  .why-card-content { padding: 12px !important; }
  .why-card h3, .service-card h3 { font-size: 13px !important; line-height: 1.35; }
  .why-card p, .service-card p { font-size: 10px !important; line-height: 1.55; }
  .service-card { min-height: 0 !important; padding: 14px 11px !important; }
  .industry-cards > a { min-height: 145px; padding: 13px 10px; }

  /* Keep heading blocks compact and readable on narrow screens. */
  .section, .platform-courses, .why-menxar { padding-top: 38px !important; padding-bottom: 42px !important; }
  .platform-courses .section-heading { margin-bottom: 17px !important; padding-bottom: 12px !important; }
  .platform-courses .section-heading h2.menxar-section-heading,
  .why-menxar .why-menxar-wrap > h2.menxar-section-heading,
  .section-heading h2, .feature-grid h2 { font-size: clamp(25px, 6.5vw, 31px) !important; line-height: 1.15 !important; }
  .platform-courses .section-heading > p { font-size: 12px; line-height: 1.6; }
  .menxar-learning-band { padding: 30px 0 !important; }
  .menxar-learning-inner { grid-template-columns: 1fr !important; gap: 15px !important; }
  .menxar-learning-inner h2 { font-size: 27px !important; }

  /* Keep form, practice editor, and dashboard controls usable rather than forcing two columns. */
  .practice-layout, .account-shell, .contact-grid, .internship-grid,
  .dashboard-grid, .roadmap-layout, .detail-row, .detail-row.reverse { grid-template-columns: 1fr !important; }
  .practice-workspace textarea, #solutionEditor { min-height: 210px; }
}

@media (max-width: 390px) {
  .wrap { width: calc(100% - 24px); }
  .header .brandmark { width: 35px; height: 35px; min-width: 35px; }
  .header .brand > span:last-child { font-size: 14px; }
  .learning-card > img { height: 92px !important; }
  .learning-card-body { padding: 9px !important; }
  .learning-card h3 { font-size: 12px !important; }
}
