.timeline-wrapper {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 40px;
  /* Hide scrollbar for webkit browsers (Chrome, Safari, Edge) */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}

/* Hide scrollbar for webkit browsers */
.timeline-wrapper::-webkit-scrollbar {
  display: none;
}

.timeline {
  position: relative;
  display: flex;
  justify-content: flex-start;
  flex-wrap: nowrap;
  padding: 100px 20px;
  min-height: 350px;
  width: max-content;
  
}

.timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  background-color: #111;
  z-index: 1;
  width: 100%;
}

.timeline-event {
  position: relative;
  width: 120px;
  flex: 0 0 auto;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  background: #066a51;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: -5px;
  transform: translateY(-50%);
  z-index: 3;
}

.timeline-connector {
  width: 2px;
  background: #111;
  position: absolute;
  left: 0;
  z-index: 1;
}

.timeline-event.top .timeline-connector {
  top: 0;
  height: 50%;
}

.timeline-event.bottom .timeline-connector {
  top: 50%;
  height: 50%;
}

.timeline-event.top .timeline-content {
  position: absolute;
  bottom: calc(50% + 10px);
  left: 10px;
  text-align: left;
}

.timeline-event.bottom .timeline-content {
  position: absolute;
  top: calc(50% + 10px);
  left: 10px;
  text-align: left;
}

.timeline-content {
  max-width: 150px;
}

.timeline-year {
  margin: 0;
  font-weight: bold;
	font-size: 1.2rem;
}

.timeline-text {
  margin-top: 4px;
  font-size: 0.74rem;
  color: #000;
}

@media (min-width: 1025px) {
  .timeline {
    margin: 0 auto;
  }
  .timeline-line {
    left: 20px;
  }
}

/* Mobilanpassning */
@media (max-width: 1024px) {
  .timeline {
    flex-direction: column;
    padding: 40px 20px;
  }

  .timeline-text {
    margin-top: 4px;
    font-size: 1rem;
  }

  /* Gör huvudlinjen vertikal */
  .timeline-line {
    left: 20px;
    top: 42px;
    bottom: 0;
    width: 2px;
    height: 100%;
  }

  .timeline-event {
    width: 100%;
    padding-left: 10px;
    margin-bottom: 25px;
    position: relative;
  }

  /* Punkt mitt på huvudlinjen */
  .timeline-dot {
    left: -5px;         
    top: 0;             
    transform: none;    
  }

  /* Ta bort connector-linjen i mobilen */
  .timeline-connector {
    display: none;
  }

  /* Flytta texten ner lite under punkten */
  .timeline-content {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: 0 !important;
    margin-top: -5px;
    max-width: 300px;
  width: 100%;
  word-wrap: break-word; 
  }
}

/* Scroll Progress Bar Styles */
.scroll-progress-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
  border-radius: 2px;
}

.scroll-progress-bar {
  height: 100%;
  background-color: #111;
  width: 0%;
  transition: width 0.1s ease;
}

.timeline-scroll-container {
  position: relative;
  margin-top: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.scroll-indicator {
  position: relative;
  width: 300px;
  height: 12px;
  background: #e0e0e0;
  border-radius: 6px;
  display: none;
  z-index: 1000;
}

.scroll-progress {
  height: 100%;
  background: #096a52;
  border-radius: 4px;
  transition: width 0.1s ease;
}

/* Hide on smaller screens as per user request */
@media (max-width: 1024px) {
  .scroll-indicator {
      display: none !important; /* Ensure it's hidden on mobile */
  }
}