/* Custom glue for legacy landing to work inside new project structure */

/* Ensure header matches screenshots: compact white bar, centered menu, button right */
#header {
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
  height: 64px;
  padding: 0;
}

/* The legacy template relies on floats; switch to flex so header height is stable */
#header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

#header .logo,
#header .main-nav {
  float: none !important;
}

#header .logo {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  height: 100%;
  line-height: 0;
}

#header .main-nav {
  display: flex;
  align-items: center;
}

/* IMPORTANT:
   Flex only the TOP LEVEL of the desktop menu.
   If we flex all <ul>, nested dropdown <ul> becomes horizontal.
*/
#header .main-nav > ul {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

#header .main-nav > ul > li {
  display: flex;
  align-items: center;
}

/* Ensure dropdown lists remain vertical */
#header .main-nav ul ul {
  display: block;
}

#header .main-nav ul ul li {
  display: block;
  width: 100%;
}

/* Login button in header */
#header .btn-login {
  margin-left: 18px;
  padding: 10px 18px;
  border-radius: 12px;
  line-height: 1;
}

/* SVG logo sizing (logo.svg)
   Force override over legacy: #header .logo img { max-height: 26px; margin: 7px 0; }
*/
#header .logo img,
#header .logo .site-logo {
  /* Make SVG behave like a normal logo image */
  height: 34px !important;
  max-height: 34px !important;
  width: auto !important;
  display: block;
  margin: 0 !important;
}

@media (max-width: 768px) {
  #header { height: 56px; padding: 0; }
#header .logo img,
  #header .logo .site-logo {
    height: 30px !important;
    max-height: 30px !important;
  
  }
}

/* Mobile nav (slide in from left) */
.mobile-nav-toggle {
  position: fixed;
  right: 16px;
  top: 18px;
  z-index: 9999;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
}
.mobile-nav-toggle,
.mobile-nav-close {
  background: none;
  border: 0;
  font-size: 22px;
  line-height: 1;
  transition: transform .2s ease, opacity .2s ease;
}

.mobile-nav-close:hover {
  transform: rotate(90deg);
  opacity: .7;
}

@media (max-width: 768px) {
  .mobile-nav-toggle { top: 14px; }
}

/* Hide burger when menu is open (prevents double icons & misaligned header line) */
body.mobile-nav-active .mobile-nav-toggle { display: none; }

#mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.35);
  z-index: 9996;
}

#mobile-nav {
  /* Fullscreen drawer (no "air" on the right) */
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  background: #fff;
  z-index: 9997;
  transform: translateX(-100%);
  transition: transform .25s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.mobile-nav-active #mobile-nav { transform: translateX(0); }
body.mobile-nav-active #mobile-nav-overlay { display: block; }

#mobile-nav .mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

/* Keep logo size consistent when the mobile menu is open (matches header logo) */
#mobile-nav .mobile-nav-header img {
  height: 30px;
  max-height: 30px;
  width: auto !important;
}

#mobile-nav .mobile-nav-close {
  border: 0;
  background: transparent;
  font-size: 34px;
  line-height: 1;
}

#mobile-nav .mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px 16px;
}

/* Slightly more compact buttons (still bootstrap) */
#mobile-nav .mobile-actions .btn.btn-sm {
  padding-top: .35rem;
  padding-bottom: .35rem;
}

#mobile-nav ul { list-style: none; padding: 0; margin: 0; }
#mobile-nav ul li { border-top: 1px solid rgba(0,0,0,.08); }
#mobile-nav ul li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  color: #111;
  font-weight: 500;
}

#mobile-nav ul li ul { display: none; }
#mobile-nav ul li.mobile-nav-item-open > ul { display: block; }
#mobile-nav ul li ul li a { font-weight: 400; padding-left: 28px; }

/* Chevron */
#mobile-nav .chev { font-size: 20px; opacity: .7; }

/* Prevent background scroll when nav active */
body.mobile-nav-active { overflow: hidden; }

.mobile-nav-toggle i,
#mobile-nav .mobile-nav-close i{
  font-size: 26px;
  line-height: 1;
}
#mobile-nav .mobile-actions .btn.btn-sm{
  padding: .35rem .7rem;   /* компактнее */
  font-size: .9rem;
  border-radius: .5rem;
}
