/* ============================================
   SUNDAS FOUNDATION — Timeline Component
   ============================================ */

.timeline {
  position: relative;
  padding: var(--space-xl) 0;
}

/* Vertical center line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: var(--color-border);
}

.timeline__item {
  position: relative;
  width: 50%;
  padding: 0 var(--space-2xl) var(--space-2xl);
}

/* Alternate left/right */
.timeline__item:nth-child(odd) {
  left: 0;
  padding-right: var(--space-3xl);
  text-align: right;
}

.timeline__item:nth-child(even) {
  left: 50%;
  padding-left: var(--space-3xl);
  text-align: left;
}

/* Timeline dot */
.timeline__dot {
  position: absolute;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  border: 4px solid var(--color-white);
  box-shadow: 0 0 0 3px var(--color-primary);
  z-index: 1;
}

.timeline__item:nth-child(odd) .timeline__dot {
  right: -10px;
}

.timeline__item:nth-child(even) .timeline__dot {
  left: -10px;
}

/* Timeline content card */
.timeline__card {
  background: var(--color-white);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  transition: all var(--transition-base);
  color: var(--color-text);
}

.timeline__card h3 {
  color: var(--color-dark);
}

.timeline__card p {
  color: var(--color-text-light);
}

.timeline__card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.timeline__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-sm);
}

.timeline__title {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-sm);
}

.timeline__text {
  font-size: var(--fs-sm);
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ---- Scroll Animation (initial hidden state) ---- */
.timeline__item {
  opacity: 0;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.timeline__item.reveal-visible {
  opacity: 1;
}

/* ---- Vertical Timeline (for Establishment page) ---- */
.timeline-vertical {
  position: relative;
  padding-left: var(--space-3xl);
}

.timeline-vertical::before {
  content: '';
  position: absolute;
  top: 0;
  left: 14px;
  width: 3px;
  height: 100%;
  background: var(--color-border);
}

.timeline-vertical__item {
  position: relative;
  margin-bottom: var(--space-xl);
}

.timeline-vertical__dot {
  position: absolute;
  left: calc(-1 * var(--space-3xl) + 5px);
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  border: 4px solid var(--color-white);
  box-shadow: 0 0 0 3px var(--color-primary);
}

.timeline-vertical__year {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.timeline-vertical__content {
  background: var(--color-white);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.timeline-vertical__title {
  font-size: var(--fs-md);
  margin-bottom: var(--space-sm);
}

.timeline-vertical__text {
  font-size: var(--fs-sm);
  color: var(--color-text-light);
}
