/*------------------------------------------------------------------
[Mobile Fixes - Xtreme Security]
Surgical mobile repairs. All rules scoped to mobile breakpoints.
Desktop layout is untouched. Loaded last in master.css so these win.
-------------------------------------------------------------------*/

/* ============ DESKTOP: hero slider text positioning ============ */
/* Replaces the old 490px inline padding-top hack */
#main-slider .sp-slide .container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding-bottom: 80px;
}
.xtreme-hero-title {
  color: #ffffff;
  font-size: 2.6em;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 14px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
}
.xtreme-hero-sub {
  color: #e9e9e9;
  font-size: 1.25em;
  line-height: 1.5;
  margin: 0 0 22px;
  max-width: 640px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}
#main-slider .sp-slide .sp-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#main-slider .sp-slide::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0));
  pointer-events: none;
}
#main-slider .sp-slide .container {
  z-index: 2;
}

/* ============ 375px and below: phones ============ */
@media (max-width: 767px) {

  /* Prevent any horizontal scrolling */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  /* ---------- 1. MOBILE NAV MENU: fix clipped text ---------- */
  /* Full-screen menu gets proper padding so no text touches viewport edges */
  .navbar-collapse.collapse.in {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    background-color: #0a0a0a !important;
    z-index: 10000 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 75px 24px 40px 24px !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
  .navbar-collapse.collapse.in .navbar-nav {
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    width: 100% !important;
  }
  .navbar-collapse.collapse.in .navbar-nav > li {
    display: block !important;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
  }
  .navbar-collapse.collapse.in .navbar-nav > li > a {
    display: block !important;
    width: 100% !important;
    padding: 16px 20px !important;
    font-size: 18px !important;
    line-height: 1.4 !important;
    letter-spacing: 0.04em !important;
    color: #ffffff !important;
    text-align: left !important;
    text-transform: uppercase !important;
    border-bottom: 1px solid #2a2a2a !important;
    white-space: normal !important;
    overflow: visible !important;
  }
  .navbar-collapse.collapse.in .navbar-nav > li > a:hover,
  .navbar-collapse.collapse.in .navbar-nav > li > a:focus {
    background-color: #1a1a1a !important;
    color: #f8d315 !important;
  }
  /* Dropdown submenus stack cleanly inside the mobile menu */
  .navbar-collapse.collapse.in .dropdown-menu {
    position: static !important;
    display: block !important;
    float: none !important;
    width: 100% !important;
    background-color: #141414 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .navbar-collapse.collapse.in .dropdown-menu > li > a {
    padding: 13px 20px 13px 36px !important;
    font-size: 15px !important;
    color: #cccccc !important;
    border-bottom: 1px solid #1f1f1f !important;
    white-space: normal !important;
  }

  /* Close (X) button inside the open mobile menu */
  .mobile-menu-close {
    display: block !important;
    position: absolute !important;
    top: 12px !important;
    right: 16px !important;
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    font-size: 26px !important;
    line-height: 1 !important;
    text-align: center !important;
    cursor: pointer !important;
    z-index: 10001 !important;
  }
  .mobile-menu-close:hover,
  .mobile-menu-close:focus {
    background: #f8d315 !important;
    border-color: #f8d315 !important;
    color: #111111 !important;
  }

  /* ---------- 6. HAMBURGER: bigger, visible, 44px touch target ---------- */
  .navbar-trigger {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 100 !important;
  }
  .navbar-toggle {
    display: block !important;
    min-width: 48px !important;
    min-height: 48px !important;
    padding: 13px 12px !important;
    margin: 0 !important;
    background-color: rgba(0, 0, 0, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 6px !important;
  }
  .navbar-toggle .icon-bar {
    display: block !important;
    width: 26px !important;
    height: 3px !important;
    margin: 0 auto 6px auto !important;
    background-color: #ffffff !important;
    border-radius: 2px !important;
  }
  .navbar-toggle .icon-bar:last-child {
    margin-bottom: 0 !important;
  }

  /* ---------- 2. LOGO: cap size on mobile ---------- */
  .logo__img,
  .home-logo-img,
  .logo img,
  a.logo img {
    max-width: 170px !important;
    width: auto !important;
    height: auto !important;
  }
  .logo {
    display: inline-block !important;
    max-width: 170px !important;
  }

  /* ---------- 7. TOP BAR: clean stacking, no cramped overlap ---------- */
  .header-top {
    padding: 12px 15px !important;
    text-align: center !important;
    height: auto !important;
  }
  .header-top .social-net {
    float: none !important;
    display: block !important;
    margin: 0 0 10px 0 !important;
    text-align: center !important;
  }
  .header-contact {
    float: none !important;
    display: block !important;
    text-align: center !important;
  }
  .header-contact__item {
    display: block !important;
    margin: 6px 0 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  .header-contact a {
    display: inline-block !important;
    padding: 6px 4px !important;
    font-size: 14px !important;
    word-break: break-all !important;
  }
  .header-contact h4 {
    margin: 8px 0 0 0 !important;
    padding: 0 !important;
  }
  .header-contact h4 img {
    width: 40px !important;
    height: auto !important;
    margin: 0 4px !important;
  }

  /* ---------- HERO SLIDER: readable, no overlaps ---------- */
  /* Slider height: fixed 800px is too tall on phones; tighten it */
  #main-slider,
  .main-slider.slider-pro {
    height: 640px !important;
    max-height: 640px !important;
  }
  .main-slider .sp-slides,
  .main-slider .sp-slide {
    height: 640px !important;
    max-height: 640px !important;
  }
  /* Headline: new hero classes, sane spacing, readable on phones */
  .xtreme-hero-title {
    padding-top: 170px !important;
    font-size: 30px !important;
    line-height: 1.25 !important;
    margin-bottom: 12px !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8) !important;
  }
  .xtreme-hero-sub {
    font-size: 16px !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8) !important;
  }
  /* 4. CTAs: stack vertically, full-width, no overlap, no truncation */
  .main-slider .btn,
  .main-slider .btn-home,
  .main-slider a.btn {
    display: block !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto 12px auto !important;
    padding: 15px 20px !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    text-align: center !important;
    white-space: normal !important;
    float: none !important;
  }
  /* Kill the old hacky absolute-style margins that caused collisions */
  .main-slider .btn-home {
    margin-top: 0 !important;
  }
  /* 5. Hide the duplicate slider-pro "Get in Touch" buttons on mobile.
     Each slide already has proper CTAs; these duplicates overlap. */
  .main-slider .main-slider__btn,
  .main-slider .sp-layer .main-slider__btn {
    display: none !important;
  }
  /* Ensure hero text sits above any decorative layers */
  .main-slider .container,
  .main-slider .row,
  .xtreme-hero-title,
  .xtreme-hero-sub {
    position: relative !important;
    z-index: 5 !important;
  }

  /* ---------- FLOATING QUOTE PILL: don't cover CTAs ---------- */
  .xtreme-float-quote {
    bottom: 14px !important;
    right: 14px !important;
    left: auto !important;
    font-size: 14px !important;
    padding: 13px 22px !important;
    z-index: 9000 !important;
    max-width: calc(100vw - 28px) !important;
  }

  /* ---------- GENERAL MOBILE POLISH ---------- */
  /* Section titles scale down */
  .ui-title-block {
    font-size: 28px !important;
    line-height: 1.3 !important;
  }
  /* 4-step section: stack steps */
  .b-advantages-4__item,
  .b-progress-list__item {
    width: 100% !important;
    float: none !important;
    display: block !important;
  }
  /* Footer: stack cleanly */
  .footer .footer-section__list li {
    width: 100% !important;
  }
  /* Images never overflow */
  img {
    max-width: 100% !important;
    height: auto !important;
  }
  /* Tables scroll instead of breaking layout */
  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  /* Jotform iframe: usable width, no sideways scroll */
  iframe[src*="jotform"],
  iframe[src*="forms.xtremesecurityinc.com"] {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 1000px !important;
  }
  /* Location pages: single column, readable */
  .city-list li {
    width: 100% !important;
  }
  /* Contact page: form fields full width */
  .form-control,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 16px !important; /* prevents iOS auto-zoom on focus */
  }
}

