/* Блок этапов сотрудничества - новый дизайн */
.sources-section-area {
  padding: 60px 0;
  position: relative;
}

.stages-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
}

/* Связующая линия между карточками */
.stages-grid::before {
  content: "";
  position: absolute;
  top: 90px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(144, 43, 241, 0.3) 10%, 
    rgba(144, 43, 241, 0.6) 50%, 
    rgba(144, 43, 241, 0.3) 90%, 
    transparent 100%
  );
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  animation: lineAppear 1.2s ease-out 0.3s forwards;
}

@keyframes lineAppear {
  0% {
    opacity: 0;
    transform: scaleX(0);
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* Карточка этапа */
.stage-box {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  padding: 35px 25px;
  transition: all 0.4s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* Фоновое свечение как у калькулятора */
.stage-box::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -10%;
  width: 100%;
  height: 120%;
  opacity: 0.12;
  background: conic-gradient(
    from 220deg,
    rgb(85, 51, 207) 0deg,
    rgb(146, 64, 222) 120deg,
    rgba(64, 64, 222, 1) 240deg,
    rgb(160, 123, 245) 360deg
  );
  filter: blur(80px);
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.stage-box:hover {
  border-color: rgba(144, 43, 241, 0.6);
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(144, 43, 241, 0.3);
}

.stage-box:hover::before {
  opacity: 0.18;
}

/* Иконка */
.stage-icon-box {
  position: relative;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: linear-gradient(135deg, #902bf1 0%, #b24fff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  transition: all 0.4s ease;
  z-index: 1;
  box-shadow: 0 10px 30px rgba(144, 43, 241, 0.4);
}

.stage-icon-box::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  border: 2px solid rgba(144, 43, 241, 0.3);
  animation: ring-pulse-stages 2s ease-in-out infinite;
}

.stage-icon-box i {
  font-size: 32px;
  color: #ffffff;
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}

.stage-box:hover .stage-icon-box {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 40px rgba(144, 43, 241, 0.6);
}

.stage-box:hover .stage-icon-box i {
  transform: scale(1.1);
}

/* Заголовок */
.stage-box h3 {
  position: relative;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 15px 0;
  line-height: 1.3;
  z-index: 1;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
}

/* Текст */
.stage-box p {
  position: relative;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  z-index: 1;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
  flex: 1;
}

.stage-box:hover p {
  color: rgba(255, 255, 255, 0.9);
}

/* Дополнительная заметка */
.stage-note {
  position: relative;
  margin-top: 20px;
  padding: 15px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(144, 43, 241, 0.15) 0%, rgba(144, 43, 241, 0.08) 100%);
  border: 1px solid rgba(144, 43, 241, 0.3);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  z-index: 1;
  transition: all 0.3s ease;
  overflow: hidden;
  text-align: left;
  width: 100%;
}

.stage-note::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(144, 43, 241, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stage-box:hover .stage-note {
  background: linear-gradient(135deg, rgba(144, 43, 241, 0.2) 0%, rgba(144, 43, 241, 0.12) 100%);
  border-color: rgba(144, 43, 241, 0.4);
  transform: translateX(3px);
}

.stage-box:hover .stage-note::before {
  opacity: 1;
}

.stage-note i {
  color: #902bf1;
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.stage-box:hover .stage-note i {
  color: #b24fff;
  transform: scale(1.1);
}

/* Адаптивность */
@media (max-width: 1400px) {
  .stages-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .stages-grid::before {
    display: none;
  }
}

@media (max-width: 1200px) {
  .stages-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stages-grid::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .stages-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .stages-grid::before {
    display: none;
  }

  .stage-box {
    padding: 35px 25px;
  }

  .stage-icon-box {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
  }

  .stage-icon-box i {
    font-size: 30px;
  }

  .stage-box h3 {
    font-size: 18px;
  }

  .stage-box p {
    font-size: 14px;
  }

  .stage-note {
    font-size: 13px;
    padding: 13px;
    margin-top: 18px;
  }
}

@media (max-width: 576px) {
  .stage-box {
    padding: 30px 20px;
  }

  .stage-icon-box {
    width: 65px;
    height: 65px;
  }

  .stage-icon-box i {
    font-size: 28px;
  }

  .stage-box h3 {
    font-size: 17px;
  }

  .stage-box p {
    font-size: 13px;
  }

  .stage-note {
    font-size: 12px;
    padding: 12px;
    margin-top: 16px;
  }

  .stage-note i {
    font-size: 15px;
  }
}
