/* 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 .logo img[src*="mortgage-brokers"]{height:32px !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 > a:first-child img[src*="mortgage-brokers"]{height:32px !important}
  .site-nav > div:first-child > div:last-child > a{white-space:nowrap}
}
@media (max-width:480px){
  /* Pages whose header button had a long label overflowed a 375px
     screen and pushed Quick Exit off the edge (7 Nov 2026): tighter gutter,
     smaller pill, phone number lives in the menu instead. */
  .site-nav > div:first-child{padding:0 14px !important}
  .site-nav > div:first-child > div:last-child{gap:6px !important}
  .site-nav > div:first-child > div:last-child > a[href^="tel:"]{display:none !important}
  .site-nav > div:first-child > div:last-child > a:not([href^="tel:"]){padding:8px 12px !important;font-size:12px !important}
  .site-nav .sep-ham{margin-left:2px;padding:11px 6px;min-width:36px}
}
@media (max-width:380px){
  .site-nav > div:first-child > a:first-child img{height:20px !important}
  .site-nav > div:first-child > a:first-child img[src*="mortgage-brokers"]{height:31px !important}
}
@media (max-width:340px){
  /* Very small phones: the header button is also in the menu */
  .site-nav > div:first-child > div:last-child > a:not([href^="tel:"]){display:none !important}
}

/* Phone menu for the inline-styled header (30 Oct 2026, built by js/sep-nav.js).
   Same look as the separation home page's menu. */
.sep-ham{display:none;background:none;border:none;cursor:pointer;padding:11px;margin-left:8px;flex-shrink:0;min-width:44px;min-height:44px}
.sep-ham span{display:block;width:22px;height:2px;background:#fff;border-radius:2px;transition:all .3s;margin:5px 0}
.sep-ham.open span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.sep-ham.open span:nth-child(2){opacity:0}
.sep-ham.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
.sep-mm{display:none;position:fixed;top:0;left:0;right:0;bottom:0;z-index:199;background:#0d1c2b;flex-direction:column;padding:80px 28px 40px;overflow-y:auto;font-family:'DM Sans',system-ui,sans-serif;animation:sepMmIn .25s ease}
.sep-mm.active{display:flex}
@keyframes sepMmIn{from{opacity:0;transform:translateY(-12px)}to{opacity:1;transform:translateY(0)}}
.sep-mm a{color:rgba(255,255,255,0.8);text-decoration:none;font-size:18px;font-weight:500;padding:14px 0;min-height:44px;border-bottom:1px solid rgba(255,255,255,0.06);transition:color .2s;display:flex;align-items:center}
.sep-mm a:hover,.sep-mm a:focus{color:#1edcaa}
.sep-mm .sep-mm-cta{margin-top:24px;padding:14px 28px;border-radius:100px;border:none;background:#1edcaa;color:#12253a;font-size:16px;font-weight:800;text-align:center;text-decoration:none;display:block;justify-content:center}
.sep-mm .sep-mm-phone{margin-top:16px;justify-content:center;font-size:15px;color:rgba(255,255,255,0.5);border-bottom:none}
@media (max-width:768px){
  .sep-ham{display:block}
  .site-nav > div:first-child{position:relative;z-index:201}
}
