/* assets/css/timeline.css - Interactive Life Events Milestone Timeline */

.timeline-container {
  position: relative;
  padding: 2rem 0;
  max-width: 850px;
  margin: 0 auto;
}

/* Central Timeline Spine */
.timeline-track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 30px;
  width: 3px;
  background: linear-gradient(to bottom, #d97706, #78350f, #334155);
  border-radius: var(--radius-full);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 70px;
  display: flex;
  flex-direction: column;
}

/* Milestone Node Icon */
.timeline-marker {
  position: absolute;
  left: 17px;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 2px solid var(--accent-gold);
  color: var(--text-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm), var(--shadow-gold);
  z-index: 2;
  transition: transform var(--transition-fast);
}

.timeline-item:hover .timeline-marker {
  transform: scale(1.2);
  border-color: #fbbf24;
  background: #d97706;
  color: #fff;
}

/* Milestone Card */
.timeline-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.timeline-card:hover {
  transform: translateX(4px);
  border-color: var(--border-gold);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-year-badge {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-gold);
  background: rgba(217, 119, 6, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-gold);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-place {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.timeline-media-thumb {
  margin-top: 0.85rem;
  max-width: 260px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  cursor: pointer;
}

.timeline-media-thumb img {
  width: 100%;
  display: block;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {

  /* Container padding */
  .timeline-container {
    padding: 1.25rem 0;
  }

  /* Track stays on the left */
  .timeline-track {
    left: 22px;
  }

  /* Items: reduce left padding */
  .timeline-item {
    padding-left: 52px;
    margin-bottom: 1.5rem;
  }

  /* Marker: smaller */
  .timeline-marker {
    left: 9px;
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  /* Card: reduce padding */
  .timeline-card {
    padding: 0.9rem;
  }

  /* Header: wrap gracefully */
  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .timeline-title {
    font-size: 1rem;
  }

  .timeline-desc {
    font-size: 0.85rem;
  }

  /* Media thumb: full width on mobile */
  .timeline-media-thumb {
    max-width: 100%;
  }
}

@media (max-width: 480px) {

  .timeline-item {
    padding-left: 46px;
  }

  .timeline-marker {
    left: 6px;
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
  }

  .timeline-track {
    left: 17px;
  }
}
