/* ===================== HMI HEADER (namespaced: hmi-hdr-*) ===================== */
.hmi-hdr-header * { box-sizing: border-box; }

/* Remove the default focus/click box (outline & tap highlight) inside the header */
.hmi-hdr-header a,
.hmi-hdr-header button {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.hmi-hdr-header a:focus,
.hmi-hdr-header button:focus,
.hmi-hdr-header a:active,
.hmi-hdr-header button:active {
  outline: none;
  box-shadow: none;
}

/* Offset page content so it isn't hidden behind the fixed header.
   Header height is 98px (see .hmi-hdr-inner min-height). */
body { padding-top: 98px; }

.hmi-hdr-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  font-family: 'Inter', Arial, sans-serif;
}

.hmi-hdr-inner {
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 76px;
  position: relative;
}

/* ── LOGO ── */
.hmi-hdr-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.hmi-hdr-logo img {
  max-height: 60px;
  width: auto;
  display: block;
}

/* ── NAV ── */
.hmi-hdr-nav {
  display: flex;
  align-items: center;
  gap: 42px;
  flex: 1 1 auto;
  justify-content: center;
}

.hmi-hdr-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 98px;
}

.hmi-hdr-item > a,
.hmi-hdr-item > .hmi-hdr-link-wrap > a {
  color: #3C3C3C;
  font-size: 14px;
  font-weight: 550;
  line-height: 18px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}

.hmi-hdr-item > a:hover,
.hmi-hdr-item > .hmi-hdr-link-wrap > a:hover,
.hmi-hdr-item.has-dropdown:hover > .hmi-hdr-link-wrap > a,
.hmi-hdr-item.has-dropdown.is-open > .hmi-hdr-link-wrap > a {
  color: #09B35A;
}

/* submenu parent wrapper */
.hmi-hdr-link-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
}

/* chevron toggle button */
.hmi-hdr-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}
.hmi-hdr-toggle-btn::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%233C3C3C' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform 0.2s ease;
}
.hmi-hdr-item.has-dropdown:hover .hmi-hdr-toggle-btn::after,
.hmi-hdr-item.has-dropdown.is-open .hmi-hdr-toggle-btn::after {
  transform: rotate(180deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2309B35A' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ── DROPDOWN MENU ── */
.hmi-hdr-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-top: 2px solid #09B35A;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  min-width: 320px;
  padding: 8px 0;
  z-index: 200;
}
.hmi-hdr-item.has-dropdown:hover .hmi-hdr-dropdown {
  display: block;
}
.hmi-hdr-dropdown a {
  display: block;
  padding: 11px 20px;
  color: #3C3C3C;
  font-size: 14px;
  font-weight: 550;
  line-height: 18px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.hmi-hdr-dropdown a:hover {
  background: #f1faf4;
  color: #09B35A;
}

/* ── LOGIN BUTTON ── */
.hmi-hdr-login {
  flex: 0 0 auto;
  background: #09B35A;
  color: #FFF;
  font-size: 14px;
  font-weight: 550;
  line-height: 18px;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 16px 48px;
  white-space: nowrap;
  transition: background 0.2s;
}
.hmi-hdr-login:hover {
  background: #07a050;
  color: #fff;
  text-decoration: none;
}

/* ── CLIENT LOGIN ICON (mobile) ── */
.hmi-hdr-login-icon {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #09B35A;
  transition: background 0.2s;
}
.hmi-hdr-login-icon:hover { background: #07a050; }
.hmi-hdr-login-icon img {
  width: 18px;
  height: 18px;
  display: block;
}

/* ── HAMBURGER ── */
.hmi-hdr-hamburger {
  display: none;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 8px;
}
.hmi-hdr-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #004b8d;
  margin: 5px 0;
  transition: 0.3s;
}
.hmi-hdr-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hmi-hdr-hamburger.is-open span:nth-child(2) { opacity: 0; }
.hmi-hdr-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── RESPONSIVE ── */
@media (max-width: 1400px) {
  .hmi-hdr-inner { padding: 0 32px; }
  .hmi-hdr-nav { gap: 24px; }
  .hmi-hdr-item > a,
  .hmi-hdr-item > .hmi-hdr-link-wrap > a { font-size: 13px; }
  .hmi-hdr-login { padding: 14px 32px; }
}

@media (max-width: 1280px) {
  .hmi-hdr-inner { padding: 0 20px; }
  .hmi-hdr-nav { gap: 16px; }
  .hmi-hdr-login { padding: 12px 24px; }
}

@media (max-width: 1199px) {
  .hmi-hdr-hamburger { display: block; order: 3; }
  .hmi-hdr-login { display: none; }
  .hmi-hdr-login-icon { display: flex; order: 2; margin-right: 14px; }
  .hmi-hdr-logo { margin-right: auto; }

  .hmi-hdr-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 999;
  }
  .hmi-hdr-nav.is-open {
    max-height: calc(100vh - 98px);
    overflow-y: auto;
  }

  .hmi-hdr-item {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid #eee;
  }
  .hmi-hdr-link-wrap {
    height: auto;
    justify-content: space-between;
  }
  .hmi-hdr-item > a,
  .hmi-hdr-item > .hmi-hdr-link-wrap > a {
    padding: 16px 24px;
    flex: 1 1 auto;
    font-size: 15px;
  }
  .hmi-hdr-toggle-btn {
    width: 56px;
    height: 56px;
  }

  .hmi-hdr-dropdown {
    position: static;
    display: none;
    border-top: none;
    border-radius: 0;
    box-shadow: none;
    min-width: 0;
    padding: 0;
    background: #f7f9fc;
  }
  .hmi-hdr-item.has-dropdown:hover .hmi-hdr-dropdown { display: none; }
  .hmi-hdr-item.has-dropdown.is-open .hmi-hdr-dropdown { display: block; }
  .hmi-hdr-dropdown a { padding-left: 40px; white-space: normal; }
}

@media (max-width: 479px) {
  .hmi-hdr-inner { padding: 0 16px; }
  .hmi-hdr-logo img { max-height: 46px; }
  .hmi-hdr-login-icon { width: 32px; height: 32px; }
  .hmi-hdr-login-icon img { width: 16px; height: 16px; }
}
