/* === Basiseinstellungen für das gesamte Layout === */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}



  @media screen and (max-width: 768px) and (orientation: landscape) {
  .timeline-vertical {

 #step-title {
    margin-top: 5px;
    font-size: 1.3em;
  }
  .navigation {
    padding: 5px 10px;
  }

  .nav-btn, .end-btn {
    padding: 8px 12px;
    font-size: 0.9em;
    width: auto;
    min-width: 100px;
 
  }    
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30px;
    margin-right: 10px;
  }

  .timeline-vertical-bar {
    height: 50vh;
    width: 6px;
    background: #ccc;
    position: relative;
    border-radius: 3px;
  }

  .timeline-vertical-bar .timeline-progress {
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, #4caf50, #81c784);
    position: absolute;
    top: 0;
    left: 0;
  }

  .rtw-vertical {
    width: 20px;
    height: 20px;
    background: url('assets/rtw.png') no-repeat center center;
    background-size: contain;
    position: absolute;
    top: 0;
    left: -7px;
  }

  .vertical-label {
    font-size: 0.7em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin-top: 5px;
    text-align: center;
  }

  .step-title {
    margin-top: 20px;
    font-size: 1.3em;
    color: #00522D;
  }
}



  

/* === Titel des aktuellen Schritts (oben im Container) === */
#step-title {
  text-align: left;
  font-size: 1.6em;
  margin-bottom: 8px;
  margin-top: 60px;
  color: #00522D;
}

/* === Standardformatierung für Schritt-Texte, außer Zeitangaben === */
.step p:not(.timeline-text):not(.time-remaining) {
  font-size: 1.1em;
  color: #3A3A3A;
  text-align: left;
  margin: 12px auto;
  line-height: 1.5;
  width: 100%;
}

/* === Haupt-Container der Inhalte === */
.container {
  margin-top: 60px;
  padding: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding-bottom: 100px; /* Platz über dem fixierten Footer */
}

/* === Sichtbarkeitssteuerung der Schritte === */
.step {
  display: none;
}
.step.active {
  display: block;
}

/* === Header während der Anleitung (grauer Balken mit Logo) === */
.cpr-header {
  background: #555555;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 10px 16px;
  font-size: 1.2em;
  height: 60px;  /* <-- Korrekt setzen */
  display: flex;
  align-items: center;
}


/* === Logo im Header (Startseite) === */
.index-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #55555520;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-sizing: border-box;
}

/* === Logo-Formatierungen === */
.logo-img {
  height: 40px;
  object-fit: contain;
  max-width: 100%;
}

.header-left .logo-img {
  height: 70px;
}

.header-right .logo-img {
  height: 40px;
}
.logo {
  height: 80px;
}

/* === Headertext z.B. bei Startseite oder Anleitung === */
.header-text {
  font-size: 1.2em;
  font-weight: bold;
}

/* === Fortschrittsbalken ganz oben === */
.page-progress-bar {
  width: 100%;
  height: 5px;
  background: #ddd;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}
.page-progress {
  width: 0%;
  height: 100%;
  background: #00B165;
  transition: width 0.3s ease-in-out;
}

/* === Medien wie Bilder oder Videos in den Schritten === */
.step img,
.step video {
  width: 100%;
  height: auto;
  display: block;
  margin: 10px auto 5px auto;
  border-radius: 10px;
  z-index: 1;
}

/* === Spezialfall: Video mit mehr Abstand unten === */
#step3 video {
  margin-bottom: 20px;
}

/* === Optional: horizontale grüne Linie zur Tiefenanzeige (wenn verwendet) === */
.depth-line {
  width: 8cm;
  height: 2px;
  background: #5aad5f;
  margin: 12px auto 8px auto;
  position: relative;
}
.depth-line span {
  position: absolute;
  top: -18px;
  right: 0;
  font-size: 0.9em;
  color: #444;
}

/* === Zeitstrahl für die 10 Minuten Dauer === */
.timeline-banner {
  width: 100%;
  background: #f8f8f8;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 12px 5vw;
  box-sizing: border-box;
  overflow-x: hidden;
  display: block;
}
.timeline-wrapper {
  width: 100%;
  max-width: 600px;
  margin: 20px auto 10px auto;
  padding: 0;
}
.timeline {
  position: relative;
  background: #ddd;
  height: 10px;
  border-radius: 5px;
  overflow: visible;
  z-index: 1;
}
.timeline-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4caf50, #81c784);
  position: absolute;
  top: 0;
  left: 0;
  transition: width 1s ease-in-out;
  z-index: 1;
}

