/* Shared chrome fixes for separation.lendology.com.au (29 Oct 2026).
   Restores the intended mobile behaviour of the inline-styled nav and footer
   on every template, and keeps the safety banner visible. Bump ?v= on change. */

/* The per-page rule ".site-nav div:nth-child(2){display:none}" also matched the
   safety banner (the nav's 2nd child), hiding it on phones. Keep it visible. */
#safety-banner{display:block !important}
#safety-banner.hidden{display:none !important}

@media (max-width:768px){
  /* Nav: hide the desktop link row and phone number, keep logo + Book button */
  .site-nav > div:first-child > div:nth-child(2),
  .nav .nav-links{display:none !important}
  .site-nav > div:first-child > div:last-child > a[href^="tel:"],
  .nav .nav-phone{display:none !important}
  .site-nav > div:first-child{padding:0 16px !important}
  .nav .nav-inner{padding:0 16px}

  /* Footer: stack the 4-column grid */
  footer div[style*="grid-template-columns:1.5fr 1fr 1fr 1fr"]{grid-template-columns:1fr 1fr !important;gap:1.5rem !important}
  footer div[style*="grid-template-columns:1.5fr 1fr 1fr 1fr"] > div:first-child{grid-column:1 / -1}
  footer > div[style*="padding:0 28px"]{padding:0 18px !important}
}
@media (max-width:600px){
  footer div[style*="grid-template-columns:1.5fr 1fr 1fr 1fr"]{grid-template-columns:1fr !important}
}

@media (max-width:600px){
  /* "The part we handle" 3-card row and other inline 3-column grids stack on phones */
  [style*="grid-template-columns:1fr 1fr 1fr"],
  [style*="grid-template-columns:repeat(3,1fr)"]{grid-template-columns:1fr !important}
  /* Wide comparison tables scroll inside their column instead of widening the page */
  table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  /* Calculator headers: the right-hand label does not fit beside the logo */
  .hdr-top{padding-left:16px !important;padding-right:16px !important;gap:12px}
  .hdr-label{display:none}
}
@media (max-width:480px){
  /* State page stat cards: long values need the full width */
  .stat-row{grid-template-columns:1fr !important}
}

@media (max-width:768px){
  /* Two-column "info + form" layouts (contact, guide download) stack */
  [style*="display:grid;grid-template-columns:1fr 1fr;gap:2.5rem"]{grid-template-columns:1fr !important}
  [style*="display:grid;grid-template-columns:1fr 1fr;gap:2.5rem"] > *{min-width:0}
}
@media (max-width:420px){
  /* Homepage nav: logo + Book button + menu button must fit a 375px screen */
  .nav .logo img{height:22px !important}
  .nav .hamburger{margin-left:4px}
}

@media (max-width:420px){
  /* Inline-styled nav: smaller logo so the Book button stays on one line */
  .site-nav > div:first-child > a:first-child img{height:22px !important}
  .site-nav > div:first-child > div:last-child > a{white-space:nowrap}
}
