/* Horizontal Timeline Design */
.our-story-timeline {
  padding: 0 0 20px;
  background: #faf8f6;
  overflow: hidden;
}

.timeline-header {
  text-align: center;
  padding: 0 10px;
}

.timeline-container {
  position: relative;
  width: 100%;
  height: 565px;
  overflow: hidden;
  padding: 40px 0 20px;
}

.timeline-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 0;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.timeline-item {
  flex-shrink: 0;
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.timeline-card {
  width: 300px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: opacity 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.4s ease;
  opacity: 0.5;
  transform: scale(0.9);
  margin-bottom: 24px;
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.timeline-item.active .timeline-card {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 8px 30px rgba(200, 129, 124, 0.2);
  border: 2px solid rgba(232, 180, 184, 0.3);
}

.timeline-card__image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #f3f1ec;
  position: relative;
}

.timeline-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.timeline-item.active .timeline-card__image img {
  transform: scale(1.05);
}

.timeline-card__content {
  padding: 20px;
}

.timeline-card__title {
  font-size: 20px;
  font-weight: 600;
  color: #4a4543;
  margin: 0 0 12px;
  font-family: var(--font-accent);
}

.timeline-card__desc {
  font-size: 14px;
  line-height: 1.6;
  color: #6b5d57;
  margin: 0 0 12px;
  word-break: keep-all;
}

.timeline-card__desc p {
  margin: 0 0 8px;
  font-size: 14px;
}

.timeline-card__date {
  font-size: 13px;
  color: #e8b4b8;
  font-weight: 500;
  display: block;
}

/* Heart Overlay on Last Card */
.heart-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
}

.heart-overlay svg {
  filter: drop-shadow(0 4px 12px rgba(241, 197, 201, 0.6));
}

.timeline-item.active .heart-overlay svg {
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

/* Navigation Thumbnails */
.timeline-nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  -webkit-overflow-scrolling: touch;
}

.timeline-nav::-webkit-scrollbar {
  display: none;
}

.timeline-nav__thumb {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  border: 3px solid transparent;
  background: #f3f1ec;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.timeline-nav__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.timeline-nav__thumb .thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: #999;
}

.timeline-nav__thumb:hover {
  border-color: rgba(232, 180, 184, 0.5);
  transform: translateY(-2px);
}

.timeline-nav__thumb.active {
  border-color: #e8b4b8;
  box-shadow: 0 4px 12px rgba(232, 180, 184, 0.4);
  transform: scale(1.1);
}

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

  .timeline-card {
    width: 260px;
  }
}

/* Smooth transitions */
@media (prefers-reduced-motion: reduce) {

  .timeline-card,
  .timeline-dot,
  .timeline-nav__dot {
    transition: none !important;
  }
}