/* Homepage 540 mobile hero only. Sources are recorded in home-mobile-plan.json. */
@media (max-width:767px) {
  /* R1: 2026-11-11 mobile-critical.css hero layout, gradient and factory image. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero:not(.elementor-motion-effects-element-type-background) {
    position:relative!important;
    box-sizing:border-box!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:center!important;
    width:100%!important;
    height:auto!important;
    min-height:560px!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    padding:48px 22px!important;
    background-color:#172b33!important;
    background-image:linear-gradient(180deg,rgba(8,28,38,.91) 0%,rgba(8,28,38,.78) 46%,rgba(8,28,38,.28) 100%),url("https://mstfab.com/wp-content/uploads/2026/07/custom-sheet-metal-fabrication-home-hero-desktop.webp")!important;
    background-size:cover!important;
    background-position:52% center!important;
    background-repeat:no-repeat!important;
    overflow:hidden!important;
    text-align:left!important;
  }

  /* R2: current h-truthful-style overlay/picture treatment. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero > .elementor-background-overlay,
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-lcp-picture {
    display:none!important;
  }

  /* R3: current h-truthful-style resets the old poster's positioning and clipping. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-eye,
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-h1,
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-sub {
    display:block!important;
    position:relative!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    z-index:3!important;
    width:min(100%,650px)!important;
    max-width:650px!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    background:transparent!important;
    overflow:visible!important;
    clip:auto!important;
    clip-path:none!important;
    text-align:left!important;
    pointer-events:auto!important;
  }

  /* R4: current h-truthful-style eye color and its mobile type sizes. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-eye p {
    color:#b8e8e9!important;
    font-size:11px!important;
    font-weight:700!important;
    line-height:1.4!important;
    letter-spacing:0!important;
    text-transform:uppercase!important;
    margin:0 0 12px!important;
  }

  /* R5: current h-truthful-style heading reset with the existing <=767 size. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-h1 .elementor-heading-title {
    color:#fff!important;
    font-family:Arial,sans-serif!important;
    font-size:34px!important;
    font-style:normal!important;
    font-weight:700!important;
    line-height:1.12!important;
    letter-spacing:0!important;
    text-transform:none!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    text-align:left!important;
    text-shadow:none!important;
    margin:0 0 16px!important;
    padding:0!important;
  }

  /* R6: current h-truthful-style main copy color and mobile type sizes. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-sub p {
    color:#f0f5f5!important;
    font-size:15px!important;
    line-height:1.48!important;
    text-align:left!important;
    max-width:620px!important;
    margin:0 0 12px!important;
  }

  /* R7: current h-truthful-style caption color and mobile type sizes. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-sub .mst-hero-caption {
    color:#d9e3e5!important;
    font-size:11px!important;
    line-height:1.45!important;
    margin:0 0 20px!important;
  }

  /* R8: current h-truthful-style CTA row with its existing mobile column override. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-ctas {
    display:flex!important;
    position:relative!important;
    top:auto!important;
    left:auto!important;
    z-index:4!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
    gap:12px!important;
    width:auto!important;
    min-width:0!important;
    height:auto!important;
    margin:0!important;
    padding:0!important;
  }

  /* R9: current h-truthful-style restores CTA widgets from the poster hotspot. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-b1,
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-b2 {
    display:block!important;
    position:relative!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    width:auto!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    transform:none!important;
  }

  /* R10: current h-truthful-style wrappers; also neutralize the legacy wrapper's opacity:0. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-b1 .elementor-button-wrapper,
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-b2 .elementor-button-wrapper {
    display:block!important;
    width:auto!important;
    height:auto!important;
    padding:0!important;
    opacity:1!important;
    visibility:visible!important;
  }

  /* R11: current h-truthful-style visible, normally positioned buttons. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-b1 .elementor-button,
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-b2 .elementor-button {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    min-width:190px!important;
    height:46px!important;
    min-height:46px!important;
    padding:0 22px!important;
    opacity:1!important;
    visibility:visible!important;
    border:1px solid transparent!important;
    border-radius:4px!important;
    background:#14889a!important;
    box-shadow:none!important;
    color:#fff!important;
    font-size:15px!important;
    font-weight:700!important;
    line-height:1.2!important;
    text-decoration:none!important;
    white-space:nowrap!important;
  }

  /* R12: current h-truthful-style suppresses the old generated play marker. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-b1 .elementor-button::before,
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-b2 .elementor-button::before {
    content:none!important;
  }

  /* R13: current h-truthful-style primary CTA hover/focus treatment. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-b1 .elementor-button:hover,
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-b1 .elementor-button:focus-visible {
    background:#0e7181!important;
  }

  /* R14: preserve the existing h-truthful-style mobile secondary-CTA hiding. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-b2 .elementor-button {
    display:none!important;
  }
}

@media (max-width:360px) {
  /* R15: 2026-11-11 critical <=360 edge spacing; retain the 48px vertical padding. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero:not(.elementor-motion-effects-element-type-background) {
    padding-left:18px!important;
    padding-right:18px!important;
  }

  /* R16/R17: current h-truthful-style existing <=360 typography overrides. */
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-h1 .elementor-heading-title {
    font-size:30px!important;
  }
  html body.home.page-id-540 .elementor.elementor-540[data-elementor-id="540"] .elementor-element.elementor-element-c0-hero .elementor-element.elementor-element-h-sub p {
    font-size:14px!important;
  }
}
