/*--------------------------------------------------------------
# Section: Как мы работаем - Timeline Variant
--------------------------------------------------------------*/

.how-section {
  padding: 80px 0;
  background: var(--surface-color, #ffffff);
}

/* Заголовок */
.how-header-wrapper {
  margin-bottom: 3rem;
}

@media (min-width: 992px) {
  .how-header-wrapper {
    margin-bottom: 4rem;
  }
}

.how-main-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--heading-color, #1a1a1a);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.how-main-subtitle {
  font-size: 1.1rem;
  color: color-mix(in srgb, var(--default-color, #666), transparent 20%);
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
}

/* Desktop Timeline */
.how-timeline-desktop {
  position: relative;
  padding: 60px 0 40px;
}

.how-timeline-line {
  position: absolute;
  top: 96px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--accent-color, #0066cc), transparent 80%) 0%,
    var(--accent-color, #0066cc) 20%,
    var(--accent-color, #0066cc) 80%,
    color-mix(in srgb, var(--accent-color, #0066cc), transparent 80%) 100%
  );
  border-radius: 1px;
  z-index: 1;
}

.how-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.how-step-icon-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 24px;
}

.how-step-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--accent-color, #0066cc);
  background: var(--background-color, #ffffff);
  border: 3px solid var(--accent-color, #0066cc);
  border-radius: 50%;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.how-step-item:hover .how-step-icon {
  transform: scale(1.1);
  box-shadow: 0 8px 28px -4px color-mix(in srgb, var(--accent-color, #0066cc), transparent 60%);
}

.how-step-number {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 32px;
  height: 32px;
  background: var(--accent-color, #0066cc);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.875rem;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent-color, #0066cc), transparent 50%);
  z-index: 3;
}

.how-step-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--heading-color, #1a1a1a);
  margin-bottom: 8px;
  line-height: 1.4;
}

.how-step-desc {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--default-color, #666), transparent 25%);
  line-height: 1.6;
  margin-bottom: 8px;
}

.how-step-tag {
  display: inline-block;
  padding: 6px 14px;
  background: color-mix(in srgb, var(--accent-color, #0066cc), transparent 92%);
  color: var(--accent-color, #0066cc);
  border: 1px dashed color-mix(in srgb, var(--accent-color, #0066cc), transparent 60%);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 8px;
  line-height: 1.4;
}

/* Mobile Timeline */
.how-timeline-mobile {
  position: relative;
  padding: 20px 0;
}

.how-timeline-line-vertical {
  position: absolute;
  left: 32px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--accent-color, #0066cc) 0%,
    var(--accent-color, #0066cc) 85%,
    color-mix(in srgb, var(--accent-color, #0066cc), transparent 80%) 100%
  );
  z-index: 1;
}

.how-steps-vertical {
  position: relative;
  z-index: 2;
}

.how-step-item-vertical {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-left: 16px;
  margin-bottom: 32px;
}

.how-step-item-vertical:last-child {
  margin-bottom: 0;
}

.how-step-item-vertical .how-step-icon-wrapper {
  width: 64px;
  height: 64px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.how-step-item-vertical .how-step-icon {
  font-size: 28px;
  border-width: 2px;
}

.how-step-item-vertical .how-step-number {
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
  top: -4px;
  right: -4px;
}

.how-step-content {
  flex: 1;
  padding-top: 8px;
}

.how-step-item-vertical .how-step-title {
  font-size: 1rem;
  margin-bottom: 6px;
}

.how-step-item-vertical .how-step-desc {
  font-size: 0.875rem;
  margin-bottom: 6px;
}

.how-step-item-vertical .how-step-tag {
  font-size: 0.7rem;
  padding: 4px 12px;
  margin-top: 6px;
}

/* Микро-текст */
.how-micro-text {
  font-size: 0.9rem;
  line-height: 1.6;
  padding-top: 40px;
  text-align: center;
  color: color-mix(in srgb, var(--default-color, #666), transparent 20%);
}

/* Блок гарантий и ответственности */
.how-guarantee-note {
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--surface-color, #ffffff), black 0.5%),
    var(--surface-color, #ffffff)
  );
  border: 1px solid color-mix(in srgb, var(--default-color, #666), transparent 92%);
  border-radius: 20px;
  padding: 32px 40px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
  margin-top: 40px;
}

.how-guarantee-label {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  color: color-mix(in srgb, var(--default-color, #666), transparent 30%);
}

.how-guarantee-text {
  font-size: 0.9rem;
  line-height: 1.7;
  color: color-mix(in srgb, var(--default-color, #666), transparent 15%);
  margin: 0;
}

/* Responsive */
@media (max-width: 1199px) {
  .how-step-icon-wrapper {
    width: 84px;
    height: 84px;
  }
  
  .how-step-icon {
    font-size: 36px;
  }
  
  .how-timeline-line {
    top: 84px;
  }
}

@media (max-width: 991px) {
  .how-section {
    padding: 60px 0;
  }
  
  .how-main-title {
    font-size: 2rem;
  }
  
  .how-main-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 767px) {
  .how-section {
    padding: 50px 0;
  }
  
  .how-main-title {
    font-size: 1.75rem;
  }
  
  .how-step-item-vertical {
    gap: 16px;
    padding-left: 12px;
    margin-bottom: 28px;
  }
  
  .how-step-item-vertical .how-step-icon-wrapper {
    width: 56px;
    height: 56px;
  }
  
  .how-step-item-vertical .how-step-icon {
    font-size: 24px;
  }
  
  .how-timeline-line-vertical {
    left: 28px;
  }
  
  .how-guarantee-note {
    padding: 24px 20px;
    margin-top: 32px;
  }
}

/* Animation for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .how-step-icon,
  .how-step-item:hover .how-step-icon {
    transition: none;
    transform: none;
  }
}
