/* RK Timeline */

.rk-timeline-section {
  background: var(--rk-cream);
}

.rk-timeline {
  --rk-tl-accent: var(--rk-orange);
  --rk-tl-line: var(--rk-border-strong);
  --rk-tl-title-ink: var(--rk-brown);
  --rk-tl-text-ink: var(--rk-ink-dim);
  position: relative;
  max-width: 46rem;
  margin-inline: auto;
  padding-left: 3rem;
}

.rk-timeline::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--rk-tl-line);
}

.rk-timeline__progress {
  position: absolute;
  left: 0.95rem;
  top: 0;
  width: 2px;
  height: 0%;
  background: linear-gradient(color-mix(in srgb, var(--rk-tl-accent) 75%, #fff), var(--rk-tl-accent));
  transition: height 0.2s linear;
}

.rk-tl-item {
  position: relative;
  padding-bottom: 4.5rem;
}

.rk-tl-item:last-child {
  padding-bottom: 0;
}

.rk-tl-item__dot {
  position: absolute;
  left: -3rem;
  top: 0.2rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--rk-cream);
  border: 2px solid var(--rk-tl-line);
  display: grid;
  place-items: center;
  transition: border-color 0.4s, box-shadow 0.4s;
}

.rk-tl-item__dot::after {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--rk-muted);
  transition: background 0.4s, transform 0.4s var(--rk-ease-out);
}

.rk-tl-item.is-inview .rk-tl-item__dot {
  border-color: var(--rk-tl-accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--rk-tl-accent) 35%, transparent);
}

.rk-tl-item.is-inview .rk-tl-item__dot::after {
  background: var(--rk-tl-accent);
  transform: scale(1.25);
}

.rk-tl-item__year {
  font-family: var(--rk-font-script);
  font-size: 2.6rem;
  color: var(--rk-tl-accent);
  line-height: 1;
}

.rk-tl-item__label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rk-tl-title-ink);
  margin: 0.4rem 0 0.8rem;
}

.rk-tl-item__text {
  color: var(--rk-tl-text-ink);
}

/* --------------------------------------------------------------- Split
   Center line, image on one side / title + text on the other, year floating
   beside the node with a dashed connector. Rows alternate automatically.
   Below 901px split rows inherit the classic left-rail styles above, with
   the image stacked into the flow. */

.rk-tl-row__media img {
  width: 100%;
  height: var(--rk-tl-img-h, auto);
  object-fit: cover;
  border-radius: var(--rk-tl-img-radius, var(--rk-radius-lg));
  display: block;
}

.rk-timeline--split .rk-tl-item__label {
  font-family: var(--rk-font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 0 0 1rem;
}

@media (max-width: 900px) {
  .rk-timeline--split .rk-tl-row__media img {
    margin-bottom: 1.2rem;
  }

  /* stack: image, then year + title + text (flipped rows too) */
  .rk-timeline--split .rk-tl-row {
    display: flex;
    flex-direction: column;
  }

  .rk-timeline--split .rk-tl-row__media {
    order: 1;
  }

  .rk-timeline--split .rk-tl-row__node {
    order: 2;
  }

  .rk-timeline--split .rk-tl-row__body {
    order: 3;
  }
}

@media (min-width: 901px) {
  .rk-timeline--split {
    max-width: none;
    padding-left: 0;
  }

  .rk-timeline--split::before,
  .rk-timeline--split .rk-timeline__progress {
    left: 50%;
    transform: translateX(-50%);
  }

  .rk-timeline--split .rk-tl-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7rem minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    padding-bottom: 5.5rem;
  }

  .rk-timeline--split .rk-tl-row:last-child {
    padding-bottom: 0;
  }

  .rk-timeline--split .rk-tl-row__media {
    order: 1;
    min-width: 0;
  }

  .rk-timeline--split .rk-tl-row__node {
    order: 2;
    position: relative;
    display: flex;
    justify-content: center;
    padding-top: 0.1rem;
  }

  .rk-timeline--split .rk-tl-row__body {
    order: 3;
    min-width: 0;
  }

  .rk-timeline--split .rk-tl-row--flip .rk-tl-row__media {
    order: 3;
  }

  .rk-timeline--split .rk-tl-row--flip .rk-tl-row__body {
    order: 1;
  }

  /* dot sits in flow, centered on the line */
  .rk-timeline--split .rk-tl-item__dot {
    position: static;
  }

  /* Year lives in the text column's normal flow, above the title — it can
     never overlap, whatever font/size it uses. A dashed connector points
     back toward the dot on the line. */
  .rk-timeline--split .rk-tl-item__year {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: -0.3rem 0 0.9rem;
  }

  .rk-timeline--split .rk-tl-item__year::before {
    content: "";
    flex: none;
    width: 2rem;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--rk-tl-accent) 0 5px, transparent 5px 9px);
  }

  /* flipped rows: text sits left of the line, so the year hugs the right
     edge with the dash on its right, pointing at the dot */
  .rk-timeline--split .rk-tl-row--flip .rk-tl-item__year {
    flex-direction: row-reverse;
  }
}

/* Editor preview: dots lit */
.elementor-editor-active .rk-tl-item .rk-tl-item__dot {
  border-color: var(--rk-tl-accent);
}