/* ============ 480px and below: small phones ============ */
@media (max-width: 480px) {
  .main-slider h4 {
    padding-top: 150px !important;
    font-size: 26px !important;
  }
  #main-slider,
  .main-slider.slider-pro,
  .main-slider .sp-slides,
  .main-slider .sp-slide {
    height: 600px !important;
    max-height: 600px !important;
  }
  .ui-title-block {
    font-size: 24px !important;
  }
  .xtreme-float-quote {
    font-size: 13px !important;
    padding: 12px 18px !important;
  }
}

/* ============ 768px breakpoint: tablets / large phones ============ */
@media (min-width: 768px) and (max-width: 991px) {
  /* Tablet: keep menu usable, logo sane */
  .logo__img,
  .home-logo-img,
  a.logo img {
    max-width: 220px !important;
    height: auto !important;
  }
  .main-slider h4 {
    font-size: 34px !important;
    line-height: 1.3 !important;
  }
  /* Stack hero CTAs on tablet too if they'd collide */
  .main-slider .btn-home {
    margin-top: 0 !important;
  }
  .navbar-toggle {
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 11px 10px !important;
  }
  html, body {
    overflow-x: hidden !important;
  }
}

/*------------------------------------------------------------------
[Mobile Fixes - Xtreme Security] DEFINITIVE PASS 2 (appended)
Complete mobile overhaul. All rules scoped to mobile breakpoints.
Desktop layout is untouched. Builds on Pass 1 above — no duplication.
-------------------------------------------------------------------*/

