/* ==========================================================================
   Header
   ========================================================================== */

.header {
  width: 100%;
  position: relative;
  top: 0;
  z-index: 100;
  background: #fff;
  transition: all 0.3s ease-in-out;
}


/* Top bar */
.header-top {
  background-color: #004da1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  gap: 16px;
}

.header-top a {
  color: #fff;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-family: 'bahnschriftregular';
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.header-phone:hover {
  color: #65cef5;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.header-social a:hover {
  color: #65cef5;
}

/* IcoMoon font icons in header */
.header [class^="icon-"],
.header [class*=" icon-"] {
  display: inline-block;
  font-family: 'icomoon' !important;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  vertical-align: middle;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.header-phone [class^="icon-"] {
  font-size: 20px;
}

.header-social [class^="icon-"] {
  font-size: 18px;
}

/* Main nav bar */
.header-main {
  background: #fff;
  border-bottom: 1px solid #d9e8f7;
}

.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 90px;
  position: relative;
}

.header-sticky .header-main {
  box-shadow: 0 2px 12px rgba(0, 77, 161, 0.08);
}

.site-logo {
  display: block;
  flex-shrink: 0;
  max-width: 280px;
}

.site-logo img {
  width: 100%;
  height: auto;
  display: block;
}

/* Navigation */
.nav-bar {
  margin-left: auto;
}

.nav-bar-inside {
  display: block;
}

.header .menu-ul,
.header .nav-bar ul {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header .menu-ul > li,
.header .nav-bar ul > li {
  position: relative;
  list-style: none;
}

.header .menu-ul > li > a,
.header .nav-bar ul > li > a {
  display: block;
  font-family: 'bahnschriftregular';
  font-size: 20px;
  font-weight: 500;
  color: #333;
  line-height: 1.2;
  padding: 8px 0;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.header .menu-ul > li > a:hover,
.header .menu-ul > li.current-menu-item > a,
.header .menu-ul > li.current_page_item > a,
.header .nav-bar ul > li > a:hover,
.header .nav-bar ul > li.current-menu-item > a,
.header .nav-bar ul > li.current_page_item > a {
  color: #004da1;
}

.header .menu-ul .sub-menu,
.header .nav-bar .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  padding: 8px 0;
  margin: 0;
  background: #fff;
  border: 1px solid #d9e8f7;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 77, 161, 0.1);
  list-style: none;
  z-index: 20;
}

.header .menu-ul li:hover > .sub-menu,
.header .nav-bar li:hover > .sub-menu {
  display: block;
}

.header .menu-ul .sub-menu li,
.header .nav-bar .sub-menu li {
  list-style: none;
}

.header .menu-ul .sub-menu a,
.header .nav-bar .sub-menu a {
  display: block;
  padding: 10px 18px;
  font-size: 15px;
  color: #333;
}

.header .menu-ul .sub-menu a:hover,
.header .nav-bar .sub-menu a:hover {
  color: #004da1;
  background: #f3f8fd;
}

.header .menu-item-has-children > a {
  padding-right: 18px;
}

.header .mobile-icon {
  display: none;
}

/* Hamburger – hidden on desktop */
.menu-icon {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-icon span {
  display: block;
  width: 26px;
  height: 2px;
  background-color: #004da1;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

.menu-icon.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-icon.open span:nth-child(2) {
  opacity: 0;
}

.menu-icon.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Mobile toggle menu – below 900px
   ========================================================================== */

@media (max-width: 900px) {
  .header-top-inner {
    min-height: 34px;
  }

  .header-phone {
    font-size: 12px;
  }

  .header-social {
    gap: 10px;
  }

  .header-social a {
    font-size: 13px;
  }

  .header-main-inner {
    min-height: 72px;
  }

  .site-logo {
    max-width: 200px;
  }

  .menu-icon {
    display: flex;
  }

  .nav-bar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: #fff;
    border-top: 1px solid #d9e8f7;
    box-shadow: 0 8px 24px rgba(0, 77, 161, 0.1);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, visibility 0.25s ease;
  }

  .nav-bar.slow {
    max-height: 80vh;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
  }

  .nav-bar-inside {
    padding: 12px 20px 20px;
  }

  .header .menu-ul,
  .header .nav-bar ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .header .menu-ul > li,
  .header .nav-bar ul > li {
    border-bottom: 1px solid #eef4fb;
  }

  .header .menu-ul > li:last-child,
  .header .nav-bar ul > li:last-child {
    border-bottom: none;
  }

  .header .menu-ul > li > a,
  .header .nav-bar ul > li > a {
    font-size: 15px;
    padding: 14px 0;
  }

  .header .menu-ul .sub-menu,
  .header .nav-bar .sub-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 8px 16px;
    background: transparent;
  }

  .header .menu-item-has-children.sub-open > .sub-menu {
    display: block;
  }

  .header .menu-item-has-children {
    position: relative;
  }

  .header .menu-item-has-children > a {
    padding-right: 36px;
  }

  .header .mobile-icon {
    display: inline-block;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #004da1;
    cursor: pointer;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .header-top-inner {
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .header-phone span {
    font-size: 13px;
  }
}