/* === RTW-Grafik, die sich über den Zeitstrahl bewegt === */
.rtw {
  width: 40px;
  height: 40px;
  background: url('assets/rtw.png') no-repeat center center;
  background-size: contain;
  position: absolute;
  top: -20px;
  left: 0;
  z-index: 2;
  transition: left 1s ease-in-out;
}

/* === Texte im Zeitstrahl (Mitte & unten) === */
.timeline-text,
.time-remaining {
  color: #555;
  font-size: 1.1em;
  text-align: left;
  margin: 6px 0;
  line-height: 1.4;
  font-weight: bold;
  word-wrap: break-word;
}

/* === Navigation am unteren Bildschirmrand === */
.navigation {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 15px;
  background: #ddd;
  position: fixed;
  bottom: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 999;
}

/* === Navigationsbuttons (Zurück, Weiter, Beenden) === */
.nav-btn, .end-btn {
  background: #00522D;
  color: white;
  border: none;
  padding: 15px;
  font-size: 18px;
  border-radius: 5px;
  width: 150px;
  cursor: pointer;
}
.nav-btn:hover {
  background: #007a43ca;
}
.end-btn {
  background: #f28b82;
}
.end-btn:hover {
  background: #e57373;
}

/* === Versteckte Elemente, z. B. Beenden-Button bis aktiv === */
.hidden {
  display: none;
}

/* === Fußzeile für Startseite === */
.footer {
  background-color: #e0e0e0;
  text-align: center;
  padding: 15px;
  font-size: 0.9em;
  color: #777;
}

/* === Startbutton auf Startseite === */
.start-btn2 {
  display: inline-block;
  padding: 12px 24px;
  font-size: 18px;
  background-color: #00522D;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  margin-top: 20px;
  max-width: 300px;
  text-align: center;
}

/* === Responsive Anpassung für kleine Displays === */
@media (max-width: 480px) {
  .container {
      padding: 12px;
  }

  .nav-btn, .end-btn {
      width: 45%;
      font-size: 1em;
      padding: 12px;
  }

  .timeline-banner {
      padding: 10px 4vw;
      padding-bottom: 80px;
  }
}

/* === Willkommensbereich auf Startseite === */
.welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: left;
  text-align: left;
  padding: 40px 20px;
}
.main-title {
  font-size: 1.6em;
  margin-bottom: 10px;
  color: #555;
}
.green-bold {
  color: #00522D;
  font-weight: bold;
}
.subtitle {
  font-size: 1.1em;
  color: #3A3A3A;
  text-align: left;
  margin: 12px auto;
  line-height: 1.5;
  width: 100%;
}

/* === Maßband zur Anzeige von 6cm Drucktiefe === */
.ruler-container {
  display: flex;
  justify-content: center;
  margin-top: 5px;
}
.ruler {
  width: 6cm;
  border-bottom: 4px solid red;
  position: absolute;
  transform: rotate(90deg) translateY(-100%);
  z-index: 10;
  transform-origin: top left;
  margin: 10px auto 5px auto;
  margin-bottom: 20px;
  border-radius: 10px;
  display: inline-block;
}
.ruler-mark {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  font-size: 12px;
  color: #333;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
}
.ruler-mark::before {
  content: '';
  display: block;
  width: 1px;
  height: 10px;
  background-color: black;
  margin-bottom: 1px;
}

/* === Wrapper für Maßband + Video nebeneinander === */
.video-ruler-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

/* === Videogröße allgemein === */
video {
  max-width: 100%;
  height: auto;
}

