/* =====================================================================
   Staff Sense landing — responsive fixes (tablet + phone)
   Loaded after main.css. Mostly overrides layout that breaks on small
   screens; the few rules outside a media query (FAQ icon padding,
   progress label) fix bugs that existed at every width.
   Breakpoints: <=1199 small laptop/tablet landscape, <=991 tablet,
   <=767 phone, <=390 small phone.
   ===================================================================== */

/* Global safety net: nothing should ever create sideways scrolling */
html,
body {
  overflow-x: clip; /* unlike "hidden", keeps position: sticky working */
}
img,
video {
  max-width: 100%;
}

/* FAQ: the +/- icon is absolutely positioned (38px wide, 10px from the
   right) but the button only reserved 23px, so long questions ran under it */
.faq-three-accordion-button,
.faq-five-accordion-button,
.faq-three-accordion-button:focus {
  padding-inline-end: 60px !important;
}

/* Progress label: pinned to the bar's right end. Riding the fill edge
   made it sit on the label at 0% and hang off-screen at 100% */
.about-five-area .percentage {
  inset-inline-start: auto !important;
  inset-inline-end: 0;
  transform: none;
  width: auto;
  text-align: end;
}

/* Preloader "STAFFSENSE": keep the letters on one line at every width.
   At 30px + 15px letter-spacing it was ~420px wide and wrapped on phones. */
.preloader .preloader-heading .load-text {
  display: flex;
  white-space: nowrap;
  font-size: clamp(18px, 5.5vw, 30px);
  letter-spacing: clamp(4px, 2.2vw, 15px);
}

/* ---------- Small laptops / tablet landscape (992px – 1199px) ---------- */
@media screen and (max-width: 1199px) {
  /* Desktop nav (3 links | logo | 3 links) ran out of room and broke
     words mid-letter ("Platfo/rm") */
  .header-eight-menu > ul {
    gap: 28px !important;
  }
  .header-eight-menu .nav-menu__link {
    white-space: nowrap;
  }
  .header-eight-logo {
    padding-inline: 20px !important;
    max-width: 210px !important;
  }

  /* Hero: fixed-width title pushed the review block off-screen */
  .banner-five-wrapper {
    flex-wrap: wrap;
    gap: 32px !important;
  }
  .banner-five-title {
    width: min(730px, 100%) !important;
    max-width: 100% !important;
  }
}

/* ---------- Tablet & below (<= 991px) ---------- */
@media screen and (max-width: 991px) {
  /* Decorative 3D figures overlap headings once columns stack */
  .contact-five-shape-1,
  .contact-five-shape-2,
  .video-five-text-shape {
    display: none !important;
  }

  /* Footer columns: breathing room when they wrap */
  .footer-five-area .row {
    row-gap: 40px;
  }

  .faq-five-area {
    padding-block-start: 100px;
  }
  .faq-five-wrap {
    margin-block-end: 40px;
  }
}

/* ---------- Phones (<= 767px) ---------- */
@media screen and (max-width: 767px) {
  /* Consistent section rhythm */
  .py-140 {
    padding-block: 64px !important;
  }
  .pt-140 {
    padding-block-start: 64px !important;
  }
  .pb-140 {
    padding-block-end: 64px !important;
  }
  .section-five-title {
    font-size: clamp(2rem, 9vw, 2.75rem) !important;
    line-height: 1.12;
  }
  .section-five-wrapper {
    margin-block-end: 32px !important;
  }

  /* ---- Hero ---- */
  .banner-five-area {
    padding-block: 120px 48px;
  }
  .banner-five-wrapper {
    gap: 24px;
    margin-block-end: 28px !important;
  }
  .banner-five-title {
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(2.1rem, 10.5vw, 3.2rem) !important;
    min-height: 2.1em;
  }
  .banner-five-review {
    margin: 0 !important;
  }
  .banner-five-counter-item {
    padding: 14px 20px !important;
  }

  /* ---- About ---- */
  .about-five-area .tw-ms-15 {
    margin-inline-start: 0 !important;
  }
  .about-five-shape {
    display: none !important; /* decorative arrow sits on the CTA */
  }
  .about-five-rate {
    padding: 20px 22px !important;
  }

  /* ---- Video block ---- */
  .video-five-height,
  .video-five-bg {
    height: 300px !important;
  }
  .video-five-bg {
    width: 100% !important;
    object-fit: cover;
  }
  .video-five-button {
    width: 88px !important;
    height: 88px !important;
    font-size: 1.75rem !important;
  }
  .video-five-bottom-area {
    margin-block-start: -120px;
    padding-block: 180px 64px;
  }
  .video-five-bottom-paragraph {
    width: 100% !important;
    max-width: 100%;
  }
  .video-five-knob-progress {
    margin-block-start: 24px;
  }

  /* ---- Feature cards (stacked panels) ---- */
  .project-five-wrapper {
    flex-direction: column;
    gap: 16px !important;
    padding: 24px 20px !important;
  }
  .project-five-wrapper > .tw-mt-13 {
    display: none; /* square tick duplicates the check-circle */
  }
  .project-five-wrapper > .d-flex {
    width: 100%;
    gap: 16px;
  }
  .project-five-wrapper > .d-flex > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }
  .project-five-wrapper > .d-flex > div:last-child h3 {
    width: auto !important;
    font-size: 1.75rem !important;
  }
  .project-five-wrapper h3.tw-text-7 {
    font-size: 1.35rem !important;
    overflow-wrap: anywhere;
  }
  .project-five-paragraph {
    margin-inline-end: 0 !important;
  }

  /* ---- Contact ---- */
  .contact-five-title {
    font-size: clamp(2.25rem, 12vw, 3.5rem) !important;
  }
  .contact-five-thumb {
    margin-block-end: 24px;
  }
  .contact-five-thumb img {
    width: 100%;
    height: auto;
    border-radius: 12px;
  }
  .contact-five-wrapper {
    padding: 28px 18px !important;
  }
  .contact-five-wrapper .theme-btn {
    padding-inline: 28px !important;
  }

  /* ---- FAQ ---- */
  .faq-five-area {
    padding-block-start: 64px;
  }
  .faq-five-wrap {
    padding: 22px 20px;
  }
  .faq-five-accordion-button {
    font-size: 16px;
    line-height: 1.4;
    padding-inline-start: 20px !important;
  }

  /* ---- Newsletter / CTA banner ---- */
  .newletter-five-area {
    padding-block: 56px !important;
  }

  /* ---- Footer ---- */
  .footer-five-shape-2 {
    width: 150px !important;
    height: auto !important;
  }
  /* Larger tap area for footer links without changing their look */
  .footer-five-area ul a,
  .footer-five-area .border-top a,
  .footer-five-area a.hover-underline {
    display: inline-block;
    padding-block: 10px;
  }
  .footer-five-area ul li {
    margin-block-end: 0 !important;
  }

  /* Tap targets: buttons/links at least 44px */
  .theme-btn,
  .banner-five-btn {
    min-height: 44px;
  }
}

/* ---------- Small phones (<= 390px) ---------- */
@media screen and (max-width: 390px) {
  .banner-five-area {
    padding-block-start: 108px;
  }
  .theme-btn {
    padding-inline: 22px !important;
    gap: 12px !important;
  }
  .theme-btn-arrow-left,
  .theme-btn-arrow-right {
    width: 48px !important;
    height: 48px !important;
  }
}
