/* =========================================================
   מ.ח הנדסה, לוגו מונפש בהדר
   שכבות אנימציה מסביב ללוגו הקיים: קרן אור חולפת (beam),
   קרן אור חולפת (beam) וזוהר אדום פועם (redglow).
   נטען גלובלית בכל העמודים.
   ========================================================= */

/* עטיפת הקישור, ריכוז הבמה */
.brand{display:inline-flex;align-items:center}

/* הבמה, קופסה ביחס 1788/656, נקבעת לפי גובה */
.mh-logo-fx{
  position:relative;
  display:block;
  height:70px;
  aspect-ratio:1788/656;
  overflow:hidden;
  line-height:0;
  direction:ltr;
  isolation:isolate;
  border-radius:6px;
}

/* הלוגו עצמו, ממלא את הבמה, ללא עיוות */
.mh-logo-fx .mh-logo-img{
  position:absolute;
  inset:0;
  width:100%!important;
  height:100%!important;
  object-fit:contain;
  object-position:center;
  display:block;
  margin:0;
  animation:none;
}

/* זוהר אדום פועם */
.mh-logo-redglow{
  position:absolute;
  inset:0;
  background:radial-gradient(ellipse at 42% 20%,#fa183d12,transparent 48%);
  pointer-events:none;
  opacity:0;
  animation:mh-logo-pulse 5.8s ease-in-out both;
}

/* קרן אור חולפת */
.mh-logo-beam{
  position:absolute;
  top:-35%;
  left:-18%;
  height:170%;
  width:15%;
  transform:skewX(-25deg);
  background:linear-gradient(90deg,transparent,#fff0 10%,#ffffffba 50%,transparent);
  mix-blend-mode:screen;
  pointer-events:none;
  opacity:0;
  animation:mh-logo-sweep 5.8s ease-in-out both;
}

@keyframes mh-logo-sweep{
  0%,48%{left:-20%;opacity:0}
  58%{opacity:.8}
  84%{left:112%;opacity:.65}
  100%{left:112%;opacity:0}
}
@keyframes mh-logo-pulse{
  0%,55%,100%{opacity:0}
  70%{opacity:1}
}

/* התאמה לרוחבי מסך, נשאר בתוך גובה ההדר בכל עמוד */
@media(max-width:1320px){.mh-logo-fx{height:64px}}
@media(max-width:1020px){.mh-logo-fx{height:60px}}
@media(max-width:680px){.mh-logo-fx{height:56px}}
@media(max-width:370px){.mh-logo-fx{height:50px}}

/* כיבוד העדפת הפחתת תנועה */
@media(prefers-reduced-motion:reduce){
  .mh-logo-beam,
  .mh-logo-redglow{display:none!important;animation:none!important}
  .mh-logo-fx .mh-logo-img{animation:none!important;opacity:1!important}
}
