:root {
  --bg: #0a0c18;
  --bg-elevated: #12142a;
  --card-bg: #141733;
  --card-bg-hover: #1a1d40;
  --border: rgba(255,255,255,0.08);
  --text: #eef0fb;
  --text-muted: #9a9dbb;
  --primary: #6d5df6;
  --primary2: #4f8cff;
  --primary-hover: #5b4be0;
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--primary2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* --- Top nav --- */
.topbar {
  background: rgba(10,12,24,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--text); }
.brand-badge {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800; color: #fff;
}
.topbar nav a { margin-left: 22px; color: var(--text-muted); font-weight: 600; font-size: 0.92rem; }
.topbar nav a:hover { color: var(--text); text-decoration: none; }
.topbar nav a.cta {
  background: var(--primary); color: #fff; padding: 9px 16px; border-radius: 999px;
}
.topbar nav a.cta:hover { background: var(--primary-hover); }

/* --- Hero carousel --- */
.hero {
  position: relative;
  height: 480px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #1a1440, #0a0c18 70%);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide .media-fg { filter: brightness(0.8); }
.hero-slide .media-bg { filter: blur(26px) brightness(0.4) saturate(1.15); }
.hero-slide .hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,12,24,0.95) 0%, rgba(10,12,24,0.35) 45%, rgba(10,12,24,0.15) 100%);
}
.hero-fallback {
  width: 100%; height: 100%;
  background: radial-gradient(circle at 75% 30%, rgba(109,93,246,0.35), transparent 55%),
              radial-gradient(circle at 20% 70%, rgba(79,140,255,0.25), transparent 50%);
}
.hero-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 32px 24px 34px;
}
.hero-info-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #d9dcff;
  margin-bottom: 12px;
}
.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  max-width: 700px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #d3d5ec;
  font-size: 0.95rem;
  font-weight: 600;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-empty {
  position: absolute; inset: 0; z-index: 2;
  height: 100%; display: flex; align-items: center; justify-content: center;
  flex-direction: column; text-align: center; padding: 0 20px;
}
.hero-empty h1 { font-size: 2rem; margin: 0 0 8px; }
.hero-empty p { color: var(--text-muted); max-width: 500px; }

.hero-dots {
  position: absolute;
  right: 24px; bottom: 34px;
  display: flex; gap: 8px;
  z-index: 5;
}
.hero-dots button {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.35);
  cursor: pointer; padding: 0;
}
.hero-dots button.active { background: #fff; width: 22px; border-radius: 5px; transition: width 0.2s ease; }

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(10,12,24,0.5); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; font-size: 1.1rem; cursor: pointer; z-index: 5;
  display: flex; align-items: center; justify-content: center;
}
.hero-arrow:hover { background: rgba(10,12,24,0.8); }
.hero-arrow.prev { left: 20px; }
.hero-arrow.next { right: 20px; }

/* --- Sponsor strip --- */
.sponsor-strip {
  display: flex; gap: 16px; overflow-x: auto;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.sponsor-strip img { height: 46px; border-radius: 8px; flex-shrink: 0; filter: grayscale(0.15); }

/* --- Section heading + filters --- */
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 14px;
  margin: 40px 0 22px;
}
.section-head h2 { font-size: 1.4rem; margin: 0; font-weight: 800; }
.section-head h2 .accent { color: var(--primary2); }
.section-head p { margin: 4px 0 0; color: var(--text-muted); font-size: 0.92rem; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; }
select {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}

