/* Sticky footer layout utility */
body.qjk-bs{
  min-height:100dvh;
  display:flex;
  flex-direction:column;
}
body.qjk-bs>main{flex:1 0 auto;}
body.qjk-bs>.qjk-footer{margin-top:auto;}

/* Fix conflict with page-fade utility which forces `display:block` via a less-specific stylesheet.
   When body also has a page-fade class (page-fade-init / page-fade-in / page-fade-out), ensure
   the flex layout is preserved so the footer stays at the bottom for short pages. */
body.qjk-bs[class*="page-fade"]{
  display:flex !important;
  flex-direction:column;
  min-height:100dvh;
}
body.qjk-bs[class*="page-fade"] > main{ flex:1 0 auto; }

/* For pages that already add margin-top on footer via utility classes keep consistency */
body.qjk-bs .qjk-footer.mt-5{margin-top:3rem;}

/* Compact footer spacing override (was margin-top 3rem + padding-top 3rem via utilities) */
.qjk-footer.mt-5{margin-top:2rem!important;}
.qjk-footer.pt-5{padding-top:2rem!important;}

@media (max-width:768px){
  .qjk-footer.mt-5{margin-top:1.5rem!important;}
  .qjk-footer.pt-5{padding-top:1.6rem!important;}
}

/* Override Bootstrap .bg-dark tone */
.bg-dark{
  --bs-bg-opacity:1;
  background-color:rgb(30,43,55)!important;
}

/* Scroll-to-top button positioning enforcement
   Note: Most styles are in style.css - these are just critical overrides */
#scrollToTop {
  position: fixed !important;
  z-index: 999999 !important;
}

#scrollToTop.is-visible {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

/* Reduce will-change memory budget usage by avoiding persistent will-change on elements.
   We explicitly reset will-change to auto for elements that previously declared it.
   If specific animations need promotion, consider adding will-change dynamically in JS
   right before the animation and removing it after transitionend. */
.qjk-header-v2,
.qjk-mobile-menu-v2 .qjk-submenu-v2,
.modal-dialog,
.hero,
.qjk-mobile-menu-v2,
.qjk-footer,
.card,
.qjk-bs .contact-card {
  will-change: auto !important;
}
