/* =========================
   FIXED NAVIGATION (Topbar)
   ========================= */

.fixed-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Bereichs-Aufteilung innerhalb der Fixed-Bar */
.fixed-bar .left-icons,
.fixed-bar .center-links,
.fixed-bar .right-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fixed-bar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}


/* ========================
   HAMBURGER BUTTON
   ======================== */

.hamburger-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

.hamburger-button:focus {
  outline: none;
}

/* ========================
   OFFCANVAS MENU
   ======================== */

.offcanvas {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 80%;
  max-width: 320px;
  background: var(--card);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 998;
  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.05);
  overflow-y: auto;
}

.offcanvas.open {
  transform: translateX(0);
}

/* Overlay (verdunkelt Hintergrund) */
.offcanvas-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 997;
}

.offcanvas-overlay.open {
  display: block;
}

/* Inhalt im Offcanvas-Menü */
.offcanvas-content {
  padding: 16px;
}

.offcanvas-close-icon {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 16px;
}

/* ========================
   NAVIGATIONSMENÜ
   ======================== */

.offcanvas-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-item {
  margin-bottom: 12px;
}

.menu-link {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
}

/* ========================
   UNTERMENÜS
   ======================== */

.with-submenu .submenu-toggle {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.submenu {
  display: none;
  margin-top: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

.submenu.open {
  display: block;
}

/* ========================
   RESPONSIVE ANPASSUNG
   ======================== */

@media (max-width: 400px) {
  .offcanvas {
    width: 90%;
  }
}

/* ========================
   FARBSYSTEM: LIGHT + DARK
   ======================== */

/* Default (light mode) */
:root {
  --card: #ffffff;
  --text: #1e1e1e;
  --border: #dddddd;
}

/* Automatischer Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --card: #1e1e1e;
    --text: #f2f2f2;
    --border: #333333;
  }
}
