html, body {
    font-family: 'Poppins', sans-serif;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* wichtig für weiches Scrollen auf iOS */
  }
  header {
    text-align: center;
    margin-bottom: 30px; /* optional: Abstand nach unten */
  }          
  #seite {
    position: relative;
    min-height: 100dvh; /* statt height: 100vh */
    width: 100%;
    background-image: url('Hintergrund1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: visible; /* wichtig: darf NICHT hidden sein */
  }
  
  #overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4); /* leichte Transparenz */
    z-index: 1;
    pointer-events: none;
  }
  
  #passwortSchutz {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 2;
  }
  #Inhalt {
    position: relative;
    z-index: 2;
    color: black;
    background: rgba(255,255,255,0.8);
    padding: 20px;
    max-width: 800px;
    margin: 50px auto 20px auto; /* Oben Abstand */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
  #grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 Spalten */
    gap: 10px;
    margin-top: 30px;
    align-items: stretch; /* NEU */
  }
  
  .kachel {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px 30px 30px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

        /* NEU für perfekte Zentrierung */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
  }

  .kachel h2 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 0.5em;
    line-height: 1.2;
    color: #333;
  }
  /* Hübscher Hover-Effekt */
  .kachel:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }   
  #Inhalt p {
    margin: 5px 0; /* Oben 5px, unten 5px Abstand */
    line-height: 1.4; /* Schöner Zeilenabstand innerhalb des Absatzes */
  }
  #slideshow {
    position: relative;
    width: 100%;
    height: 200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    background: #ddd; /* falls kein Bild geladen wird */
  }
  #slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* WICHTIG: keine Verzerrung, schöner Zuschnitt */
    opacity: 0;
    transition: opacity 1s ease-in-out;
 }
 form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  margin: 0 auto;
  padding: 30px;
  background: rgba(255,255,255,0.9);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

form label {
  font-weight: 600;
  margin-bottom: 5px;
}

form input,
form textarea {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  font-family: inherit;
}

form button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 16px;         /* iOS */
  min-height: 48px;        /* iOS */
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

form button:hover {
  background-color: #45a049;
}
.hinweis {
  font-size: 0.9rem;
  color: #666;
  margin-top: -10px;
  margin-bottom: 10px;
  display: block;
}

  @media (min-width: 768px) {
    body {
      
      background-size: contain;
      background-position: top center;
      background-repeat: no-repeat;
      background-color: #f5f5f5; /* dezente Hintergrundfarbe als Auffüllung */
    }
    #seite {
      background-size: contain;
      background-color: #000;
    }
  }
  @media (max-width: 600px) {
    #grid {
      grid-template-columns: 1fr !important;
    }
    .kachel {
        width: 100%; /* Neu! Damit Kacheln 100% Breite auf kleinen Geräten bekommen */
        box-sizing: border-box;
    }
    #Inhalt {
        margin: 0 auto 20px auto; /* Auf kleinen Bildschirmen weniger Abstand oben */
        padding-top: 0; /* NEU! Nur oben kein Padding */
    }
    #seite {
        padding-top: 0 !important;  /* NEU! Nur oben kein Padding */
    }
  }