
.mph-header,
.mph-header * {
  box-sizing: border-box;
}

.mph-header {
  width: 100%;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid rgba(14,50,92,.08);
  box-shadow: 0 10px 35px rgba(20,46,86,.10);
  z-index: 99999;
  font-family: inherit;
  overflow: visible;
}

.mph-header.mph-sticky {
  position: sticky;
  top: 0;
}

body.admin-bar .mph-header.mph-sticky {
  top: 32px;
}

.mph-inner {
  width: min(1420px, calc(100% - 40px));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 34px;
  position: relative;
  overflow: visible;
}

.mph-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.mph-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #173b69;
}

.mph-logo-img {
  max-height: 64px;
  width: auto;
  display: block;
}

.mph-logo-text {
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.mph-navigation {
  margin-inline-start: auto;
  overflow: visible;
}

.mph-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(17px, 1.8vw, 32px);
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.mph-menu > li {
  position: relative;
  margin: 0;
  padding: 0;
}

.mph-menu > li > a:not(.mph-register-btn):not(.mph-badge) {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  color: #173b69;
  font-size: clamp(15px, 1.25vw, 19px);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, transform .2s ease;
}

.mph-menu > li > a:not(.mph-register-btn):not(.mph-badge):hover,
.mph-menu > li.current-menu-item > a {
  color: #f47b20;
  transform: translateY(-1px);
}

.mph-menu .sub-menu {
  list-style: none;
  position: absolute;
  top: calc(100% - 2px);
  right: 0;
  width: max-content;
  min-width: 210px;
  background: #fff;
  border: 1px solid rgba(14,50,92,.08);
  box-shadow: 0 16px 40px rgba(13,35,66,.12);
  border-radius: 16px;
  padding: 10px;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: .2s ease;
  z-index: 100000;
}

.mph-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mph-menu .sub-menu a {
  display: block;
  color: #173b69;
  text-decoration: none;
  padding: 10px 13px;
  border-radius: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.mph-menu .sub-menu a:hover {
  background: #f5f8fc;
  color: #f47b20;
}

.mph-register-item {
  margin-inline-start: 8px !important;
  padding-bottom: 2px !important;
  overflow: visible;
}

.mph-register-btn {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  border-radius: 16px;
  color: #fff !important;
  background: linear-gradient(135deg, #ff9e2c, #ff5f46);
  box-shadow: 0 12px 28px rgba(255,104,53,.27);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none !important;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  z-index: 4;
}

.mph-register-btn:hover {
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(255,104,53,.34);
}

.mph-badge {
  position: absolute;
  top: 64px;
  left: 50%;
  width: max-content;
  min-width: 110px;
  padding: 9px 13px 10px;
  border-radius: 8px 8px 14px 14px;
  background: #ffe36f;
  border: 2px solid #fff;
  box-shadow: 0 8px 19px rgba(0,0,0,.16);
  text-align: center;
  color: #84251f !important;
  text-decoration: none !important;
  transform: translateX(-50%);
  transform-origin: 50% -18px;
  animation: mphSwing 2.6s ease-in-out infinite;
  z-index: 3;
}

.mph-badge strong {
  display: block;
  font-size: 13px;
  font-weight: 1000;
  line-height: 1.25;
}

.mph-badge small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.2;
  color: #a34b23;
}

.mph-rope {
  position: absolute;
  left: 50%;
  top: -15px;
  width: 2px;
  height: 16px;
  background: #8b705f;
  transform: translateX(-50%);
}

.mph-pin {
  position: absolute;
  left: 50%;
  top: -22px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #df3d34;
  transform: translateX(-50%);
  box-shadow: 0 2px 5px rgba(0,0,0,.22);
}

@keyframes mphSwing {
  0%, 100% { transform: translateX(-50%) rotate(0deg); }
  20% { transform: translateX(-50%) rotate(5deg); }
  45% { transform: translateX(-50%) rotate(-4deg); }
  70% { transform: translateX(-50%) rotate(3deg); }
  88% { transform: translateX(-50%) rotate(-2deg); }
}

.mph-toggle {
  display: none;
  margin-inline-start: auto;
  width: 48px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: #f2f6fb;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.mph-toggle span {
  width: 23px;
  height: 2px;
  border-radius: 2px;
  background: #173b69;
  display: block;
  transition: .2s ease;
}

@media (max-width: 1080px) {
  .mph-inner {
    min-height: 78px;
    width: min(100% - 24px, 1420px);
  }

  .mph-toggle {
    display: inline-flex;
  }

  .mph-navigation {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(13,35,66,.16);
    border: 1px solid rgba(14,50,92,.08);
    padding: 14px;
    overflow: visible;
  }

  .mph-header.mph-open .mph-navigation {
    display: block;
  }

  .mph-menu {
    display: block;
  }

  .mph-menu > li {
    margin: 0 !important;
  }

  .mph-menu > li > a:not(.mph-register-btn):not(.mph-badge) {
    width: 100%;
    min-height: 46px;
    padding: 0 10px;
    font-size: 16px;
  }

  .mph-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    width: 100%;
    min-width: 0;
    box-shadow: none;
    border: 0;
    padding: 0 14px 6px 0;
    display: none;
  }

  .mph-menu li:hover > .sub-menu,
  .mph-menu .menu-item-has-children.mph-sub-open > .sub-menu {
    display: block;
  }

  .mph-register-item {
    margin-top: 12px !important;
    padding-bottom: 46px !important;
    text-align: center;
  }

  .mph-register-btn {
    width: 100%;
  }

  .mph-badge {
    top: 64px;
  }
}

@media (max-width: 782px) {
  body.admin-bar .mph-header.mph-sticky {
    top: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mph-badge {
    animation: none;
  }

  .mph-menu a,
  .mph-register-btn {
    transition: none;
  }
}
