/* Saidelong 2.2.0 runtime fidelity patch.
   Loaded last so Elementor's generic image/container rules cannot distort
   the global header or the approved homepage hero. */

/* --- Global Header: lock the original static-site proportions. --- */
body.sdl-theme .elementor-widget-sdl-global-header,
body.sdl-theme .elementor-widget-sdl-global-header > .elementor-widget-container,
body.sdl-theme .sdl-global-shell,
body.sdl-theme .sdl-global-shell > .e-con-inner{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  gap:0!important;
}

body.sdl-theme .site-header{
  width:100%!important;
  left:0!important;
  right:0!important;
  overflow:visible!important;
}

/* Elementor ships `.elementor img { height:auto }` after theme styles.
   The original header depends on a fixed logo height, so make this explicit. */
body.sdl-theme .elementor .site-header .sdl-global-logo,
body.sdl-theme .site-header .sdl-global-logo,
body.sdl-theme .elementor .site-header .brand > img,
body.sdl-theme .site-header .brand > img{
  display:block!important;
  width:auto!important;
  height:46px!important;
  max-width:190px!important;
  max-height:46px!important;
  object-fit:contain!important;
  object-position:left center!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  scale:1!important;
}

body.sdl-theme .site-header .brand,
body.sdl-theme .site-header .sdl-global-brand{
  display:flex!important;
  align-items:center!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:210px!important;
  overflow:hidden!important;
}

/* Keep WordPress' logged-in admin bar from covering the site header. */
body.admin-bar.sdl-theme .site-header{top:32px!important;}
@media(max-width:782px){body.admin-bar.sdl-theme .site-header{top:46px!important;}}

/* Header navigation must never inherit Elementor container sizing. */
body.sdl-theme .site-header .header-inner{
  width:min(calc(100% - var(--side) * 2),var(--max))!important;
  max-width:var(--max)!important;
  margin-inline:auto!important;
  padding:0!important;
}
body.sdl-theme .site-header .main-nav{
  width:auto!important;
  max-width:none!important;
  min-height:0!important;
}

/* --- Homepage hero: preserve the approved source layout. --- */
body.sdl-theme.home-page .hero{
  overflow:hidden!important;
  isolation:isolate!important;
}
body.sdl-theme.home-page .hero-media,
body.sdl-theme.home-page .hero-media picture{
  position:absolute!important;
  inset:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  overflow:hidden!important;
}
body.sdl-theme.home-page .hero-cover{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:cover!important;
  object-position:center center!important;
  margin:0!important;
}

/* Simple entrance only: no split text, blur, scale or competing reveal system. */
body.sdl-theme.home-page .hero-copy .sdl-hero-title,
body.sdl-theme.home-page .hero-copy .sdl-hero-cta{
  opacity:1;
  transform:none;
  filter:none!important;
  clip-path:none!important;
  will-change:auto!important;
}
html.sdl-motion-active body.sdl-theme.home-page .hero:not(.ready) .hero-copy .sdl-hero-title{
  opacity:0;
  transform:translate3d(0,10px,0);
}
html.sdl-motion-active body.sdl-theme.home-page .hero:not(.ready) .hero-copy .sdl-hero-cta{
  opacity:0;
  transform:translate3d(0,8px,0);
}
html.sdl-motion-active body.sdl-theme.home-page .hero .hero-copy .sdl-hero-title{
  transition:opacity .46s ease,transform .54s cubic-bezier(.22,1,.36,1)!important;
}
html.sdl-motion-active body.sdl-theme.home-page .hero .hero-copy .sdl-hero-cta{
  transition:opacity .42s ease .09s,transform .50s cubic-bezier(.22,1,.36,1) .09s,
             background-color .28s ease,border-color .28s ease,color .28s ease!important;
}
html.sdl-motion-active body.sdl-theme.home-page .hero.ready .hero-copy .sdl-hero-title,
html.sdl-motion-active body.sdl-theme.home-page .hero.ready .hero-copy .sdl-hero-cta{
  opacity:1;
  transform:none;
}

