/* ==========================================================================
   Rank ABC — site fixes
   Scoped corrections for the approved theme. Loaded after style.css on every
   page. Nothing here changes the layout language: it only fixes three defects.

   1. `.btn-style-one` in the 404 / error pages rendered a black dot because
      style.css styles `.btn-style-one > span:last-child` as a 36px dark circle.
      The 404 markup uses <span class="btn-title"> as the last child, so the text
      was swallowed by that circle.
   2. The back-to-top button sat at right:50/bottom:50 and overlapped the unified
      contact launcher (right:28 / bottom:85 / 54px). It now sits beside it.
   3. The 4-step framework section on /services uses `.work-section.pt-0`, which
      removed its top padding and left the block cramped.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Button text must never become a circle
   -------------------------------------------------------------------------- */
.theme-btn.btn-style-one > span.btn-title,
.btn-style-one > span.btn-title {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  line-height: inherit !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  color: inherit !important;
  display: inline !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  flex-shrink: 1 !important;
}
.theme-btn.btn-style-one:hover > span.btn-title,
.btn-style-one:hover > span.btn-title {
  background: transparent !important;
  color: inherit !important;
}
/* Keep a real arrow/icon child as the circular badge it was designed to be. */
.theme-btn.btn-style-one > span:last-child:not(.btn-title),
.btn-style-one > span:last-child:not(.btn-title) {
  /* unchanged — style.css already handles it */
}

/* --------------------------------------------------------------------------
   2. Floating buttons: side by side, never overlapping
   -------------------------------------------------------------------------- */
.back-to-top-wrapper {
  right: 92px !important;   /* left of the contact launcher (right 28 + 54px + gap) */
  z-index: 989 !important;  /* just under the launcher so it never covers it */
}
.back-to-top-wrapper.back-to-top-btn-show {
  bottom: 88px !important;  /* aligns with the launcher's vertical centre */
}

/* Tablet / small desktop */
@media (max-width: 991px) {
  .back-to-top-wrapper { right: 88px !important; }
  .back-to-top-wrapper.back-to-top-btn-show { bottom: 84px !important; }
}

/* Mobile: launcher is right 18 / bottom 78 / 48px */
@media (max-width: 767px) {
  .back-to-top-wrapper { right: 74px !important; }
  .back-to-top-wrapper.back-to-top-btn-show { bottom: 78px !important; }
  .back-to-top-btn { width: 40px !important; height: 40px !important; line-height: 40px !important; }
}

/* Very narrow screens: keep both inside the viewport */
@media (max-width: 380px) {
  .back-to-top-wrapper { right: 68px !important; }
}

/* The launcher's open panel is wider than the button row — make sure the
   back-to-top never floats above it. (`:has()` is progressive enhancement;
   older browsers simply keep the button visible.) */
body:has(.ra-contact.is-open) .back-to-top-wrapper {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* --------------------------------------------------------------------------
   3. Spacing for the 4-step framework (Forensic Audit / Roadmap / Execution…)
      Only the variant that opted out of top padding is affected.
   -------------------------------------------------------------------------- */
.work-section.pt-0 {
  padding-top: 80px !important;
  padding-bottom: 90px !important;
}
@media (max-width: 991px) {
  .work-section.pt-0 { padding-top: 60px !important; padding-bottom: 70px !important; }
}
@media (max-width: 767px) {
  .work-section.pt-0 { padding-top: 46px !important; padding-bottom: 56px !important; }
}

/* Titles inside that section need a little more breathing room on mobile. */
@media (max-width: 767px) {
  .work-section .sec-title { margin-bottom: 28px; }
  .work-section .work-block { margin-bottom: 20px !important; }
  .work-section .work-block:last-child { margin-bottom: 0 !important; }
}
