/* =============================================
   MOBILE LOGO BAR - Separate from Duda Header
   Shows ONLY on mobile (max-width: 767px)
   Hides the original broken Duda logo on mobile
   ============================================= */

/* Hidden on desktop/tablet */
#mobile-logo-bar {
  display: none;
}

/* ---- MOBILE ONLY ---- */
@media (max-width: 767px) {

  /* Show mobile logo bar */
  #mobile-logo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Logo left, burger right */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: #ffffff;
    z-index: 9998; /* below drawer (10000) but above everything else */
    padding: 0 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  }

  #mobile-logo-bar a.logo-link {
    display: block;
    line-height: 0;
    text-decoration: none;
  }

  #mobile-logo-bar img {
    height: 62px; /* slightly smaller to fit better */
    width: auto;
    max-width: 150px;
    object-fit: contain;
    display: block;
  }

  /* Hamburger button in the bar */
  #mobile-logo-bar .hamburgerButton {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
  }

  #mobile-logo-bar .hamburgerButton svg {
    width: 24px;
    height: 24px;
    fill: #38B349; /* Matching theme color */
  }

  /* ---- Hide the original Duda logo and hamburger on mobile ---- */
  /* Using attribute selector to avoid CSS escaping issues with numeric IDs */
  [id="1b40c5f7"],
  [id="6cc3b7b8"] {
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 !important;
    display: none !important;
  }

  /* ---- Hide the original Duda header container on mobile to remove white gap ---- */
  #dmFlexHeaderContainer,
  #flex-header {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    visibility: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  /* Push page content down EXACTLY the height of our fixed logo bar (62px) */
  #dm-outer-wrapper {
    padding-top: 62px !important;
    margin-top: 0 !important;
  }

  /* Reset any margins on the content wrapper that Duda might add */
  #site_content,
  .site_content,
  .dm_wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}
