/* Digital Catalyst — shared header/footer stylesheet.
 * Header layout, desktop dropdown and mobile accordion are owned by
 * dc-shared-header.php (#dc-unified-responsive-header).
 * Do not reintroduce the legacy .dd:hover ul / @media display:none rules here.
 */

/* Minimal safe base: do not use all:revert on navigation or its descendants. */
#dc-shared-header,
#dc-shared-header *,
#dc-shared-footer,
#dc-shared-footer * {
    box-sizing: border-box;
}

/* Shared footer design (retained from the supplied stylesheet). */
#dc-shared-footer.ftr {
    background: #101012;
    padding: 56px 40px 28px;
    color: rgba(255,255,255,.65);
    font-family: Inter, system-ui, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
}
#dc-shared-footer.ftr img { max-width: 100%; }
#dc-shared-footer.ftr .ftr-in {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 40px;
}
#dc-shared-footer.ftr a {
    color: rgba(255,255,255,.75);
    text-decoration: none;
}
#dc-shared-footer.ftr h2 {
    font: 600 .78rem Poppins, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #00A2A7;
    margin: 0 0 16px;
}
#dc-shared-footer.ftr ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
    font-size: .9rem;
}
#dc-shared-footer.ftr p { margin: 0 0 10px; font-size: .92rem; }
#dc-shared-footer.ftr .copy {
    max-width: 1180px;
    margin: 36px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.12);
    font-size: .82rem;
    color: rgba(255,255,255,.5);
}
@media (max-width: 860px) {
    #dc-shared-footer.ftr .ftr-in { grid-template-columns: 1fr; }
    #dc-shared-footer.ftr { padding: 44px 20px 24px; }
}

/* Scrollable mobile navigation, without a forced panel height.
   Only the OUTER nav scrolls. Expanded groups stay in normal document flow. */
@media (max-width: 1439px) {
  body.dc-mobile-menu-open { overflow: hidden !important; }

  #dc-shared-header.hdr #dc-primary-nav.nav[data-open="true"] {
    height: auto !important;
    min-height: 0 !important;
    max-height: var(--dc-mobile-nav-available, calc(100dvh - var(--dc-mobile-nav-top, 100px) - 8px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    align-content: flex-start !important;
  }

  /* Without flex-shrink:0, rows compress to fit and the menu won't scroll. */
  #dc-shared-header.hdr #dc-primary-nav.nav > a,
  #dc-shared-header.hdr #dc-primary-nav.nav > .dd,
  #dc-shared-header.hdr #dc-primary-nav.nav > .dd > ul {
    flex-shrink: 0 !important;
  }

  #dc-shared-header.hdr #dc-primary-nav.nav > .dd > ul,
  #dc-shared-header.hdr #dc-primary-nav.nav .sub-dropdown {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* Keep the scrollbar visible while the drawer is open (reference behaviour). */
@media (max-width: 1439px) {
  #dc-shared-header.hdr #dc-primary-nav.nav[data-open="true"] {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    scrollbar-gutter: stable;
  }
  #dc-shared-header.hdr #dc-primary-nav.nav[data-open="true"]::-webkit-scrollbar { width: 6px; }
  #dc-shared-header.hdr #dc-primary-nav.nav[data-open="true"]::-webkit-scrollbar-thumb { background: #98adad; border-radius: 10px; }
  #dc-shared-header.hdr #dc-primary-nav.nav[data-open="true"]::-webkit-scrollbar-track { background: #f3f6f6; }
}
