/* Global mobile refinements */
@media (max-width:640px){
  .section-box, .card, .apply-panel { border-radius:20px; }
  .section-box { padding:1.15rem 1rem 1.35rem; }
  .stats .stat h4 { font-size:1.4rem; }
}
@media (max-width:520px){
  .grid.cols-3, .grid.cols-2, .values, .safety-grid { grid-template-columns:1fr !important; }
  .stats { flex-direction:column; }
  .stats .stat { width:100%; }
}
@media (max-width:420px){
  h1, .about-hero h1, .careers-hero h1 { font-size:clamp(1.6rem,8vw,2rem) !important; }
  .nav-cta { font-size:.8rem !important; }
}

/* ===== Shared Mobile Optimizations (Added) ===== */
@media (max-width:780px){
  .pricing-wrapper, .careers-wrapper, .services-main, .testimonials-inner { padding-left:.9rem; padding-right:.9rem; }
  .section-box { margin-bottom:1.6rem; }
  .fare-grid, .jobs-grid, .benefits, .service-categories-grid { grid-template-columns:1fr !important; }
  .calc-wrap { grid-template-columns:1fr !important; }
}
@media (max-width:620px){
  .section-box h2, .booking-strip h2 { font-size:1.15rem !important; }
  .fare-card .price { font-size:1.45rem !important; }
  .apply-form input, .apply-form select, .apply-form textarea { font-size:.78rem; }
  .jobs-grid .job, .fare-card, .benefit, .card { padding:.95rem .85rem 1rem; border-radius:18px; }
  .booking-strip { padding:1.2rem 1rem 1.35rem !important; }
  .booking-actions .hero-btn, .booking-actions .btn { padding:.75rem 1.2rem; }
}
@media (max-width:540px){
  /* Make long tables scroll horizontally without breaking layout */
  table { display:block; width:100%; overflow-x:auto; }
  table thead { display:table; width:100%; }
  table tbody { display:table; width:100%; }
  th, td { white-space:nowrap; }
  .formula pre { font-size:.78rem; }
  .hero-btn { font-size:.9rem; }
}
@media (max-width:480px){
  .nav-menu { width:240px !important; left:-260px; } /* a bit wider for easier tap targets */
  .nav-menu li a { font-size:.8rem !important; }
  .hero-content h1 { font-size:1.15rem !important; }
  .how-card, .why-card { padding:1rem .75rem .95rem !important; }
  .how-card h3, .why-card h3 { font-size:1rem; }
  .how-card p, .why-card p { font-size:.8rem; }
}
@media (max-width:400px){
  .logo-home img, .main-nav.nav-shrink .logo-home img { width:40px !important; height:40px !important; }
  .menu-toggle { width:42px; height:42px; }
  .testimonial.chat .avatar { width:42px !important; height:42px !important; }
  .quote { font-size:.8rem !important; }
  .section-box, .apply-panel { padding:1rem .75rem 1.1rem !important; }
}
@media (max-width:360px){
  body { font-size:14px; }
  .nav-menu { width:100% !important; left:-100%; }
  .nav-menu.active { left:0; }
  .nav-menu li a { font-size:.78rem !important; }
  .booking-strip h2 { font-size:1.2rem !important; }
}

/* Prevent horizontal overflow from code blocks or long links */
pre, code { word-break:break-word; white-space:pre-wrap; }
pre { overflow:auto; }

/* Ensure images never overflow container */
img { max-width:100%; height:auto; }

/* Slightly tighter vertical rhythm on very small screens */
@media (max-width:480px){
  p, li { line-height:1.5; }
  .section-box h2 { margin-bottom:.8rem; }
}
