/* =========================================================
   🌿 KGV "Pritzwalker Straße" e.V. – Hauptstylesheet
   Struktur:
   1. Grundlayout & Hintergrund
   2. Typografie & globale Elemente
   3. Buttons & Interaktion
   4. Komponenten (Footer, Kontakt, Impressum)
   5. Responsive Anpassungen
   ========================================================= */

:root {
  --footer-height: 80px; /* zentrale Variable für Footerhöhe */
}

/* === 1. GRUNDLAYOUT & HINTERGRUND === */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #fff;
  text-align: center;
  /* Alternative statische Hintergrundfarbe:
  background: linear-gradient(to bottom, #001a00, #006600 50%, #001a00);
  background-attachment: fixed;
  */
}

/* Fixierter, leicht verschwommener, abgedunkelter Hintergrund */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('images/background.webp') center center / cover no-repeat fixed;
  filter: blur(6px) brightness(0.6) saturate(1.15);
  transform: scale(1.05);
  z-index: -2;
  image-rendering: auto;
}

/* Abdunkelung für bessere Lesbarkeit */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 60%),
    linear-gradient(to bottom, rgba(0,0,0,0.15), rgba(0,0,0,0.35));
  z-index: -1;
}

/* Startseite mittig ausgerichtet */
body.index {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Hauptinhalt – Abstand zum Footer */
main.container {
  padding-top: 4em;
  padding-bottom: calc(4em + var(--footer-height));
}

/* === 2. TYPOGRAFIE & GLOBALE ELEMENTE === */
h1 {
  font-size: 4em;
  margin: 0.2em 0;
  text-shadow: 3px 3px 6px #000;
}

h2 {
  font-size: 2em;
  margin: 0;
  text-shadow: 2px 2px 4px #000;
}

a {
  color: #aaffaa;
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
a:hover, a:focus {
  color: #fff;
  text-shadow: 0 0 6px #00ff00;
}

/* === 3. BUTTONS & INTERAKTION === */
.button-container {
  margin-top: 2em;
  display: flex;
  justify-content: center;
  gap: 1.5em;
}

.btn {
  background: #fff;
  color: #004400;
  font-weight: bold;
  padding: 0.6em 1.5em;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
}
.btn:hover {
  background: #00aa00;
  color: #fff;
  transform: scale(1.05);
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5);
}

/* === 4. KOMPONENTEN === */

/* --- Footer --- */
footer {
  width: 100%;
  min-height: var(--footer-height);
  padding: 0.6em 0;
  background: rgba(0, 0, 0, 0.5);
  position: fixed;
  bottom: 0;
  left: 0;
  text-align: center;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}

footer .button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2em;
  margin: 0;
}

footer .btn {
  font-size: 0.9em;
}

footer .copyright {
  margin-top: 0.6em;
  font-size: 0.85em;
  opacity: 0.85;
  color: #aaffaa;
}

/* --- Mobile Burger-Menü --- */
.mobile-menu {
  display: none;
}

#menu-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8em;
}

#mobile-nav {
  display: none;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.8);
  position: absolute;
  bottom: 3em;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10px;
  padding: 0.5em 1em;
}

#mobile-nav.active {
  display: flex;
}

#mobile-nav a {
  padding: 0.4em 0;
  color: #aaffaa;
}

/* --- Kontaktboxen --- */
.vorstaende-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2em;
  margin: 2em auto;
}

.kontakt-box,
.kontakt-footer,
.impressum-box {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.kontakt-box {
  padding: 1.5em 2em;
  width: 280px;
  text-align: left;
}

.kontakt-box h3 {
  margin-top: 0;
  color: #aaffaa;
  text-align: center;
}

.kontakt-footer {
  margin-top: 2em;
  padding: 1.2em 2em;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.impressum-box {
  padding: 1.5em 2em;
  margin: 2em auto;
  max-width: 800px;
  text-align: left;
}

.impressum-box h2,
.impressum-box h3 {
  color: #aaffaa;
  margin-top: 0;
  text-align: center;
}

#register .gericht {
  display: inline-block;
  font-style: italic;
  color: #aaffaa;
  margin-bottom: 0.2em;
}

/* --- Vereinsname-Abstand --- */
#verein {
  margin-top: 0;
  margin-bottom: 3.5em;
}

/* === 5. RESPONSIVE ANPASSUNGEN === */
@media (max-width: 768px) {
  /* Hintergrund Performance */
  body::before {
    inset: -3vh;
    filter: blur(5px) brightness(0.68) saturate(1.1);
    background-attachment: scroll;
    transform: none;
  }

  /* Typografie */
  h1 {
    font-size: 2.2em;
    line-height: 1.2em;
    word-break: break-word;
    overflow-wrap: anywhere;
    padding: 0 0.5em;
  }

  h2 {
    font-size: 1.4em;
  }

  /* Footer – nur Startseite bleibt sichtbar */
  footer .button-container a:not([href="index.html"]) {
    display: none;
  }

  /* Burger-Menü */
  .mobile-menu {
    display: block;
    position: fixed;
    bottom: calc(var(--footer-height) + 0.6em);
    right: 1.2em;
    z-index: 1000;
  }

  #menu-toggle {
    background-color: rgba(0, 0, 0, 0.6);
    color: #aaffaa;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
  }

  #menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
  }

  #mobile-nav {
    display: none;
    position: fixed;
    bottom: calc(var(--footer-height) + 3em);
    right: 1em;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 0.8em 1.2em;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
  }

  #mobile-nav.active {
    display: block;
  }

  #mobile-nav a {
    display: block;
    color: #aaffaa;
    padding: 0.5em 0;
    font-weight: bold;
  }

  /* Boxen dunkler */
  .kontakt-box, .impressum-box, .kontakt-footer {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
  }

  /* Buttons */
  footer .btn {
    padding: 0.8em 1.4em;
    font-size: 1em;
  }

  /* Copyright */
  footer .copyright {
    font-size: 0.7em;
    line-height: 1.2;
    padding: 0 1em;
  }

  /* Footerhöhe anpassen */
  :root {
    --footer-height: 60px;
  }
}

@media (min-width: 768px) {
  body::before {
    background-attachment: fixed;
    transform: scale(1.08);
    transition: transform 3s ease-in-out;
  }
  body:hover::before {
    transform: scale(1.1);
  }
}

@media (max-width: 400px) {
  h1 { font-size: 1.8em; }
}
