/**
 * Timeline (Model 1 only) — shared on homepage and company page.
 */

.avinci-timeline {
  --tl-bg: #2d2d2d;
  --tl-cyan: #00bfff;
  --tl-text: #fff;
  --tl-line-y-low: 244px;
  --tl-line-y-high: 122px;
  --tl-dot-size: 10px;
  --tl-canvas-width: 3720px;
  --tl-height: 360px;
  background: var(--tl-bg);
  color: var(--tl-text);
  font-family: "XMH Flama-Book", sans-serif;
}

.avinci-timeline.content__history {
  width: 100%;
  margin: 0 auto;
}

.avinci-timeline__heading-wrap {
  width: 100%;
  max-width: 1171px;
  margin: 0 auto;
}

.avinci-timeline__title {
  margin: 0;
  padding: 28px 0 0;
  font-family: "XMH Flama-Bold", "XMH Flama-Medium", sans-serif;
  font-size: 32px;
  line-height: 1.1;
  color: #fff;
}

.avinci-timeline__track {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: var(--tl-height);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  padding: 8px 0;
}

.avinci-timeline__track::-webkit-scrollbar {
  display: none;
}

.avinci-timeline__track.is-dragging {
  cursor: grabbing;
}

.avinci-timeline__svg {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--tl-canvas-width);
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.avinci-timeline__path {
  stroke: #fff;
  stroke-width: 1;
  fill: none;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}

.avinci-timeline__items {
  position: relative;
  display: flex;
  gap: 26px;
  width: max-content;
  min-width: var(--tl-canvas-width);
  padding-left: 32px;
  padding-right: 420px;
}

.avinci-timeline__item {
  --line-y: var(--tl-line-y-low);
  position: relative;
  width: 220px;
  min-height: 340px;
  flex: 0 0 auto;
  z-index: 2;
}

.avinci-timeline__item--wide {
  width: 420px;
}

.avinci-timeline__item--wide .avinci-timeline__text {
  max-width: 400px;
}

.avinci-timeline__item--track-low {
  --line-y: var(--tl-line-y-low);
}

.avinci-timeline__item--track-high {
  --line-y: var(--tl-line-y-high);
}

.avinci-timeline__dot {
  position: absolute;
  left: 0;
  width: var(--tl-dot-size);
  height: var(--tl-dot-size);
  border-radius: 50%;
  background: var(--tl-cyan);
  top: calc(var(--line-y) - (var(--tl-dot-size) / 2));
  z-index: 3;
}

.avinci-timeline__dot--start {
  width: 12px;
  height: 12px;
  top: calc(var(--line-y) - 6px);
  background: #fff;
}

.avinci-timeline__stem {
  position: absolute;
  left: 4px;
  width: 1px;
  background: #fff;
  opacity: 0.9;
  z-index: 2;
}

.avinci-timeline__item--above .avinci-timeline__stem {
  top: 14px;
  bottom: calc(var(--tl-height) - var(--line-y));
}

.avinci-timeline__item--below .avinci-timeline__stem {
  top: var(--line-y);
  bottom: 12px;
}

.avinci-timeline__body {
  position: absolute;
  left: 14px;
  right: 0;
}

.avinci-timeline__item--above .avinci-timeline__body {
  top: 10px;
}

.avinci-timeline__item--below .avinci-timeline__body {
  top: calc(var(--line-y) + 18px);
}

.avinci-timeline__year {
  display: block;
  font-family: "XMH Flama-Bold", "XMH Flama-Medium", sans-serif;
  font-size: 28px;
  line-height: 1;
  margin: 0 0 6px;
  color: #fff;
}

.avinci-timeline__text {
  font-size: 12px;
  line-height: 1.35;
  color: #fff;
  max-width: 260px;
}

.avinci-timeline__text p {
  margin: 0 0 0.35em;
}

.avinci-timeline__text p:last-child {
  margin-bottom: 0;
}

.avinci-timeline__sep {
  display: block;
  margin: 0.35em 0;
  line-height: 1;
  color: #fff;
}

/* Mobile fallback */
@media (max-width: 767px) {
  .avinci-timeline {
    --tl-height: auto;
  }

  .avinci-timeline__track {
    height: auto;
    overflow: visible;
    cursor: default;
    padding: 18px 0 30px;
  }

  .avinci-timeline__svg {
    display: none;
  }

  .avinci-timeline__items {
    min-width: 0;
    width: 100%;
    display: block;
    padding: 0 0 0 24px;
    border-left: 1px solid #fff;
  }

  .avinci-timeline__item,
  .avinci-timeline__item--wide {
    width: 100%;
    min-height: 0;
    margin: 0 0 20px;
  }

  .avinci-timeline__dot {
    left: -29px;
    top: 8px !important;
  }

  .avinci-timeline__stem {
    display: none;
  }

  .avinci-timeline__body {
    position: static;
  }

  .avinci-timeline__year {
    font-size: 28px;
  }

  .avinci-timeline__text {
    font-size: 14px;
    max-width: none;
  }

  .avinci-timeline__title {
    font-size: 26px;
    padding: 24px 0 0;
  }
}
