/* Deep Signal header — mobile navigation (burger + slide-down panel).
   Pairs with ds-mobile-nav.js, which tags each Deep Signal nav with the
   stable marker classes .dsm-nav / .dsm-open and injects .ds-nav-burger.
   Deep Signal pages use a per-page prefix (ds-nav, so-nav, …), so the
   links/CTA are matched generically via [class$="-nav-links"] /
   [class$="-nav-cta"]. The in-body node CSS hides the links at <=768px;
   the open-state rules below (higher specificity + !important) reveal them. */

.ds-nav-burger { display: none; }

@media (max-width: 768px) {
  /* Hamburger button */
  .dsm-nav .ds-nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 11px;
    margin-left: auto;
    box-sizing: border-box;
    background: transparent;
    border: 1px solid rgba(229, 91, 19, 0.4);
    border-radius: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex: 0 0 auto;
  }
  .dsm-nav .ds-nav-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
  }
  .dsm-open .ds-nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .dsm-open .ds-nav-burger span:nth-child(2) { opacity: 0; }
  .dsm-open .ds-nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Keep logo left; group burger + CTA on the right, tighten the CTA. */
  .dsm-nav [class$="-nav-cta"] { margin-left: 12px; }

  /* Slide-down panel — overrides the in-body `[prefix]-nav-links { display: none }`. */
  .dsm-nav.dsm-open [class$="-nav-links"] {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 6px 0 14px;
    background: linear-gradient(180deg, rgba(6, 6, 6, 0.98) 0%, rgba(12, 12, 12, 0.98) 100%);
    -webkit-backdrop-filter: saturate(140%) blur(18px);
    backdrop-filter: saturate(140%) blur(18px);
    border-bottom: 1px solid rgba(229, 91, 19, 0.28);
    box-shadow: 0 28px 50px -16px rgba(0, 0, 0, 0.7);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .dsm-nav.dsm-open [class$="-nav-links"] > a,
  .dsm-nav.dsm-open [class$="-nav-links"] > .ds-ind-dd > a {
    display: block;
    width: 100%;
    padding: 15px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
  .dsm-nav.dsm-open [class$="-nav-links"] a:hover,
  .dsm-nav.dsm-open [class$="-nav-links"] a:active { color: #E55B13; }

  /* Industries: expand its sub-panel inline instead of the hover dropdown.
     The wrapper/panel are always .ds-ind-dd / .ds-ind-dd-panel regardless
     of prefix (nav-industries-dd.js hardcodes those class names). */
  .dsm-nav.dsm-open .ds-ind-dd { display: block; width: 100%; }
  .dsm-nav.dsm-open .ds-ind-dd-panel {
    position: static !important;
    display: flex !important;
    flex-direction: column;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.03);
  }
  .dsm-nav.dsm-open .ds-ind-dd-panel::before { display: none; }
  .dsm-nav.dsm-open .ds-ind-dd-panel a {
    padding: 12px 24px 12px 40px !important;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.62) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    white-space: normal;
  }

  body.ds-nav-lock { overflow: hidden; }
}
