/* ===== Legacy Timeline =====
   Every selector starts with .legacy-timeline so theme / Elementor global styles
   don't leak in, and these styles don't leak out. */
.legacy-timeline {
  --lt-bg: #bdbdbd;
  --lt-panel: #8c8c8c;
  --lt-ink: #111;
  --lt-text: #080808;
  --lt-dot-off: #9a9a9a;
  --lt-dot-on: #943726;
  --lt-serif: "DM Serif Display", Georgia, serif;
  --lt-sans: "DM Sans", Arial, sans-serif;
 
  color: var(--lt-text);
  font-family: var(--lt-sans);
  font-size: 13px;
  line-height: 1.6;
}

.legacy-timeline *,
.legacy-timeline *::before,
.legacy-timeline *::after {
  box-sizing: border-box;
}

.legacy-timeline img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===== Layout ===== */
.legacy-timeline .history {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 40px;
  max-width: 1640px;
  margin: 0 auto; 
  align-items: start;
}

.legacy-timeline .history__content {
  padding: 10px 0;
}

/* ===== Story sections ===== */
.legacy-timeline .story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  margin: 0 0 60px;
  padding: 0;
  scroll-margin-top: 40px;
}

.legacy-timeline .story__media {
  position: relative;
}

.legacy-timeline .story__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #9e9e9e;
  filter: grayscale(100%);
}

.legacy-timeline .story--img-right .story__media {
  transform: translateY(-20px);
}

.legacy-timeline .story__text h2 {
  margin: 0 0 16px;
  font-family: var(--lt-serif);
  font-weight: 400;
  font-size: 60px;
  line-height: 1.1;
  color: var(--lt-ink);
  text-transform: none;
  letter-spacing: normal;
}

.legacy-timeline .story__text p {
  margin: 0 0 16px;
  font-family: var(--lt-sans);
  font-size: 20px;
  line-height: 1.6;
  color: var(--lt-text);
}

/* ===== Image slider (fade) ===== */
.legacy-timeline .slider__frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #9e9e9e;
}

