/* ==================================================
   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;
  gap: 1.5rem;
  position: relative;
  z-index: 10020;
}

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

/* Navigation auf Desktop */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  visibility: visible;
  pointer-events: auto;
  position: static;
}

/* Navigationslinks */
nav a {
  color: #e10600;
  margin-left: 0;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
}

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

/* ==================================================
   BURGER MENU – MOBILE NAV FIX
================================================== */

#menuBtn {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  position: relative;
  z-index: 10030;
}

@media (max-width: 900px) {

  header {
    padding: 0.85rem 1rem;
  }

  #menuBtn {
    display: inline-flex;
  }

  nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(78vw, 300px);
    height: 100vh;
    margin-left: 0;
    background: #000;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 5rem 0 1.5rem;
    border-left: 1px solid rgba(225, 6, 0, 0.45);
    box-shadow: -18px 0 35px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, visibility 0s linear 0.28s;
    z-index: 10025;
  }

  nav.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.28s ease;
  }

  nav a {
    display: block;
    margin: 0;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid rgba(225, 6, 0, 0.18);
    font-size: 1rem;
  }

  nav a:hover {
    background: rgba(225, 6, 0, 0.12);
    text-decoration: none;
  }

  nav a:last-child {
    border-bottom: 0;
  }

  body.menu-open {
    overflow: hidden;
  }

  body.menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10010;
  }
}

#menuBtn:hover {
  opacity: 0.8;
}

/* Hamburguer-Icon mit drei Linien */
#menuBtn span {
  display: block;
  width: 28px;
  height: 3px;
  background: #e10600;
  margin: 0;
  transition: 0.35s ease;
  position: absolute;
  left: 8px;
  border-radius: 2px;
}

#menuBtn span:nth-child(1) {
  top: 12px;
}

#menuBtn span:nth-child(2) {
  top: 22px;
}

#menuBtn span:nth-child(3) {
  top: 32px;
}

#menuBtn.active span:nth-child(1) {
  transform: rotate(-45deg);
  top: 22px;
}

#menuBtn.active span:nth-child(2) {
  opacity: 0;
}

#menuBtn.active span:nth-child(3) {
  transform: rotate(45deg);
  top: 22px;
}

/* ==================================================
   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("../../Server/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);
}

/* Spotify-Link im Turnierplaner */
.tp-page .tp-step {
  z-index: 10;
}

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

/* ==================================================
   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;
}

.event-empty {
  background: rgba(230, 224, 224, 0.8);
  border: 1px solid rgba(0,0,0,0.1);
  border-left: 4px solid #e10600;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 0;
}

/* ==================================================
   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;
  z-index: 0;
}

/* Wasserzeichen-Logo */
.page-watermark::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("../../Server/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: -1;
}

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

.tp-page header,
.page-watermark header {
  z-index: 10020;
}

/* ==================================================
   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);
}

/* ==================================================
   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;
}

/* ==================================================
   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 mittlere Screens und Smartphones */
@media (max-width: 768px) {

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

  /* 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;
  }
}

/* ==================================================
   TURNIERPLANER – STANDINGS TABELLE
================================================== */
/* Standings-Card mit mehr Abstand */
.round.tp-standings-card {
  margin-top: 3rem;
  margin-bottom: 3rem;
  background: rgba(255, 255, 255, 0.05);
  border-left: 6px solid #e10600;
}

/* Wrapper für die Standings-Tabelle */
.tp-standings-wrapper {
  overflow-x: auto;
  margin-top: 1.5rem;
  display: table;
}

/* Standings-Tabelle */
.tp-standings-table {
  width: auto;
  border-collapse: collapse;
  font-size: 0.95rem;
}

/* Tabellenkopf */
.tp-standings-table thead {
  background: rgba(225, 6, 0, 0.1);
  border-bottom: 2px solid #e10600;
}

.tp-standings-table th {
  padding: 0.8rem 0.6rem;
  text-align: left;
  font-weight: bold;
  color: #e10600;
}

/* Tabellenzeilen */
.tp-standings-table tbody tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: background 0.2s ease;
}

.tp-standings-table tbody tr:hover {
  background: rgba(225, 6, 0, 0.05);
}

/* Tabellenzellen */
.tp-standings-table td {
  padding: 0.7rem 0.6rem;
}

/* Erste Spalte (Rang) fett */
.tp-standings-table tbody td:first-child {
  font-weight: bold;
  color: #e10600;
}

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