/* ============ 767px and below: phones — Pass 2 ============ */
@media (max-width: 767px) {

  /* ---------- GLOBAL SAFETY NET ---------- */
  /* Long words/URLs wrap instead of breaking layout */
  p, li, span, div, h1, h2, h3, h4, h5, h6, a {
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
  }
  /* Body bottom padding so the floating quote pill never covers footer content */
  body {
    padding-bottom: 90px !important;
  }

  /* ---------- HEADINGS: proportional scale-down ---------- */
  h1, .b-title-page {
    font-size: clamp(24px, 7vw, 32px) !important;
    line-height: 1.25 !important;
  }
  h2 {
    font-size: clamp(21px, 6vw, 28px) !important;
    line-height: 1.3 !important;
  }
  h3 {
    font-size: clamp(18px, 5vw, 23px) !important;
    line-height: 1.35 !important;
  }

  /* ---------- FEATURE BOXES: full-width stacked cards ----------
     Fixes the "narrow right-aligned strips" bug. Pass 1 set the item
     to full width; these rules fix the INNER label/name elements
     that were floating and squeezing the text to one side. */
  .b-progress {
    padding: 30px 0 !important;
  }
  .b-progress-list {
    display: block !important;
    width: 100% !important;
    padding: 0 15px !important;
    margin: 0 !important;
    list-style: none !important;
  }
  .b-progress-list__item {
    padding: 20px 18px !important;
    margin-bottom: 14px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    border-radius: 8px !important;
  }
  .b-progress-list__label {
    display: block !important;
    float: none !important;
    width: auto !important;
    margin: 0 auto 10px auto !important;
    padding: 0 !important;
    text-align: center !important;
  }
  .b-progress-list__label i {
    font-size: 2.2em !important;
  }
  .b-progress-list__name {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    letter-spacing: 0.03em !important;
    white-space: normal !important;
  }

  /* ---------- CITIES-SECTION (Contractor Check banner): no truncation ---------- */
  .cities-section {
    padding: 35px 20px !important;
    text-align: center !important;
  }
  .container-cities {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }
  .container-cities h4 {
    font-size: clamp(17px, 5vw, 22px) !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    padding: 0 5px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  /* ---------- BUTTONS: 48px min-height, no truncation ---------- */
  .btn, .btn-default, .btn-primary, .btn-effect,
  a.btn, button.btn, input[type="submit"].btn {
    min-height: 48px !important;
    margin-bottom: 12px !important;
    line-height: 1.4 !important;
  }

  /* ---------- GALLERY: single column ---------- */
  .gallery-grid {
    display: block !important;
  }
  .gallery-item {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    margin: 0 0 12px 0 !important;
  }
  .gallery-item img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* ---------- FOOTER: clean stacking, addresses wrap ---------- */
  .footer__main, .footer-main-section,
  .footer-main-section_left, .footer-main-section_right {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    text-align: center !important;
  }
  .footer__contact {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 8px !important;
  }
  .footer-section__list,
  .footer .list-unstyled {
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
  }
  /* Footer newsletter form: stack input + button */
  .footer-form {
    display: block !important;
    width: 100% !important;
    max-width: 340px !important;
    margin: 0 auto !important;
  }
  .footer-form__input {
    display: block !important;
    width: 100% !important;
    margin-bottom: 10px !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
  }
  .footer-form .btn, .footer-form button {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ---------- FORMS: labels above inputs, rows stack ---------- */
  label {
    display: block !important;
    margin-bottom: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
  }
  .ui-form .row > [class*="col-"] {
    width: 100% !important;
    float: none !important;
  }
  textarea.form-control, textarea {
    min-height: 120px !important;
  }

  /* ---------- IFRAMES: maps + jotform ---------- */
  iframe {
    max-width: 100% !important;
  }
  iframe[src*="google.com/maps"],
  iframe[src*="maps"] {
    width: 100% !important;
    height: 300px !important;
  }

  /* ---------- SECTIONS: breathing room ---------- */
  .section-default .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* ---------- MISC TEMPLATE PATTERNS ---------- */
  .b-advantages-1-item {
    margin-bottom: 24px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    text-align: center !important;
  }
  .b-reviews__item, .reviews__item {
    padding: 20px 15px !important;
  }
  /* Brand logo strip: wrap instead of squeeze */
  .b-brands__item {
    display: inline-block !important;
    width: 46% !important;
    margin: 2% !important;
    vertical-align: middle !important;
  }
  .breadcrumb {
    white-space: normal !important;
    font-size: 13px !important;
    padding: 10px 15px !important;
  }
  .b-title-page__wrap, .section-title-page {
    padding: 30px 15px !important;
  }
  /* Location/service page side images: spacing when stacked */
  .section-default .row > [class*="col-sm-6"] img.img-responsive {
    margin-bottom: 20px !important;
  }
}

/* ============ 480px and below: small phones — tighten further ============ */
@media (max-width: 480px) {
  .b-progress-list__item {
    padding: 18px 14px !important;
  }
  .b-progress-list__name {
    font-size: 14px !important;
  }
  .container-cities h4 {
    font-size: 17px !important;
  }
  .xtreme-float-quote {
    font-size: 13px !important;
    padding: 12px 18px !important;
    bottom: 12px !important;
    right: 12px !important;
  }
  body {
    padding-bottom: 80px !important;
  }
}

/* ============ 768px–991px: tablets ============ */
@media (min-width: 768px) and (max-width: 991px) {
  .gallery-item {
    flex: 1 1 calc(50% - 10px) !important;
  }
  .b-progress-list__item {
    width: 100% !important;
    float: none !important;
    display: block !important;
    margin-bottom: 12px !important;
  }
  .b-progress-list__label {
    float: none !important;
    display: block !important;
    text-align: center !important;
    margin-bottom: 8px !important;
  }
  .b-progress-list__name {
    display: block !important;
    width: 100% !important;
    float: none !important;
    text-align: center !important;
  }
}

/* ---- Content v2: real stats, trust banner, field photos (mobile) ---- */
@media (max-width: 767px) {
  .xtreme-stats > div {
    margin-bottom: 18px !important;
  }
  .xtreme-stats div[style*="font-size: 2.6em"],
  .xtreme-stats div[style*="font-size: 2.4em"],
  .xtreme-stats div[style*="font-size: 2.2em"] {
    font-size: 2em !important;
  }
  .xtreme-field-photos img {
    height: 170px !important;
  }
}
@media (max-width: 480px) {
  .xtreme-field-photos .col-xs-6 {
    width: 100% !important;
  }
  .xtreme-field-photos img {
    height: auto !important;
    max-height: 260px;
  }
}

/* ---- Interactive v3: city hero images ---- */
.section-title-page {
  position: relative;
  overflow: hidden;
  background-color: #141414;
}
.section-title-page .bg-slideshow {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  z-index: 0;
}
.section-title-page .bg-slideshow > li {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}
.section-title-page .bg-slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}
.section-title-page .parallax__inner {
  position: relative;
  z-index: 2;
  padding: 64px 0;
}
.section-title-page .parallax__inner::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.62), rgba(0,0,0,0.55));
  z-index: 0;
}
.section-title-page .parallax__inner .container {
  position: relative;
  z-index: 1;
}
.b-title-page {
  color: #ffffff !important;
  text-shadow: 0 2px 12px rgba(0,0,0,0.55);
  font-size: 40px;
  line-height: 1.15;
  margin-top: 0;
}
.b-title-page__info {
  color: rgba(255,255,255,0.88) !important;
  font-size: 17px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.section-title-page .breadcrumb {
  background: transparent;
}
.section-title-page .breadcrumb > li,
.section-title-page .breadcrumb > li > a {
  color: rgba(255,255,255,0.75);
}
.section-title-page .breadcrumb > .active {
  color: #f8d315;
}
/* French lead paragraph on Quebec pages */
.fr-lead {
  background: #f7f7f7;
  border-left: 4px solid #f8d315;
  padding: 14px 18px;
  font-size: 16px;
  line-height: 1.6;
  margin: 18px 0;
}
@media (max-width: 767px) {
  .section-title-page .parallax__inner {
    padding: 44px 0;
  }
  .b-title-page {
    font-size: 30px !important;
    line-height: 1.2;
  }
  .b-title-page__info {
    font-size: 15px;
  }
}
@media (max-width: 480px) {
  .b-title-page {
    font-size: 26px !important;
  }
}

/* ---- Interactive v3: chat widget + mobile cities menu guardrails ---- */
#xtc-bubble {
  bottom: 20px !important;
  left: 20px !important;
  right: auto !important;
}
#xtc-panel {
  left: 16px !important;
  right: auto !important;
}
@media (max-width: 480px) {
  #xtc-bubble {
    bottom: 16px !important;
    left: 16px !important;
    width: 56px !important;
    height: 56px !important;
  }
  #xtc-panel {
    width: calc(100vw - 32px) !important;
    max-width: 340px;
    max-height: 65vh !important;
    bottom: 84px !important;
  }
  #xtc-body {
    max-height: calc(65vh - 120px);
    overflow-y: auto;
  }
  .xtreme-cities-scroll {
    max-height: 38vh !important;
  }
}

