.timeline-wrapper {
  width: 100%;
  overflow: hidden;
  max-width: 100vw;
  padding: 50px 20px;
  padding-left: 9rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  text-align: center;
  color: white;
}

.timeline-container {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  width: 100%;
}

.timeline {
  position: relative;
  border-left: 2px dashed #D0E057;
  padding-left: 20px;
  min-width: 120px;
  flex-shrink: 0;
}

.timeline .year {
  margin: 60px 0;
  position: relative;
  font-weight: bold;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.timeline .year:first-child {
  margin-top: 0;
}

.timeline .year a {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 5px 0;
}

.timeline .year::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 8px;
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.timeline .year.active a {
  color: #D0E057;
  font-size: 22px;
}

.timeline .year.active::before {
  background: #D0E057;
  width: 14px;
  height: 14px;
  left: -28px;
  top: 6px;
}

.content-area {
  flex: 1;
  position: relative;
  min-height: 500px;
}

.content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.content.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.content h3 {
  font-size: 1.8rem;
  color: #D0E057;
  margin-bottom: 20px;
  line-height: 1.3;
}

.images {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  /* Remove or change background color */
}

.main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transform: scale(0.98);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  display: block; /* Ensure images display as block */
}

.content.show .main-img {
  transform: scale(1);
}

/* Specific content styling */
.images-1 {
  width: 100%;
  max-width: 800px;
  height: 500px;
}

.images-2 {
  width: 100%;
  max-width: 430px;
  height: 350px;
}

.images-3 {
  width: 100%;
  max-width: 620px;
  height: 380px;
}

.images-4 {
  width: 100%;
  max-width: 700px;
  height: 420px;
}

.images-5 {
  width: 100%;
  max-width: 600px;
  height: 400px;
}

/* Tablet Styles */
@media screen and (max-width: 1024px) {
  .timeline-wrapper {
      padding: 40px 15px;
  }

  h2 {
      font-size: 2rem;
      margin-bottom: 30px;
  }

  .timeline-container {
      flex-direction: column;
      gap: 15px; /* Reduced gap */
  }

  .timeline {
      border-left: none;
      border-top: 2px dashed #D0E057;
      padding-left: 0;
      padding-top: 10px; /* Reduced padding */
      padding-bottom: 5px; /* Added small bottom padding */
      display: flex;
      justify-content: center;
      gap: 25px; /* Reduced gap between years */
      min-width: auto;
      width: 100%;
  }

  .timeline .year {
      margin: 0;
      font-size: 18px;
  }

  .timeline .year::before {
      display: none;
  }

  .timeline .year.active a {
      font-size: 20px;
  }

  .content-area {
      min-height: auto; /* Changed from fixed height */
  }

  .content {
      text-align: center;
      position: relative;
      margin-top: 0; /* Ensure no extra top margin */
  }

  .content h3 {
      font-size: 1.5rem;
      margin-bottom: 15px; /* Reduced margin */
  }

  .images {
      margin: 0 auto;
  }

  .images-1 {
      height: 350px;
      max-width: 90%;
  }

  .images-2 {
      height: 280px;
      max-width: 90%;
  }

  .images-3 {
      height: 300px;
      max-width: 90%;
  }

  .images-4 {
      height: 320px;
      max-width: 90%;
  }

  .images-5 {
      height: 300px;
      max-width: 90%;
  }
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
  .timeline-wrapper {
      padding: 30px 10px;
  }

  h2 {
      font-size: 1.8rem;
      margin-bottom: 25px;
  }

  .timeline-container {
      gap: 10px; /* Further reduced gap */
  }

  .timeline {
      gap: 15px; /* Reduced gap between years */
      padding-top: 8px; /* Reduced padding */
      padding-bottom: 3px;
      flex-wrap: wrap;
      justify-content: center;
  }

  .timeline .year {
      font-size: 16px;
  }

  .timeline .year.active a {
      font-size: 18px;
  }

  .content-area {
      min-height: auto; /* Remove fixed height */
  }

  .content {
      position: relative;
      margin-top: 0;
  }

  .content h3 {
      font-size: 1.3rem;
      margin-bottom: 10px; /* Reduced margin */
  }

  .images {
      margin: 0 auto;
  }

  .images-1,
  .images-2,
  .images-3,
  .images-4,
  .images-5 {
      height: 250px;
      max-width: 95%;
  }

  .main-img {
      object-fit: contain;
  }
}

/* Small Mobile Styles */
@media screen and (max-width: 480px) {
  .timeline-wrapper {
      padding: 20px 8px;
  }

  h2 {
      font-size: 1.5rem;
      margin-bottom: 20px;
  }

  .timeline-container {
      gap: 8px; /* Minimal gap */
  }

  .timeline {
      gap: 12px; /* Reduced gap */
      padding-top: 6px; /* Minimal padding */
      padding-bottom: 2px;
  }

  .timeline .year {
      font-size: 14px;
  }

  .timeline .year.active a {
      font-size: 16px;
  }

  .content h3 {
      font-size: 1.1rem;
      line-height: 1.2;
      margin-bottom: 8px; /* Reduced margin */
  }

  .images-1,
  .images-2,
  .images-3,
  .images-4,
  .images-5 {
      height: 200px;
      max-width: 98%;
  }
}

/* Very Small Mobile */
@media screen and (max-width: 320px) {
  .timeline-wrapper {
      padding: 15px 5px;
  }

  h2 {
      font-size: 1.3rem;
  }

  .timeline .year {
      font-size: 12px;
  }

  .timeline .year.active a {
      font-size: 14px;
  }

  .content h3 {
      font-size: 1rem;
  }

  .images-1,
  .images-2,
  .images-3,
  .images-4,
  .images-5 {
      height: 180px;
      max-width: 100%;
  }
}