/* CARES Dock */
#cares {
  position: relative;
  font-size: 16px;
}
.dock-wrapper {
  width: 100%;
  margin-top: 50px;
}
#cares-dock {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  height: auto;
  margin: auto;
  position: relative;
}
.cares-dock-item {
  position: static;
  z-index: 10;
  margin-bottom: 20px;
}
#leistungen .item-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-transform: uppercase;
  font-size: 1.2em;
  font-weight: bold;
  color: #000;
}
#leistungen .item-icon:hover,
#leistungen .item-icon:active 
{
  font-weight: bold;
  color: #000;
}
#leistungen .item-content {
  position: relative;
  text-align: center;
  visibility: visible;
  opacity: 1;
  transition: visibility 0s, opacity 0.5s linear;
  margin: 30px auto;
}
#leistungen .item-icon > svg:not(.circle) {
  width: 100px;
  height: 100px;
  margin-bottom: 10px;
  transition: transform 0.25s, color 0.25s;
  color: #f39200;
  display: block;
}
#cares-dock {
  gap: 28px;
}

.cares-dock-item {
  width: 175px;
  flex: 0 0 175px;
  text-align: center;
}

#leistungen .item-icon {
  height: 160px;
  justify-content: flex-end;
  line-height: 1.1;
  white-space: nowrap;
}
#leistungen .item-icon.zweizeilig {
    margin-bottom: 14px;
}

#leistungen .item-icon .main-icon {
  width: 92px;
  height: 92px;
  margin-bottom: 22px;
  color: #bebebf;
  transition: transform 0.25s, color 0.25s;
  transform-origin: center center;
}

#leistungen .item-icon:hover .main-icon,
#leistungen .item-icon:active .main-icon {
  transform: scale(1.18);
  color: #f39200;
}


#cares-line {
  width: min(1060px, 90%);
  height: 8px;
  background: #ddd;
  position: absolute;
  top: 230px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
}

/* Fortschrittsbalken */
#cares-line .progress {
  position: absolute;
  height: 8px;
  background: #f39200;
  border-radius: 999px;
  width: 0%;
  transition: width .3s;
}

/* Punkte */
#cares-line span {
  width: 36px;
  height: 36px;
  background: #2f3136;
  border-radius: 50%;
  position: relative;
  z-index: 2;

  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  transition: all .25s;
}
#cares-line span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 45%;
  width: 8px;
  height: 8px;

  border-top: 2px solid #fff;
  border-right: 2px solid #fff;

  transform: translate(-50%, -50%) rotate(45deg);
}
#cares:has(.cares-dock-item:nth-child(1):hover) #cares-line .progress {
  width: 0%;
}
#cares:has(.cares-dock-item:nth-child(2):hover) #cares-line .progress {
  width: 20%;
}
#cares:has(.cares-dock-item:nth-child(3):hover) #cares-line .progress {
  width: 40%;
}
#cares:has(.cares-dock-item:nth-child(4):hover) #cares-line .progress {
  width: 60%;
}
#cares:has(.cares-dock-item:nth-child(5):hover) #cares-line .progress {
  width: 80%;
}
#cares:has(.cares-dock-item:nth-child(6):hover) #cares-line .progress {
  width: 100%;
}

#cares:has(.cares-dock-item:nth-child(1):hover) #cares-line span:nth-of-type(-n+1),
#cares:has(.cares-dock-item:nth-child(2):hover) #cares-line span:nth-of-type(-n+2),
#cares:has(.cares-dock-item:nth-child(3):hover) #cares-line span:nth-of-type(-n+3),
#cares:has(.cares-dock-item:nth-child(4):hover) #cares-line span:nth-of-type(-n+4),
#cares:has(.cares-dock-item:nth-child(5):hover) #cares-line span:nth-of-type(-n+5),
#cares:has(.cares-dock-item:nth-child(6):hover) #cares-line span:nth-of-type(-n+6) {
  background: #f39200;
  transform: scale(1.2);
}
#cares-line span:hover {
  transform: scale(1.1);
}
#cares:has(.cares-dock-item:nth-child(1):hover) #cares-line span:nth-of-type(1),
#cares:has(.cares-dock-item:nth-child(2):hover) #cares-line span:nth-of-type(2),
#cares:has(.cares-dock-item:nth-child(3):hover) #cares-line span:nth-of-type(3),
#cares:has(.cares-dock-item:nth-child(4):hover) #cares-line span:nth-of-type(4),
#cares:has(.cares-dock-item:nth-child(5):hover) #cares-line span:nth-of-type(5),
#cares:has(.cares-dock-item:nth-child(6):hover) #cares-line span:nth-of-type(6) {
  background: #f39200;
  transform: scale(1.35);
  box-shadow: 0 6px 8px rgba(0,0,0,.25);
  z-index: 3;
}
#leistungen li {
    list-style: none;
    margin-bottom: 10px;
  color: #e28801;
}

