/* === HOW IT WORKS SECTION STYLES === */

.how-it-works {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1rem;
}

.section-header p {
  max-width: 500px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #64748b;
  font-weight: 500;
}

/* Timeline - kompaktowy pionowy */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  z-index: 1;
}

/* Minimalistyczna pionowa linia */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: rgba(59, 130, 246, 0.3);
  border-radius: 1px;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  position: relative;
  width: 100%;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.2s; }
.timeline-item:nth-child(2) { animation-delay: 0.4s; }
.timeline-item:nth-child(3) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* Alternating layout */
.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

/* Hover effect dla całego timeline item */
.timeline-item:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-image img {
  transform: scale(1.05);
}

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

.timeline-content {
  width: calc(50% - 60px);
  background: rgba(255, 255, 255, 0.7);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.timeline-item:nth-child(odd) .timeline-content {
  text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
  text-align: left;
}

.timeline-content h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 12px;
}

.timeline-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  color: #64748b;
  font-weight: 500;
}

/* Minimalistyczne markery */
.timeline-marker {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #60a5fa;
  border: 3px solid white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  z-index: 2;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
  transition: all 0.2s ease;
  position: relative;
}

.timeline-marker:hover {
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.timeline-image {
  width: calc(50% - 60px);
}

.timeline-image img {
  max-width: 240px;
  height: auto;
  border-radius: 12px;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.timeline-image img:hover {
  opacity: 1;
}

/* Responsive dla tabletów */
@media (max-width: 992px) {
  .timeline::before {
    left: 30px;
    transform: none;
  }

  .timeline-item {
    flex-direction: row;
    text-align: left;
    padding-left: 60px;
    align-items: flex-start;
    margin-bottom: 2rem;
  }

  .timeline-item:nth-child(even) {
    flex-direction: row;
  }

  .timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }

  .timeline-content {
    width: auto;
    flex: 1;
    margin-right: 1rem;
    text-align: left;
  }

  .timeline-image {
    width: auto;
  }
  
  .timeline-image img {
    max-width: 180px;
  }
}

/* Mobile responsywność */
@media (max-width: 768px) {
  .how-it-works {
    padding: 4rem 0;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .section-header p {
    font-size: 1rem;
    max-width: 400px;
  }

  .timeline::before {
    left: 30px;
    width: 2px;
  }

  .timeline-item {
    flex-direction: row;
    text-align: left;
    padding-left: 58px;
    align-items: flex-start;
    margin-bottom: 2rem;
  }

  .timeline-item:nth-child(even) {
    flex-direction: row;
  }

  .timeline-item:hover {
    transform: none;
  }
  
  .timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 42px;
  }

  .timeline-marker svg {
    width: 24px;
    height: 24px;
  }
  
  .timeline-content {
    width: auto;
    flex: 1;
    text-align: left;
    margin-right: 1rem;
  }

  .timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
  }

  .timeline-content p {
    font-size: 0.95rem;
  }
  
  .timeline-image {
    width: auto;
  }

  .timeline-image img {
    max-width: 160px;
  }
}