/* ============================================
   NETWORMS - NAVIGATION FIXES V8 (BURGER BUTTON FIX)
   Fügen Sie diesen Code am ENDE Ihrer bestehenden main.css hinzu
   ============================================ */

/* ----- DESKTOP NAVIGATION FIXES (981px+) ----- */
@media (min-width: 981px) {
  
  /* Header: Flexbox für Ausrichtung */
  .nw-header__inner {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }
  
  /* Brand bleibt links */
  .nw-brand {
    flex-shrink: 0;
  }
  
  /* Hauptnavigation: DIREKT nach rechts schieben */
  .nw-nav {
    display: flex !important;
    margin-left: auto;
    margin-right: 0;
    padding-right: 0 !important;
    gap: 2rem;
    flex-shrink: 0;
  }
  
  /* Tools Container - NÄHER an Navigation */
  .nw-header__tools {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: 0 !important;
    padding-left: 1rem !important;
  }
  
  /* Home Button - ICON IN WEISS */
  .nw-iconbtn.nw-home-btn {
    display: grid !important;
    place-items: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    background: rgba(255,255,255,.03) !important;
    transition: border-color .15s ease, box-shadow .15s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  .nw-iconbtn.nw-home-btn img {
    display: block !important;
    /* WICHTIG: Filter für WEISSES Icon */
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(0,255,156,.12)) !important;
    width: auto !important;
    height: auto !important;
  }
  
  .nw-iconbtn.nw-home-btn:hover {
    border-color: var(--line) !important;
    box-shadow: 0 0 0 1px rgba(0,255,156,.05) inset !important;
  }
  
  /* Subnavigation: PRÄZISE AUSRICHTUNG */
  .nw-subnav {
    display: block !important;
  }
  
  .nw-subnav__inner {
    display: flex;
    justify-content: flex-end;
    position: relative;
  }
  
  .nw-subnav__links {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-right: calc(170px + 1rem) !important;
  }
  
  /* Mobile Elemente im Desktop verstecken */
  .nw-burger,
  .nw-mobile,
  .nw-mobile-backdrop {
    display: none !important;
  }
}


/* ----- MOBILE NAVIGATION FIXES (max 980px) ----- */
@media (max-width: 980px) {
  
  /* Desktop-Navigation und Subnav verstecken */
  .nw-nav,
  .nw-subnav {
    display: none !important;
  }
  
  /* Header Layout - SAUBER ohne komische Linien */
  .nw-header__inner {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0 !important;
  }
  
  /* Tools + Home Button + Burger - ALLE GLEICH GROSS */
  .nw-header__tools {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center;
    margin-left: auto;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Home Button für Mobile */
  .nw-iconbtn.nw-home-btn {
    display: grid !important;
    place-items: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    background: rgba(255,255,255,.03) !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .nw-iconbtn.nw-home-btn img {
    display: block !important;
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(0,255,156,.12)) !important;
    width: auto !important;
    height: auto !important;
  }
  
  .nw-iconbtn.nw-home-btn:hover {
    border-color: var(--line) !important;
    box-shadow: 0 0 0 1px rgba(0,255,156,.05) inset !important;
  }
  
  /* ALLE iconbtns in Tools - GLEICHE Größe */
  .nw-header__tools .nw-iconbtn {
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }
  
  /* Burger Button - GLEICHE GRÖSSE wie Icon-Buttons (40x40) */
  /* Mit MENU.SVG Icon */
  .nw-burger {
    display: grid !important; /* Grid für Icon-Zentrierung */
    place-items: center !important;
    width: 40px !important; /* GLEICH wie iconbtn */
    height: 40px !important; /* GLEICH wie iconbtn */
    border-radius: 14px !important; /* GLEICH wie iconbtn */
    border: 1px solid rgba(255,255,255,.08) !important; /* GLEICH wie iconbtn */
    background: rgba(255,255,255,.03) !important; /* GLEICH wie iconbtn */
    cursor: pointer;
    padding: 0 !important;
    margin: 0 0 0 0.5rem !important; /* Gleicher Abstand wie gap */
    flex-shrink: 0 !important;
    transition: border-color .15s ease, box-shadow .15s ease !important;
  }
  
  .nw-burger:hover {
    border-color: var(--line) !important;
    box-shadow: 0 0 0 1px rgba(0,255,156,.05) inset !important;
  }
  
  /* Burger Linien VERSTECKEN (spans) */
  .nw-burger span {
    display: none !important;
  }
  
  /* MENU.SVG Icon im Burger - IN WEISS */
  .nw-burger img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    /* WICHTIG: Filter für WEISSES Icon - GLEICH wie Home/Search/Feed */
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(0,255,156,.12)) !important;
  }
  
  /* Mobile Backdrop */
  .nw-mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
    backdrop-filter: blur(4px);
  }
  
  .nw-mobile-backdrop.is-open {
    opacity: 1;
    visibility: visible;
  }
  
  /* Mobile Navigation Panel - VON RECHTS */
  .nw-mobile {
    display: block !important;
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 360px;
    height: 100vh;
    background-color: #0a0a0a;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
  }
  
  .nw-mobile.is-open {
    transform: translateX(0);
  }
  
  /* Mobile Navigation Items - RECHTSBÜNDIG */
  .nw-mobile__nav {
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 0.25rem;
  }
  
  .nw-mobile__item {
    width: 100%;
  }
  
  .nw-mobile__link {
    display: block;
    padding: 0.75rem 0;
    text-align: right;
    font-size: 1.125rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: padding-right 0.2s ease;
  }
  
  .nw-mobile__link:hover {
    padding-right: 0.5rem;
  }
  
  /* Sub-Links rechtsbündig */
  .nw-mobile__subwrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0.5rem 0;
    gap: 0.25rem;
  }
  
  .nw-mobile__sublink {
    display: block;
    padding: 0.5rem 0;
    padding-right: 1rem;
    text-align: right;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: padding-right 0.2s ease;
  }
  
  .nw-mobile__sublink:hover {
    padding-right: 1.5rem;
  }
}

/* ----- KRITISCHE FIXES ----- */

/* Verhindert ungewollte Styles */
@media (max-width: 980px) {
  .nw-header__tools::before,
  .nw-header__tools::after {
    display: none !important;
  }
  
  .nw-header__tools > * {
    box-sizing: border-box !important;
  }
}

/* ----- END NAVIGATION FIXES ----- */