/* =========================================================
   BUG SITE V3.0 — GLOBAL HEADER STABILITY BASELINE
   Replaces accumulated header overrides with one authoritative layer.
   Desktop >=1181px preserves the established visual dimensions.
   Mobile/tablet <=1180px uses a simple non-blurred fixed header.
   ========================================================= */

:root{
  --bug-header-h:118px;
  --bug-header-line:rgba(194,145,43,.36);
  --bug-header-gold:#d5a943;
  --bug-header-gold-light:#ead38a;
  --bug-header-text:#e4e0d6;
}

html{ scroll-padding-top:calc(var(--bug-header-h) + 18px); }

[data-bug-header].premium-site-header.topbar{
  position:sticky !important;
  top:0 !important;
  z-index:10000 !important;
  width:100% !important;
  max-width:none !important;
  height:var(--bug-header-h) !important;
  min-height:var(--bug-header-h) !important;
  display:grid !important;
  grid-template-columns:136px minmax(680px,1fr) 190px !important;
  align-items:center !important;
  gap:26px !important;
  box-sizing:border-box !important;
  margin:0 !important;
  padding:0 44px !important;
  background:linear-gradient(180deg,rgba(2,8,6,.985),rgba(2,7,5,.955)) !important;
  border:0 !important;
  border-bottom:1px solid var(--bug-header-line) !important;
  box-shadow:0 10px 34px rgba(0,0,0,.27) !important;
  backdrop-filter:blur(13px) saturate(112%) !important;
  -webkit-backdrop-filter:blur(13px) saturate(112%) !important;
}

[data-bug-header].premium-site-header .brand-lockup,
[data-bug-header].premium-site-header .brand-lockup.brand-lockup-full{
  position:static !important;
  justify-self:start !important;
  align-self:center !important;
  width:auto !important;
  min-width:0 !important;
  height:88px !important;
  display:flex !important;
  align-items:center !important;
  gap:0 !important;
  margin:0 !important;
  padding:0 !important;
  overflow:visible !important;
  color:inherit !important;
  text-decoration:none !important;
}

[data-bug-header].premium-site-header .brand-lockup .logo-role-header,
[data-bug-header].premium-site-header .brand-lockup img{
  display:block !important;
  flex:0 0 auto !important;
  width:96px !important;
  height:72px !important;
  max-width:96px !important;
  margin:0 !important;
  padding:0 !important;
  object-fit:contain !important;
  filter:drop-shadow(0 5px 14px rgba(0,0,0,.46)) !important;
}
[data-bug-header].premium-site-header .brand-lockup-copy{ display:none !important; }

[data-bug-header].premium-site-header .main-nav{
  position:static !important;
  justify-self:center !important;
  align-self:stretch !important;
  width:auto !important;
  min-width:0 !important;
  height:var(--bug-header-h) !important;
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:center !important;
  gap:clamp(22px,1.55vw,34px) !important;
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  white-space:nowrap !important;
}

[data-bug-header].premium-site-header .main-nav a{
  position:relative !important;
  width:auto !important;
  height:var(--bug-header-h) !important;
  min-height:0 !important;
  flex:0 0 auto !important;
  display:flex !important;
  align-items:center !important;
  margin:0 !important;
  padding:2px 0 0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:var(--bug-header-text) !important;
  font-family:"Cormorant Garamond",Georgia,serif !important;
  font-size:14px !important;
  font-weight:650 !important;
  line-height:1 !important;
  letter-spacing:.055em !important;
  text-transform:uppercase !important;
  text-decoration:none !important;
  white-space:nowrap !important;
  opacity:.9 !important;
}