/* ============ CRITICAL: Override broken responsive.css mobile rules ============ */
/* These rules in responsive.css use hacky fixed margins that cause overlapping */
@media (max-width: 767px) {
  /* Kill the negative margin pulling logo over hero */
  .logo__img {
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
  }
  /* Center logo properly instead of 50% left margin hack */
  .home-logo-img {
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 140px !important;
    height: auto !important;
    max-width: 140px !important;
  }
  a.logo {
    display: block !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 10px 0 !important;
  }
  /* Fix header button insane margins */
  .header-main__btn,
  .askbutton_home,
  .askbutton_down {
    margin: 10px 0 !important;
    display: inline-block !important;
  }
  /* Header layout: clean flexbox, no overlap */
  .header-main .container .row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .header-main .col-xs-12 {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }
  /* Ensure header doesn't overlap slider */
  .header-main {
    position: relative !important;
    z-index: 100 !important;
    background: #0a0a0a !important;
  }
  #main-slider {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 0 !important;
  }
  /* Hero text breathing room */
  .main-slider .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* ============ MOBILE HERO: Replace broken JS slider with static hero ============ */
@media (max-width: 767px) {
  /* Kill slider-pro JS layout — show first slide as static hero */
  #main-slider.main-slider.slider-pro,
  #main-slider {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  #main-slider .sp-slides,
  #main-slider .sp-slide {
    height: auto !important;
    max-height: none !important;
    position: relative !important;
  }
  /* Hide all slides except first */
  #main-slider .sp-slide:not(:first-child) {
    display: none !important;
  }
  #main-slider .sp-slide:first-child {
    display: block !important;
    position: relative !important;
  }
  /* Hero image as background */
  #main-slider .sp-slide:first-child .sp-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 0 !important;
  }
  /* Dark overlay for text readability */
  #main-slider .sp-slide:first-child::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.55) !important;
    z-index: 1 !important;
  }
  /* Content positioning */
  #main-slider .sp-slide:first-child .container {
    position: relative !important;
    z-index: 2 !important;
    padding-top: 60px !important;
    padding-bottom: 60px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  #main-slider .sp-slide:first-child h4 {
    padding-top: 0 !important;
    margin-top: 0 !important;
    font-size: 28px !important;
    line-height: 1.3 !important;
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8) !important;
  }
  #main-slider .sp-slide:first-child h5 {
    font-size: 16px !important;
    color: #ddd !important;
    margin-bottom: 24px !important;
  }
  /* Hide slider-pro nav elements */
  #main-slider .sp-arrows,
  #main-slider .sp-buttons,
  #main-slider .sp-grab,
  #main-slider .sp-selectable {
    display: none !important;
  }
  /* Floating quote pill: move above chat bubble */
  .xtreme-float-quote {
    bottom: 90px !important;
    right: 14px !important;
  }
}

