:root {
  --rot: #d00000;
  --rot-dunkel: #a00000;
  --hellrot: #fff0f0;
  --weiss: #ffffff;
  --grau: #f5f5f5;
  --text: #1f1f1f;
  --muted: #555;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  display: flex;
  flex-direction: column;
  background: transparent;
}

.wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  background: transparent;
}

.background-slideshow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(120% 120% at 10% 10%, rgba(208, 0, 0, 0.12), transparent),
              radial-gradient(120% 120% at 90% 0%, rgba(255, 200, 0, 0.12), transparent),
              linear-gradient(135deg, #f9f2f2 0%, #f5f7fb 35%, #eef3fb 100%);
}

.background-slideshow img {
  display: none;
}

.background-slideshow img.active {
  display: none;
}

header {
  background-color: rgba(208, 0, 0, 0.9);
  color: white;
  padding: 1rem 2rem;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 2;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1rem;
}

.logo {
  max-height: 70px;
  flex-shrink: 0;
}

header h1 {
  font-size: clamp(1.2rem, 4vw, 2.2rem);
  margin: 0;
  flex-grow: 1;
  min-width: 0;
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-btn {
  background: #fff;
  color: var(--rot);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 0.35rem 0.65rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-btn:hover {
  transform: translateY(-1px);
  background: #f7f7f7;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.social-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

.social-btn img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.nav-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-size: 1.6rem;
  color: white;
  cursor: pointer;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: none;
}

.events-btn {
  background: #ffffff;
  color: var(--rot);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 0.55rem 1.05rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.events-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
  background: #f7f7f7;
}

.main-nav {
  background-color: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(5px);
  margin: 1rem auto;
  padding: 0.6rem 1rem;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  max-width: 1080px;
  display: flex;
  justify-content: center;
  z-index: 2;
  width: 88%;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  align-items: center;
  position: relative;
}

.nav-links li a {
  text-decoration: none;
  color: var(--rot);
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background-color: #ffffff;
  border: none;
  transition: all 0.2s ease;
  position: relative;
  z-index: 2;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.nav-links li a:hover {
  background-color: var(--rot);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(208, 0, 0, 0.18);
}

.nav-links li a.active,
.nav-links li a.active-current {
  color: white;
  background: transparent;
  box-shadow: none;
}

/* Fokus-Stile für Tastatur-Nutzer */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.btn-ghost:focus-visible,
.btn-primary:focus-visible,
.nav-toggle:focus-visible,
.events-btn:focus-visible,
.social-btn:focus-visible {
  outline: 2px solid var(--rot);
  outline-offset: 2px;
}

.nav-indicator {
  position: absolute;
  top: 50%;
  left: 0;
  height: 42px;
  width: 0;
  background: var(--rot);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(208, 0, 0, 0.25);
  transform: translateY(-50%);
  transition: transform 0.25s ease, width 0.25s ease, opacity 0.2s ease;
  opacity: 0;
  z-index: 1;
}

.hero {
  background-color: rgba(255, 255, 255, 0.96);
  color: var(--rot);
  padding: 3.5rem 2rem;
  text-align: center;
  border-radius: 22px;
  margin: 1rem auto 1.5rem;
  position: relative;
  z-index: 1;
  max-width: 1120px;
  width: 92%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.96) 0%,
    rgba(255,255,255,0.92) 28%,
    rgba(255,255,255,0.75) 55%,
    rgba(255,255,255,0.15) 78%,
    rgba(255,255,255,0) 100%);
  z-index: 1;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slides img.active {
  opacity: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: start;
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.2rem 0.8rem;
  background: var(--hellrot);
  color: var(--rot);
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.hero h2 {
  margin: 0.6rem 0 0.5rem;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  color: var(--text);
  position: relative;
  z-index: 2;
}

.hero p.lead {
  color: var(--muted);
  margin: 0.4rem 0 1.4rem;
  font-size: 1.05rem;
  position: relative;
  z-index: 2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--rot), #e83434);
  color: #fff;
  box-shadow: 0 12px 26px rgba(208, 0, 0, 0.22);
}

.btn-ghost {
  background: #ffffff;
  color: var(--rot);
  border-color: rgba(208, 0, 0, 0.35);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.btn:hover {
  transform: translateY(-1px);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--weiss);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.stat-card span {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--rot);
}

.stat-card small {
  color: var(--muted);
}

.content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem 2rem 2.5rem;
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto 2rem;
}

.content a {
  text-decoration: none;
  color: inherit;
}

.content div {
  background-color: rgba(255, 255, 255, 0.95);
  border: none;
  padding: 1.5rem;
  border-radius: 20px;
  text-align: left;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content div:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.content h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.content p {
  color: var(--muted);
  margin: 0.2rem 0 0;
}

.content img {
  max-width: 100%;
  border-radius: 15px;
  margin-top: 1rem;
  display: block;
}

.events-section {
  max-width: 1120px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
}

.events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
}

.events-header h3 {
  margin: 0.2rem 0;
  color: var(--text);
}

.events-wrapper {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 1rem 1.2rem 1.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(208, 0, 0, 0.08);
}

.event-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.event-chip {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(208, 0, 0, 0.15);
  min-width: 220px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
  cursor: pointer;
}

.sponsor-section {
  max-width: 1120px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
}

.sponsor-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
}

