/* =========================================================
   ALLGEMEINE STYLES (Gilt für alle Seiten)
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #f9f9f9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background-color: #333;
  color: #fff;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 1.8rem;
  font-weight: bold;
}

.logo-img {
  height: 40px;
  width: auto;
}

/* =========================================================
   NAVIGATION
========================================================= */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #333;
  color: white;
  position: relative;
  z-index: 1000;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin: 0 1rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  user-select: none;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #A0A0A0;
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 180px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 1000;
}

.dropdown-menu li a,
.dropdown-menu li .dropdown-text {
  display: block;
  padding: 10px;
  text-decoration: none;
  color: white;
  cursor: pointer;
  white-space: nowrap;
}

.dropdown-menu li a:hover,
.dropdown-menu li .dropdown-text:hover {
  background-color: #A0A0A0;
  color: #ffcc00;
}

.dropdown:hover > .dropdown-menu {
  display: block;
}

.dropdown-menu .dropdown-menu {
  top: 0;
  left: 100%;
}

/* =========================================================
   INDEX-SEITE
========================================================= */

main {
  flex: 1;
  padding: 2rem;
}

.main-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  font-size: 1.2rem;
}

.text-section {
  flex: 1 1 300px;
  line-height: 1.1;
}

.image-section {
  flex: 1 1 300px;
  display: flex;
  justify-content: center;
}

