/* Base layout */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-header__wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__brand img {
  max-height: 89px;
  width: auto;
  display: block;
}

/* Contacts */
.site-header__contacts {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.site-header__contact-item {
  display: flex;
}

.site-header__contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #003d7c;
  text-decoration: none;
  font-weight: 500;
}

.site-header__icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.site-header__contact-text {
  white-space: nowrap;
}

/* Socials & CTA */
.site-header__social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-header__social-link img {
  width: 24px;
  height: 24px;
}

.site-header__cta img {
  max-height: 64px;
  width: auto;
  display: block;
}

/* Navigation */

.primary-menu__link {
  color: #fff;
  text-decoration: none;
}

.menu-item-docs a {
  color: #fff;
  background: transparent;
}

.menu-item-docs a:hover {
  color: #8ec1e6 !important;
  background: transparent !important;
}

.primary-menu__link:hover {
  background-color: transparent;
  border-color: transparent;
  color: #8ec1e6;
}

/* Снимаем белый фон и рамку с базовых стилей #mainav при ховере/активе */
#mainav .primary-menu__link:hover,
#mainav li:hover > .primary-menu__link,
#mainav .current-menu-item > .primary-menu__link {
  background-color: transparent;
  border-color: transparent;
  color: #8ec1e6;
}

.current-menu-item > .primary-menu__link {
  color: #8ec1e6;
  font-weight: 600;
}

.site-header__nav-wrapper {
  display: flex;
  justify-content: flex-end;
}

.site-header__nav {
  width: 100%;
}

.site-header__nav .primary-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header__bg {
  background-color: #003d7c;
}

/* Burger */
.site-header__burger {
  display: none;
  position: relative;
  width: 32px;
  height: 24px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.site-header__burger span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #003d7c;
  border-radius: 1px;
  transition: transform 0.2s ease, top 0.2s ease, opacity 0.2s ease;
}

.site-header__burger span:nth-child(1) {
  top: 2px;
}

.site-header__burger span:nth-child(2) {
  top: 11px;
}

.site-header__burger span:nth-child(3) {
  top: 20px;
}

/* State class for JS: .is-open on body or header */
.site-header.is-open .site-header__burger span:nth-child(1) {
  top: 11px;
  transform: rotate(45deg);
}

.site-header.is-open .site-header__burger span:nth-child(2) {
  opacity: 0;
}

.site-header.is-open .site-header__burger span:nth-child(3) {
  top: 11px;
  transform: rotate(-45deg);
}

.site-header.is-open .site-header__nav-wrapper {
  max-height: 500px;
  opacity: 1;
  visibility: visible;
}

/* Responsive */
@media (max-width: 992px) {
  .site-header__inner {
    padding-inline: 16px;
  }

  .site-header__contacts {
    gap: 16px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .site-header__inner {
    padding: 10px 16px 6px;
    gap: 8px;
  }

  .site-header__wrapper {
    align-items: flex-start;
  }

  .site-header__contacts {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .site-header__social {
    margin-top: 4px;
  }

  .site-header__burger {
    display: inline-block;
  }

  .site-header__nav-wrapper {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease;
  }

}

