/* Timeline container */
.timeline-wrapper {
  background-color: #f8f9fa;
  background-color: transparent;
  padding: 4rem 2rem;
}

/* Scrollable track */
.timeline-scroll {
  overflow-x: auto;
  scroll-behavior: smooth;
}

/* Container for the entire timeline */
.timeline-container {
  display: grid;
  grid-template-rows: 1fr 60px 1fr; /* Top row, middle row (for line), bottom row */
  grid-auto-flow: column; /* This is crucial for horizontal scrolling */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; 
  gap: 10px; /* Space between each event/reaction pair */
  padding-top: 30px;
  padding-bottom: 30px; /* Provides padding for the scrollable area */
  position: relative;
  min-width: 3900px;
}

/* The timeline line, placed in the middle grid row */
.timeline-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #dc3545;
  background-color: goldenrod;
  transform: translateY(-50%);
}

/* Common styles for all timeline cards */
.timeline-card {
  width: 250px; /* Fixed width for the cards */
  height: auto;
  padding: 0em .5em;
}

/* .timeline-card .card-body {
  margin-left: 0;
  padding-left: 0;
} */

.timeline-card ul  {
  list-style-type: none; 
  margin-left: 0;
  padding-left: 0;
}

.list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem; /* Or use a specific margin-right on the badge */
}

/* Optional: To make the badge and text align neatly */
.list-item .badge {
  flex-shrink: 0;
  padding-top: 0;
  margin-top: 0.5em;
}

/* Positioning for top cards */
.timeline-top-card {
  grid-row: 1; /* Places the card in the first row of the grid */
  align-self: end; /* Aligns the card to the bottom of its grid cell */
}

/* Positioning for bottom cards */
.timeline-bottom-card {
  grid-row: 3; /* Places the card in the third row of the grid */
  align-self: start; /* Aligns the card to the top of its grid cell */
  padding-left: 0.5em;
  padding-right: 0.5em;
}


/* Style for the timeline dots */
.timeline-dot {
  width: 12px;
  height: 12px;
  background-color: goldenrod;
  border-radius: 50%;
  border: 2px solid goldenrod;
  box-shadow: 0 0 0 2px goldenrod;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  top: 40%;
  grid-row: 2; /* Place the dot in the middle row */
  justify-self: center; /* Center the dot horizontally in its column */
  cursor: pointer;
  z-index: 10;
}

.timeline-dot:hover {
  transform: scale(1.5);
  box-shadow: 0 0 8px 4px darkgoldenrod;
}



/* Style for the timeline dots */
.timeline-numbered-dot {
  /* width: 12px;
  height: 12px; */
  /* background-color: #dc3545; */
  /* border-radius: 50%; */
  /* border: 2px solid #dc3545; */
  /* box-shadow: 0 0 0 2px #dc3545; */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  top: 28%;
  grid-row: 2; /* Place the dot in the middle row */
  justify-self: center; /* Center the dot horizontally in its column */
  cursor: pointer;
  z-index: 10;
}

/* .timeline-numbered-dot:hover {
  transform: translate(-50%, 20%);
  transform: scale(1.5);
  box-shadow: 0 0 8px 4px #b8860b09;
} */




/* Responsive tweaks */
@media (max-width: 768px) {
  .timeline-container {
    min-width: 3600px;
    gap: 1rem;
  }

  .timeline-card {
    min-width: 200px;
    max-width: 220px;
  }
}