.main-image {
  max-width: 100%;
  height: auto;
  border: 6px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

/* =========================================================
   STOCKBAHNBAU-SEITE
========================================================= */

.main-wrapper-stockbahnbau {
  display: flex;
  flex-direction: column;
  padding: 0 9rem;
  align-items: center;
  gap: 4rem;
  margin: 60px 0 100px;
}

.content-grid-stockbahnbau {
  display: flex;
  flex-direction: row; /* 🔹 Bild links, Text rechts */
  gap: 8rem;
  width: 100%;
  margin-top: 30px;
  align-items: center; /* 🔹 vertikal zentriert */
}

/* Textbereich */
.text-section-stockbahnbau {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: justify;
  font-size: 1.2rem;
  line-height: 1.4;
}

/* Bildbereich / Slideshow */
.image-section-stockbahnbau {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Slideshow Container */
.slideshow-container-stockbahnbau {
  position: relative; /* 🔹 wichtig für Pfeile */
  max-width: 800px;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  border: 6px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

/* Slides */
.slide {
  display: none;
}

.slide img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%; /* 🔹 Vertikal zentriert */
  transform: translateY(-1%); /* 🔹 Exakte Mitte */
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 24px;
  transition: 0.50s;
  user-select: none;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  z-index: 5; /* 🔹 bleibt über dem Bild */
}

.prev:hover,
.next:hover {
  background: rgba(0, 0, 0, 0.7);
}

.prev {
  left: 0px; /* 🔹 etwas Abstand vom linken Rand */
}

.next {
  right: 10px; /* 🔹 etwas Abstand vom rechten Rand */
}

/* =========================================================
   MANNSCHAFTEN-SEITE
========================================================= */

.main-wrapper-mannschaften {
  display: flex;
  flex-direction: column;
  padding: 0 9rem;
  align-items: center;
  margin: 60px 0 130px;
}

/* =========================================================
   ERGEBNISSE DORFTURNIER
========================================================= */

.main-wrapper-ergebnisse-dorfturnier {
  display: flex;
  flex-direction: column;
  padding: 0 9rem;
  align-items: center;
  margin: 60px 0 130px;
}

.image-ergebnisse-dorfturnier {
  width: 40%;
  height: auto;
  border-radius: 10px;
  margin: 20px 0 70px;
}

/* =========================================================
   ERGEBNISSE TURNIER
========================================================= */

.main-wrapper-ergebnisse-turnier {
  display: flex;
  flex-direction: column;
  padding: 0 9rem;
  align-items: center;
  margin: 60px 0 130px;
}

.image-ergebnisse-turnier {
  width: 40%;
  height: auto;
  border-radius: 10px;
  margin-top: 50px;
}

/* =========================================================
   VORSTAND-SEITE
========================================================= */

.main-wrapper-vorstand {
  text-align: center;
  padding: 130px;
}

.vorstand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.vorstand-card {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.vorstand-card:hover {
  transform: translateY(-5px);
}

.vorstand-card img {
  width: 100%;
  max-width: 350px;
  border-radius: 50%;
  margin-bottom: 15px;
}

/* =========================================================
   VERANSTALTUNG-SEITE
========================================================= */

.main-veranstaltung {
  padding: 60px 60px;
  font-size: 20px;
  text-align: justify;
  padding-left: 250px;
  padding-right: 250px;
}

.slideshow-container {
  max-width: 1200px;
  max-height: 1200px;
  position: relative;
  margin: 1rem auto 100px;
  overflow: hidden;
}

.slide {
  display: none;
}

.slide img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.fade {
  animation: fade 1s ease-in-out;
}

@keyframes fade {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 45%;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 2rem;
  background-color: rgba(0,0,0,0.3);
  border-radius: 3px;
  transition: 0.3s ease;
}

.next {
  right: 0;
}

.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.6);
}

/* =========================================================
   ÜBER UNS / KONTAKT / IMPRESSUM / DATENSCHUTZ
========================================================= */

.main-ueberuns,
.main-kontakt,
.main-impressum,
.main-datenschutz {
  padding: 60px;
  font-size: 1.2rem;
  line-height: 1.2;
}

.main-content-ueberuns {
  display: flex;
  flex-wrap: wrap;         /* sorgt dafür, dass Text & Bild untereinander rutschen bei kleinen Screens */
  gap: 2rem;               /* Abstand zwischen Text und Bild */
  align-items: center;  /* <--- diese Zeile statt "flex-start" */
  padding: 2rem;
  font-size: 1.2rem;
}

.text-section-ueberuns {
  flex: 1 1 500px;         /* Text bekommt etwas mehr Platz */
  text-align: justify;
  padding-left: 30px;
}

.image-section-ueberuns {
  flex: 1 1 400px;         /* Bildbereich rechts */
  display: flex;
  justify-content: center; /* zentriert das Bild horizontal */
  align-items: center;     /* zentriert das Bild vertikal */
  margin: 100px;
}

.image-section-ueberuns img {
  max-width: 100%;         /* passt sich der Breite des Containers an */
  height: auto;            /* bleibt proportional (nicht verzerrt) */
  object-fit: contain;     /* garantiert, dass das Seitenverhältnis gewahrt bleibt */
  border: 6px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

/* =========================================================
   GALERIE
========================================================= */

.page-title {
  text-align: center;
  font-size: 2.5em;
  margin-bottom: 40px;
  color: black;
}

.gallery-section {
  margin-bottom: 150px;
}

.gallery-title {
  text-align: center;
  font-size: 1.8em;
  margin-bottom: 25px;
}

.gallery-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  padding: 0 10px;
  margin-left: 150px;
  margin-right: 150px;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-image:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

.close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 2em;
  color: white;
  cursor: pointer;
}

/* =========================================================
   FOOTER
========================================================= */

footer {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 0.5rem;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-center {
  text-align: center;
}

.footer-links {
  margin-top: 1px;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  margin: 0 3px;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Social Media Icons */
.footer-icons {
  margin-top: 5px;
}

.footer-icons a {
  color: #fff; /* <-- macht die Icons weiß */
  font-size: 1.5em;
  margin: 0 5px;
  text-decoration: none; /* <-- entfernt Unterstrich */
  transition: color 0.3s ease;
}

.footer-icons a:hover {
  color: #ccc;
}

/* =========================================================
   MOBILE STYLES (max-width: 768px)
========================================================= */

@media (max-width: 768px) {

  /* NAVIGATION */
  .menu-toggle {
    display: block;
    z-index: 1001;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #333;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 10px 0;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    text-align: center;
    margin: 10px 0;
  }

  .dropdown-menu {
    position: static;
    background-color: #444;
  }

  /* INDEX */
  .main-content {
    flex-direction: column;
    padding: 1rem;
    margin: 50px 0;
  }

  /* STOCKBAHNBAU */
  .main-wrapper-stockbahnbau {
    padding: 1rem;
    margin-bottom: 30px;
  }

  .content-grid-stockbahnbau {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem; /* 🔹 mehr Abstand zwischen Slideshow und Text */
  }

  .text-section-stockbahnbau {
    text-align: justify;
    font-size: 1.1rem;
    padding: 0 0rem;
  }

  .image-section-stockbahnbau {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  /* Slideshow Container */
  .slideshow-container-stockbahnbau {
    position: relative;
    max-width: 400px; /* 🔹 kleinere Breite auf Mobil */
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  }

  /* Bilder */
  .slideshow-container-stockbahnbau img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
  }

  /* Pfeile */
  .prev,
  .next {
    cursor: pointer;
    position: absolute;
    top: 50%; /* 🔹 exakt mittig */
    transform: translateY(-50%);
    padding: 10px; /* 🔹 kleiner für Mobile */
    color: white;
    font-weight: bold;
    font-size: 18px; /* 🔹 verkleinert */
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    z-index: 10;
    user-select: none;
    transition: background 0.3s ease;
  }

  .prev:hover,
  .next:hover {
    background: rgba(0, 0, 0, 0.7);
  }

  .prev {
    left: 0px; /* 🔹 etwas Abstand vom Rand */
  }

  .next {
    right: 0px;
  }

  /* VORSTAND */
  .main-wrapper-vorstand {
    padding: 20px;
  }

  .vorstand-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }

  .vorstand-card img {
    max-width: 250px;
  }

  /* VERANSTALTUNG */
  .main-veranstaltung {
    padding: 50px 10px;
    font-size: 16px;
  }

  /* ERGEBNISSE */
  .image-ergebnisse-dorfturnier,
  .image-ergebnisse-turnier {
    width: 70%;
  }

  /* KONTAKT */
  .main-kontakt {
    padding: 30px 10px;
    font-size: 1.1rem;
  }

  /* ÜBER UNS */
  .main-content-ueberuns {
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem; /* 🔹 Abstand oben/unten 2rem, links/rechts 1rem */
  }

  .text-section-ueberuns {
    padding: 0; /* 🔹 entfernt unnötige Innenabstände */
    text-align: justify;
  }

  .image-section-ueberuns {
    margin: 0px 0;
    display: flex;
    justify-content: center;
  }

  .image-section-ueberuns img {
    max-width: 80%;
    height: auto;
  }

  .main-wrapper-mannschaften {
    display: flex;
    font-size: 1.1rem;
    flex-direction: column;
    padding: 0 1rem;
    align-items: center;
    margin: 60px 0 130px;
  }

  .main-wrapper-ergebnisse-dorfturnier {
    display: flex;
    flex-direction: column;
    padding: 0 1rem;
    align-items: center;
    margin: 60px 0 130px;
  }

  .image-ergebnisse-dorfturnier {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0 70px;
  }

  .main-wrapper-ergebnisse-turnier {
    display: flex;
    flex-direction: column;
    padding: 0 1rem;
    align-items: center;
    margin: 30px 0 30px;
  }

  .image-ergebnisse-turnier {
    width: 60%;
    height: auto;
    border-radius: 10px;
    margin-top: 30px;
  }
  
  .kontakt-frame {
    display: flex;
    flex-wrap: wrap;
  }
  .main-kontakt {
    padding-top: 30px;
    padding-bottom: 30px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 1.1rem;
    line-height: 1.1;
  }
  .main-impressum {
    padding-top: 30px;
    padding-bottom: 30px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 1.1rem;
    line-height: 1.1;
  }
  .main-datenschutz {
    padding-top: 30px;
    padding-bottom: 30px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 1.1rem;
    line-height: 1.1;
  }
  .main-wrapper-mannschaften {
    padding-top: 30px;
    padding-bottom: 30px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 1.1rem;
    line-height: 1.1;
  }
  
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    padding: 0 50px;
    margin-left: 5px;
    margin-right: 5px;
  }

  .gallery-section {
    margin-bottom: 80px;
  }

  .gallery-title {
    font-size: 1.4em;
  }

  .close {
    top: 15px;
    right: 20px;
    font-size: 1.5em;
  }
}
