:root {
  --primary-blue: #0056b3;
  --text-dark: #1a202c;
  --line-color: #cbd5e1;
}

.timeline {
  margin: 0 auto;
  font-family: sans-serif;
  overflow: hidden; /* Prevents overflow on mobile */
}

/* --- HEADER SECTION --- */
.timeline__header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.timeline__window {
  flex: 1;
  overflow: hidden; 
  position: relative;
  height: 100px; /* Fixed height to center everything */
  display: flex;
  align-items: center;
}

.timeline__center-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background-color: var(--primary-blue);
  border-radius: 50%;
  z-index: 10;
}

.timeline__track {
  display: flex;
  position: absolute; /* Prevents years from squeezing together */
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%;
  align-items: center;
  transition: transform 1s ease-in-out;
}

.timeline__line {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  background-color: var(--line-color);
  z-index: 0;
}

.timeline__year-item {
  flex: 0 0 33.333%; /* 3 visible on mobile */
  text-align: center;
  position: relative;
  z-index: 1;
  cursor: pointer;
  color: #64748b;
  font-size: 1.25rem;
  font-weight: bold;
  transition: color 0.3s;
}

.timeline__year-item--active {
  color: var(--text-dark);
}

.timeline__year-text {
  display: inline-block;
  transform: translateY(-30px);
  color: #002855;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

.timeline__controls {
  display: flex;
  gap: 10px;
  margin-left: 30px;
  top: -30px;
  position: relative;
}

.timeline__pretitle {
  color: #4A4A4A;
  font-size: 16px;
}

.timeline__text-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.timeline__nav-btn {
  width: 40px; 
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-blue);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.timeline__nav-btn--disabled {
  background-color: var(--line-color);
  cursor: not-allowed;
}

/* --- BOTTOM SECTION (SLIDER) --- */
.timeline__content-wrapper {
  overflow: hidden;
}

.timeline__content-track {
  display: flex;
  transition: transform 1s ease-in-out;
}

.timeline__slide {
  flex: 0 0 100%;
  box-sizing: border-box; /* Prevents overflow due to padding */
  display: flex;
  flex-direction: column-reverse; /* Mobile: Text top, image bottom */
  gap: 40px;
}

.timeline__image-col{ 
  overflow: hidden;
  position: relative;
} 

.timeline__image-col img, .timeline__image-col video{
  border-radius: 20px 0 0 20px;
  position: absolute;
  object-fit: cover;
  inset: 0;
  width: 100%;
  height: 100% !important;
}
.timeline__eyebrow h3 {
  font-weight: 700;
  letter-spacing: 1px;
  color: #002855;
  margin: 0 0 20px;
}

.timeline__eyebrow p {
  color: #000000;
  line-height: 1.5;
}

.timeline__button a {
  color: #06C;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  align-items: center;
  display: flex;
  gap: 15px;
}

.timeline__button a svg {
  width: 7px;
}
.on-dark .timeline__year-text,
.on-dark .timeline__eyebrow h3,
.on-dark .timeline__eyebrow p,
.on-dark .timeline__pretitle {
  color: #ffffff;
}

.on-dark .timeline__year-item {
  color: rgba(255, 255, 255, 0.6);
}

.on-dark .timeline__year-item--active {
  color: #ffffff;
}
.on-dark .timeline__button a {
  color: #66b3ff; 
}

/* --- DESKTOP (Greater than 768px) --- */
@media (min-width: 768px) {
  .timeline__year-item {
    flex: 0 0 20%; /* 5 visible on desktop */
  }

  .timeline__slide {
    flex-direction: row;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .timeline__image-col{ 
    height: 100%;
  }
  .timeline__image-col img , .timeline__image-col video{
    border-radius: 20px 0 0 20px;:
  }
}

@media (max-width: 650px) {
  .timeline__header {
    flex-direction: column;
  }
  .timeline__window {
    flex: auto;
    width: 100%;
  }
  .timeline__controls {
    margin-left: 0;
    top: -15px;
  }
  .timeline__image-col{
    height: 250px;
  }
}