.legacy-timeline .slider__frame .slider__slide {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.legacy-timeline .slider__frame .slider__slide.is-active {
  opacity: 1;
}

.legacy-timeline .story__dots {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.legacy-timeline .story__dots button {
  width: 12px;
  height: 12px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--lt-dot-off);
  box-shadow: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.legacy-timeline .story__dots button:hover {
  transform: scale(1.3);
}

.legacy-timeline .story__dots button.is-active {
  background: var(--lt-dot-on);
}

/* ===== Sticky button ===== */
.legacy-timeline .sticky-cta {
  position: sticky;
  bottom: 20px;
  z-index: 5;
  margin-top: 20px;
}

.legacy-timeline .history-btn {
  display: inline-block;
  padding: 10px 18px;
  background: #f2f2f2;
  color: var(--lt-ink);
  font-family: var(--lt-serif);
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: background 0.2s, color 0.2s;
}

.legacy-timeline .history-btn:hover,
.legacy-timeline .history-btn:focus {
  background: var(--lt-ink);
  color: #fff;
}

/* ===== Timeline (desktop: vertical, full screen height) ===== */
.legacy-timeline .timeline {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px); /* 20px gap above and below */
  margin: 20px 0;
  background: var(--lt-panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
}

.legacy-timeline .timeline__arrow {
  width: 22px;
  height: 22px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  color: #fff;
  font-size: 9px;
  line-height: 22px;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.legacy-timeline .timeline__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

/* window that the track slides inside */
.legacy-timeline .timeline__viewport {
  position: relative;
  flex: 1;
  width: 100%;
  overflow: hidden;
}

/* the main line */
.legacy-timeline .timeline__viewport::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  background: #000;
}

.legacy-timeline .timeline__track {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 60px 0;
  list-style: none;
  transition: transform 0.6s ease;
}

.legacy-timeline .timeline__item {
  position: relative;
  flex: 1;
  min-height: 180px;
  margin: 0;
  padding: 0;
}

.legacy-timeline .timeline__item a {
  position: absolute;
  inset: 0;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.3s;
}

/* dot at the end of the branch */
.legacy-timeline .timeline__item a::before {
  content: "";
  position: absolute;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #000;
  transition: background 0.3s, transform 0.3s;
}

/* branch from the line to the dot */
.legacy-timeline .timeline__item a::after {
  content: "";
  position: absolute;
  top: -0.5px;
  width: 54px;
  height: 1px;
  background: #000;
}

.legacy-timeline .timeline__item--left a::before  { left: calc(50% - 60px); }
.legacy-timeline .timeline__item--left a::after   { left: calc(50% - 52px); }
.legacy-timeline .timeline__item--right a::before { left: calc(50% + 50px); }
.legacy-timeline .timeline__item--right a::after  { left: calc(50% + 1px); }

.legacy-timeline .timeline__year,
.legacy-timeline .timeline__label {
  position: absolute;
  writing-mode: vertical-rl;
	white-space: wrap;
  font-size: 14px;
	font-weight: 600;
  line-height: 1;
}

.legacy-timeline .timeline__year {
  bottom: calc(100% + 10px);
  font-weight: 700;
}

.legacy-timeline .timeline__label {
  top: 12px;
}

.legacy-timeline .timeline__item--left .timeline__year,
.legacy-timeline .timeline__item--left .timeline__label {
  left: calc(50% - 60px);
}

.legacy-timeline .timeline__item--right .timeline__year,
.legacy-timeline .timeline__item--right .timeline__label {
  left: calc(50% + 50px);
}

/* hover + active (current section) */
.legacy-timeline .timeline__item a:hover,
.legacy-timeline .timeline__item.is-active a {
  color: #fff;
}

.legacy-timeline .timeline__item a:hover::before {
  transform: scale(1.3);
}

.legacy-timeline .timeline__item.is-active a::before {
  background: var(--lt-dot-on);
  transform: scale(1.5);
}

.legacy-timeline .timeline__item.is-active .timeline__label {
  font-weight: 700;
}
@media (max-width: 1440px) {
	.legacy-timeline .story__text h2{
		font-size: 50px;
	}
}
/* ===== Tablet / mobile: horizontal timeline, one item at a time ===== */
@media (max-width: 900px) {
  .legacy-timeline .history {
    grid-template-columns: minmax(0, 1fr);
    gap: 0; 
  }

  .legacy-timeline .history__content {
    padding: 10px 0;
  }

  .legacy-timeline .story {
    scroll-margin-top: 100px; /* room for the sticky timeline bar */
  }

  .legacy-timeline .timeline {
    order: -1;
    top: 12px;
    z-index: 10;
    height: auto;
    margin: 12px 0 0; /* side spacing comes from the 16px gutter */
    padding: 10px 16px;
    flex-direction: row;
    gap: 12px;
  }

  .legacy-timeline .timeline__arrow {
    transform: rotate(-90deg);
  }

  .legacy-timeline .timeline__viewport {
    height: 70px;
    min-width: 0;
  }

  .legacy-timeline .timeline__viewport::before {
    top: 50%;
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 3px;
    margin: -1.5px 0 0;
  }

  .legacy-timeline .timeline__track {
    flex-direction: row;
    padding: 0;
  }

  .legacy-timeline .timeline__item {
    flex: 0 0 100%;
    min-height: 0;
  }

  .legacy-timeline .timeline__item a::after {
    display: none;
  }

  .legacy-timeline .timeline__item--left a::before,
  .legacy-timeline .timeline__item--right a::before {
    top: 50%;
    left: 50%;
    margin: -5px 0 0 -5px;
  }

  .legacy-timeline .timeline__item--left .timeline__year,
  .legacy-timeline .timeline__item--right .timeline__year,
  .legacy-timeline .timeline__item--left .timeline__label,
  .legacy-timeline .timeline__item--right .timeline__label {
    left: 50%;
    writing-mode: horizontal-tb;
    transform: translateX(-50%);
    font-size: 12px;
	text-align: center;
  }

  .legacy-timeline .timeline__year {
    top: auto;
    bottom: calc(50% + 12px);
  }

  .legacy-timeline .timeline__label {
    top: calc(50% + 12px);
  }
}

@media (max-width: 640px) {
  .legacy-timeline .story {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
  }

  /* image always first on mobile */
  .legacy-timeline .story--img-right .story__media {
    order: -1;
    transform: none;
  }

  .legacy-timeline .story__text h2 {
    font-size: 28px;
  }

  .legacy-timeline .sticky-cta {
    bottom: 12px;
    text-align: center;
  }
}

/* ===== WordPress admin bar (logged-in users) ===== */
@media (min-width: 901px) {
  .admin-bar .legacy-timeline .timeline {
    top: 52px;
    height: calc(100vh - 72px);
  }
}

@media (min-width: 783px) and (max-width: 900px) {
  .admin-bar .legacy-timeline .timeline {
    top: 44px;
  }
}

@media (min-width: 601px) and (max-width: 782px) {
  .admin-bar .legacy-timeline .timeline {
    top: 58px;
  }
}
