:root {
  --blau: #284d99;
  --gelb: #ffdd00;
  --weiß: #fff;
  --grau: #adb5b2;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--weiß);
  color: var(--blau);
}

header {
  background: var(--gelb);
  border-bottom: 2px solid var(--grau);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem 2vw;
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  margin-right: 0;
}

.logo img {
  height: 48px;
}

.site-title {
  margin-left: 0.6rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--blau);
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  height: 25px;
  justify-content: space-between;
  margin-left: auto;
  margin-right: 0;
}

.menu-toggle span {
  height: 3px;
  background: var(--blau);
  border-radius: 2px;
  display: block;
}

/* Standard-Menü */
nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  text-decoration: none;
  color: var(--blau);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.2s;
}

nav a:hover,
nav a:focus {
  background: var(--weiß);
  color: var(--blau);
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
  object-fit: cover;
}

.hero {
  text-align: center;
  background: var(--blau);
  color: var(--weiß);
  padding-bottom: 2rem;
}

.hero h1 {
  margin-top: 1rem;
  color: var(--gelb);
}

section {
  padding: 2rem 5vw;
  background: var(--weiß);
  scroll-margin-top: 80px;
}

#vorstand .vorstand-container {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.vorstand-member {
  text-align: center;
  background: var(--grau);
  border-radius: 8px;
  padding: 1rem;
  width: 200px;
}

.vorstand-member img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.caption {
  margin-top: 0.5rem;
  color: var(--blau);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.gallery-thumb {
  width: 100%;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.2s;
}

.gallery-thumb:hover {
  transform: scale(1.05);
}

/* Galerie-Paginierung */
.gallery-pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-pagination button {
  background: var(--gelb);
  color: var(--blau);
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.gallery-pagination button:disabled {
  background: var(--grau);
  color: var(--weiß);
  cursor: not-allowed;
}

.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(40,77,153,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  flex-direction: column;
}

.lightbox.hidden { display: none; }

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.arrow {
  font-size: 2rem;
  color: var(--gelb);
  cursor: pointer;
  margin: 0 2rem;
  user-select: none;
}

.close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: var(--gelb);
  font-size: 2rem;
  cursor: pointer;
  user-select: none;
}

.termine-list,
.downloads-list {
  list-style: none;
  padding: 0;
  color: var(--blau);
}

.termine-list li,
.downloads-list li {
  margin-bottom: 0.5rem;
}

#anmeldeformular,
#kontaktform {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(40,77,153,0.08);
}

#anmeldeformular label,
#kontaktform label {
  font-weight: bold;
  color: var(--blau);
}

#anmeldeformular input,
#anmeldeformular textarea,
#kontaktform input,
#kontaktform textarea {
  padding: 0.5rem;
  border: 1px solid var(--grau);
  border-radius: 4px;
  font-size: 1rem;
}

#anmeldeformular fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

#anmeldeformular legend {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

#anmeldeformular button,
#kontaktform button {
  background: var(--gelb);
  color: var(--blau);
  border: none;
  border-radius: 4px;
  padding: 0.75rem;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

#anmeldeformular button:hover,
#kontaktform button:hover {
  background: var(--blau);
  color: var(--weiß);
}

footer {
  background: var(--blau);
  color: var(--weiß);
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
}

footer a {
  color: var(--gelb);
  text-decoration: underline;
}

.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(173,181,178,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal.hidden { display: none; }

.modal-content {
  background: var(--weiß);
  color: var(--blau);
  border-radius: 8px;
  padding: 2rem;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(40,77,153,0.2);
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  color: var(--blau);
  cursor: pointer;
}

/* Responsive Anpassungen */
@media (max-width: 900px) {
  header {
    flex-direction: row;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 60px;
    justify-content: flex-start;
  }
  .logo {
    margin-right: 0;
  }
  .site-title {
    margin-left: 0.6rem;
    font-size: 1.2rem;
    font-weight: bold;
  }
  .menu-toggle {
    display: flex;
    margin-left: auto;
    position: absolute;
    top: 50%;
    right: 2vw;
    transform: translateY(-50%);
  }
  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--gelb);
    position: absolute;
    top: 60px;
    left: 0;
    padding: 1rem 0;
    border-bottom: 2px solid var(--grau);
    z-index: 101;
  }
  nav ul.active {
    display: flex;
  }
}

/* Desktop-Ansicht: Header-Menü rechts, Abstand Logo-Text angenehm */
@media (min-width: 901px) {
  header {
    justify-content: space-between;
  }
  .site-title {
    margin-left: 0.6rem;
  }
}
