/*
 * Hudson MSP global page-shell and footer spacing system
 * Scope: redesigned HTML-widget pages using hmsp-/hst- wrappers.
 * Rollback: deactivate this WPCode snippet.
 */

:root{
  --hmsp-section-space-desktop:80px;
  --hmsp-section-space-tablet:64px;
  --hmsp-section-space-mobile:52px;
}

/* Preserve the WordPress admin-toolbar offset if page-level shell CSS resets html margins. */
@media screen {
  html:has(body.admin-bar){
    margin-top:32px!important;
  }
}
@media screen and (max-width:782px){
  html:has(body.admin-bar){
    margin-top:46px!important;
  }
}

/* Network Management page carries an ID-specific html margin reset; restore the logged-in offset. */
@media screen {
  html:has(body.admin-bar):has(#network-management-services){
    margin-top:32px!important;
  }
}
@media screen and (max-width:782px){
  html:has(body.admin-bar):has(#network-management-services){
    margin-top:46px!important;
  }
}

/* Remove verified Elementor shell padding around redesigned full-width pages. */
body .page-content>.elementor>.e-con:has(main:is(.hmsp-home,.hmsp-page,.hmsp-network,.hst-austin,.hst-city,.hst-contact-page,.hmsp-cloud,.hst-areas)),
body .page-content>.elementor>.e-con:has(main:is(.hmsp-home,.hmsp-page,.hmsp-network,.hst-austin,.hst-city,.hst-contact-page,.hmsp-cloud,.hst-areas))>.e-con-inner{
  padding-top:0!important;
  padding-right:0!important;
  padding-bottom:0!important;
  padding-left:0!important;
}

/* Remove the default 10px wrapper around custom full-width HTML sections. */
body .e-con:has(>.elementor-widget-html>.elementor-widget-container>:is(main,section,div)[class^="hmsp-"]),
body .e-con:has(>.elementor-widget-html>.elementor-widget-container>:is(main,section,div)[class^="hst-"]){
  padding-top:0!important;
  padding-bottom:0!important;
}

/* Standard section rhythm for the redesigned Hudson service/home system. */
body .hmsp-section{
  padding-top:var(--hmsp-section-space-desktop)!important;
  padding-bottom:var(--hmsp-section-space-desktop)!important;
}

/* Exact global footer owners verified on the live DOM. */
#footer{
  background-color:#111719!important;
}

#footer .elementor-element-9e5ab2e{
  padding-top:0!important;
  padding-bottom:0!important;
}

/* Let the browser expose real overflow while correcting the verified Bootstrap shell mismatch. */
body:has(.hst-footer){
  overflow-x:visible!important;
}

body .tm-blog-sidebar-row:has(main:is(.hmsp-home,.hmsp-page,.hmsp-network,.hst-austin,.hst-city,.hst-contact-page,.hmsp-cloud,.hst-areas)){
  margin-left:-12px!important;
  margin-right:-12px!important;
}

body .page-content>.elementor>.e-con:has(main:is(.hmsp-home,.hmsp-page,.hmsp-network,.hst-austin,.hst-city,.hst-contact-page,.hmsp-cloud,.hst-areas))>.e-con-inner,
body .e-con:has(>.elementor-widget-html>.elementor-widget-container>main:is(.hmsp-home,.hmsp-page,.hmsp-network,.hst-austin,.hst-city,.hst-contact-page,.hmsp-cloud,.hst-areas)),
body .elementor-widget-html:has(>.elementor-widget-container>main:is(.hmsp-home,.hmsp-page,.hmsp-network,.hst-austin,.hst-city,.hst-contact-page,.hmsp-cloud,.hst-areas)),
body .elementor-widget-container:has(>main:is(.hmsp-home,.hmsp-page,.hmsp-network,.hst-austin,.hst-city,.hst-contact-page,.hmsp-cloud,.hst-areas)){
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* Site-wide responsive header and narrow-screen form corrections. */
@media (max-width:1024px){
  body .hmsp-section{
    padding-top:var(--hmsp-section-space-tablet)!important;
    padding-bottom:var(--hmsp-section-space-tablet)!important;
  }

  body.tm-header-sticky-mobile header#header,
  body.tm-header-sticky-mobile-always header#header{
    min-height:65px!important;
  }

  header#header #elementor-header-top-mobile{
    width:100%!important;
    max-width:100vw!important;
  }

  header#header #tm-header-mobile{
    min-height:65px;
  }

  header#header .tm-header-menu{
    width:min(350px,100vw)!important;
    max-width:100vw!important;
    overscroll-behavior:contain;
  }

  header#header .tm-header-menu-scroll{
    max-width:100%;
  }

  header#header #tm-nav-mobile{
    right:max(15px,env(safe-area-inset-right))!important;
  }

  .page-content img,
  .page-content svg,
  .page-content video,
  .page-content canvas,
  .page-content iframe{
    max-width:100%;
  }
}

@media screen and (max-width:782px){
  body.admin-bar header#header #elementor-header-top-mobile{
    top:46px!important;
  }
}

@media (max-width:767px){
  body .elementor-hidden-mobile:has(main:is(.hmsp-page,.hmsp-cloud,.hst-areas)),
  body .elementor-hidden-mobile:has(.hmsp-contact){
    display:flex!important;
  }

  body .hmsp-section{
    padding-top:var(--hmsp-section-space-mobile)!important;
    padding-bottom:var(--hmsp-section-space-mobile)!important;
  }
}

@media (max-width:359px){
  .wpforms-recaptcha-container{
    width:100%;
    min-height:66px;
  }

  .wpforms-recaptcha-container .g-recaptcha{
    width:304px!important;
    height:64px!important;
    transform:scale(.82);
    transform-origin:0 0;
  }
}

/* Restore primary page content for exact Elementor wrappers incorrectly marked hidden on mobile. */
@media (max-width:767px){
  body .elementor-hidden-mobile.e-con:is(
    .elementor-element-1bcf3db,
    .elementor-element-6cb920b,
    .elementor-element-e71390f,
    .elementor-element-c6be852,
    .elementor-element-3f04541,
    .elementor-element-a5efb2a,
    .elementor-element-357569e,
    .elementor-element-48f21a1,
    .elementor-element-a748db5,
    .elementor-element-a065471,
    .elementor-element-4c3bbd9,
    .elementor-element-5e0b75b,
    .elementor-element-7fe8760,
    .elementor-element-796e556,
    .elementor-element-7cc5ecc
  ){
    display:flex!important;
  }
}

/* Contain the Universal City decorative floating object without masking page content. */
body.page-id-149502 .elementor-element-5d9a7fb{
  overflow:hidden!important;
}

/* Align custom DIV-based page shells with the Bootstrap container gutters. */
body .tm-blog-sidebar-row:has(.elementor-widget-html [id^="hmsp-"]),
body .tm-blog-sidebar-row:has(.elementor-widget-html [id^="hst-"]){
  margin-left:-12px!important;
  margin-right:-12px!important;
}
/* Clip the remaining viewport-unit scrollbar artifact on Universal City only. */
body.page-id-149502{
  overflow-x:clip!important;
}
