/* Шапка сайта */
#header .header-wrapper {
  border-bottom: 1px solid rgba(10, 53, 87, 0.08);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 26px rgba(9, 40, 70, 0.055);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

#header .header-wrapper.stuck {
  height: 64px !important;
  border-bottom: 1px solid rgba(10, 53, 87, 0.08);
  background: #fff;
  box-shadow: 0 13px 34px rgba(9, 40, 70, 0.13);
}

#header .header-wrapper.stuck .header-main {
  height: 63px !important;
  min-height: 63px !important;
}

#header .header-wrapper.stuck .header-inner {
  height: 63px !important;
  min-height: 63px !important;
}

#header .header-wrapper.stuck .logo {
  height: 63px !important;
  overflow: visible;
}

#header .header-wrapper.stuck .logo img {
  max-height: 46px !important;
}

#header .header-wrapper.stuck .header-nav-main.nav > li > a {
  min-height: 32px;
  padding: 0 10px !important;
  font-size: 11px !important;
}

#header .header-wrapper.stuck .header-contact.nav > li > a {
  min-height: 32px;
}

#header .header-wrapper.stuck .header-contact.nav > li:last-child > a {
  font-size: 12px !important;
}

#header .header-main {
  background: transparent;
}

#header .header-inner {
  min-height: 78px;
  padding-top: 0;
  padding-bottom: 0;
}

#header .logo {
  display: flex;
  align-items: center;
  margin-right: 24px;
}

#header .logo a {
  display: flex;
  align-items: center;
}

#header .logo img {
  width: auto !important;
  max-height: 64px;
}

/* Навигация по центру */
#header .header-inner > .hide-for-medium.flex-left {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

#header .header-inner > .hide-for-medium.flex-left > .header-nav {
  width: auto;
  margin: 0 auto;
}

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

#header .header-nav-main.nav > li {
  margin: 0 1px;
}

#header .header-nav-main.nav > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px !important;
  border-radius: 7px;
  color: #29465e !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.055em !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

#header .header-nav-main.nav > li > a:hover {
  background: #f4f8fb;
  color: #0a3557 !important;
}

#header .header-nav-main.nav > li.current-menu-item > a,
#header .header-nav-main.nav > li.active > a {
  background: #f4f8fb;
  box-shadow: inset 0 -2px 0 #f3c64d;
  color: #0a3557 !important;
}

/* Контакты справа */
#header .header-inner > .hide-for-medium.flex-right {
  display: flex;
  align-items: center;
  margin-left: 20px;
}

#header .header-nav-main.nav-right {
  margin: 0;
}

#header .header-contact-wrapper {
  display: flex;
  align-items: center;
}

#header .header-contact.nav {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

#header .header-contact.nav > li {
  margin: 0;
  padding: 0;
}

#header .header-contact.nav > li > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  line-height: 1.2 !important;
  text-decoration: none !important;
  text-transform: none !important;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

#header .header-contact.nav > li:first-child > a {
  border-color: #edf2f6;
  background: #f7fafc;
  color: #7c8f9d !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

#header .header-contact.nav > li:first-child > a:hover {
  border-color: #e2ebf2;
  background: #fff;
  color: #0a3557 !important;
}

#header .header-contact.nav > li:last-child > a {
  border-color: #0a3557;
  background: #0a3557;
  box-shadow: 0 6px 16px rgba(10, 53, 87, 0.12);
  color: #fff !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

#header .header-contact.nav > li:last-child > a:hover {
  border-color: #0a4d80;
  background: #0a4d80;
  box-shadow: 0 8px 20px rgba(10, 53, 87, 0.2);
  color: #fff !important;
}

#header .header-contact .icon-clock {
  color: #d9a400;
  font-size: 13px;
  line-height: 1;
}

#header .header-contact .icon-phone {
  color: #f3c64d;
  font-size: 13px;
  line-height: 1;
}

#header .header-contact.nav-divided > li + li::before {
  display: none;
}

/* Планшет: оставляем меню в одну строку */
@media (min-width: 850px) and (max-width: 1100px) {
  #header .header-contact.nav > li:first-child {
    display: none;
  }

  #header .header-nav-main.nav > li > a {
    padding: 0 9px !important;
    font-size: 11px !important;
  }

  #header .header-contact.nav > li:last-child > a {
    padding: 0 11px;
    font-size: 12px !important;
  }
}

/* Мобильная шапка */
@media (max-width: 849px) {
  #header .header-wrapper,
  #header .header-main {
    height: auto !important;
  }

  #header .header-main {
    min-height: 62px;
  }

  #header .header-inner {
    min-height: 62px;
  }

  #header .logo {
    margin-right: 0;
  }

  #header .logo img {
    max-height: 44px;
  }

  #header .mobile-nav .button.icon {
    border-color: #0a3557 !important;
    border-radius: 8px !important;
    background: #0a3557 !important;
    color: #fff !important;
  }

  #header .header-wrapper.stuck {
    height: 56px !important;
  }

  #header .header-wrapper.stuck .header-main {
    height: 55px !important;
    min-height: 55px !important;
  }

  #header .header-wrapper.stuck .header-inner {
    height: 55px !important;
    min-height: 55px !important;
  }

  #header .header-wrapper.stuck .logo {
    height: 55px !important;
  }

  #header .header-wrapper.stuck .logo img {
    max-height: 38px !important;
  }
}
