/* Responsive topbar for mobile, tablet, desktop */

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: white;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative; /* für das X */
}
.menu-toggle:focus { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 2px; }
.menu-toggle .bar {
  display: block;
  width: 26px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Open/close animation */
/* Beim Öffnen: Hamburger-Balken ausblenden und zentriertes X anzeigen */
.topbar.open .menu-toggle .bar { opacity: 0; }

.menu-toggle::before,
.menu-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.topbar.open .menu-toggle::before {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(45deg);
}
.topbar.open .menu-toggle::after {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Mobile/tablet layout */
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; flex-direction: column; gap: 5px; padding: 10px 30px; }

  /* Hide nav & socials by default on small screens */
  .logo-nav nav { display: none !important; }
  .social-icons { display: none !important; }

  /* When menu is open, stack content */
  .topbar.open { align-items: stretch; }
  .topbar.open .logo-nav { width: 100%; flex-direction: column; align-items: flex-start; gap: 10px; }
  .topbar.open .logo img { height: 70px; }
  .topbar.open nav { display: flex !important; flex-direction: column; gap: 12px; padding-top: 6px; }
  .topbar.open .social-icons { display: flex !important; margin-top: 8px; }
}