[data-bug-header].premium-site-header .main-nav a:hover,
[data-bug-header].premium-site-header .main-nav a.active{
  color:var(--bug-header-gold-light) !important;
  opacity:1 !important;
}
[data-bug-header].premium-site-header .main-nav a.active::after{
  content:"" !important;
  position:absolute !important;
  left:7% !important;
  right:7% !important;
  bottom:0 !important;
  height:2px !important;
  background:linear-gradient(90deg,transparent,#b98120 12%,#dcaf48 50%,#b98120 88%,transparent) !important;
}

[data-bug-header].premium-site-header .top-actions,
[data-bug-header].premium-site-header .premium-actions{
  position:static !important;
  justify-self:end !important;
  align-self:center !important;
  width:190px !important;
  min-width:190px !important;
  height:50px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
}

[data-bug-header].premium-site-header .header-login,
[data-bug-header].premium-site-header .top-actions .btn{
  position:relative !important;
  width:190px !important;
  min-width:190px !important;
  height:50px !important;
  min-height:50px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-sizing:border-box !important;
  margin:0 !important;
  padding:1px 20px 0 !important;
  border:1px solid rgba(205,158,55,.52) !important;
  border-radius:2px !important;
  background:linear-gradient(180deg,rgba(44,33,12,.18),rgba(5,12,9,.08)) !important;
  color:#d9b458 !important;
  font-family:"Bahnschrift SemiCondensed","Arial Narrow",Arial,sans-serif !important;
  font-size:11px !important;
  font-weight:650 !important;
  line-height:1 !important;
  letter-spacing:.11em !important;
  text-transform:uppercase !important;
  text-decoration:none !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.015),0 10px 22px rgba(0,0,0,.12) !important;
}
[data-bug-header].premium-site-header .header-login::before{
  content:"" !important;
  position:absolute !important;
  left:22px !important;
  right:22px !important;
  bottom:7px !important;
  height:1px !important;
  opacity:.42 !important;
  background:linear-gradient(90deg,transparent,#c69735,transparent) !important;
}
[data-bug-header].premium-site-header .header-login::after{
  content:"" !important;
  position:absolute !important;
  inset:7px !important;
  border:1px solid rgba(240,224,173,.07) !important;
  pointer-events:none !important;
}

[data-bug-header].premium-site-header .menu-button{ display:none !important; }

/* ===== LAPTOP 1181–1640 ===== */
@media (max-width:1640px) and (min-width:1181px){
  :root{ --bug-header-h:104px; }

  [data-bug-header].premium-site-header.topbar{
    grid-template-columns:122px minmax(620px,1fr) 172px !important;
    gap:18px !important;
    padding:0 34px !important;
  }
  [data-bug-header].premium-site-header .brand-lockup,
  [data-bug-header].premium-site-header .brand-lockup.brand-lockup-full{
    height:80px !important;
  }
  [data-bug-header].premium-site-header .brand-lockup .logo-role-header,
  [data-bug-header].premium-site-header .brand-lockup img{
    width:86px !important;
    height:64px !important;
    max-width:86px !important;
  }
  [data-bug-header].premium-site-header .main-nav{
    gap:clamp(15px,1.05vw,23px) !important;
  }
  [data-bug-header].premium-site-header .main-nav a{
    font-size:12px !important;
  }
  [data-bug-header].premium-site-header .top-actions,
  [data-bug-header].premium-site-header .premium-actions,
  [data-bug-header].premium-site-header .header-login,
  [data-bug-header].premium-site-header .top-actions .btn{
    width:172px !important;
    min-width:172px !important;
  }
}

/* ===== MOBILE / TABLET <=1180 ===== */
@media (max-width:1180px){
  :root{ --bug-header-h:68px; }

  html{
    scroll-padding-top:calc(var(--bug-header-h) + 10px);
  }
  html.bug-menu-open,
  html.bug-menu-open body{
    overflow:hidden !important;
    overscroll-behavior:none !important;
  }
  body{
    padding-top:var(--bug-header-h) !important;
  }

  [data-bug-header].premium-site-header.topbar{
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    right:0 !important;
    width:100% !important;
    height:var(--bug-header-h) !important;
    min-height:var(--bug-header-h) !important;
    max-height:var(--bug-header-h) !important;
    grid-template-columns:minmax(0,1fr) 46px !important;
    gap:10px !important;
    padding:0 14px !important;
    margin:0 !important;
    background:#020806 !important;
    border-bottom:1px solid rgba(194,145,43,.24) !important;
    box-shadow:0 4px 16px rgba(0,0,0,.22) !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
    transform:none !important;
  }

  [data-bug-header].premium-site-header .brand-lockup,
  [data-bug-header].premium-site-header .brand-lockup.brand-lockup-full{
    height:54px !important;
    max-width:92px !important;
  }
  [data-bug-header].premium-site-header .brand-lockup .logo-role-header,
  [data-bug-header].premium-site-header .brand-lockup img{
    width:68px !important;
    height:50px !important;
    max-width:68px !important;
    filter:none !important;
  }

  [data-bug-header].premium-site-header .main-nav,
  [data-bug-header].premium-site-header .top-actions,
  [data-bug-header].premium-site-header .premium-actions{
    display:none !important;
  }

  [data-bug-header].premium-site-header .menu-button{
    position:relative !important;
    inset:auto !important;
    justify-self:end !important;
    display:block !important;
    width:44px !important;
    height:44px !important;
    min-width:44px !important;
    min-height:44px !important;
    margin:0 !important;
    padding:0 !important;
    border:1px solid rgba(205,158,55,.34) !important;
    border-radius:0 !important;
    background:#06100c !important;
    color:transparent !important;
    font-size:0 !important;
    cursor:pointer !important;
    pointer-events:auto !important;
    touch-action:manipulation !important;
    transform:none !important;
    z-index:10003 !important;
  }

  [data-bug-header].premium-site-header .menu-button-lines,
  [data-bug-header].premium-site-header .menu-button-lines::before,
  [data-bug-header].premium-site-header .menu-button-lines::after{
    content:"" !important;
    position:absolute !important;
    left:10px !important;
    right:10px !important;
    height:2px !important;
    background:#dbc47f !important;
    transition:none !important;
  }
  [data-bug-header].premium-site-header .menu-button-lines{
    top:21px !important;
  }
  [data-bug-header].premium-site-header .menu-button-lines::before{
    left:0 !important;
    right:0 !important;
    top:-8px !important;
  }
  [data-bug-header].premium-site-header .menu-button-lines::after{
    left:0 !important;
    right:0 !important;
    top:8px !important;
  }

  [data-bug-header].premium-site-header.menu-open .menu-button-lines{
    background:transparent !important;
  }
  [data-bug-header].premium-site-header.menu-open .menu-button-lines::before{
    top:0 !important;
    transform:rotate(45deg) !important;
  }
  [data-bug-header].premium-site-header.menu-open .menu-button-lines::after{
    top:0 !important;
    transform:rotate(-45deg) !important;
  }

  [data-bug-header].premium-site-header.menu-open .main-nav{
    position:fixed !important;
    top:var(--bug-header-h) !important;
    left:0 !important;
    right:0 !important;
    bottom:0 !important;
    width:auto !important;
    height:auto !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    gap:0 !important;
    padding:10px 16px 88px !important;
    margin:0 !important;
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch !important;
    overscroll-behavior:contain !important;
    background:#020806 !important;
    border:0 !important;
    box-shadow:none !important;
    white-space:normal !important;
    z-index:10001 !important;
    transform:none !important;
  }

  [data-bug-header].premium-site-header.menu-open .main-nav a{
    width:100% !important;
    height:50px !important;
    min-height:50px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    flex:0 0 auto !important;
    margin:0 !important;
    padding:0 6px !important;
    border:0 !important;
    border-bottom:1px solid rgba(255,255,255,.055) !important;
    background:transparent !important;
    color:#e4e0d6 !important;
    font-size:13px !important;
    line-height:1.1 !important;
    white-space:normal !important;
  }
  [data-bug-header].premium-site-header.menu-open .main-nav a.active{
    color:#e3b74e !important;
  }
  [data-bug-header].premium-site-header.menu-open .main-nav a.active::after{
    display:none !important;
  }

  [data-bug-header].premium-site-header.menu-open .top-actions,
  [data-bug-header].premium-site-header.menu-open .premium-actions{
    position:fixed !important;
    left:16px !important;
    right:16px !important;
    bottom:calc(12px + env(safe-area-inset-bottom)) !important;
    width:auto !important;
    min-width:0 !important;
    height:50px !important;
    display:flex !important;
    align-items:stretch !important;
    margin:0 !important;
    padding:0 !important;
    background:#020806 !important;
    z-index:10002 !important;
    transform:none !important;
  }

  [data-bug-header].premium-site-header.menu-open .header-login,
  [data-bug-header].premium-site-header.menu-open .top-actions .btn{
    width:100% !important;
    min-width:0 !important;
    height:50px !important;
    min-height:50px !important;
    margin:0 !important;
  }

  /* Disable remnants of previous experimental mobile overlays. */
  .bug-mobile-menu{
    display:none !important;
    pointer-events:none !important;
  }
}

@media (max-width:560px){
  :root{ --bug-header-h:64px; }

  [data-bug-header].premium-site-header.topbar{
    grid-template-columns:minmax(0,1fr) 44px !important;
    padding:0 12px !important;
  }
  [data-bug-header].premium-site-header .brand-lockup,
  [data-bug-header].premium-site-header .brand-lockup.brand-lockup-full{
    height:50px !important;
  }
  [data-bug-header].premium-site-header .brand-lockup .logo-role-header,
  [data-bug-header].premium-site-header .brand-lockup img{
    width:64px !important;
    height:46px !important;
    max-width:64px !important;
  }
}


/* BUG MOBILE FINAL CONFLICT RESET 3062 */
@media (max-width:1180px){

  /* Старые псевдо-линии бургера полностью отключаем */
  [data-bug-header].premium-site-header .menu-button::before,
  [data-bug-header].premium-site-header .menu-button::after{
    content:none !important;
    display:none !important;
    box-shadow:none !important;
  }

  /* Меню всегда занимает весь экран под шапкой */
  [data-bug-header].premium-site-header.menu-open .main-nav{
    position:fixed !important;
    inset:var(--bug-header-h) 0 0 0 !important;

    width:100vw !important;
    max-width:none !important;
    min-width:0 !important;

    height:calc(100vh - var(--bug-header-h)) !important;
    height:calc(100dvh - var(--bug-header-h)) !important;
    min-height:0 !important;
    max-height:none !important;

    margin:0 !important;
    padding:12px 20px 92px !important;

    box-sizing:border-box !important;
    background:#020806 !important;
    opacity:1 !important;

    transform:none !important;
    translate:none !important;

    overflow-x:hidden !important;
    overflow-y:auto !important;

    z-index:10001 !important;
  }

  [data-bug-header].premium-site-header.menu-open .main-nav a{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;

    margin:0 !important;
    padding:0 4px !important;

    box-sizing:border-box !important;
  }

  /* Личный кабинет — полноценная нижняя кнопка */
  [data-bug-header].premium-site-header.menu-open .top-actions,
  [data-bug-header].premium-site-header.menu-open .premium-actions{
    position:fixed !important;

    left:20px !important;
    right:20px !important;
    top:auto !important;
    bottom:calc(14px + env(safe-area-inset-bottom)) !important;

    width:auto !important;
    max-width:none !important;
    min-width:0 !important;

    margin:0 !important;
    padding:0 !important;

    transform:none !important;
    translate:none !important;

    z-index:10002 !important;
  }

  [data-bug-header].premium-site-header.menu-open .header-login{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin:0 !important;
  }

  /* При открытом меню фон страницы не двигается */
  html.bug-menu-open,
  html.bug-menu-open body{
    overflow:hidden !important;
    width:100% !important;
  }
}



/* BUG HOME MOBILE FEATURE ALIGNMENT 3064 */
@media (max-width:768px){

  .home-page #about.feature-grid .feature-card{
    display:grid !important;
    grid-template-columns:76px minmax(0,1fr) !important;
    gap:18px !important;
    align-items:start !important;
  }

  .home-page #about.feature-grid .feature-card .feature-icon{
    width:76px !important;
    height:76px !important;
    min-width:76px !important;
    margin:0 !important;
    justify-self:start !important;
  }

  .home-page #about.feature-grid .feature-card > div:last-child{
    min-width:0 !important;
    width:100% !important;
    margin:0 !important;
    padding:0 !important;
  }

  .home-page #about.feature-grid .feature-card h3,
  .home-page #about.feature-grid .feature-card p{
    margin-left:0 !important;
    padding-left:0 !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    hyphens:none !important;
  }
}
