/* Killara Plumbing — sitewide layout grid (2026-11). One container width for header, footer and homepage sections. */
:root{
  --kp-max:1440px;
  --kp-gutter:40px;
  --kp-pad:max(var(--kp-gutter), calc((100% - var(--kp-max)) / 2));
  --kp-navy:#0d254b;
  --kp-blue:#0095db;
  --kp-blue-dark:#0061a3;
  --kp-ink:#1b2333;
  --kp-muted:#4a5568;
  --kp-line:#dfe6ef;
  --kp-tint:#f2f6fb;
  --kp-radius:14px;
}
@media (max-width:991px){ :root{ --kp-gutter:24px; } }
@media (max-width:640px){ :root{ --kp-gutter:16px; } }

/* Header: keep the full-width colour bar, constrain the content to the grid */
header#masthead .nav-wrapper{ padding:0 var(--kp-pad); box-sizing:border-box; }
header#masthead .nav-wrapper .logo{ padding:8px 0; display:flex; align-items:center; }
header#masthead .nav-wrapper .left_side,
header#masthead .nav-wrapper .right_side{ margin-left:0; margin-right:0; }

/* Footer content on the same grid */
footer#footer .footer_inner{ padding-left:var(--kp-pad); padding-right:var(--kp-pad); box-sizing:border-box; }

/* Header sides size to content (page CSS uses unscoped .left_side/.right_side widths) */
header#masthead .nav-wrapper{ display:flex; align-items:center; justify-content:space-between; gap:24px; }
header#masthead .nav-wrapper > .left_side{ width:auto !important; flex:1 1 auto; min-width:0; }
header#masthead .nav-wrapper > .right_side{ width:auto !important; flex:0 0 auto; }
header#masthead .main_navigation a{ white-space:nowrap; }

/* Desktop dropdowns: anchor to their menu item + hover bridge (no gap that closes the menu) */
@media (min-width:992px){
  header#masthead .nav-wrapper > .left_side{ align-self:stretch; display:flex; align-items:stretch; }
  header#masthead .main_navigation,
  header#masthead .main_navigation > div,
  header#masthead .main_navigation ul.main_navigation_inner,
  header#masthead .main_navigation ul.main_navigation_inner > li{ height:auto !important; align-self:stretch; }
  header#masthead .main_navigation ul.main_navigation_inner{ display:flex; align-items:stretch; }
  header#masthead .main_navigation ul.main_navigation_inner > li{ position:relative; display:flex; align-items:center; }
  header#masthead .main_navigation ul.main_navigation_inner > li > ul.sub-menu{ top:100% !important; left:-3rem; margin-top:0 !important; z-index:50; }
  header#masthead .main_navigation ul.main_navigation_inner > li > ul.sub-menu::before{ content:""; position:absolute; left:0; right:0; top:-14px; height:14px; }
}

/* Header content exactly on the grid edges (theme added 50px side padding + centred flex) */
@media (min-width:992px){
  header#masthead .nav-wrapper > .left_side{ padding-left:0 !important; padding-right:0 !important; justify-content:flex-start !important; gap:40px; }
  header#masthead .nav-wrapper > .left_side > .logo{ margin:0 !important; flex:0 0 auto; }
  header#masthead .nav-wrapper > .left_side > .main_navigation{ margin:0 !important; }
  header#masthead .nav-wrapper > .right_side{ padding-left:0 !important; padding-right:0 !important; }
}

/* Before-footer CTA (sitewide): navy band full width, photo + copy on the grid */
.before_footer_cta{ padding:88px var(--kp-pad) !important; gap:64px; align-items:center !important; box-sizing:border-box; }
.before_footer_cta > .left_side{ flex:0 0 40%; width:40% !important; align-self:stretch; min-height:340px; position:relative; }
.before_footer_cta > .left_side img{ position:absolute; inset:0; width:100% !important; height:100% !important; object-fit:cover; border-radius:var(--kp-radius); }
.before_footer_cta > .right_side{ flex:1 1 auto; width:auto !important; padding:0 !important; gap:48px; align-items:center; justify-content:space-between; }
.before_footer_cta > .right_side > .right_side_left{ flex:1 1 auto; width:auto !important; }
.before_footer_cta > .right_side > .right_side_right{ flex:0 0 auto; width:auto !important; }
@media (max-width:991px){
  .before_footer_cta{ flex-direction:column !important; padding:56px var(--kp-gutter) !important; gap:28px; }
  .before_footer_cta > .left_side{ width:100% !important; flex:none; min-height:240px; }
  .before_footer_cta > .right_side{ flex-direction:column; align-items:flex-start; gap:24px; }
}
/* footer CTA: drop the decorative 24/7 block */
.before_footer_cta .right_side_right{ display:none !important; }
.before_footer_cta > .right_side{ justify-content:flex-start !important; }
/* Dropdown sizes to its longest item */
@media (min-width:992px){
  header#masthead .main_navigation ul.main_navigation_inner > li > ul.sub-menu{ width:auto !important; min-width:300px; padding:22px 28px !important; border-radius:0 0 12px 12px; box-shadow:0 18px 40px rgba(13,37,75,.18); }
  header#masthead .main_navigation ul.main_navigation_inner > li > ul.sub-menu a{ white-space:nowrap; display:block; padding:4px 0; }
  header#masthead .main_navigation ul.main_navigation_inner > li > ul.sub-menu a:hover{ text-decoration:underline; }
}
