/* OneMagic Unified 2.1.3 — one isolated header/menu for every template. */
.omg-global-header,
.omg-global-header *{box-sizing:border-box}
html body header.omg-global-header{
  position:sticky!important;
  top:0!important;
  z-index:2147483647!important;
  width:100%;
  margin:0;
  padding:0;
  border:0;
  border-bottom:1px solid #e4eaf2;
  background:#fff;
  color:#071124;
  box-shadow:0 5px 18px rgba(15,35,66,.045);
  isolation:isolate;
}
.omg-global-header__inner{
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:28px;
  width:min(calc(100% - 48px),1240px);
  min-height:72px;
  margin:0 auto;
}
.omg-global-brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-width:0;
  color:#071124;
  text-decoration:none;
}
.omg-global-brand__mark{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  flex:0 0 34px;
  border-radius:11px;
  background:linear-gradient(145deg,#4e72ff,#0aaad6);
  color:#fff;
  font:800 18px/1 Inter,Arial,sans-serif;
  box-shadow:0 8px 18px rgba(18,102,255,.2);
}
.omg-global-brand__copy{display:block;min-width:0}
.omg-global-brand__copy strong{
  display:block;
  color:#071124;
  font:900 19px/1.05 Inter,Arial,sans-serif;
  letter-spacing:-.035em;
  white-space:nowrap;
}
.omg-global-brand__copy small{
  display:block;
  margin-top:4px;
  color:#718099;
  font:700 9px/1 Inter,Arial,sans-serif;
  white-space:nowrap;
}
.omg-global-menu{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:28px;
  min-width:0;
}
.omg-global-menu a{
  position:static;
  display:inline-flex;
  align-items:center;
  min-height:40px;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:#0f172a;
  font:850 13px/1.25 Inter,Arial,sans-serif;
  text-align:left;
  text-decoration:none;
  white-space:nowrap;
}
.omg-global-menu a:hover,
.omg-global-menu a.is-active{color:#1266ff}
.omg-global-menu a.is-active{box-shadow:inset 0 -2px #1266ff}
.omg-global-menu__telegram{display:none!important}
.omg-global-toggle{display:none}

/* Disable legacy page-specific headers. The global header above is the only one shown. */
body .omg-rh-header,
body header.sej-site-header,
body header.om-main-header,
body header.omk2-top[data-sej-header],
body header.omk2-top[data-omc2-header],
body.sej-nav-page .sej-topbar{display:none!important}

@media (max-width:1024px){
  html.omg-global-menu-open,
  body.omg-global-menu-open{overflow:hidden!important}
  .omg-global-header{
    padding:6px 0;
    border-bottom:0;
    background:#f4f7fb;
    box-shadow:none;
    overflow:visible;
  }
  .omg-global-header__inner{
    grid-template-columns:minmax(0,1fr) 42px;
    gap:8px;
    width:calc(100% - 20px);
    min-height:58px;
    padding:0 8px 0 12px;
    border:1px solid #dfe7f1;
    border-radius:16px;
    background:#fff;
    box-shadow:0 8px 24px rgba(15,35,66,.08);
    overflow:visible;
  }
  .omg-global-brand__mark{
    width:32px;
    height:32px;
    flex-basis:32px;
    border-radius:10px;
    font-size:17px;
  }
  .omg-global-brand__copy strong{font-size:17px}
  .omg-global-brand__copy small{font-size:8px;margin-top:3px}
  .omg-global-toggle{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    width:42px;
    height:42px;
    margin:0;
    padding:0;
    border:1px solid #e1e7ef;
    border-radius:12px;
    background:#f5f8fc;
    cursor:pointer;
  }
  .omg-global-toggle span{
    display:block;
    width:22px;
    height:2px;
    margin:0;
    border-radius:3px;
    background:#0b1736;
    transition:transform .18s ease,opacity .18s ease;
  }
  .omg-global-header.is-open .omg-global-toggle span:nth-child(1){transform:translateY(7px) rotate(45deg)}
  .omg-global-header.is-open .omg-global-toggle span:nth-child(2){opacity:0}
  .omg-global-header.is-open .omg-global-toggle span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
  .omg-global-menu{
    position:absolute;
    top:calc(100% + 8px);
    right:0;
    left:0;
    z-index:2147483647!important;
    display:none;
    grid-template-columns:1fr;
    align-items:stretch;
    gap:4px;
    width:100%;
    max-height:calc(100dvh - 84px);
    margin:0;
    padding:10px;
    overflow-x:hidden;
    overflow-y:auto;
    border:1px solid #dfe7f1;
    border-radius:16px;
    background:#fff;
    box-shadow:0 22px 60px rgba(15,35,66,.25);
    opacity:1;
    visibility:visible;
    isolation:isolate;
  }
  .omg-global-header.is-open .omg-global-menu{display:grid}
  .omg-global-menu a{
    position:static!important;
    display:flex!important;
    align-items:center!important;
    width:100%!important;
    min-height:44px!important;
    margin:0!important;
    padding:11px 12px!important;
    border:0!important;
    border-radius:10px!important;
    background:#fff!important;
    color:#071124!important;
    font-size:13px!important;
    line-height:1.25!important;
    font-weight:850!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    box-shadow:none!important;
    transform:none!important;
    opacity:1!important;
  }
  .omg-global-menu a:hover,
  .omg-global-menu a.is-active{background:#eef5ff!important;color:#1266ff!important}
  .omg-global-menu a.is-active{box-shadow:none!important}
  .omg-global-menu__telegram{
    display:flex!important;
    justify-content:center!important;
    margin-top:6px!important;
    background:#139ee8!important;
    color:#fff!important;
  }
}


/* Final 2.1.1 isolation: page templates cannot restyle the shared menu. */
@media (max-width:1024px){
  body .omg-global-header .omg-global-menu,
  body .omg-global-header.is-open .omg-global-menu{
    float:none!important;
    transform:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  body .omg-global-header:not(.is-open) .omg-global-menu{
    display:none!important;
    pointer-events:none!important;
  }
  body .omg-global-header.is-open .omg-global-menu{
    display:grid!important;
    pointer-events:auto!important;
    opacity:1!important;
    visibility:visible!important;
  }
}


/* 2.1.3 tablet menu width: compact panel rather than a full-width sheet. */
@media (min-width:769px) and (max-width:1024px){
  .omg-global-menu{left:auto!important;right:0!important;width:min(430px,100%)!important;}
}
