/* ==========================================================================
   WORKFLOW TIMELINE STYLES
   ========================================================================== */

.s-workflow {
  padding-top: 60px;
  padding-bottom: 100px;
}

.timeline-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Фоновая (тусклая) линия */
.timeline-line-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 200px; /* Позиция линии. Слева 200px для колонки с шагами */
  width: 2px;
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateX(-50%);
}

/* Красная линия (заполняется при скролле) */
.timeline-line-progress {
  position: absolute;
  top: 0;
  left: 200px;
  width: 2px;
  background-color: #c01101;
  transform: translateX(-50%);
  height: 0%; /* Стартует с 0, JS будет её увеличивать */
  transition: height 0.2s ease-out;
  box-shadow: 0 0 10px rgba(192, 17, 1, 0.5);
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px 80px 1fr; /* Лево (Шаг) | Центр (Точка) | Право (Текст) */
  gap: 0;
  margin-bottom: 60px;
  position: relative;
  opacity: 0.3; /* Тусклые по умолчанию */
  transform: translateY(20px);
  transition: all 0.6s ease;
}

/* Класс для подсветки шага при скролле */
.timeline-item.active {
  opacity: 1;
  transform: translateY(0);
}

.timeline-left {
  text-align: right;
  padding-top: 5px; /* Выравниваем по заголовку справа */
}

.step-num {
  font-family: "Polaris", "Lato", sans-serif;
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.step-price {
  font-family: "Polaris", "Lato", sans-serif;
  font-size: 24px;
  color: #ffffff;
  margin-bottom: 5px;
}

.step-note {
  font-family: "Lato", sans-serif;
  font-size: 13px;
  color: #777;
}

.timeline-center {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 8px; /* Выравниваем точку */
  position: relative;
  z-index: 2;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  background-color: #111;
  border: 2px solid #333;
  border-radius: 50%;
  transition: all 0.4s ease;
}

/* Когда шаг активен, точка светится красным */
.timeline-item.active .timeline-dot {
  background-color: #c01101;
  border-color: #c01101;
  box-shadow: 0 0 15px rgba(192, 17, 1, 0.8);
}

.timeline-right {
  padding-left: 10px;
  padding-bottom: 20px;
}

.timeline-title {
  font-family: "Polaris", "Lato", sans-serif;
  font-size: 20px;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline-text {
  font-family: "Lato", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #a0a0a0;
  margin-bottom: 15px;
}

.timeline-text strong {
  color: #dddddd;
}

.timeline-text em {
  color: #888888;
}

/* АДАПТИВНОСТЬ ДЛЯ ТЕЛЕФОНОВ */
@media screen and (max-width: 768px) {
  .timeline-wrapper {
    padding-left: 20px; /* Сдвигаем всё вправо */
  }
  
  .timeline-line-bg,
  .timeline-line-progress {
    left: 20px; /* Линия теперь с самого левого края */
  }
  
  .timeline-item {
    grid-template-columns: 40px 1fr; /* Только Точка и Контент */
    margin-bottom: 50px;
  }
  
  .timeline-left {
    grid-column: 2; /* Переносим "Шаг и Цену" в правую колонку */
    text-align: left;
    margin-bottom: 15px;
    padding-top: 0;
    display: flex;
    align-items: baseline;
    gap: 15px;
  }
  
  .step-num { margin-bottom: 0; font-size: 16px; color: #c01101; }
  .step-price { font-size: 18px; margin-bottom: 0; }
  .step-note { display: none; /* Прячем доп текст на мобилках для чистоты */ }
  
  .timeline-center {
    grid-column: 1;
    grid-row: 1 / 3; /* Точка растягивается на высоту */
    justify-content: flex-start;
    padding-top: 5px;
    transform: translateX(-6px); /* Центрируем точку на линии */
  }
  
  .timeline-right {
    grid-column: 2;
    padding-left: 0;
  }
}

/* --- Стили для ссылок внутри текста таймлайна --- */
.timeline-text a.timeline-link {
  color: #ffffff;
  text-decoration: none;
  position: relative;
  font-weight: 700;
  transition: color 0.3s ease;
}

.timeline-text a.timeline-link::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: #c01101; /* Красная линия подчеркивания */
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.timeline-text a.timeline-link:hover {
  color: #c01101;
}

.timeline-text a.timeline-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}