.cares-dock-item {
  position: relative;
}

#leistungen .item-content {
  position: absolute;
  top: 250px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 22px 24px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  text-align: center;
  visibility: hidden;
  opacity: 0;
  transition:    opacity .35s ease,    transform .35s ease,    visibility 0s linear .35s;  z-index: 50;
}

#leistungen .item-icon:hover + .item-content,
#leistungen .item-icon:active + .item-content {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}

#leistungen .item-content ul {
  margin: 0;
  padding: 0;
}

#leistungen .item-content li {
  list-style: none;
  margin-bottom: 10px;
  color: #d88400;
  line-height: 1.35;
  font-size: 0.95rem;
}
  
#cares {
  height: 440px;
}
.dock-wrapper {
  background: linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)), url(../img/anlagenlebenszyklus.jpg);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  margin: 0;
}
#cares-dock {
  display: flex;
  flex-direction: row;
  justify-content: center;   /* statt space-between */
  align-items: flex-end;
  width: 960px;
  margin: 0 auto;
  gap: 20px;                /* Abstand kontrollieren */
}
#cares-line {
  width: 1015px;
  height: 8px;
  background: #ddd;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
}
.cares-dock-item {
  margin-bottom: 0;
}
.item-icon {
  height: 145px;
  margin-bottom: 35px;
}

.item-icon .main-icon {
  width: 86px;
  height: 86px;
  margin-bottom: 18px;
  color: #bebebf;
}
.item-content {
  position: absolute;
  top: 280px;
  text-align: center;
  width: 250px;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.5s linear;
}
.item-icon:hover + .item-content,
.item-icon:active + .item-content {
  visibility: visible;
  opacity: 1;
}

/* bis 1024 ausblenden */
@media (max-width: 1024px) {
  #cares, div.anlagenlebenszyklus {
    display: none;
  }
}
@media (min-width: 1025px) and (max-width: 1200px) {

  #cares {
    --cares-width: 840px;
    position: relative;
    height: 350px;
  }

  .dock-wrapper {
    margin-top: 0;
    background-size: contain;
    background-position: center;
  }

  #cares-dock {
    width: var(--cares-width);
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    justify-items: center;
    align-items: end;
    gap: 0;
  }

  .cares-dock-item {
    width: 140px;
    flex: none;
    margin: 0;
    text-align: center;
  }

  #leistungen .item-icon {
    height: 145px;
    font-size: 0.9rem;
    line-height: 1.1;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
  }

  #leistungen .item-icon .main-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 14px;
  }

  #cares-line {
    width: var(--cares-width);
    max-width: var(--cares-width);
    height: 32px;
    top: 195px;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    background: transparent;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    justify-items: center;
    align-items: center;
    overflow: visible;
  }

  #cares-line::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 8px;
    background: #ddd;
    border-radius: 999px;
    z-index: 0;
  }

  #cares-line .progress {
    position: absolute;
    left: 8.333%;
    top: 50%;
    transform: translateY(-50%);
    height: 8px;
    width: 0;
    background: #f39200;
    border-radius: 999px;
    z-index: 1;
    transition: width .3s;
  }

  #cares-line span {
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 2;
  }

  #cares-line span::after {
    width: 7px;
    height: 7px;
  }

  #leistungen .item-content {
    top: 220px;
    width: 220px;
  }

  #leistungen .item-content li {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  #cares:has(.cares-dock-item:nth-child(1):hover) #cares-line .progress {
    width: 0;
  }

  #cares:has(.cares-dock-item:nth-child(2):hover) #cares-line .progress {
    width: 16.666%;
  }

  #cares:has(.cares-dock-item:nth-child(3):hover) #cares-line .progress {
    width: 33.333%;
  }

  #cares:has(.cares-dock-item:nth-child(4):hover) #cares-line .progress {
    width: 50%;
  }

  #cares:has(.cares-dock-item:nth-child(5):hover) #cares-line .progress {
    width: 66.666%;
  }

  #cares:has(.cares-dock-item:nth-child(6):hover) #cares-line .progress {
    width: 83.333%;
  }
}