html { font-size: 18px; }
:root {
  --bg: #fafafa; --fg: #1a1a1a; --muted: #666; --card-bg: #fff;
  --border: #e2e2e2; --accent: #2b4c7e; --badge-bg: #eef1f5;
  --header-bg: rgba(255,255,255,0.9);
  --content-width: 1100px;
}
* { box-sizing: border-box; }
html, body { height: 100%; overflow-x: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  background-image: url("../img/bg-pattern.svg");
  background-repeat: repeat;
  background-size: 640px 640px;
  display: flex; flex-direction: column; min-height: 100vh;
}

/* Kopfzeile mit Menüfunktion */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 4.2rem 0.7rem 1.5rem; flex-wrap: wrap; gap: 0.6rem;
}
.site-header .brand { font-weight: 700; font-size: 1.05rem; color: var(--fg); text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; min-width: 0; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.site-header nav a:hover { color: var(--accent); }

.category-filter { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; min-width: 0; }
.category-filter button {
  background: none; border: none; padding: 0; font: inherit;
  color: var(--muted); font-size: 0.9rem; cursor: pointer;
}
.category-filter button:hover { color: var(--accent); }
.category-filter button.active { color: var(--accent); font-weight: 600; }

@media (max-width: 640px) {
  .category-filter {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    max-width: 100%; padding-bottom: 0.2rem;
  }
  .category-filter button { flex: 0 0 auto; }
}

.menu-toggle {
  position: absolute; top: 0.7rem; right: 1.5rem; z-index: 21;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 34px; height: 30px; padding: 0; border: 1px solid var(--border);
  border-radius: 6px; background: none; cursor: pointer;
}
.menu-toggle span { display: block; height: 2px; background: var(--fg); border-radius: 1px; }

header.hero { max-width: 960px; margin: 0 auto; padding: 3rem 1.5rem 1rem; }
header.hero h1 { font-size: 1.9rem; margin-bottom: 0.4rem; }
header.hero p { color: var(--muted); max-width: 40rem; }

main { max-width: var(--content-width); margin: 0 auto; padding: 2rem 1.5rem 3rem; width: 100%; flex: 1 0 auto; }

.intro { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; }
.intro-text { flex: 1; min-width: 240px; }
.intro h1 { font-size: 1.9rem; margin-bottom: 0.6rem; }
.intro p { color: var(--muted); max-width: 40rem; }
.intro-image {
  width: 160px; height: 160px; object-fit: cover; border-radius: 50%;
  border: 1px solid var(--border);
}

.spotlight { margin-top: 2.5rem; }
.spotlight h2, .events h2 {
  font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); margin: 0 0 0.8rem;
}
.spotlight-card {
  display: flex; gap: 1.2rem; flex-wrap: wrap;
  border: 1px solid var(--border); background: var(--card-bg);
  border-radius: 8px; padding: 1.2rem; align-items: center;
}
.spotlight-image-link { display: block; flex-shrink: 0; }
.spotlight-image {
  width: 220px; max-width: 100%; height: 130px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--border); background: var(--bg);
}
.spotlight-text { flex: 1; min-width: 220px; }
.spotlight-text .title { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 1.1rem; }
.spotlight-text .title:hover { text-decoration: underline; }
.spotlight-text p { margin: 0.4rem 0 0; color: var(--muted); }

.events { margin-top: 2.5rem; }
.event-group { margin-bottom: 1.2rem; }
.event-group h3 { font-size: 1rem; margin: 0 0 0.4rem; }
.event-group ul { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.event-group a { color: var(--accent); text-decoration: none; }
.event-group a:hover { text-decoration: underline; }
.event-item {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 0.5rem; margin: 0 0 0.15rem 0.3rem;
}
.event-thumb-link { display: inline-block; text-decoration: none; border: none; }
.event-thumb {
  width: 100%; max-width: 280px; height: 160px; object-fit: contain; border-radius: 8px;
  border: 1px solid var(--border); margin-left: 0.6rem; display: block;
}
.event-group--hidden { display: none; }
.events-more { display: flex; gap: 0.6rem; margin-top: 0.6rem; }
.events-more button {
  background: none; border: 1px solid var(--border); color: var(--fg);
  border-radius: 6px; padding: 0.35rem 0.8rem; cursor: pointer; font-size: 0.85rem;
}
.events-more button:hover { border-color: var(--accent); color: var(--accent); }

section.category { margin-top: 2.5rem; }
section.category h2 {
  font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); margin: 0 0 0.8rem;
}

.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.card {
  border: 1px solid var(--border); background: var(--card-bg);
  border-radius: 8px; padding: 1rem 1.1rem; transition: border-color 0.15s, transform 0.15s;
  background-size: cover; background-position: center;
}
.card:hover { border-color: var(--accent); transform: translateY(-1px); }
.card a.title { color: var(--accent); text-decoration: none; font-weight: 600; }
.card a.title:hover { text-decoration: underline; }
.card p { margin: 0.4rem 0 0.6rem; color: var(--muted); font-size: 0.92rem; }
.card .source-link { color: var(--accent); text-decoration: none; font-size: 0.85rem; white-space: nowrap; }
.card .source-link:hover { text-decoration: underline; }
.badge {
  display: inline-block; font-size: 0.72rem; background: var(--badge-bg);
  color: var(--muted); padding: 0.15rem 0.5rem; border-radius: 4px; margin-right: 0.3rem;
}

footer {
  background: var(--card-bg); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.5rem; flex-wrap: wrap; gap: 0.6rem;
  color: var(--muted); font-size: 0.85rem;
}
footer a { color: var(--muted); }

/* Seitliches Einstellungs-Panel (Hamburger-Menü) */
.side-panel {
  position: fixed; top: 0; right: 0; height: 100vh; width: 260px;
  max-width: 80vw; background: var(--card-bg); border-left: 1px solid var(--border);
  padding: 1.4rem; box-shadow: -4px 0 12px rgba(0,0,0,0.08);
  transform: translateX(100%); transition: transform 0.2s ease; z-index: 30;
}
.side-panel.open { transform: translateX(0); }
.side-panel-header { display: flex; align-items: center; justify-content: space-between; margin: 0 0 1rem; }
.side-panel-header h2 { font-size: 1rem; margin: 0; }
.panel-close-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 1.2rem; line-height: 1; padding: 0.2rem 0.4rem;
}
.panel-close-btn:hover { color: var(--accent); }
.panel-section { margin-bottom: 1.4rem; }
.panel-section > span { display: block; color: var(--muted); font-size: 0.85rem; margin-bottom: 0.5rem; }
.control-row { display: flex; align-items: center; gap: 0.5rem; }
.value-readout { min-width: 3.4rem; text-align: center; font-size: 0.85rem; color: var(--fg); }
.font-size-control button {
  background: none; border: 1px solid var(--border); color: var(--fg);
  border-radius: 6px; padding: 0.3rem 0.6rem; cursor: pointer; font-size: 0.85rem;
}
.font-size-control button:hover { border-color: var(--accent); color: var(--accent); }
.width-control input[type="range"] { width: 100%; accent-color: var(--accent); margin-bottom: 0.5rem; }
.width-control .control-row { justify-content: space-between; }
.reset-btn {
  background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 6px; padding: 0.3rem 0.6rem; cursor: pointer; font-size: 0.8rem; margin-top: 0.5rem;
}
.reset-btn:hover { border-color: var(--accent); color: var(--accent); }
.width-control .reset-btn { margin-top: 0; }
