/* InsightiC Mobile Menu — compact branded popup for Astra's mobile dropdown.
   Scoped to #ast-mobile-header so it out-specifies Astra's customizer CSS. */

@media (max-width: 921px) {

  #ast-mobile-header {
    position: relative;
  }

  /* Toggle button: brand gradient, matching the site's other CTA buttons
     (see .ic-cr-btn in contact-right.html) */
  #ast-mobile-header .menu-toggle {
    background: linear-gradient(90deg, #7B5EFB 0%, #3B82F6 25%, #22D3EE 50%, #3B82F6 75%, #7B5EFB 100%) !important;
    background-size: 200% 100% !important;
    background-position: 0% center !important;
    border-radius: 10px !important;
    transition: background-position 0.45s ease !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #ast-mobile-header .menu-toggle:hover,
  #ast-mobile-header .menu-toggle:focus {
    background-position: 100% center !important;
  }

  #ast-mobile-header .menu-toggle .ast-mobile-svg {
    fill: #ffffff !important;
    width: 24px !important;
    height: 24px !important;
  }

  #ast-mobile-header .menu-toggle .mobile-menu {
    color: #ffffff !important;
  }

  /* Panel: floats under the toggle instead of spanning the screen.
     top/right are fallbacks — mobile-menu.js aligns the panel to the toggle. */
  #ast-mobile-header .ast-mobile-header-content {
    position: absolute !important;
    top: 100%;
    right: 16px;
    left: auto !important;
    width: min(240px, calc(100vw - 32px)) !important;
    margin-top: 8px;
    padding: 6px !important;
    background: #1E293B !important;
    border: 1px solid rgba(240, 245, 250, 0.2);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    z-index: 999;
    box-sizing: border-box;
  }

  .ast-main-header-nav-open #ast-mobile-header .ast-mobile-header-content {
    animation: ic-mm-open 0.16s ease-out;
  }

  /* Strip Astra's own backgrounds, spacing and borders inside the panel */
  #ast-mobile-header .ast-mobile-header-content > *,
  #ast-mobile-header .ast-builder-menu-mobile,
  #ast-mobile-header .main-header-bar-navigation,
  #ast-mobile-header .main-navigation,
  #ast-mobile-header .main-header-menu,
  #ast-mobile-header .main-header-menu .menu-item {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #ast-mobile-header .main-header-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  /* Items */
  #ast-mobile-header .main-header-menu .menu-item > .menu-link {
    position: relative;
    display: block;
    width: 100% !important;
    box-sizing: border-box;
    padding: 11px 14px !important;
    border: 0 !important;
    border-radius: 8px;
    background: transparent !important;
    color: #F0F5FA !important;
    font-family: 'Lexend', sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.4;
    text-decoration: none;
    transition: background 0.15s ease;
  }

  #ast-mobile-header .main-header-menu .menu-item > .menu-link:hover,
  #ast-mobile-header .main-header-menu .menu-item > .menu-link:focus-visible {
    background: rgba(240, 245, 250, 0.06) !important;
    color: #FFFFFF !important;
    outline: none;
  }

  /* Current page: tint + brand gradient bar */
  #ast-mobile-header .main-header-menu .menu-item.current-menu-item > .menu-link {
    background: rgba(93, 200, 230, 0.12) !important;
    color: #FFFFFF !important;
  }

  #ast-mobile-header .main-header-menu .menu-item.current-menu-item > .menu-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(#7B5EFB, #22D3EE);
  }
}

@keyframes ic-mm-open {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 921px) and (prefers-reduced-motion: reduce) {
  .ast-main-header-nav-open #ast-mobile-header .ast-mobile-header-content {
    animation: none;
  }
  #ast-mobile-header .main-header-menu .menu-item > .menu-link {
    transition: none;
  }
}
