* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body, html {
  font-family: 'Open Sans', sans-serif;
  height: 100%;
  scroll-behavior: smooth;
  overflow: hidden;
}
header {
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 2rem;
  text-align: center;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}
header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
header p {
  font-size: 1.2rem;
  font-style: italic;
}
.menu-toggle {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  cursor: pointer;
  width: 30px;
  height: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1001;
}
.menu-toggle span {
  display: block;
  height: 4px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.menu {
  position: fixed;
  top: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  width: 200px;
  height: 100vh;
  display: none;
  flex-direction: column;
  padding: 4rem 1rem;
}
.menu a {
  color: white;
  text-decoration: none;
  margin: 1rem 0;
  font-size: 1.2rem;
}
.menu.show {
  display: flex;
}
.scroll-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}
section {
  height: 100vh;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 2rem;
  scroll-snap-align: start;
  opacity: 1;
  transform: scale(1);
}
section.visible {
  opacity: 1;
  transform: scale(1.05);
  transition: transform 1s ease-in-out;
}

.info-box {
  background-color: rgba(255, 255, 255, 0.8);
  padding: 2rem;
  border-radius: 50%;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

footer {
  background: #222;
  color: white;
  text-align: center;
  padding: 1rem;
}

.selected {
  background-color: #f8d7da; /* rot = belegt */
}

.weekend {
background-color: #d4edda; /* grün = verfügbar */
}

.calendar-header {
padding: 1rem;
text-align: center;
border: 1px solid #ccc;
min-height: 70px;
position: relative;
}
.calendar-day.empty {
background: transparent;
border: none;
pointer-events: none;
}

.calendar-controls {
  margin: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.calendar-day {
  padding: 1rem;
  text-align: center;
  border: 1px solid #ccc;
  cursor: pointer;
  position: relative;
  min-height: 70px;
}

.info-popup {
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
background: white;
border: 1px solid #ccc;
padding: 6px 10px;
font-size: 0.85em;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
border-radius: 6px;
white-space: nowrap;
z-index: 999;
display: none;
pointer-events: none;
width: max-content; /* Popup passt sich optimal an Inhalt an */
}

.info-popup.visible {
display: block;
}

button {
padding: 0.5rem 1rem;
cursor: pointer;
}

.gallery-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  max-width: 1100px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 1rem;
  width: 100%;
  max-width: 900px;
  min-height: 660px; /* 3 Reihen * Bildhöhe inkl. Abstand */
}

.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
  object-fit: cover;
}

.gallery-grid img:hover {
  transform: scale(1.05);
}

.gallery-nav {
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  background: none;
  border: none;
  color: #333;
  transition: 0.2s ease;
}

.gallery-nav:disabled {
  color: #ccc;
  cursor: default;
}


.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
  cursor: pointer;
}

.kontaktformular {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
}

.kontaktformular input,
.kontaktformular textarea {
  padding: 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
}

.kontaktformular button {
  padding: 0.75rem;
  font-size: 1rem;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 10px;
  transition: background-color 0.3s ease;
}

.kontaktformular button:hover {
  background-color: #555;
}

:root {
  color-scheme: only light;
}

/* Optional absichern gegen Dark-Mode-Stile */
html, body {
  background-color: white !important;
  color: black !important;
}


@media screen and (max-width: 768px) {

  /* Header kompakter */
  header {
    padding: 1rem;
  }

  header h1 {
    font-size: 1.5rem;
  }

  header p {
    font-size: 0.9rem;
  }

  .menu-toggle {
    top: 1rem;
    right: 1rem;
    width: 25px;
    height: 20px;
  }

  .menu-toggle span {
    height: 3px;
  }

  .menu {
    width: 100%;
    height: auto;
    align-items: center;
  }

  .scroll-container {
    overflow-y: scroll;
    overflow-x: hidden;
  }

  section {
    min-height: 100vh;
    height: auto;
    padding: 1rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
  }

  .info-box {
    width: 160px;
    height: 160px;
    padding: 1rem;
    font-size: 0.75rem;
  }

  /* Galerie nur 4 Bilder (2x2) */
  .gallery-wrapper {
    flex-direction: column;
    padding: 0 0.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 5px;
    min-height: unset;
  }

  .gallery-grid img {
    width: 100%;
    height: auto;
    max-height: 150px;
  }

  /* Lightbox Bild */
  .lightbox img {
    max-width: 90%;
    max-height: 80%;
  }

  /* Kontaktformular */
  .kontaktformular {
    padding: 1rem;
  }

  .kontaktformular input,
  .kontaktformular textarea {
    font-size: 0.85rem;
    padding: 0.6rem;
  }

  .kontaktformular button {
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  #kontakt > div {
    margin-top: -3cm;
  }

  /* Kalender */
  .calendar {
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    width: 100%;
    max-width: 100%;
  }

  .calendar-header,
  .calendar-day {
    padding: 0.05rem !important;
    font-size: 0.5rem !important;
  }

  .calendar-controls {
    flex-direction: row;
    justify-content: center;
    gap: 0.3rem;
    margin: 0.5rem 0;
    align-items: center;
  }

  .calendar-controls button {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  #kalender-monat {
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .info-popup {
    font-size: 0.45rem !important;
    padding: 1px 3px !important;
  }

  #calendar-wrapper {
    min-height: unset;
    width: 100%;
  }

  #termine {
    transform: scale(0.85);
    transform-origin: top center;
    max-width: 360px;
    margin: 0 auto;
  }

  #termine h2 {
    font-size: 1rem;
  }
}