/* === Abschlussbereich (Dank & Info) === */
.ende-banner {
  width: 100%;
  background: #f8f8f8;
  border-top: 1px solid #00B165;
  border-bottom: 1px solid #00B165;
  border-left: 1px solid#00B165;
  border-right: 1px solid#00B165;
  padding: 12px 5vw;
  box-sizing: border-box;
  overflow-x: hidden;
  text-align: center;
  font-size: 1em;
  margin-bottom: 10px;
}
@media screen and (max-width: 768px) and (orientation: landscape) {
  /* Kompakter Header */
  .cpr-header {
    height: 32px;
    padding: 4px 8px;
    font-size: 0.85em;
  }

  .cpr-header .logo {
    height: 22px;
  }

  /* Kompakter Footer */
  .navigation {
    padding: 4px 8px;
    background: #ddd;
  }

  .nav-btn,
  .end-btn {
    font-size: 0.85em;
    padding: 6px 10px;
    width: auto;
    min-width: 80px;
  }

  /* Platz für step-title */
  #step-title {
    margin-top: 10px;
    font-size: 1.3em;
  }

  /* Container muss genug Abstand oben haben 
  .container {
    margin-top: 50px !important;
    padding-bottom: 80px !important;
  }*/
  .step-content {
    align-items: flex-start;
    margin-top: 5px; /* Reduziert vertikalen Abstand zum Titel */
  }

  .step-media img,
  .step-media video {
    margin-top: 0;
    margin-bottom: 0;
    max-height: 325px; /* Bild/Videohöhe dynamisch begrenzen */
    object-fit: contain;
  }


  .container {
    margin-top: 40px !important;
    padding-top: 10px;
    

  }
    .step-content {
      display: flex;
      flex-direction: row;
      align-items: flex-start;
      gap: 16px;
    }
  
    .timeline-vertical {
      display: flex !important;
      flex-direction: column;
      align-items: center;
      width: 32px;
      margin-right: 10px;
    }

    
  
    .timeline-vertical-bar {
      height: 50vh;
      width: 6px;
      background: #ccc;
      position: relative;
      border-radius: 3px;
    }
  
    .timeline-vertical-bar .timeline-progress {
      width: 100%;
      height: 0%; /* per JS gesetzt */
      background: linear-gradient(to bottom, #4caf50, #81c784);
      position: absolute;
      top: 0;
      left: 0;
    }
  
    .rtw-vertical {
      width: 20px;
      height: 20px;
      background: url('assets/rtw.png') no-repeat center center;
      background-size: contain;
      position: absolute;
      top: 0;
      left: -7px;
    }
  
    .vertical-label {
      font-size: 0.7em;
      writing-mode: vertical-rl;
      transform: rotate(180deg);
      margin-top: 5px;
      text-align: center;
    }
  
    /* Zeitstrahl unten ausblenden */
    .timeline-banner {
      display: none !important;
    }
  
  
}

@media screen and (orientation: portrait) {
  #step-title {
    margin-top: 20px !important; /* statt 80px */
  }

  .container {
    margin-top: 60px !important; /* war 60px + zusätzlich im Landscape mehr */
  }

  

@media screen and (max-width: 768px) and (orientation: landscape) {
  .container {
    margin-top: 60px !important;
    padding-top: 100px;
    padding-bottom: 100px;
    max-height: calc(100vh - 100px); /* Bildschirmhöhe minus Header+Footer */
    overflow-y: auto;
    box-sizing: border-box;
  }

  body {
    overflow-y: hidden; /* Kein Doppelscroll */
  }

  .step {
    overflow-y: auto;
  }

  #step4 {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 80px; /* Platz für Footer */
  }

  #step-title {
    margin-top: 40px !important;
    font-size: 1.3em;
    text-align: center;
  }

  .navigation {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 10px;
    background: #ddd;
    z-index: 999;
  }
  .timeline-banner {
    display: none !important;
  }

  .timeline-vertical {
    display: flex !important;
  }

  }
  
}

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}


#introScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #00522D; /* dein Grünton */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#introStartBtn {
  font-size: 2em;
  padding: 20px 40px;
  background: none;
  border: 3px solid white;
  color: white;
  border-radius: 10px;
  cursor: pointer;
}
#introStartBtn:hover {
  background: rgba(255,255,255,0.2);
}

/* Next-Button: hellgrün + dunkelgrüner Füllbalken von links nach rechts */
#nextBtn {
  position: relative;
  overflow: hidden;
  background: #b6e7b6;           /* hellgrün */
  border: none;
}

#nextBtn::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--fill, 0%);        /* Füllstand */
  background: #2e7d32;           /* dunkelgrün */
  z-index: 0;
  transition: width linear;
}

#nextBtn > span {
  position: relative;
  z-index: 1;
}