:root {
  --sidebar-width: 280px;
}

/* ===== Reset & Grundlayout ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Trebuchet MS', sans-serif;
  background-color: #fff;
  color: #333;
  /* Scroll verhindern, wenn Sidebar offen */
  transition: padding 0.3s ease;
}
body.sidebar-open {
  overflow: hidden;
}

/* ===== Header ===== */
.header {
  font-size: 32px;
  letter-spacing: 8px;
  text-align: center;
  border-bottom: 2px solid pink;
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 20;
}

/* Menü-Button (links) */
.menu-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  transition: color 0.2s ease;
}
.menu-btn:hover { color: hotpink; }

/* ===== Overlay (dunkelt Hintergrund ab) ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body.sidebar-open .overlay {
  opacity: 1;
  pointer-events: all;
}

/* ===== Sidebar links ===== */
.sidebar {
  position: fixed;
  left: calc(-1 * var(--sidebar-width));
  top: 0;
  height: 100%;
  width: var(--sidebar-width);
  background-color: #ffe6f2;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
  padding: 80px 16px 24px;
  transition: left 0.3s ease;
  z-index: 10;
}
.sidebar.open { left: 0; }

/* Schließen-X */
.close-btn {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 28px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  transition: color 0.2s ease;
}
.close-btn:hover { color: hotpink; }

/* Hauptpunkt */
.top-link {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #ffd1e6;
  border: 1px solid #ffc1dc;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.top-link:hover { background: #ffbfdc; }

/* Caret */
.caret { font-size: 16px; opacity: 0.8; }

/* Submenu */
.submenu {
  margin-top: 8px;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 3px solid #ffb6c1;
}
.submenu a {
  display: block;
  padding: 10px 12px;
  text-decoration: none;
  color: #333;
  border-radius: 8px;
  font-size: 16px;
  transition: background 0.2s ease;
}
.submenu a:hover { background: #ffd9e8; }

/* ===== Content ===== */
.content {
  max-width: 980px;
  margin: 24px auto;
  padding: 0 16px;
  transition: margin-left 0.3s ease;
}
.hero {
  background: #fff5fa;
  border: 1px solid #ffe3f0;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}
.hero h1 { margin-top: 0; letter-spacing: 1px; }

.card {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

/* ===== Responsive ===== */

/* Kleine Bildschirme */
@media (max-width: 640px) {
  .header { letter-spacing: 5px; font-size: 26px; }
  .menu-btn { left: 12px; }
  :root { --sidebar-width: 85vw; }
}

/* Ab Desktop */
@media (min-width: 1024px) {
  /* Optional: Wenn Sidebar offen, Content etwas nach rechts schieben */
  body.sidebar-open .content {
    margin-left: var(--sidebar-width);
  }
}
