/* style.css */
/* == BASIS-LAYOUT-EINSTELLUNGEN (unverändert vom Original) == */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
  font-family: "Open Sans", sans-serif;
  color: #333;
  background: #f6f8fc;
}
.container {
  width: 900px;
  max-width: 100%;
  margin: 2rem auto;
  padding: 1rem;
  background: #fff;
  border-radius: 20px;
}
h1, h2, h3, h4, h5 {
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: #444;
}
.center {
  text-align: center;
}
.clear {
  clear: both;
}
.search-container {
  margin-bottom: 1rem;
  float: right;
}
#searchInput {
  padding: 0.3rem 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 250px;
}
.highlight {
  background-color: #ffd800;
  transition: background-color 0.3s ease;
}

/* == HEADERS FÜR OBERBEREICH / BEREICH (unverändert vom Original) == */
.oberbereich-header {
  background: #44ad4d;
  color: #fff;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-radius: 4px;
  margin: 1.5rem 0 0;
  transition: background 0.3s ease;
  width: 100%;
}
.oberbereich-header:hover {
  background: #2f7a27;
}
.oberbereich-content {
  display: none;
  border-radius: 0 0 4px 4px;
  margin-bottom: 1.5rem;
  width: 100%;
}
.bereich-header {
  background: #5388D3;
  color: #fff;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-radius: 4px;
  margin: 10px 0 0 0;
  transition: background 0.3s ease;
  width: 100%;
}
.bereich-header:hover {
  background: #4A82C3;
}
.bereich-content {
  display: none;
  background: #f8fcff;
  border-radius: 0 0 10px 10px;
  margin-bottom: 1.5rem;
  width: 100%;
  border: 1px solid #badcff;
  padding: 5px;
}

/* == PIXEL-PROGRESS (unverändert: lineGrow, circleMove etc.) == */
.row {
  display: block;
  margin: 0.5rem 0;
  width: 100%;
}
.pixel-progress {
  position: relative;
  margin: 0 0 40px 5px;
  width: var(--lineWidth, 840px);
  height: 40px;
  background: transparent;
}
.pixel-progress .track {
  position: absolute;
  top: 50%;
  left: 0; 
  right: 0;
  transform: translateY(-50%);
  height: 2px;
  background: #ccc;
}
.pixel-progress .active-line {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 4px;
  width: 0;
  z-index: 0;
  background: linear-gradient(
    270deg,
    #4cd34c 0%,
    #0c910c 20%,
    #4cd34c 40%,
    #75f075 60%,
    #4cd34c 80%,
    #1bad1b 100%
  );
  background-size: 200% 200%;
  animation: lineGrow 3s forwards, fluidMove 3s linear infinite;
}
.circle {
  position: absolute;
  top: 50%;
  left: 0;
  width: 20px;
  height: 20px;
  background: green;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  animation: circleMove 3s forwards;
}
.circle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 11px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
  transform-origin: center;
}

/* LABELS */
.pixel-progress .labels {
  position: absolute;
  top: 60%;
  left: 0; 
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
}
.pixel-progress .label {
  position: absolute;
  font-size: 0.8rem;
  color: #666;
  bottom: -1.5rem;
  transform: translateX(-50%);
}

.pixel-progress .label:first-of-type {
    left: 15px;         /* an den linken Rand */
  transform: none; /* nicht verschieben */
}

.pixel-progress .label:last-of-type {
right: -10px !important;
left: unset !important;
transform: none;
}

.pixel-progress .label:first-of-type:before {
  transform: translateX(-15px);
}
.pixel-progress .label:last-of-type {
  text-align: right !important;
}

/* Alle Dots standardmäßig GRAU => erst später werden sie GRÜN */
.pixel-progress .label::before {
  content: "";
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ccc;
  z-index: 10;

  /* Wir färben sie per Animation um => becomeGreen */
  animation-name: becomeGreen;
  animation-duration: 0.5s;        /* Wie schnell von grau auf grün */
  animation-delay: var(--dotDelay, 9999s); 
  animation-fill-mode: forwards;   /* bleibt grün am Ende */
  animation-timing-function: ease-in-out;
}

/* label-active => wir lassen "dot" weg */
.label-active::before {
  content: none;
}

/* KEYFRAMES: grau -> grün */
@keyframes becomeGreen {
  0%   { background-color: #ccc; }
  100% { background-color: #4cd34c; }
}

/* lineGrow => animiert die Breite der aktiven Linie */
@keyframes lineGrow {
  0%   { width: 0; }
  100% { width: var(--circleEnd, 0px); }
}
/* circleMove => Kugel 0 -> circleEnd */
@keyframes circleMove {
  0%   { left: 0; }
  100% { left: var(--circleEnd, 0); }
}
/* fluidMove => animiert den "Beamer"-Effekt der aktiven Linie */
@keyframes fluidMove {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@media (max-width:600px){
  .container { width:95%; }
}

/* iOS-Style Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  vertical-align: middle;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.oberbereich-title {
    color: white;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #2196F3;
}
input:checked + .slider:before {
  transform: translateX(22px);
}
/* Schalter-Wrapper */
.toggle-wrapper {
  float: left;
  margin-right: 20px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Footer-Styling */
.footer {
  text-align: center;
  padding: 1rem;
 
  margin-top: 2rem;

}
.footer a {
  color: #5388D3;
  text-decoration: none;
  margin: 0 0.5rem;
}
.footer a:hover {
  text-decoration: underline;
}
.footer p {
  margin: 0.5rem 0;
}