.timeline-section {
  padding: 100px 0;
  position: relative;
  min-height: 100vh;
}

.timeline-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.timeline-header {
  text-align: center;
  margin-bottom: 80px;
}

.timeline-header h2 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--light);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.timeline-header h2::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 4px;
  background: var(--bs-cyan);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.timeline-header p {
  font-size: 1.2rem;
  color: rgba(241, 250, 238, 0.8);
  max-width: 700px;
  margin: 0 auto;
}

/* Timeline elements */

.timeline {
  position: relative;
  /*margin: 50px 0;*/
}

.timeline::before {
  content: '';
  position: absolute;
  width: 6px;
  background-color: var(--secondary);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10px;
}

.timeline-item {
  padding: 20px 40px;
  position: relative;
  width: 50%;
  /*opacity: 0;*/
  transition: all 0.5s ease;
  transform: translateY(50px);
}

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

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

.timeline-contentc {
  padding: 30px;
  /*background: var(--secondary);*/
  background-color: var(--card-bg);
  border-radius: 35px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: perspective(1000px) rotateY(-8deg) scale(1.03);
  /*default: tilt + scale;*/
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  backface-visibility: hidden;
  will-change: transform;
}

.timeline-content {
  padding: 30px;
  background: var(--card-bg);
  border-radius: 35px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: perspective(1000px) rotateY(8deg) scale(1.03);
  /*default: tilt + scale;*/
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-contentc:hover {
  transform: perspective(1000px) rotateY(0deg) scale(1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.timeline-img-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 20px;
  height: 200px;
  transform: scale(0.9);
  transition: all 0.5s ease;
}

.timeline-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}

.img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient);
  opacity: 0.3;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: scale(1.03) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.timeline-content:hover .img-overlay {
  opacity: 0.1;
}

.timeline-contentc:hover .img-overlay {
  opacity: 0.1;
}

/* Creative entrance animations */

@keyframes slideInLeft {
  from {
    transform: translateX(-100px) rotate(-5deg);
    opacity: 0;
  }
  to {
    transform: translateX(0) rotate(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100px) rotate(5deg);
    opacity: 0;
  }
  to {
    transform: translateX(0) rotate(0);
    opacity: 1;
  }
}

.timeline-item.active:nth-child(odd) {
  animation: slideInLeft 0.8s ease forwards;
}

.timeline-item.active:nth-child(even) {
  animation: slideInRight 0.8s ease forwards;
}

.timeline-contentc h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  /*color: var(--accent);*/
}

.timeline-content h3 {
  font-size: 1.5rem;
  /*margin-bottom: 15px;*/
  /*color: var(--accent);*/
  font-weight: bold;
}

.timeline-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.timeline-date {
  position: absolute;
  width: 120px;
  background: var(--secondary);
  color: var(--dark);
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 5px 15px rgba(32,69,201,0.3);
}

.timeline-item:nth-child(odd) .timeline-date {
  right: -150px;
  top: 25px;
}

.timeline-item:nth-child(even) .timeline-date {
  left: -150px;
  top: 25px;
}

.timeline-dot {
  position: absolute;
  width: 30px;
  height: 30px;
  /*background: var(--accent);*/
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 50%;
  top: 30px;
  z-index: 1;
  box-shadow: 0 0 0 5px rgba(32,150,201,0.3);
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -15px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -15px;
}

@media (max-width: 768px) {
  .timeline::before {
    left: 31px;
  }
}

@media (max-width: 768px) {
  .timeline-item {
    width: 100%;
    padding-left: 57px;
    padding-right: 10px;
    /*margin-top: 100px;*/
    padding-top: 94px;
  }
}

@media (max-width: 768px) {
  .timeline-item:nth-child(even) {
    left: 0;
  }
}

@media (max-width: 768px) {
  .timeline-item:nth-child(odd) .timeline-date, .timeline-item:nth-child(even) .timeline-date {
    left: 70px;
    right: auto;
    top: 25px;
  }
}

@media (max-width: 768px) {
  .timeline-dot {
    left: 16px;
  }
}

@media (max-width: 768px) {
  .timeline-item:nth-child(even) .timeline-dot {
    left: 16px;
  }
}

