/* v901 — Mobile shell polish: homepage, top navigation, footer
   Desktop untouched. All rules are mobile/tablet only. */

@media (max-width: 1024px){
  /* Top navigation: keep all links reachable instead of squeezing/cutting. */
  body .topbar{
    position:relative !important;
    max-width:100% !important;
    overflow:hidden !important;
  }

  body .topbar .nav,
  body .topbar .container.nav{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
    padding-left:14px !important;
    padding-right:14px !important;
    box-sizing:border-box !important;
  }

  body .topbar .brand,
  body .topbar .logo,
  body .topbar a[href="/"],
  body .topbar a[href="./"]{
    flex:0 0 auto !important;
    min-width:0 !important;
  }

  body .topbar .navlinks{
    flex:1 1 auto !important;
    min-width:0 !important;
    max-width:100% !important;
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch !important;
    white-space:nowrap !important;
    padding:6px 2px 8px !important;
    scrollbar-width:thin !important;
  }

  body .topbar .navlinks a,
  body .topbar .navlinks button,
  body .topbar .navlinks .nav-link{
    flex:0 0 auto !important;
    white-space:nowrap !important;
    min-height:36px !important;
    display:inline-flex !important;
    align-items:center !important;
  }

  body .topbar .navlinks::-webkit-scrollbar{
    height:5px !important;
  }

  body .topbar .navlinks::-webkit-scrollbar-thumb{
    background:#c7d5e8 !important;
    border-radius:999px !important;
  }

  /* Dropdowns on tablet/mobile should never go off-screen. */
  body .topbar .dropdown-menu,
  body .topbar [class*="dropdown"],
  body .navlinks [class*="menu"]{
    max-width:calc(100vw - 24px) !important;
  }
}

@media (max-width: 768px){
  /* General page shell */
  body{
    overflow-x:hidden !important;
  }

  body .topbar .container.nav{
    min-height:58px !important;
  }

  body .topbar .navlinks{
    order:3 !important;
    flex-basis:100% !important;
    width:100% !important;
    margin-top:0 !important;
    border-top:1px solid rgba(10,47,92,.08) !important;
    background:rgba(255,255,255,.96) !important;
  }

  body .topbar .nav{
    flex-wrap:wrap !important;
  }

  body .topbar .navlinks a,
  body .topbar .navlinks button,
  body .topbar .navlinks .nav-link{
    font-size:13.5px !important;
    padding:8px 10px !important;
    border-radius:999px !important;
    background:#f4f8ff !important;
    border:1px solid #d7e2f0 !important;
    color:#0b315f !important;
    text-decoration:none !important;
  }

  body .topbar .navlinks a[href*="order"],
  body .topbar .navlinks a[href*="apply"],
  body .topbar .navlinks .apply,
  body .topbar .navlinks .btn.red{
    background:#e53935 !important;
    color:#fff !important;
    border-color:#e53935 !important;
  }

  /* Homepage hero and checker stack */
  body .home-conversion-hero-grid,
  body .home-conversion-hero-grid-v295G,
  body .hero-grid,
  body .container.grid.two{
    grid-template-columns:1fr !important;
    gap:18px !important;
  }

  body .home-hero-copy,
  body .home-hero-copy-v295G{
    max-width:100% !important;
  }

  body .home-hero-actions,
  body .hero-actions{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px !important;
  }

  body .home-hero-actions .btn,
  body .hero-actions .btn{
    width:100% !important;
    justify-content:center !important;
    text-align:center !important;
    min-height:44px !important;
  }

  body .home-hero-side-stack-v289G,
  body .home-hero-side-stack-v295G,
  body .home-fee-preview-card,
  body .home-fee-preview-card-v289G,
  body .home-fee-preview-card-v295G,
  body .home-visa-checker-compact-card-v296G{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  body .home-hero-side-stack-v289G,
  body .home-hero-side-stack-v295G{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
  }

  body .compact-fee-fields,
  body .visa-checker-form{
    grid-template-columns:1fr !important;
    gap:10px !important;
  }

  body .compact-fee-bottom{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px !important;
  }

  body .compact-fee-bottom .btn,
  body .home-visa-checker-box-v296G .btn{
    width:100% !important;
    justify-content:center !important;
  }

  body .hero-plane-stage-v295G,
  body .hero-plane-stage-left-v407G{
    max-height:180px !important;
    min-height:0 !important;
    overflow:hidden !important;
  }

  body .home-key-services-carousel-v787DM{
    max-width:100% !important;
    overflow:hidden !important;
  }

  body .home-key-services-track-v787DM{
    display:flex !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch !important;
    scroll-snap-type:x proximity !important;
    gap:12px !important;
    padding-bottom:8px !important;
  }

  body .home-key-services-track-v787DM > *{
    flex:0 0 82% !important;
    max-width:82% !important;
    scroll-snap-align:start !important;
  }

  body .home-key-services-line-art-v792{
    display:none !important;
  }

  body .client-story-grid,
  body .home-partners-grid,
  body .footer-grid,
  body .vge-footer-grid-v787FL{
    grid-template-columns:1fr !important;
    gap:18px !important;
  }

  body .home-image-panel{
    max-height:180px !important;
    overflow:hidden !important;
    border-radius:0 !important;
  }

  /* Footer: stop legal links from squeezing into a broken line */
  body .footer{
    overflow:hidden !important;
  }

  body .vge-footer-bottom-v787GV,
  body .vge-footer-bottom-inner-v787GV{
    width:100% !important;
    max-width:100% !important;
  }

  body .vge-footer-bottom-inner-v787GV{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    gap:10px !important;
  }

  body .vge-footer-legal-links-v787GV{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:8px 12px !important;
    max-width:100% !important;
  }

  body .vge-footer-legal-links-v787GV a{
    overflow-wrap:anywhere !important;
  }

  body .footer a[href^="mailto:"],
  body .footer a[href^="tel:"]{
    overflow-wrap:anywhere !important;
  }

  /* Public bottom alerts/disclaimers */
  body .alert{
    padding:14px !important;
    border-radius:0 !important;
    font-size:13.5px !important;
    line-height:1.55 !important;
  }
}

@media (max-width: 480px){
  body .topbar .container.nav{
    padding-left:10px !important;
    padding-right:10px !important;
  }

  body .topbar .navlinks{
    gap:6px !important;
  }

  body .topbar .navlinks a,
  body .topbar .navlinks button,
  body .topbar .navlinks .nav-link{
    font-size:13px !important;
    padding:7px 9px !important;
  }

  body .home-key-services-track-v787DM > *{
    flex-basis:88% !important;
    max-width:88% !important;
  }

  body .hero-plane-stage-v295G,
  body .hero-plane-stage-left-v407G,
  body .home-image-panel{
    max-height:150px !important;
  }

  body .footer{
    font-size:13.5px !important;
  }
}

@media (max-width: 390px){
  body .topbar .navlinks a,
  body .topbar .navlinks button,
  body .topbar .navlinks .nav-link{
    font-size:12.5px !important;
    padding:7px 8px !important;
  }

  body .home-key-services-track-v787DM > *{
    flex-basis:92% !important;
    max-width:92% !important;
  }
}
