/* Timeline of Value Section - Horizontal Grid Layout */
.timeline-of-value-section {
  position: relative;
  padding: 60px 0;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.timeline-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Content area - 4 column grid */
.timeline-content-area {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Journey rows */
.journey-row {
  position: relative;
  opacity: 0;
}

/* Alternating slide-in animations */
.journey-row:nth-child(1) {
  animation: slide-in-right 0.8s ease-out forwards;
  animation-delay: 0.2s;
}

.journey-row:nth-child(2) {
  animation: slide-in-left 0.8s ease-out forwards;
  animation-delay: 0.4s;
}

.journey-row:nth-child(3) {
  animation: slide-in-right 0.8s ease-out forwards;
  animation-delay: 0.6s;
}

.journey-row:nth-child(4) {
  animation: slide-in-left 0.8s ease-out forwards;
  animation-delay: 0.8s;
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Timeline content cards */
.timeline-content {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 3rem 1.5rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(40, 225, 232, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
              0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
  position: relative;
}

/* Numbered circle badge at top-center */
.timeline-content::before {
  content: attr(data-number);
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  background: var(--turquoise);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #000;
  box-shadow: 0 0 0 4px rgba(40, 225, 232, 0.3),
              0 0 15px rgba(40, 225, 232, 0.8);
  z-index: 3;
  transition: all 0.3s ease;
}

/* Use counter for automatic numbering */
.timeline-content-area {
  counter-reset: timeline-counter;
}

.journey-row {
  counter-increment: timeline-counter;
}

.timeline-content::before {
  content: counter(timeline-counter);
}

.timeline-content:hover::before {
  width: 35px;
  height: 35px;
  top: -17px;
  box-shadow: 0 0 0 6px rgba(40, 225, 232, 0.4),
              0 0 20px rgba(40, 225, 232, 1);
}

.timeline-content:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--turquoise);
  box-shadow: 0 8px 30px rgba(40, 225, 232, 0.3),
              0 4px 15px rgba(0, 0, 0, 0.25);
  transform: translateY(-8px);
}

/* Content typography */
.timeline-content h3 {
  font-size: 1rem;
  color: var(--turquoise);
  margin-bottom: 0.4rem;
  font-weight: 600;
  line-height: 1.3;
}

.timeline-content .subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.8rem;
  font-weight: 500;
  font-style: italic;
}

.timeline-content > p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

/* Responsive Design - Tablet (2x2 grid) */
@media (max-width: 968px) {
  .timeline-of-value-section {
    padding: 50px 0;
  }

  .timeline-container {
    padding: 0 30px;
  }

  .timeline-content-area {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .timeline-content {
    padding: 2.5rem 1.3rem 1.3rem;
  }

  .timeline-content h3 {
    font-size: 0.95rem;
  }

  .timeline-content .subtitle {
    font-size: 0.75rem;
  }

  .timeline-content > p {
    font-size: 0.83rem;
  }
}

/* Responsive Design - Mobile (stacked) */
@media (max-width: 768px) {
  .timeline-of-value-section {
    padding: 40px 0;
  }

  .timeline-container {
    padding: 0 20px;
  }

  .timeline-content-area {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .journey-row {
    padding: 1.2rem 1rem;
  }

  .timeline-content {
    padding: 2.5rem 1rem 1.2rem;
  }

  .timeline-content::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline-content h3 {
    font-size: 0.93rem;
    text-align: center;
  }

  .timeline-content .subtitle {
    font-size: 0.75rem;
    text-align: center;
  }

  .timeline-content > p {
    font-size: 0.82rem;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .timeline-container {
    padding: 0 15px;
  }

  .timeline-content-area {
    gap: 1.2rem;
  }

  .timeline-content {
    padding: 2.3rem 1rem 1rem;
  }

  .timeline-content::before {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .timeline-content h3 {
    font-size: 0.88rem;
  }

  .timeline-content .subtitle {
    font-size: 0.7rem;
  }

  .timeline-content > p {
    font-size: 0.78rem;
  }
}

/* Very small screens (< 360px) - Optimized typography and spacing */
@media (max-width: 359px) {
  .timeline-of-value-section {
    padding: 35px 0;
  }

  .timeline-container {
    padding: 0 12px;
  }

  .timeline-content-area {
    gap: 1rem;
  }

  .timeline-content {
    padding: 2.1rem 0.85rem 0.85rem;
    border-radius: 10px;
  }

  .timeline-content::before {
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
    top: -13px;
  }

  .timeline-content:hover::before {
    width: 30px;
    height: 30px;
    top: -15px;
  }

  .timeline-content h3 {
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    line-height: 1.25;
  }

  .timeline-content .subtitle {
    font-size: 0.68rem;
    margin-bottom: 0.7rem;
  }

  .timeline-content > p {
    font-size: 0.75rem;
    line-height: 1.6;
  }
}