/* The heading's second line stays white in the client's final v4 source. */
body.sdl-theme.home-page .hero-copy .title-xl span{color:#fff!important;}

/* The facts should enter as one calm block; no separate bouncing/staggered cards. */
body.sdl-theme.home-page .hero .fact{
  opacity:1!important;
  transform:none!important;
  transition:none!important;
  animation:none!important;
}
body.sdl-theme.home-page .hero .counter-visual,
body.sdl-theme.home-page .hero.facts-loaded .counter-visual{
  opacity:1!important;
  transform:none!important;
  animation:none!important;
}
body.sdl-theme.home-page .hero-facts-grid{
  opacity:1!important;
  transform:none!important;
  animation:none!important;
}

/* Editor preview must be static and selectable. */
body.elementor-editor-active.sdl-theme .site-header,
body.elementor-editor-preview.sdl-theme .site-header{
  top:auto!important;
}
body.elementor-editor-active.sdl-theme.home-page .hero-copy .sdl-hero-title,
body.elementor-editor-active.sdl-theme.home-page .hero-copy .sdl-hero-cta,
body.elementor-editor-preview.sdl-theme.home-page .hero-copy .sdl-hero-title,
body.elementor-editor-preview.sdl-theme.home-page .hero-copy .sdl-hero-cta{
  opacity:1!important;
  transform:none!important;
  transition:none!important;
}

@media(max-width:760px){
  body.sdl-theme .elementor .site-header .sdl-global-logo,
  body.sdl-theme .site-header .sdl-global-logo,
  body.sdl-theme .elementor .site-header .brand > img,
  body.sdl-theme .site-header .brand > img{
    height:34px!important;
    max-height:34px!important;
    max-width:150px!important;
  }
  body.sdl-theme .site-header .brand,
  body.sdl-theme .site-header .sdl-global-brand{max-width:160px!important;}
}

@media(prefers-reduced-motion:reduce){
  body.sdl-theme.home-page .hero-copy .sdl-hero-title,
  body.sdl-theme.home-page .hero-copy .sdl-hero-cta{
    opacity:1!important;
    transform:none!important;
    transition:none!important;
  }
}

/* ===== v2.3 final motion stability =====
   Hero copy and Quality content are intentionally static. This avoids race
   conditions between Elementor rendering, cached CSS and intersection observers. */
body.sdl-theme.home-page .hero-copy .sdl-hero-title,
body.sdl-theme.home-page .hero-copy .sdl-hero-cta,
html.sdl-motion-active body.sdl-theme.home-page .hero:not(.ready) .hero-copy .sdl-hero-title,
html.sdl-motion-active body.sdl-theme.home-page .hero:not(.ready) .hero-copy .sdl-hero-cta,
html.sdl-motion-active body.sdl-theme.home-page .hero.ready .hero-copy .sdl-hero-title,
html.sdl-motion-active body.sdl-theme.home-page .hero.ready .hero-copy .sdl-hero-cta{
  opacity:1!important;
  transform:none!important;
  filter:none!important;
  clip-path:none!important;
  animation:none!important;
}
body.sdl-theme.home-page .hero-copy .sdl-hero-title{transition:none!important;}
body.sdl-theme.home-page .hero-copy .sdl-hero-cta{
  transition:background-color .28s ease,border-color .28s ease,color .28s ease,transform .22s ease!important;
}
body.sdl-theme.home-page .hero .fact,
body.sdl-theme.home-page .hero-facts-grid,
body.sdl-theme.home-page .hero .counter-visual{
  opacity:1!important;
  transform:none!important;
  animation:none!important;
}

body.sdl-theme.quality-page .reveal,
body.sdl-theme.quality-page .reveal.sdl-pending,
body.sdl-theme.quality-page .reveal.in,
body.sdl-theme.quality-page .reveal.is-visible{
  opacity:1!important;
  transform:none!important;
  transition:none!important;
  animation:none!important;
}
body.sdl-theme.quality-page .quality-hero-media img{
  animation:none!important;
  transform:scale(1.035)!important;
}
