/* --------------------------------
   Horizontal Timeline - fertige CSS Version
-------------------------------- */

/* Root Variablen */
:root {
  --cd-color-1: hsl(0, 0%, 0%);
  --cd-color-2: hsl(214, 82%, 22%);
  --cd-color-3: hsl(0, 0%, 97%);
}


/* Timeline Wrapper */
.cd-h-timeline__container {
  position: relative;
  height: 100px;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
}

@media (max-width: 768px) {
  .cd-h-timeline__container {
    max-width: 100%;
    height: 80px;
    margin: 0 10px;
  }
}

/* Timeline Dates Wrapper */
.cd-h-timeline__dates {
  position: relative;
  height: 100%;
  margin: 0 20px;
  overflow: hidden;
}

.cd-h-timeline__dates::before,
.cd-h-timeline__dates::after {
  content: '';
  position: absolute;
  z-index: 2;
  top: 0;
  height: 100%;
  width: 20px;
}

/* Timeline Line */
.cd-h-timeline__line {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 49px;
  height: 5px;
  background-color: #e5e5e5;
  transition: transform 0.4s;
}

/* Timeline Filling Line */
.cd-h-timeline__filling-line {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  bottom: -20px;
  height: 100%;
  width: 100%;
  background-color: var(--cd-color-2);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s;
}

/* Timeline Date */
.cd-h-timeline__date {
  position: absolute;
  bottom: 0;
  z-index: 2;
  text-align: center;
  font-size: 1.5em;
  padding-bottom: 20px;
  color: var(--cd-color-1);
  user-select: none;
  text-decoration: none;
}

.cd-h-timeline__date::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -10px;
  height: 25px;
  width: 25px;
  border-radius: 50%;
  border-width: 2px;
  border-style: solid;
  border-color: #e5e5e5;
  background-color: var(--cd-color-3);
  transition: background-color 0.3s, border-color 0.3s;
}

.cd-h-timeline__date:hover::after {
  background-color: var(--cd-color-2);
  border-color: var(--cd-color-2);
}

/* Responsive Date Font */
@media (max-width: 768px) {
  .cd-h-timeline__date {
    font-size: 0.7em;
  }
}

/* Selected / Older Events */
.cd-h-timeline__date--selected::after,
.cd-h-timeline__date--older-event::after {
  background-color: var(--cd-color-2);
  border-color: var(--cd-color-2);
}

/* Timeline Navigation Arrows */
.cd-h-timeline__navigation {
  position: absolute;
  z-index: 1;
  top: 50%;
  transform: translateY(-50%);
  height: 34px;
  width: 34px;
  border-radius: 50%;
  border-width: 2px;
  border-style: solid;
  border-color: #e5e5e5;
  transition: border-color 0.3s;
  /* background-color: var(--cd-color-2); */
}

.cd-h-timeline__navigation::after {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  background: url(/wp-content/themes/bm_hp_v02/images/about_us/cd-arrow.svg) no-repeat 0 0;
}

.cd-h-timeline__navigation:hover {
  border-color: var(--cd-color-2);
}

.cd-h-timeline__navigation--prev {
  left: 0;
  transform: translateY(-50%) rotate(180deg);
}

.cd-h-timeline__navigation--next {
  right: 0;
}

.cd-h-timeline__navigation--inactive {
  cursor: not-allowed;
}

.cd-h-timeline__navigation--inactive::after {
  background-position: 0 -16px;
}

/* Timeline Events Container */
.cd-h-timeline__events {
  position: relative;
  width: 100%;
  overflow: hidden;
  transition: height 0.4s;
}

/* Single Event */
.cd-h-timeline__event {
  position: absolute;
  z-index: 1;
  width: 100%;
  left: 0;
  top: 0;
  transform: translateX(-100%);
  padding: 1px 5%;
  opacity: 0;
  animation-duration: 0.4s;
  animation-timing-function: ease-in-out;
}

.cd-h-timeline__event--selected {
  position: relative;
  z-index: 2;
  opacity: 1;
  transform: translateX(0);
}

/* Event Animations */
.cd-h-timeline__event--enter-right,
.cd-h-timeline__event--leave-right {
  animation-name: cd-enter-right;
}

.cd-h-timeline__event--enter-left,
.cd-h-timeline__event--leave-left {
  animation-name: cd-enter-left;
}

.cd-h-timeline__event--leave-right,
.cd-h-timeline__event--leave-left {
  animation-direction: reverse;
}

.cd-h-timeline__event-content {
  max-width: 800px;
}

.cd-h-timeline__event-title {
  color: var(--cd-color-1);
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 2rem;
}

.cd-h-timeline__event-date {
  display: block;
  font-style: italic;
  margin: 5px auto;
}

.cd-h-timeline__event-date::before {
  content: '- ';
}

/* Keyframes */
@keyframes cd-enter-right {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0%);
  }
}

@keyframes cd-enter-left {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0%);
  }
}

/* Fallback, falls JS deaktiviert ist */
html:not(.js) .cd-h-timeline__dates,
html:not(.js) .cd-h-timeline__navigation {
  display: none;
}
