/* Roadmap Section */
.roadmap {
  padding: 5rem 0;
  position: relative;
  background: linear-gradient(
    180deg,
    var(--bg-color) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    var(--bg-color) 100%
  );
}

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

/* Vertical Line */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--primary-color) 15%,
    var(--primary-color) 85%,
    transparent 100%
  );
}

.timeline-item {
  margin-bottom: 4rem;
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.timeline-content {
  width: 45%;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  position: relative;
  transition: all 0.3s ease;
  z-index: 10;
}

.timeline-content:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

/* Section Headers (Topology A/B) */
.timeline-section-header {
  width: 100%;
  text-align: center;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid var(--primary-color);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 3rem;
  position: relative;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.timeline-section-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-color);
  font-weight: 700;
}

.timeline-section-header p {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.timeline-section-header.topology-b {
  background: rgba(255, 193, 7, 0.1);
  border-color: #ffc107;
  margin-top: 2rem;
}

/* Dot on the line */
.timeline-dot {
  width: 20px;
  height: 20px;
  background: var(--bg-color);
  border: 4px solid var(--primary-color);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

/* Alternating sides with explicit classes using Flexbox alignment */
.timeline-item.left {
    justify-content: flex-start !important;
}

.timeline-item.right {
    justify-content: flex-end !important;
}

.timeline-item.left .timeline-content {
    margin: 0 !important;
    text-align: right; /* Content alignment optional */
}

.timeline-item.right .timeline-content {
    margin: 0 !important;
    text-align: left; /* Content alignment optional */
}

/* Ensure content text alignment is reset if needed inside card */
.timeline-content {
    text-align: left;
}

/* Connector lines */
.timeline-content::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 30px;
  height: 2px;
  background: var(--primary-color);
  opacity: 0.5;
}

.timeline-item.left .timeline-content::after {
  right: -31px !important;
  left: auto !important;
}

.timeline-item.right .timeline-content::after {
  left: -31px !important;
  right: auto !important;
}

/* Content Styles */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.2rem;
}

.status-done {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-progress {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-planned {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.timeline-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-weight: 700;
}

.timeline-content .description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.timeline-list li {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  line-height: 1.6;
  padding-left: 0.5rem;
}

.timeline-list li i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.timeline-list li strong {
  color: var(--text-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    margin-bottom: 3rem;
  }

  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px !important;
    padding: 1.5rem;
  }

  .timeline-dot {
    left: 20px;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-width: 3px;
  }

  .timeline-content::after {
    left: -31px !important;
    right: auto !important;
  }

  .timeline-section-header {
    margin-left: 0;
    width: 100%;
    padding: 1.2rem 1rem;
  }

  .timeline-section-header h3 {
    font-size: 1.15rem;
    line-height: 1.4;
  }

  .timeline-section-header p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .timeline-content h3 {
    font-size: 1.1rem;
    line-height: 1.4;
    word-wrap: break-word;
    hyphens: auto;
    margin-bottom: 0.8rem;
  }

  .timeline-content .description {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
  }

  .status-badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.8rem;
    margin-bottom: 1rem;
  }

  .timeline-list {
    margin: 0.8rem 0;
  }

  .timeline-list li {
    font-size: 0.82rem;
    margin-bottom: 0.9rem;
    line-height: 1.7;
    word-wrap: break-word;
  }

  .timeline-list li strong {
    display: inline-block;
    margin-bottom: 0.2rem;
  }
}
