/* ==========================================================================
   Muse Paint Bar — Site Header Styles
   Path: assets/css/mpb_site_header.css

   All selectors use the `mpb-site-header` prefix to avoid any collision
   with the existing theme header. Uses !important on key visual rules
   because the surrounding BackendPro/admin template ships its own
   button + nav styles that would otherwise bleed in.
   ========================================================================== */

.mpb-site-header,
.mpb-site-header *,
.mpb-site-header *::before,
.mpb-site-header *::after {
  box-sizing: border-box;
}

/* ---------- Bar ---------- */
.mpb-site-header {
  position: relative !important;
  z-index: 100 !important;
  background: #333 !important;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  color: #fff !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15) !important;
  /* Parent theme stylesheet sets `header { height: 140px }`. Override so our
     bar collapses to the natural height of its inner flex row. */
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
}

.mpb-site-header__inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 40px 24px !important;
  height: 60px !important;
  gap: 16px !important;
}

/* Spacer is a no-op now that the header isn't fixed; kept in markup
   for backward compatibility but takes no vertical space. */
.mpb-site-header__spacer {
  display: none !important;
}

/* ---------- Hamburger toggle ---------- */
.mpb-site-header__menu-toggle {
  display: inline-flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 5px !important;
  width: 40px !important;
  height: 40px !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer !important;
  border-radius: 4px !important;
  transition: background 0.15s ease;
}

.mpb-site-header__menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.mpb-site-header__menu-bar {
  display: block !important;
  width: 22px !important;
  height: 2px !important;
  background: #fff !important;
  border-radius: 1px !important;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Animate hamburger -> X when open */
.mpb-site-header__menu-toggle[aria-expanded="true"] .mpb-site-header__menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mpb-site-header__menu-toggle[aria-expanded="true"] .mpb-site-header__menu-bar:nth-child(2) {
  opacity: 0;
}
.mpb-site-header__menu-toggle[aria-expanded="true"] .mpb-site-header__menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Logo ---------- */
.mpb-site-header__logo {
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
  margin-right: auto !important;     /* pushes CTAs to the right */
}

.mpb-site-header__logo-img {
  display: block !important;
  height: 42px !important;
  width: auto !important;
  user-select: none;
}

/* Hide existing theme off-canvas wrapper on pages where this header is in use */
.off-canvas-wrap {
  display: none !important;
}

/* ---------- CTA buttons ---------- */
.mpb-site-header__ctas {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.mpb-site-header__btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 40px !important;
  padding: 0 22px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  border-radius: 5px !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

.mpb-site-header__btn--outline {
  background: transparent !important;
  color: #fff !important;
  border-color: #fff !important;
}

.mpb-site-header__btn--filled {
  background: #fff !important;
  color: #333 !important;
  border-color: #fff !important;
}

/* ---------- Slide-down nav ---------- */
.mpb-site-header__nav {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  background: #333 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  max-height: 0 !important;
  overflow: hidden !important;
  transition: max-height 0.3s ease;
}

.mpb-site-header__nav[data-open="true"] {
  max-height: 500px !important;
}

.mpb-site-header__nav-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 8px 0 !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.mpb-site-header__nav-item {
  margin: 0 !important;
  padding: 0 !important;
}

.mpb-site-header__nav-link {
  display: block !important;
  padding: 16px 24px !important;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  transition: background 0.15s ease;
}

.mpb-site-header__nav-link:hover,
.mpb-site-header__nav-link:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

/* ---------- Backdrop when nav is open (mobile) ---------- */
.mpb-site-header__nav[data-open="true"]::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: -1;
  pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .mpb-site-header__inner {
    padding: 16px 10px !important;
    gap: 8px !important;
  }
  .mpb-site-header__logo-img { height: 36px !important; }

  .mpb-site-header__btn {
    height: 36px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    letter-spacing: 1px !important;
  }
}

@media (max-width: 420px) {
  .mpb-site-header__btn {
    padding: 0 10px !important;
    font-size: 12px !important;
  }
}