/* timeline.css */
.timeline-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 10px 0 10px 0;
  /* Extra padding for hover effects */
}

.timeline-scroll-container {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 5px 0 10px 0;
  /* Buffer for shadow and transform */
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
  cursor: grab;
}

.timeline-scroll-container:active {
  cursor: grabbing;
}

.timeline-scroll-container::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

.timeline-item {
  flex: 0 0 auto;
  width: 320px;
  height: 420px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  color: white !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  user-select: none;
  /* Prevent text selection during drag */
  background-color: #1a1a1a;
  cursor: pointer;
}

.timeline-item:hover {
  transform: translateY(-15px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.timeline-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transition: transform 0.6s ease;
}

.timeline-item:hover .timeline-bg {
  transform: scale(1.1);
}

.timeline-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.0) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.9) 100%);
  z-index: 2;
  transition: opacity 0.4s ease;
}

.timeline-item:hover .timeline-overlay {
  opacity: 0.8;
}

.timeline-content {
  position: relative;
  z-index: 3;
  padding: 25px;
}

.timeline-title {
  font-size: 1.0rem;
  font-weight: 400;
  margin: 0 0 15px 10px;
  color: #ffcc00;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.timeline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-links a {
  font-size: 0.9rem;
  font-weight: 300;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.timeline-links a:hover {
  background: #ffffff;
  color: #1a1a1a !important;
  transform: translateY(-2px);
  border-color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .timeline-item {
    width: 280px;
    height: 380px;
  }

  .timeline-title {
    font-size: 1.5rem;
  }

  .timeline-links a {
    font-size: 0.8rem;
    padding: 5px 12px;
  }
}