/* Timeline Styles - Teral Timeline Plugin */
.timeline-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px;
  overflow: hidden;
  background-color: #f5f5f5;
}

/* Upward-pointing triangle at bottom - marks start of journey (oldest year) - theme blue */
.timeline-container::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 22px solid #02a2e4;
  z-index: 2;
}

.timeline-line {
  position: absolute;
  top: 20px;
  left: 50%;
  bottom: 24px; /* Stop above the arrow - arrow is the base/start */
  transform: translateX(-50%);
  width: 4px;
  background: #d1d5db;
  z-index: 0;
}

.timeline-dot {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background-color: #165dfb;
  border-radius: 50%;
  z-index: 2;
}

.timeline-item {
  padding: 10px 20px;
  position: relative;
  width: 50%;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
  will-change: opacity, transform;
  z-index: 1;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Colored vertical line segment per year - aligns with center axis */
.timeline-item::before {
  content: "";
  position: absolute;
  top: -80px;
  bottom: -80px;
  width: 4px;
  background-color: var(--timeline-color, #165dfb);
  z-index: 1;
}
.timeline-item.left::before {
  left: 100%;
  transform: translateX(-50%);
}
.timeline-item.right::before {
  left: 0;
  transform: translateX(-50%);
}

.timeline-item::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 25px;
  right: -12px;
  background-color: var(--timeline-color, #242f93);
  border: 4px solid #fff;
  top: -13px;
  border-radius: 50%;
  z-index: 2;
}

.timeline-item.left {
  left: 0;
}
.timeline-item.right {
  left: 50%;
}
.timeline-item.right::after {
  left: -12px;
}

.timeline-content {
  padding: 15px 20px;
  background-color: white;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Extra padding when no image - prevents text sticking to edges */
.timeline-content--no-image {
  padding: 20px 28px;
}

.timeline-item.left .timeline-content {
  border-radius: 0 60px 6px 60px;
}
.timeline-item.right .timeline-content {
  border-radius: 0 60px 6px 60px;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.timeline-text-content {
  flex: 1;
}
.timeline-year {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--timeline-color, #242f93);
  /* margin-bottom: 10px; */
}
.timeline-year a {
  color: inherit;
}
.timeline-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #333;
}
.timeline-description {
  color: #000000;
  line-height: 1.6;
  /* margin-bottom: 15px; */
}

.timeline-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--timeline-color, #02a2e4);
}
/* Hide image container when empty (no img child) */
.timeline-image:not(:has(img)) {
  display: none !important;
}
.timeline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.timeline-image:hover img {
  transform: scale(1.05);
}

@media screen and (max-width: 768px) {
  .timeline-container::before {
    left: 31px;
    transform: translateX(-50%);
  }
  .timeline-line {
    left: 31px;
  }
  .timeline-dot {
    left: 31px;
    transform: none;
  }
  .timeline-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 25px;
  }
  .timeline-item.right {
    left: 0;
  }
  .timeline-item::before {
    left: 31px;
    transform: translateX(-50%);
  }
  .timeline-item::after {
    left: 18px;
    top: -13px;
  }
  .timeline-item.left::after,
  .timeline-item.right::after {
    left: 18px;
  }
  .timeline-content {
    flex-direction: column;
    text-align: center;
    border-radius: 6px 0 0 6px !important;

    /* new */
    border-top-left-radius: 65px;
    border-bottom-right-radius: 70px;
  }
  .timeline-image {
    margin-bottom: 15px;
  }
}

.timeline-heading {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
  padding: 0 20px;
}
.timeline-heading h3 {
  font-size: 2.5rem;
  color: #000;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}
.timeline-heading h3::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, #3498db, #2ecc71);
  border-radius: 2px;
}
.timeline-heading p {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.6;
  margin-top: 25px;
}

@media screen and (max-width: 768px) {
  .timeline-heading {
    margin-bottom: 40px;
  }
  .timeline-heading h3 {
    font-size: 2.5rem;
  }
  .timeline-heading p {
    font-size: 1rem;
  }
}