/* --- Event grid --- */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
  padding-bottom: 10px;
}
.event-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
}
.event-card:hover {
  transform: translateY(-3px);
  background: var(--card-bg-hover);
  border-color: rgba(255,255,255,0.16);
}
.event-card-img-wrap { position: relative; height: 160px; background: #1a1d40; }
.event-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-card-img-wrap.no-img {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #241f55, #12142a);
  color: rgba(255,255,255,0.25); font-size: 1.8rem; font-weight: 800;
}
.event-tag {
  position: absolute; top: 10px; left: 10px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 3px 10px; border-radius: 999px;
  color: #fff;
}
.event-card-body { padding: 15px 16px 17px; display: flex; flex-direction: column; flex: 1; }
.event-card-date { font-size: 0.8rem; font-weight: 700; color: var(--primary2); margin-bottom: 4px; }
.event-card-title { font-size: 1.02rem; font-weight: 800; margin: 0 0 6px; }
.event-card-loc { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 8px; }
.verein-link { color: var(--text-muted); text-decoration: underline; text-decoration-color: rgba(255,255,255,0.2); }
.verein-link:hover { color: var(--primary2); }
.event-card-desc { font-size: 0.85rem; color: #c7c9e2; flex: 1; }
.event-card-footer {
  margin-top: 10px; display: flex; justify-content: space-between; align-items: center;
  font-size: 0.83rem;
}
.event-card-price { font-weight: 700; }
.event-card-more { color: var(--primary2); font-weight: 700; }

.load-more-wrap { text-align: center; margin: 34px 0 50px; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff; border: none; padding: 12px 26px; border-radius: 999px;
  font-weight: 700; font-size: 0.92rem; cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.08); }

.empty-state { text-align: center; padding: 70px 20px; color: var(--text-muted); }

/* --- Modal --- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(6,7,15,0.75);
  display: none; align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 560px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  font-size: 1.1rem; cursor: pointer; z-index: 2;
}
.modal-close:hover { background: rgba(255,255,255,0.2); }
.modal-img { width: 100%; height: 220px; object-fit: cover; display: block; }
.modal-body { padding: 24px 26px 28px; }
.modal-date { font-size: 0.85rem; font-weight: 700; color: var(--primary2); margin-bottom: 6px; }
.modal-title { font-size: 1.4rem; font-weight: 800; margin: 0 0 12px; }
.modal-meta { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 14px; }
.modal-meta div { margin-bottom: 4px; }
.modal-desc { font-size: 0.95rem; color: #d5d7ec; white-space: pre-line; margin-bottom: 18px; }
.modal-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.modal-price { font-weight: 800; font-size: 1.05rem; }

.muted { color: var(--text-muted); }

/* --- Blurred-Backdrop Bildrahmen: zeigt jedes Bild unbeschnitten, füllt Lücken
   (z.B. bei Hochformat-Plakaten) mit einer weichgezeichneten Kopie desselben Bildes --- */
.media-frame { position: relative; z-index: 0; overflow: hidden; background: #06070f; }
.media-frame .media-bg {
  position: absolute; inset: -6%;
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(0.45) saturate(1.15);
  transform: scale(1.1);
}
.media-frame .media-fg {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 22px 0 40px;
}
.site-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.site-footer-links { display: flex; gap: 18px; }
.site-footer-links a { color: var(--text-muted); font-weight: 600; }
.site-footer-links a:hover { color: var(--text); }

/* --- Legal pages (Impressum/Datenschutz) --- */
.legal-page { padding: 50px 0 70px; max-width: 760px; }
.legal-page h1 { font-size: 1.8rem; margin-bottom: 6px; }
.legal-page h2 { font-size: 1.15rem; margin-top: 34px; margin-bottom: 10px; color: var(--primary2); }
.legal-page p, .legal-page li { color: #cfd1e6; font-size: 0.95rem; line-height: 1.7; }
.legal-page ul { padding-left: 20px; }
.legal-page .placeholder {
  background: rgba(255,180,80,0.12);
  border: 1px solid rgba(255,180,80,0.35);
  border-radius: 8px;
  padding: 2px 8px;
  color: #ffcf8a;
  font-weight: 600;
}
.legal-page .note-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-top: 30px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .hero { height: 420px; }
  .hero-title { font-size: 1.5rem; }
  .hero-arrow { display: none; }
}