/* ============ BADGE PILLS: prevent horizontal overflow on mobile ============ */
@media (max-width: 767px) {
  /* Yellow badge pills in Retail section were cut off on the right */
  .b-progress-list__name,
  [class*="badge"],
  .yellow-badge {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    padding: 10px 14px !important;
  }
  /* Ensure badge containers don't overflow */
  .b-progress-list,
  .b-progress-list__item {
    max-width: 100% !important;
    overflow: hidden !important;
  }
}

/* ============ MOBILE: Fix hero clutter and overlapping ============ */
@media (max-width: 767px) {
  /* Hide the top header bar email/phone on mobile to reduce clutter */
  .header-topbar,
  .top-header,
  .header-top {
    display: none !important;
  }
  /* Trust banner: clean spacing, no overlap */
  section[style*="background-color: #111"] {
    padding: 24px 16px !important;
  }
  section[style*="background-color: #111"] .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* Floating quote button: keep clear of content */
  .xtreme-float-quote {
    bottom: 100px !important;
    right: 12px !important;
    font-size: 13px !important;
    padding: 10px 16px !important;
    z-index: 999 !important;
  }
  /* Chat widget: bottom left, don't cover text */
  .xtreme-chat-widget,
  #xtreme-chat {
    bottom: 16px !important;
    left: 12px !important;
    z-index: 998 !important;
  }
  /* How-it-works steps: proper spacing on mobile */
  .section-default .col-xs-12 {
    margin-bottom: 30px !important;
  }
}

