/* MIDAS v55 — explicit mobile call action, common service contact strip,
   responsive contact typography and guaranteed desktop wordmark sheen. */

/* Dedicated phone action exists only on mobile; desktop keeps the full phone block. */
.midas-mobile-call-top{display:none}

@media (max-width:850px){
  .midas-header-inner{
    grid-template-columns:minmax(108px,132px) 1fr auto!important;
    column-gap:8px!important;
  }
  .midas-mobile-call-top{
    display:inline-flex!important;
    grid-column:2!important;
    grid-row:1!important;
    justify-self:end!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:88px!important;
    height:40px!important;
    padding:0 13px!important;
    border:1px solid rgba(234,28,44,.72)!important;
    border-radius:10px!important;
    background:linear-gradient(180deg,rgba(207,13,28,.24),rgba(110,5,14,.16))!important;
    color:#fff!important;
    text-decoration:none!important;
    font-size:13px!important;
    line-height:1!important;
    font-weight:800!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
  }
  .midas-menu-btn{
    grid-column:3!important;
    grid-row:1!important;
    min-width:72px!important;
    height:40px!important;
  }

  /* The old call CTA under the home hero is intentionally gone. */
  .midas-home .midas-hero-actions{
    justify-content:center!important;
  }
  .midas-home .midas-hero-actions .premium-btn{
    width:min(92vw,360px)!important;
  }

  /* Mobile address: remove cramped typography and allow every line to breathe. */
  .home-contact-v21 .midas-contact-strip-inner{
    width:calc(100% - 28px)!important;
    margin-inline:auto!important;
  }
  .home-contact-v21 .contact-title-v13{
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    text-align:center!important;
    font-size:clamp(15px,4.2vw,19px)!important;
    line-height:1.25!important;
  }
  .home-contact-v21 .contact-line-v13 span,
  .home-contact-v21 .contact-hours-v13 span{
    white-space:normal!important;
  }
}

@media (max-width:420px){
  .midas-header-inner{
    width:calc(100% - 16px)!important;
    grid-template-columns:112px 1fr auto!important;
    column-gap:6px!important;
  }
  .midas-brand-v6 img{width:108px!important}
  .midas-mobile-call-top{
    min-width:78px!important;
    height:38px!important;
    padding:0 10px!important;
    font-size:12px!important;
  }
  .midas-menu-btn{
    min-width:64px!important;
    height:38px!important;
    padding:0 9px!important;
    font-size:12px!important;
  }
}

/* One identical lower contact block on Applications, Stage 1, Russification and Developments. */
body:not(.midas-home) .home-contact-v21{
  border-top:1px solid rgba(255,255,255,.08)!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  background:#050506!important;
  padding:0!important;
  margin-top:34px!important;
}

/* Desktop contact strip must adapt instead of clipping the red KMB title or phone number. */
@media (min-width:851px){
  .home-contact-v21 .midas-contact-strip-inner{
    width:min(1440px,calc(100% - 48px))!important;
    margin:0 auto!important;
    display:grid!important;
    grid-template-columns:minmax(250px,1.08fr) minmax(235px,.8fr) minmax(210px,.7fr) minmax(360px,1.18fr)!important;
    align-items:stretch!important;
    gap:0!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;
  }
  .home-contact-v21 .contact-title-v13{
    font-size:clamp(12px,1.05vw,16px)!important;
    line-height:1.25!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  .home-contact-v21 .contact-phone-v13 a:first-child{
    font-size:clamp(15px,1.25vw,20px)!important;
    white-space:nowrap!important;
  }
  .home-contact-v21 .contact-line-v13 span,
  .home-contact-v21 .contact-hours-v13,
  .home-contact-v21 .contact-call-v13{
    font-size:clamp(11px,.9vw,14px)!important;
  }
}

/* On narrower desktop/laptop widths use a 2x2 strip instead of cutting content. */
@media (min-width:851px) and (max-width:1180px){
  .home-contact-v21 .midas-contact-strip-inner{
    grid-template-columns:1fr 1fr!important;
  }
  .home-contact-v21 .contact-map-v13{
    min-height:180px!important;
  }
}

/* Guaranteed, visible letter-only headlight reflection on the HOME desktop hero.
   The alpha mask contains only the MIDAS wordmark letters; the car/background cannot light up. */
@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::after{
    content:""!important;
    display:block!important;
    position:absolute!important;
    inset:0!important;
    z-index:20!important;
    pointer-events:none!important;
    opacity:1!important;
    background:linear-gradient(105deg,
      transparent 0%, transparent 28%,
      rgba(255,255,255,0) 36%,
      rgba(255,220,220,.25) 40%,
      rgba(255,255,255,.92) 45%,
      #fff 47%,
      rgba(255,235,235,.9) 49%,
      rgba(255,35,52,.48) 53%,
      transparent 59%, transparent 100%)!important;
    background-size:260% 100%!important;
    background-position:135% 0!important;
    -webkit-mask:url('midas-hero-logo-alpha-mask.png') center/100% 100% no-repeat!important;
    mask:url('midas-hero-logo-alpha-mask.png') center/100% 100% no-repeat!important;
    mix-blend-mode:screen!important;
    filter:drop-shadow(0 0 4px rgba(255,255,255,.5))!important;
    will-change:background-position,filter!important;
    animation:midas-v55-letter-headlights 3.2s linear infinite!important;
  }
  @keyframes midas-v55-letter-headlights{
    0%{background-position:145% 0;filter:brightness(.9) drop-shadow(0 0 1px rgba(255,255,255,.2))}
    18%{background-position:100% 0;filter:brightness(1.15) drop-shadow(0 0 3px rgba(255,255,255,.45))}
    42%{background-position:42% 0;filter:brightness(1.45) drop-shadow(0 0 6px rgba(255,255,255,.7))}
    66%{background-position:-20% 0;filter:brightness(1.2) drop-shadow(0 0 4px rgba(255,80,90,.55))}
    100%{background-position:-75% 0;filter:brightness(.95) drop-shadow(0 0 1px rgba(255,255,255,.2))}
  }
}

/* User explicitly requested this motion, so do not suppress it via OS reduced-motion here. */
@media (prefers-reduced-motion:reduce) and (min-width:851px){
  body.midas-home .midas-hero-desktop::after{
    animation:midas-v55-letter-headlights 3.2s linear infinite!important;
    opacity:1!important;
  }
}
