/* responsive.css
   Enthält alle Media Queries, die die Desktop-Stile in layout.css überschreiben,
   um eine optimale Darstellung auf Tablets und Smartphones zu gewährleisten.
*/

/* ==========================================================
   1) Tablet (bis 768px) – Porträtansicht
   Optimiert das Layout für Tablets und kleinere Bildschirme im Hochformat.
   ==========================================================
*/
@media (max-width: 768px) and (orientation: portrait) {
  /* Container-Anpassungen: Vertikale Anordnung statt horizontal */
  .container {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: none;
    margin: 10px auto;
    padding: 10px;
  }

  .left,
  .right {
    width: 100%;
    max-width: 100%;
  }

  .left .image {
    /* Bildanpassungen für Tablets */
    width: 90%;
    max-width: 400px;
    height: auto;
  }

  /* Anpassungen für die Button-Gruppe */
  .buttons {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .buttons button {
    flex: 0 1 calc((100% - 10px) / 3);
    max-width: calc((100% - 10px) / 3);
  }

  /* Fix für Jubiläum-Button nach Reset */
  .buttons button.reset-state {
    animation: none !important;
    background-color: #007BFF !important; /* Standardfarbe */
    color: white !important;
    border: none !important;
  }

  /* Experience-Container: Angepasste Schriftgröße und Ausrichtung */
  .experience-container {
    text-align: center;
    width: 90%;
    height: auto;
    margin-top: 10px;
    font-size: 20px;
  }

  /* Overlay-Text: Leicht verkleinerte Schrift und Positionsanpassung */
  #overlay-text {
    font-size: 20px;
    bottom: 3%;
  }

  /* Jubiläum-Bilder: Angepasste maximale Größe */
  .jubilaeum-container img {
    max-width: 80%;
    max-height: 40vh;
  }
}


/* ==========================================================
   2) Smartphone (bis 480px)
   Optimiert das Layout für sehr kleine Bildschirme.
   ==========================================================
*/
@media (max-width: 480px) {
  /* Button-Gruppe: Drei Buttons pro Zeile */
  .buttons {
    flex-wrap: wrap;
    gap: 10px; /* Abstand zwischen den Buttons */
    width: 90%;
    margin: 0 auto;
    padding: 0;
  }
  
  .buttons button {
    /* Berechnet die Breite: (100% - 20px) geteilt durch 3 */
    flex: 0 1 calc((100% - 20px) / 3);
    max-width: calc((100% - 20px) / 3);
    height: 45px;
    font-size: 18px;
    box-sizing: border-box;
    background-color: blue;
    color: white;
    border: 1px solid darkblue;
    /* Ursprüngliches margin entfernt – stattdessen ein positiver margin-Wert */
    margin: 5px;
  }
  
  .buttons button:disabled {
    background-color: #ddd;
    color: #888;
    border: 1px solid darkblue;
    cursor: not-allowed;
  }
  
  /* Spezielle Regel für Party-Mode Buttons auf Smartphones */
  .buttons button.party-mode {
    animation: partyText 1s infinite alternate ease-in-out !important;
  }
  
  /* Bildanpassungen: Zentrierung und maximale Höhe */
  .left .image {
    display: block;
    margin: 0 auto;
    max-width: 90%;
    height: auto;
    max-height: 80vh;
  }
  
  /* Overlay-Text: Kleinere Schriftgröße */
  #overlay-text {
    font-size: 16px;
    bottom: 3%;
  }
  
  /* Jubiläum-Bilder: Angepasste maximale Dimensionen */
  .jubilaeum-container img {
    max-width: 90%;
    max-height: 35vh;
  }
  
  /* Experience-Container: Zentrierte Ausrichtung mit zusätzlichem Padding */
  .experience-container {
    text-align: center;
    justify-content: flex-start;
    padding: 10px;
  }
}