.sponsor-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.sponsor-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 0.75rem 1.2rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
  font-weight: 700;
  color: var(--text);
}

.docs-section {
  max-width: 1120px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
}

.docs-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.doc-card {
  background: #fff;
  border-radius: 14px;
  padding: 1rem 1.2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.doc-info strong {
  display: block;
}

.doc-info small {
  color: var(--muted);
}

.doc-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.docs-search {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.docs-search input {
  flex: 1;
  min-width: 220px;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .docs-section {
    padding: 0 1rem;
  }

  .docs-grid {
    grid-template-columns: 1fr;
  }

  .doc-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .doc-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .doc-actions .btn,
  .doc-actions .btn-ghost,
  .doc-actions .btn-primary {
    width: auto;
  }
}

footer {
  background-color: rgba(208, 0, 0, 0.9);
  color: white;
  text-align: center;
  padding: 1rem;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  z-index: 1;
}

footer p {
  margin: 0;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal.open {
  display: flex;
}

ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  position: relative;
}

.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.close, .modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 1.5rem;
  color: var(--rot);
  cursor: pointer;
  border: none;
  background: transparent;
}

.modal-btn, .events-modal-btn {
  background: var(--rot);
  color: white;
  border: none;
  padding: 0.45rem 1.1rem;
  border-radius: 12px;
  margin: 0.3rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-btn:hover, .events-modal-btn:hover {
  background: var(--rot-dunkel);
}

.event-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.event-detail-modal {
  max-width: 900px;
}

.event-card {
  background: #fff;
  border-radius: 14px;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.event-card h4 {
  margin: 0 0 0.3rem;
}

.event-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.event-description {
  margin: 0.6rem 0 0.2rem;
  color: var(--text);
}

.event-description a {
  color: var(--rot);
  text-decoration: underline;
  word-break: break-word;
}

.event-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--rot);
  font-weight: 700;
  text-decoration: none;
}

.event-gallery {
  margin-top: 1rem;
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
}

.event-gallery img {
  max-height: 520px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: none;
  margin: 0 auto;
}

.event-gallery img.active {
  display: block;
}

.event-gallery-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  height: auto;
  padding: 0.5rem;
}

.event-gallery-link img {
  cursor: zoom-in;
}

.event-gallery-controls {
  display: none;
  justify-content: space-between;
  margin-top: 0.6rem;
  gap: 0.5rem;
}

.gallery-btn {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: var(--rot);
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
}

.gallery-btn:hover {
  background: var(--rot-dunkel);
}

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .header-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
  }

  .main-nav {
    flex-direction: column;
    border-radius: 20px;
    max-width: 90%;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    width: 100%;
  }

  .nav-indicator {
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links li a {
    display: block;
    width: 100%;
    background: #fff;
    color: var(--rot);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  }

  .nav-links li a.active,
  .nav-links li a.active-current {
    background: var(--rot);
    color: #fff;
  }

  header h1 {
    font-size: clamp(1rem, 5vw, 1.5rem);
    white-space: normal;
    line-height: 1.3;
    text-align: center;
    width: 100%;
  }

  .hero {
    padding: 2.8rem 1.2rem;
    width: calc(100% - 1.5rem);
  }

  .hero::before {
    background: rgba(255,255,255,0.95);
  }

  .content {
    padding: 1rem;
  }

  .content div {
    padding: 1.1rem;
  }

  footer {
    font-size: 0.9em;
  }
}
