/*
 * Mobile nav: visibility controlled here only (avoids fighting Tailwind .hidden / layers).
 * Toggled class: header-menu--open (see assets/inline.js).
 */
@media (max-width: 767px) {
  #header-menu:not(.header-menu--open) {
    display: none !important;
  }

  #header-menu.header-menu--open {
    display: flex !important;
    flex-direction: column;
    gap: 1.5rem;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 60;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 31, 63, 0.98);
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
}

@media (min-width: 768px) {
  #header-menu {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    position: static !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    z-index: auto !important;
  }

  #header-menu.header-menu--open {
    /* desktop: ignore mobile open class */
    position: static !important;
    display: flex !important;
  }
}

/*
 * Hamburger visibility: internal static pages often lack Tailwind, so .md:hidden
 * does not show the button. ID rules always apply.
 */
@media (max-width: 767px) {
  #mobile-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    position: relative;
    z-index: 55;
  }
}

@media (min-width: 768px) {
  #mobile-menu-btn {
    display: none !important;
  }
}
