/* ==================================================
   ALLGEMEIN – RESET
================================================== */
/* Setzt Standardabstände zurück und vereinheitlicht Box-Modell */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* ==================================================
   ALLGEMEIN – BASIS
================================================== */
/* Grundlegende Seiteneinstellungen */
body {
  background: #ffffff;
  color: #111;
  line-height: 1.6;
}

/* Hilfsklasse zum Ausblenden */
.hidden {
  display: none;
}

/* ==================================================
   ALLGEMEIN – LAYOUT
================================================== */
/* Seitenlayout mit Footer am unteren Rand */
.page-flex {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hauptinhalt füllt verfügbaren Platz */
.page-content {
  flex: 1;
}

/* ==================================================
   PAGES – HEADER & NAVIGATION
================================================== */
/* Kopfbereich mit Logo und Navigation */
header {
  background: #000;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Vereinslogo im Header */
header img {
  height: 50px;
}

/* Navigationslinks */
nav a {
  color: #e10600;
  margin-left: 1rem;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* ==================================================
   PAGES – MAIN
================================================== */
/* Hauptinhalt */
main {
  padding: 0;
}

/* ==================================================
   PAGES – HERO
================================================== */
/* Hero-Bereich (Landing Page) */
.hero {
  background: #ffffff;
  padding: 4rem 2rem;
  display: flex;
  justify-content: center;
}

/* Hero-Inhalt zentriert */
.hero-inner {
  max-width: 700px;
  text-align: center;
}

/* Großes Logo im Hero */
.hero-logo {
  max-width: 450px;
  width: 100%;
  margin-bottom: 1rem;
}

/* Hero-Überschrift */
.hero h1 {
  font-size: 2.4rem;
  color: #e10600;
  margin-bottom: 1rem;
}

/* Hero-Text */
.hero p {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 2rem;
}

/* ==================================================
   ALLGEMEIN – BUTTONS
================================================== */
/* Primärer Button */
.btn-primary {
  display: inline-block;
  background: #e10600;
  color: #fff;
  padding: 0.9rem 1.8rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #ff1e1e;
}

/* Sekundärer Button */
.btn-secondary {
  background: #444;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  border: none;
  cursor: pointer;
}

/* Deaktivierter Button */
.tp-disabled {
  background: #ccc !important;
  cursor: not-allowed;
}

/* ==================================================
   PAGES – TEASER GRID
================================================== */
/* Grid für Übersichts- & Teaser-Bereiche */
.teaser-grid {
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ==================================================
   PAGES – CARD
================================================== */
/* Standard-Card */
.card {
  background: rgba(255, 255, 255, 0.3);
  padding: 2rem;
  border-radius: 12px;
}

/* Card-Überschrift */
.card h2 {
  color: #e10600;
  margin-bottom: 0.8rem;
}

/* Card-Text */
.card p {
  margin-bottom: 1rem;
}

/* Card-Links */
.card a {
  color: #e10600;
  font-weight: bold;
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

/* ==================================================
   TURNIERPLANER – INPUTS
================================================== */
/* Labels im Turnier-Setup */
.tp-step label {
  font-weight: bold;
  display: block;
  margin-top: 0.5rem;
}

/* Eingabefelder im Turnier-Setup */
.tp-step input {
  width: 100%;
  max-width: 300px;
  padding: 0.5rem;
  margin-bottom: 1rem;
}

/* Button für "Neues Turnier starten" */
#resetTournamentBtn {
  background: #ccc;
  color: #333;
  border: none;
  padding: 0.8rem 1.6rem;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
}

#resetTournamentBtn:hover {
  background: #bbb;
}

/* ==================================================
   TURNIERPLANER – RUNDEN
================================================== */
/* Turnierrunde */
.round {
  position: relative;
  z-index: 2;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Rundentitel */
.round h3 {
  color: #e10600;
  margin-bottom: 0.5rem;
}

/* Aktive Runde */
.round.active {
  border-left: 6px solid #e10600;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  border-right: 1px solid rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

/* ==================================================
   TURNIERPLANER – SPIELE
================================================== */
/* Einzelnes Match */
.match {
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
}

/* Match-Titel */
.match p {
  margin-bottom: 0.3rem;
  font-weight: bold;
}

/* Gewinner-Auswahl */
.match select {
  max-width: 280px;
  padding: 0.5rem;
}

/* Gewinner-Markierung */
.winner {
  color: #0a8f2a;
  font-weight: bold;
}

.loser {
  color: #999;
}

/* ==================================================
   TURNIERPLANER – MODAL (Regeln)
================================================== */
/* Modal-Hintergrund */
.tp-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

/* Modal-Inhalt */
.tp-modal-content {
  background: #fff;
  padding: 2.5rem;
  border-radius: 14px;
  max-width: 600px;
  width: 90%;
}

/* Abstand für Button im Modal */
.tp-modal-content button.btn-primary {
  margin-top: 1.5rem;
}

/* Listen im Modal */
.tp-modal-content ul {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.tp-modal-content li {
  margin-bottom: 0.3rem;
}

/* Modal explizit ausblenden */
.tp-modal.hidden {
  display: none;
}

/* ==================================================
   TURNIERPLANER – TISCHE
================================================== */
/* Grid für Tische */
.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Einzelner Tisch */
.table {
  background: rgba(189, 166, 160, 0.8);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

/* Tischüberschrift */
.table h4 {
  margin-bottom: 0.4rem;
  color: #e10600;
  font-size: 0.95rem;
  font-weight: bold;
}

/* Hover-Effekt */
.table:hover {
  border-color: rgba(225, 6, 0, 0.35);
}

/* ==================================================
   TURNIERPLANER – SEITENHINTERGRUND
================================================== */
/* Turnierplaner-Seite */
.tp-page {
  position: relative;
}

/* Wasserzeichen-Logo */
.tp-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("../images/ebv_gross_dick.png") center / 55% no-repeat;
  background-size: min(65%, 600px);
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
}

/* Inhalt über dem Wasserzeichen */
.tp-page header,
.tp-page main,
.tp-page footer {
  position: relative;
  z-index: 1;
}

/* Transparente Cards im Turnierplaner */
.tp-page .card {
  background: rgba(255, 255, 255, 0.1);
}

/* ==================================================
   STATUTEN
================================================== */
/* Formatierung langer Textblöcke */
.statuten-text {
  white-space: pre-wrap;
  line-height: 1.8;
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
}

/* ==================================================
   KONTAKT – FORMULARE
================================================== */
/* Einfaches Formularlayout */
.simple-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.simple-form label {
  font-weight: bold;
}

/* Eingabefelder */
.simple-form input,
.simple-form textarea {
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.25);
  font-family: inherit;
}

.simple-form textarea {
  resize: vertical;
}

/* Fokus-Stil */
.simple-form input:focus,
.simple-form textarea:focus {
  outline: none;
  border-color: #e10600;
}

/* ==================================================
   EVENTS – HIGHLIGHTS
================================================== */
/* Grid für Event-Highlights */
#eventHighlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Highlight-Karte */
.event-highlight {
  background: rgba(201, 195, 195, 0.8);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  padding: 1.2rem;
}

/* Highlight-Titel */
.event-highlight h3 {
  color: #e10600;
  margin-bottom: 0.5rem;
}

/* ==================================================
   EVENTS – KALENDER
================================================== */
/* Kalenderkopf */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-bottom: 1rem;
}

/* Monatsnavigation */
.calendar-header button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Kalenderraster */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
}

/* Kalendertag */
.calendar-day {
  background: rgba(230, 224, 224, 0.8);
  border: 1px solid rgba(0,0,0,0.1);
  padding: 0.4rem;
  font-size: 0.85rem;
  min-height: 80px;
}

/* Tage mit Event */
.calendar-day.has-event {
  background: rgba(225, 6, 0, 0.1);
  border-color: #e10600;
}

/* Event im Kalendertag */
.calendar-event {
  background: rgba(225,6,0,0.1);
  border-left: 3px solid #e10600;
  padding: 0.2rem 0.3rem;
  margin-top: 0.2rem;
  cursor: pointer;
  font-size: 0.75rem;
}

/* ==================================================
   EVENTS – POP-UP
================================================== */
/* Overlay */
.event-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

/* Popup-Fenster */
.event-popup {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
}

/* ==================================================
   MERCH
================================================== */
/* Banner */
.merch-banner {
  max-height: 260px;
}

/* Bannerbild */
.merch-banner img {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Call-to-Action */
.merch-cta {
  max-width: 700px;
  margin: 0 auto 3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Button-Zusatz */
.merch-btn span {
  color: #ffffff;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  margin-left: 0.3rem;
  font-weight: bold;
  font-size: 0.9em;
}

/* Merch-Seite Anpassungen */
body.merch-page .teaser-grid {
  padding-bottom: 0;
}

body.merch-page .merch-cta {
  margin-top: 0.5rem;
}

/* ==================================================
   SEITEN-WASSERZEICHEN (GLOBAL)
================================================== */
/* Seiten mit Wasserzeichen */
.page-watermark {
  position: relative;
}

/* Wasserzeichen-Logo */
.page-watermark::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("../images/ebv_gross_dick.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(55%, 600px);
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

/* Inhalt über Wasserzeichen */
.page-watermark header,
.page-watermark main,
.page-watermark footer {
  position: relative;
  z-index: 1;
}

/* ==================================================
   GALERIE – GRID & CAPTIONS
================================================== */
/* Galerie-Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* Galerie-Element */
.gallery-grid figure {
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Bilder & Videos */
.gallery-grid img,
.gallery-grid video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: #ddd;
}

/* Bildunterschrift */
.gallery-grid figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #555;
  text-align: center;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
}

.lightbox.hidden {
  display: none;
}

/* ==================================================
   KONTAKT
================================================== */
/* Kontakt-Layout */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 0 2rem 3rem;
}

/* Umrandete Kontakt-Boxen */
.contact-grid .card {
  border: 1px solid rgba(0, 0, 0, 0.12);
}

/* Impressum rechtsbündig */
.impressum-box {
  text-align: right;
}

/* Kleinere Felder */
.small-form input,
.small-form textarea {
  max-width: 100%;
  font-size: 0.9rem;
}

/* ==================================================
   MITGLIED WERDEN
================================================== */
/* Grüner Mitglied-Button */
.card .btn-secondary {
  background: #0a8f2a;
  color: #fff;
  font-size: 1rem;
  padding: 0.8rem 1.6rem;
  border-radius: 30px;
  font-weight: bold;
  margin-top: 1.2rem;
}

.card .btn-secondary:hover {
  background: #0fb03a;
}

/* CTA zentrieren */
.member-cta {
  display: flex;
  justify-content: center;
  margin-top: 1.2rem;
}

/* ==================================================
   SOCIAL ICONS
================================================== */
/* Social-Link */
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
}

/* Social-Icons */
.social-link img {
  width: 32px;
  height: 32px;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
  filter: invert(1);
}

.social-link img:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* ==================================================
   RESPONSIVE
================================================== */
/* Anpassungen für kleinere Screens */
@media (max-width: 768px) {

  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  #tournamentSection::before {
    background-size: 90%;
    opacity: 0.03;
  }
}

/* Anpassungen für Smartphones */
@media (max-width: 480px) {

  /* Header untereinander statt nebeneinander */
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Navigation bekommt etwas Luft */
  nav {
    margin-top: 0.5rem;
  }

  nav a {
    margin-left: 0;
    margin-right: 0.8rem;
  }

  /* Turnier-Tische immer untereinander */
  .table-grid {
    grid-template-columns: 1fr;
  }

  /* Kalender kompakter auf kleinen Screens */
  .calendar-day {
    min-height: 60px;
    font-size: 0.75rem;
  }

  .calendar-event {
    font-size: 0.7rem;
  }

  /* Wasserzeichen noch dezenter */
  #tournamentSection::before {
    background-size: 95%;
    opacity: 0.02;
  }
}

/* ==================================================
   FOOTER
================================================== */
/* Einheitlicher Footer auf allen Seiten */
footer {
  background: #000;
  color: #aaa;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  width: 100%;
}


