/* Timeline Section */
.timeline-section {
  padding: 4rem 10%;
  background: rgba(255, 255, 255, 0.98);
  margin: 2rem 10%;
  border-radius: 20px;
}

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

/* Timeline vertical line */
.timeline-container::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #1a9872 0%, #b4d95a 100%);
  border-radius: 2px;
  box-shadow: 0 0 20px rgba(26, 152, 114, 0.3);
}

/* Timeline Item */
.timeline-item {
  position: relative;
  margin: 4rem 0;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
  margin-right: 0;
  text-align: left;
  padding-left: 3rem;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: auto;
  margin-left: 0;
  text-align: right;
  padding-right: 3rem;
}

/* Timeline Marker */
.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #1a9872, #b4d95a);
  border-radius: 50%;
  border: 5px solid white;
  box-shadow: 0 0 0 4px rgba(26, 152, 114, 0.2), 0 4px 15px rgba(26, 152, 114, 0.4);
  z-index: 10;
  cursor: pointer;
  transition: all 0.4s ease;
  animation: pulse-marker 2s ease-in-out infinite;
}

@keyframes pulse-marker {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(26, 152, 114, 0.2), 0 4px 15px rgba(26, 152, 114, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(26, 152, 114, 0.3), 0 6px 25px rgba(26, 152, 114, 0.6);
  }
}

.timeline-marker:hover {
  transform: translateX(-50%) scale(1.3);
  box-shadow: 0 0 0 8px rgba(26, 152, 114, 0.3), 0 6px 30px rgba(180, 217, 90, 0.7);
}

/* Timeline Content */
.timeline-content {
  width: 45%;
  background: linear-gradient(135deg, #d4e896 0%, #b4d95a 100%);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(26, 152, 114, 0.2);
  transition: all 0.4s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.timeline-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.timeline-content:hover::before {
  left: 100%;
}

.timeline-content:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 40px rgba(26, 152, 114, 0.35);
  border-color: #1a9872;
}

.timeline-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0d4d4d;
  margin-bottom: 0.5rem;
  opacity: 0.8;
  letter-spacing: 0.5px;
}

.timeline-content h3 {
  font-size: 1.8rem;
  color: #0c5066;
  margin-bottom: 1rem;
  font-weight: 700;
}

.timeline-content p {
  font-size: 1.1rem;
  color: #455a64;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* View Details Button */
.view-details-btn {
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, #1a9872, #0c5066);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(26, 152, 114, 0.3);
  position: relative;
  overflow: hidden;
}

.view-details-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.view-details-btn:hover::before {
  width: 300px;
  height: 300px;
}

.view-details-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(26, 152, 114, 0.5);
}

/* Event Modal */
.event-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.event-modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  border-radius: 20px;
  max-width: 800px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes slideUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #0c5066;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.close-modal:hover {
  background: #1a9872;
  transform: rotate(90deg);
}

.modal-body {
  padding: 3rem;
}

.modal-body h2 {
  color: #0c5066;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.modal-date {
  color: #1a9872;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.modal-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #455a64;
  margin-bottom: 2rem;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.modal-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modal-gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(26, 152, 114, 0.4);
}

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

  .timeline-marker {
    left: 30px;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    width: calc(100% - 80px);
    margin-left: 80px;
    margin-right: 0;
    text-align: left;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .modal-body {
    padding: 2rem 1.5rem;
  }

  .modal-body h2 {
    font-size: 1.8rem;
  }
}
