/* ===============================
   Vertical Alternating Timeline
================================= */

.timeline {
  position: relative;
  margin: 80px auto;
  max-width: 1100px;
  padding: 40px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 3px;
  height: 100%;
  background: #00b3ff;
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 30px;
  width: 18px;
  height: 18px;
  background: #00b3ff;
  border-radius: 50%;
}

.timeline-item:nth-child(odd)::before {
  right: -9px;
}

.timeline-item:nth-child(even)::before {
  left: -9px;
}

/* Cards */
.timeline-content {
  background: var(--card-bg, #ffffff);
  color: var(--text-color, #222);
  padding: 25px;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-content:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* Logo */
.cert-logo img {
  max-height: 70px;
  max-width: 200px;
  object-fit: contain;
  margin-bottom: 15px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 8px;
  margin-bottom: 10px;
}

.category { background: #1f2937; color: #00b3ff; }
.level.beginner { background: #1e3a8a; color: #93c5fd; }
.level.intermediate { background: #065f46; color: #6ee7b7; }
.level.advanced { background: #7f1d1d; color: #fca5a5; }

/* Lists */
.timeline-content ul {
  margin-top: 10px;
  padding-left: 18px;
}

.timeline-content li {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 900px) {
  .timeline-item, .timeline-item:nth-child(even), .timeline-item:nth-child(odd) {
    width: 100%;
    left: 0;
    text-align: left;
  }
  .timeline-item::before {
    left: 11px !important;
    right: auto;
  }
}