/* ==========================================================================
   Muse Paint Bar — Custom Site Header (Divi)
   File: wp-content/themes/musePaint/css/mpb-custom.css   (or child theme)
   --------------------------------------------------------------------------
   Drop-in stylesheet for the custom header used in Divi's Global Header
   template. Selectors are written with extra specificity + !important on
   visual rules because Divi's own .et_pb_section a / button styles fight
   plain class selectors otherwise.

   Companion HTML lives in a Divi Code module inside the Global Header.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) Kill Divi's default header chrome
   The custom header below replaces Divi's secondary + main nav.
   -------------------------------------------------------------------------- */
#top-header,
#main-header,
.et_secondary_nav_enabled #top-header,
#et-secondary-nav,
#et-top-navigation {
  display: none !important;
}

/* Divi reserves vertical space on <body> for its fixed header.
   Reclaim that space so our header sits flush at the top. */
body.et_fixed_nav,
body.et_secondary_nav_enabled,
body {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* The Divi section + row wrapping our Code module: strip outer chrome
   so .mpb-divi-header__inner can lay out edge-to-edge.
   Note: Divi's own selectors are extremely deep (e.g.
     `.et-tb-has-template.et-db #et-boc .et-l .et_pb_with_background .et_pb_row`)
   so we need !important + extra-specific selectors to win the cascade. */
.et-l .et_pb_section.mpb-divi-header-section,
.et-l .et_pb_section.mpb-divi-header-section .et_pb_row,
.et-l .et_pb_section.mpb-divi-header-section .et_pb_row .et_pb_column,
.et-l .mpb-divi-header-section,
.et-l .mpb-divi-header-section .et_pb_row,
.et-l .mpb-divi-header-section .et_pb_row .et_pb_column {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
.et-l .mpb-divi-header-section .et_pb_row {
  background: transparent !important;
}

/* Also catch the case where the user hasn't added .mpb-divi-header-section
   as a CSS class on the section — kill outer padding on ANY section whose
   row contains our header. */
.et-l .et_pb_section:has(.mpb-divi-header),
.et-l .et_pb_section:has(.mpb-divi-header) .et_pb_row,
.et-l .et_pb_section:has(.mpb-divi-header) .et_pb_row .et_pb_column {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Divi re-adds padding-left/right: 15px on .et_pb_row at <=1221px via:
     .et-tb-has-template.et-db #et-boc .et-l .et_pb_row { padding: ... !important; }
   We need a more-specific matching selector inside the same media query to win. */
@media (max-width: 1221px) {
  .et-tb-has-template.et-db #et-boc .et-l .et_pb_section.mpb-divi-header-section .et_pb_row,
  .et-tb-has-template.et-db #et-boc .et-l .et_pb_section:has(.mpb-divi-header) .et_pb_row,
  .et-tb-has-template.et-db #et-boc .et-l .et_pb_section.mpb-divi-header-section .et_pb_row .et_pb_column,
  .et-tb-has-template.et-db #et-boc .et-l .et_pb_section:has(.mpb-divi-header) .et_pb_row .et_pb_column {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* --------------------------------------------------------------------------
   2) Box-sizing reset (scoped)
   -------------------------------------------------------------------------- */
.mpb-divi-header,
.mpb-divi-header *,
.mpb-divi-header *::before,
.mpb-divi-header *::after {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   3) The bar itself
   -------------------------------------------------------------------------- */
.mpb-divi-header {
  --mpb-bar-bg: #333;
  --mpb-bar-fg: #fff;

  position: relative;
  z-index: 100;
  background: var(--mpb-bar-bg) !important;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  color: var(--mpb-bar-fg) !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
}

.mpb-divi-header__inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  max-width: 1280px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 19px 24px !important;
  gap: 16px !important;
}

/* --------------------------------------------------------------------------
   4) Hamburger toggle
   -------------------------------------------------------------------------- */
.mpb-divi-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;
  margin: 0 !important;
  cursor: pointer !important;
  border-radius: 4px !important;
}

.mpb-divi-header__menu-bar {
  display: block !important;
  width: 22px !important;
  height: 2px !important;
  background: var(--mpb-bar-fg) !important;
  border-radius: 1px !important;
}

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

.mpb-divi-header__logo-img {
  display: block !important;
  height: 42px !important;
  width: auto !important;
  max-width: none !important;        /* Divi caps img max-width: 100% */
  user-select: none;
}

/* Universal link reset inside the header so Divi's defaults don't bleed in */
.mpb-divi-header a,
.mpb-divi-header a:hover,
.mpb-divi-header a:focus,
.mpb-divi-header a:visited {
  text-decoration: none !important;
}

/* --------------------------------------------------------------------------
   6) CTA buttons — high specificity so Divi's .et_pb_section a rules lose
   -------------------------------------------------------------------------- */
.mpb-divi-header__ctas {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.mpb-divi-header a.mpb-divi-header__btn,
.mpb-divi-header a.mpb-divi-header__btn:hover,
.mpb-divi-header a.mpb-divi-header__btn:focus,
.mpb-divi-header a.mpb-divi-header__btn:active,
.mpb-divi-header a.mpb-divi-header__btn:visited {
  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;
  line-height: 1 !important;
  box-shadow: none !important;
  transition: none !important;
  transform: none !important;
}

/* Kill Divi's arrow animation (::after slides in on hover and pushes padding) */
.mpb-divi-header a.mpb-divi-header__btn::after,
.mpb-divi-header a.mpb-divi-header__btn::before,
.mpb-divi-header a.mpb-divi-header__btn:hover::after,
.mpb-divi-header a.mpb-divi-header__btn:active::after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
  width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.mpb-divi-header a.mpb-divi-header__btn--outline,
.mpb-divi-header a.mpb-divi-header__btn--outline:visited,
.mpb-divi-header a.mpb-divi-header__btn--outline:hover,
.mpb-divi-header a.mpb-divi-header__btn--outline:focus {
  background: transparent !important;
  color: #fff !important;
  border-color: #fff !important;
}

.mpb-divi-header a.mpb-divi-header__btn--filled,
.mpb-divi-header a.mpb-divi-header__btn--filled:visited,
.mpb-divi-header a.mpb-divi-header__btn--filled:hover,
.mpb-divi-header a.mpb-divi-header__btn--filled:focus {
  background: #fff !important;
  color: #333 !important;
  border-color: #fff !important;
}

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

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

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