/* ==========================================================================
   History Timeline Styles
   ========================================================================== */

/* --- Timeline Container --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 40px auto;
}

/* Vertical line */
.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background-color: #0066cc;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* --- Timeline Items --- */
.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
  box-sizing: border-box;
}

/* Circle node on each item */
.timeline-item::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  background-color: white;
  border: 4px solid #0066cc;
  top: 50%;
  border-radius: 50%;
  z-index: 1;
}

/* Left-side items */
.timeline-item.left {
  left: 0;
}

.timeline-item.left::after {
  right: 0;
  transform: translate(50%, -50%);
}

/* Right-side items */
.timeline-item.right {
  left: 50%;
}

.timeline-item.right::after {
  left: 0;
  transform: translate(-50%, -50%);
}

/* Arrow pointers (optional decorative) */
.timeline-item.left::before {
  content: ' ';
  height: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  z-index: 1;
  right: -10px;
  border: medium solid #f5f5f5;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent #f5f5f5;
}

.timeline-item.right::before {
  content: ' ';
  height: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  z-index: 1;
  left: -10px;
  border: medium solid #f5f5f5;
  border-width: 10px 10px 10px 0;
  border-color: transparent #f5f5f5 transparent transparent;
}

/* --- Content Card --- */
.timeline-content {
  padding: 20px 30px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
  margin-top: 0;
  color: #0066cc;
  font-size: 18px;
}

.timeline-date {
  font-weight: bold;
  color: #0066cc;
  font-size: 16px;
  margin-bottom: 8px;
}

.timeline-text {
  color: #333;
  line-height: 1.6;
  margin: 0;
}

/* --- Mobile Responsive (single-column layout) --- */
@media screen and (max-width: 600px) {
  /* Position the vertical line on the left */
  .timeline::after {
    left: 20px;
    transform: translateX(-50%);
  }

  /* All items full-width, stacked to the right of the line */
  .timeline-item {
    width: 100%;
    padding-left: 55px;
    padding-right: 15px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .timeline-item.left,
  .timeline-item.right {
    left: 0;
  }

  /* Center the circle node on the vertical line */
  .timeline-item::after,
  .timeline-item.left::after,
  .timeline-item.right::after {
    left: 20px;
    right: auto;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  /* Hide the arrow pointers on mobile */
  .timeline-item.left::before,
  .timeline-item.right::before {
    display: none;
  }
}