/* ============ MOBILE: Clean header top bar layout ============ */
@media (max-width: 767px) {
  /* Top bar: stack cleanly, no overlap */
  .header-top .container,
  .header-top .row,
  .header-top .col-xs-12 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .social-net {
    text-align: center !important;
    margin-bottom: 8px !important;
  }
  .social-net__item {
    margin: 0 8px !important;
  }
  .header-contact {
    text-align: center !important;
    margin-top: 4px !important;
  }
  .header-contact__item {
    display: block !important;
    margin-bottom: 4px !important;
    font-size: 14px !important;
  }
  .header-contact a {
    display: inline-block !important;
    font-size: 14px !important;
    word-break: break-all !important;
  }
  /* Trust banner: single clean headline */
  section[style*="background-color: #111"] > .container {
    max-width: 100% !important;
  }
}

/* ============ MOBILE: hero contact banner, logo grid, locations ============ */
@media (max-width: 767px) {
  /* Hero contact banner: stack CTA and email cleanly */
  .xtreme-hero-contact {
    padding: 26px 16px !important;
  }
  .xtreme-hero-contact h2 {
    font-size: 1.3em !important;
  }
  .xtreme-hero-contact-row {
    flex-direction: column !important;
    gap: 12px !important;
  }
  .xtreme-hero-contact-row a[href^="tel:"] {
    width: 100% !important;
    max-width: 320px !important;
    text-align: center !important;
  }
  .xtreme-hero-contact .social-net {
    text-align: center !important;
  }
  .xtreme-hero-contact .social-net__item {
    margin: 0 10px !important;
  }
  /* Client logo grid: 2 columns on phones */
  .xtreme-client-logos > div[style*="grid"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 8px !important;
  }
  .xtreme-client-logos img {
    max-width: 130px !important;
  }
  /* Locations SEO grid: single column on phones */
  .xtreme-locations-seo > .container > div[style*="grid"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  /* Locations SEO grid: 2 columns on tablets */
  .xtreme-locations-seo > .container > div[style*="grid"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
