/* ===== Base / Page (SCOPED TO TIMELINE) ===== */
.tl, .tl * { box-sizing: border-box; }

.tl{
  --tl-center-gap: 5rem;
  --tl-top-controls-space: 72px;

  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:#ffffff;
  color:#0c1320;

  padding: 48px 0 28px;
}

.tl__inner{
  position: relative;
  max-width: 1200px;     /* boxed look wie Screenshot */
  margin: 0 auto;
  padding: var(--tl-top-controls-space) 16px 80px;
}

/* ===== Center line ===== */
.tl__line{
  position: absolute;
  left: 50%;
  top: var(--tl-top-controls-space);
  bottom: 110px;
  width: 2px;
  transform: translateX(-50%);
  background: #7592CA;
}

/* ===== Viewport/Track (VERTIKAL SLIDE) ===== */
.tl__viewport{
  overflow: hidden;
  width: 100%;
  height: 980px;
  position: relative;
  transition: height 520ms ease;
}

.tl__track{
  display: flex;
  flex-direction: column;
  will-change: transform;
  transition: transform 520ms ease;
}

/* ===== Timeline items (vertical stacked) ===== */
.tl__item{
  position: relative;
  width: 100%;
  margin: 0 0 3rem;       /* Abstand zwischen Events */
}

/* Card wrapper alignment */
.tl__item--left .tl__card{
  margin-right: auto;
}
.tl__item--right .tl__card{
  margin-left: auto;
}

/* ===== Card ===== */
.tl__card{
  width: calc(50% - var(--tl-center-gap));
  border-radius: 15px;
  padding: 2rem;
  background: #E3E9F4;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tl__title{
  font-size: 24px !important;
  line-height: 1.1 !important;
  margin: 0 0 12px !important;
  font-weight: 400 !important;
}

.tl__text{
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

/* ===== Dot on line ===== */
.tl__dot{
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: white;
  border: 2px solid rgba(40, 90, 200, 0.9);
  z-index: 3;
}

/* ===== Connector line card -> center line ===== */
.tl__connector{
  display: none;
}

/* ===== Date pill near the center line ===== */
.tl__date{
  position: absolute;
  top: 0px;
  padding: 8px 16px;
  font-weight: bold !important;
  border-radius: 999px;
  font-size: 16px;
  background: #7592CA;
  color: white;
  line-height: 24px;
  white-space: nowrap;
  z-index: 4;
  width: fit-content;
}

/* Left item: date sits on the right of line */
.tl__date--right{
  left: calc(50% + var(--tl-center-gap));
}

/* Right item: date sits on the left of line */
.tl__date--left{
  right: calc(50% + var(--tl-center-gap));
}

/* ===== ACTIVE (gold) ===== */
.tl__item--active .tl__card{
  background: #F9F2E5;
}

.tl__item--active .tl__dot{
  background: #D6A94F;
  border-color: #D6A94F;
}

.tl__item--active .tl__date{
  background: #D6A94F;
  border-color: #D6A94F;
  color:#fff;
}

/* ===== Controls (just UI) ===== */
.tl__controls{
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
  z-index: 5;
}

.tl__controls--top{
  top: 10px;
  bottom: auto;
}

.tl__btn{
  border-radius: 999px;
  border: 2px solid #7592CA;
  background-color: rgba(255,255,255,0.9);
  color: #7592CA;
  cursor: pointer;
  padding: 8px 16px;
  line-height: 0;
  transition: background-color 400ms ease, color 400ms ease;
}

.tl__btn:hover,
.tl__btn:focus-visible{
  background-color: #7592CA;
  color: #fff;
}

.tl__btn:hover svg path,
.tl__btn:focus-visible svg path{
  stroke: #fff;
}

/* Keep clicked/focused state neutral so only default + hover are visible */
.tl .tl__btn:focus,
.tl .tl__btn:focus:not(:focus-visible){
  background-color: rgba(255,255,255,0.9) !important;
  color: #7592CA !important;
  outline: none !important;
  box-shadow: none !important;
}

.tl .tl__btn:focus svg path,
.tl .tl__btn:focus:not(:focus-visible) svg path{
  stroke: #7592CA !important;
}

/* Override possible Elementor active state on click/tap */
.tl .tl__btn:active,
.tl .tl__btn:active:hover,
.tl .tl__btn:active:focus{
  background-color: rgba(255,255,255,0.9) !important;
  color: #7592CA !important;
}

.tl .tl__btn:active svg path,
.tl .tl__btn:active:hover svg path,
.tl .tl__btn:active:focus svg path{
  stroke: #7592CA !important;
}

/* ===== Responsive ===== */
@media (max-width: 980px){
  .tl{
    --tl-center-gap: 0;
    --tl-mobile-date-height: 34px;
    padding: 24px 0 20px;
  }

  .tl__inner{
    padding: 0 14px 20px;
  }

  .tl__line{
    left: 25px;
    top: 0;
    bottom: 0;
    transform:none;
  }

  .tl__controls,
  .tl__controls--top{
    display: none;
  }

  .tl__viewport{
    height: auto;
    overflow: visible;
  }

  .tl__track{
    transform: none !important;
    transition: none;
    gap: 0;
  }

  .tl__item{
    margin: 0 0 18px;
    padding-left: 44px;
  }

  .tl__item--left .tl__card,
  .tl__item--right .tl__card{
    margin: 0 !important;
  }

  .tl__card{
    width: 100%;
    border-radius: 12px;
    padding: 1.1rem;
    gap: 0.65rem;
  }

  .tl__title{
    font-size: 22px;
    margin: 0 0 8px;
  }

  .tl__text{
    font-size: 15px;
    line-height: 1.55;
  }

  .tl__dot{
    display:block;
    left: 25px;
    top: calc((var(--tl-mobile-date-height) - 14px) / 2);
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
  }

  .tl__connector{
    display:none;
  }

  .tl__date{
    position: static;
    display: inline-flex;
    align-items: center;
    height: var(--tl-mobile-date-height);
    width: fit-content;
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1;
    padding: 7px 12px;
  }
}
