/* speed-p0-1121: template-speed pilot CSS. Tokens unchanged. No copy/color/font-family changes.
   Loaded last so typography and menu rules can win over fusion-styles where intended. */

/* P0-1: stop Avada typography JS from late-locking H1 px (class + !important calc).
   Below 400px, dark-swap-1025-r3 already sets clamp(1.5rem, 7vw, 2rem) at higher specificity
   (max-width:399px). From 400px up, H1 is font-size:1em of its fusion-title parent
   (home 28px / 22px at <=640px; hubs 2.111em), which is what typography JS was measuring
   and locking after first paint. */
@media (min-width: 400px) {
  h1.title-heading-left { font-size: 1em !important; }
}

/* P0-3: home Union Station hero is a real <picture> (same crops, cover, positions).
   Keep existing hero-fix geometry (navy band + phone crop below on small screens). */
.hero_section { position: relative; }
.hero_section > .fusion-builder-row { position: relative; z-index: 1; }
.hero_section > picture.sl-lcp-hero {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  margin: 0;
  display: block;
}
.hero_section > picture.sl-lcp-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
@media (max-width: 640px) {
  .hero_section > picture.sl-lcp-hero {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    width: 100%;
  }
  .hero_section > picture.sl-lcp-hero img {
    width: 100%;
    height: auto;
    object-fit: fill;
    object-position: center bottom;
  }
}

/* P0-3: TBI / truck slogan-below photo band — real <picture> in place of ::before
   inheriting a CSS background-image. Same 1905/313 band (200px tall at <=640px). */
#main .fusion-flex-container.fusion-builder-row-3.sl-slogan-below > picture.sl-lcp-hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  aspect-ratio: 1905 / 313;
  z-index: 0;
  pointer-events: none;
  margin: 0;
  display: block;
}
#main .fusion-flex-container.fusion-builder-row-3.sl-slogan-below > picture.sl-lcp-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
#main .fusion-flex-container.fusion-builder-row-3.sl-slogan-below.sl-tt-hero > picture.sl-lcp-hero img {
  object-position: 70% top;
}
@media (max-width: 640px) {
  #main .fusion-flex-container.fusion-builder-row-3.sl-slogan-below > picture.sl-lcp-hero {
    aspect-ratio: auto;
    height: 200px;
  }
}
/* Don't also paint the inherited background on ::before (the img is the band now). */
#main .fusion-flex-container.fusion-builder-row-3.sl-slogan-below.sl-lcp-hero-img::before {
  background-image: none !important;
  content: none !important;
}

/* P1: start the mobile nav in Avada's post-JS collapsed state (class collapse-enabled
   is added only after fusion-scripts run). Without this, #menu-mobile-menu is visible
   (~209px) on first paint and then collapses (~40px), shifting main#main by ~0.18 CLS.
   data-breakpoint is 1024; rules match .collapse-enabled.mobile-mode-collapse-to-button. */
@media (max-width: 1023px) {
  .fusion-menu-element-wrapper.mobile-mode-collapse-to-button > ul {
    display: block;
    max-height: 0;
    min-height: 0;
    overflow: hidden;
    opacity: 0;
    z-index: -1;
  }
  .fusion-menu-element-wrapper.mobile-mode-collapse-to-button.expanded > ul {
    max-height: 100vh;
    max-height: max-content;
    overflow-y: auto;
    opacity: 1;
    z-index: 10;
  }
  .fusion-menu-element-wrapper.mobile-mode-collapse-to-button > button:not(.fusion-close-flyout) {
    display: block;
    outline: 0;
  }
}
