/* MIDAS v56 — hard fixes verified against desktop + mobile renders. */

/* ===== Mobile header: explicit CALL + MENU, same row, no fragile grid dependency ===== */
.midas-mobile-call-top{display:none}
@media (max-width:850px){
  .midas-header-v6{position:relative!important;z-index:1000!important}
  .midas-header-inner{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    width:calc(100% - 24px)!important;
    min-height:78px!important;
    margin:0 auto!important;
    gap:8px!important;
  }
  .midas-brand-v6{margin-right:auto!important;flex:0 0 auto!important}
  .midas-brand-v6 img{width:clamp(125px,34vw,165px)!important;height:auto!important}
  .midas-actions-v6{display:none!important}
  .midas-mobile-call-top,
  .midas-menu-btn{
    position:static!important;
    transform:none!important;
    flex:0 0 auto!important;
    box-sizing:border-box!important;
    height:42px!important;
    border-radius:11px!important;
    font-weight:800!important;
    font-size:14px!important;
    line-height:1!important;
  }
  .midas-mobile-call-top{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:96px!important;
    padding:0 14px!important;
    color:#fff!important;
    text-decoration:none!important;
    border:1px solid #ea1c2c!important;
    background:linear-gradient(180deg,#b80e1d,#720711)!important;
    box-shadow:0 0 16px rgba(234,28,44,.18)!important;
    order:2!important;
  }
  .midas-menu-btn{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:76px!important;
    padding:0 12px!important;
    order:3!important;
  }
  .midas-nav-v6{z-index:1200!important}
}
@media (max-width:390px){
  .midas-header-inner{width:calc(100% - 16px)!important;gap:6px!important}
  .midas-brand-v6 img{width:112px!important}
  .midas-mobile-call-top{min-width:84px!important;padding:0 9px!important;font-size:12px!important}
  .midas-menu-btn{min-width:64px!important;padding:0 8px!important;font-size:12px!important}
}

/* Old hero call CTA is not merely hidden — it was removed from HTML. Keep defensive rule. */
@media (max-width:850px){
  body.midas-home .midas-hero-actions a[href^="tel:"]{display:none!important}
}

/* ===== Common contact strip: same block on all service pages ===== */
.home-contact-v21 .contact-line-v13 span{white-space:normal!important}
@media (min-width:851px){
  .home-contact-v21 .midas-contact-strip-inner{
    width:min(1420px,calc(100% - 40px))!important;
    margin:0 auto!important;
    display:grid!important;
    grid-template-columns:minmax(245px,1fr) minmax(230px,.82fr) minmax(195px,.70fr) minmax(320px,1.18fr)!important;
    align-items:stretch!important;
  }
  .home-contact-v21 .contact-brand-v13,
  .home-contact-v21 .contact-phone-v13,
  .home-contact-v21 .contact-hours-v13,
  .home-contact-v21 .contact-map-v13{min-width:0!important;box-sizing:border-box!important}
  .home-contact-v21 .contact-title-v13{
    display:block!important;
    max-width:100%!important;
    color:#f0182b!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    font-size:clamp(12px,1vw,16px)!important;
    line-height:1.25!important;
  }
  .home-contact-v21 .contact-phone-v13>div{min-width:0!important}
  .home-contact-v21 .contact-phone-v13 a:first-child{
    display:block!important;
    max-width:100%!important;
    font-size:clamp(15px,1.22vw,20px)!important;
    line-height:1.15!important;
    white-space:nowrap!important;
  }
}
@media (min-width:851px) and (max-width:1120px){
  .home-contact-v21 .midas-contact-strip-inner{grid-template-columns:1fr 1fr!important}
  .home-contact-v21 .contact-map-v13{min-height:190px!important}
}
@media (max-width:850px){
  .home-contact-v21 .midas-contact-strip-inner{width:calc(100% - 28px)!important;margin-inline:auto!important}
  .home-contact-v21 .contact-title-v13{text-align:center!important;white-space:normal!important;overflow:visible!important;font-size:clamp(14px,4.1vw,19px)!important}
  .home-contact-v21 .contact-line-v13 span{font-size:14px!important;line-height:1.45!important}
}

/* ===== Desktop hero: real PNG alpha letters, clipped by an animated narrow light band. =====
   This does NOT depend on CSS mask support. The PNG itself contains only the letters. */
@media (min-width:851px){
  body.midas-home .midas-hero-desktop{position:relative!important;overflow:hidden!important;isolation:isolate!important}
  body.midas-home .midas-hero-desktop>img:first-child{position:relative!important;z-index:1!important;display:block!important}
  body.midas-home .midas-hero-desktop::after{display:none!important;content:none!important}
  body.midas-home .midas-letter-sheen-img{
    display:block!important;
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    object-fit:fill!important;
    z-index:8!important;
    pointer-events:none!important;
    opacity:0!important;
    mix-blend-mode:screen!important;
    filter:brightness(2.8) drop-shadow(0 0 5px rgba(255,255,255,.9)) drop-shadow(0 0 12px rgba(255,40,55,.55))!important;
    will-change:clip-path,opacity,filter!important;
    animation:midas-v56-letter-sweep 4.2s ease-in-out infinite!important;
  }
  @keyframes midas-v56-letter-sweep{
    0%,10%{clip-path:polygon(0 0,0 0,0 100%,0 100%);opacity:0}
    14%{clip-path:polygon(2% 0,8% 0,8% 100%,2% 100%);opacity:.15}
    24%{clip-path:polygon(8% 0,18% 0,18% 100%,8% 100%);opacity:.75}
    36%{clip-path:polygon(17% 0,29% 0,29% 100%,17% 100%);opacity:1}
    48%{clip-path:polygon(27% 0,38% 0,38% 100%,27% 100%);opacity:.95}
    60%{clip-path:polygon(37% 0,48% 0,48% 100%,37% 100%);opacity:.65}
    70%{clip-path:polygon(47% 0,57% 0,57% 100%,47% 100%);opacity:.18}
    76%,100%{clip-path:polygon(58% 0,64% 0,64% 100%,58% 100%);opacity:0}
  }
}
@media (max-width:850px){body.midas-home .midas-letter-sheen-img{display:none!important}}


/* v56 hotfix — requested 2026-08-12: remove mobile hero CTA and prevent desktop hero height inflation. */
@media (max-width:850px){
  body.midas-home .midas-hero-actions{display:none!important}
}
@media (min-width:851px){
  body.midas-home .midas-hero-v4{height:auto!important;min-height:0!important}
  body.midas-home .midas-hero-desktop{
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    aspect-ratio:2304/687!important;
    position:relative!important;
    overflow:hidden!important;
    background:#050506!important;
  }
  body.midas-home .midas-hero-desktop>img:first-child{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    max-height:none!important;
    object-fit:cover!important;
    object-position:center!important;
    margin:0!important;
  }
  body.midas-home .midas-letter-sheen-img{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    max-height:none!important;
    margin:0!important;
  }
}

/* v56 cross-browser hero sizing: let the real image define section height (Chrome/Yandex parity). */
@media (min-width:851px){
  body.midas-home .midas-hero-desktop{
    aspect-ratio:auto!important;
    height:auto!important;
    min-height:0!important;
  }
  body.midas-home .midas-hero-desktop>img:first-child{
    position:relative!important;
    inset:auto!important;
    display:block!important;
    width:100%!important;
    height:auto!important;
    max-height:none!important;
    object-fit:initial!important;
  }
}

/* v56 final cross-browser desktop home hero fix — Yandex/Chrome parity.
   Use the artwork as a background so browser image helpers cannot alter layout geometry. */
@media (min-width:851px){
  body.midas-home .midas-hero-v4{
    display:block!important;
    height:auto!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
  }
  body.midas-home .midas-hero-desktop{
    display:block!important;
    width:100%!important;
    height:calc(100vw * 687 / 2304)!important;
    max-height:572.5px!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    position:relative!important;
    overflow:hidden!important;
    background:#050506 url("midas-hero-wide.png") center center / 100% 100% no-repeat!important;
  }
  body.midas-home .midas-hero-desktop>img:first-child{
    display:none!important;
    width:0!important;
    height:0!important;
    max-height:0!important;
    margin:0!important;
    padding:0!important;
  }
  body.midas-home .midas-letter-sheen-img{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    max-height:none!important;
    margin:0!important;
  }
}
