/* ===== WEBDEV STAGES SECTION (UNIQUE) ===== */

.stg-web-title {
  font-size: 40px;
  font-weight: 700;
  line-height: 100%;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0 0 20px 0;
  margin-top: 120px;
  text-align: center;
}

.stg-web-subtitle {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 60px;
  text-align: center;
}

.stg-web-list {
  position: relative;
  margin: 0 auto;
  margin-bottom: 115px;
}

/* Центральна лінія */
.stg-web-list::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: black;
  transform: translateX(-50%);
  z-index: 0;
}

.stg-web-item {
  position: relative;
  margin-bottom: 60px;
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

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

/* Прибираємо хвостик лінії в кінці */
.stg-web-item:last-child::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 30px;
  bottom: 0;
  width: 1px;
  background-color: gray; /* Має збігатися з фоном секції */
  transform: translateX(-50%);
  z-index: 2;
}

.stg-web-item-number {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 47px;
  height: 47px;
  background-color: black;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 400;
  color: white;
  z-index: 3;
  flex-shrink: 0;
}

.stg-web-item-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  width: 100%;
  align-items: flex-start;
}

/* Непарні кроки (01, 03, 05, 07) */
.stg-web-item:nth-child(odd) .stg-web-item-text {
  padding-left: 50px;
  order: 2;
}

.stg-web-item:nth-child(odd) .stg-web-item-image {
  padding-right: 50px;
  order: 1;
}

/* Парні кроки (02, 04, 06) */
.stg-web-item:nth-child(even) .stg-web-item-text {
  padding-right: 50px;
  text-align: right;
  order: 1;
}

.stg-web-item:nth-child(even) .stg-web-item-image {
  padding-left: 50px;
  order: 2;
}

.stg-web-item-image img {
  width: 100%;
  max-height: 388px;
  border-radius: 12px;
  object-fit: cover;
}

.stg-web-item-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.stg-web-item-description {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 30px;
}

.stg-web-item-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stg-web-item-list li {
  padding-left: 24px;
  margin-bottom: 12px;
  position: relative;
  line-height: 1.4;
  font-size: 16px;
}

.stg-web-item:nth-child(even) .stg-web-item-list li {
  padding-left: 0;
  padding-right: 24px;
}

.stg-web-item-list li::before {
  content: "•";
  position: absolute;
  color: var(--color-primary);
  left: 0;
  font-size: 20px;
}

.stg-web-item:nth-child(even) .stg-web-item-list li::before {
  left: auto;
  right: 0;
}

/* ===== MOBILE ADAPTIVE ===== */

@media (max-width: 768px) {
  .stg-web-title {
    font-size: 28px;
    margin-top: 60px;
    margin-bottom: 20px;
  }

  .stg-web-subtitle {
    font-size: 18px;
    margin-bottom: 50px;
  }

  .stg-web-list {
    margin-bottom: 54px;
  }

  .stg-web-list::before {
    left: 24px;
    transform: none;
  }

  .stg-web-item {
    margin-bottom: 40px;
    padding-left: 60px;
  }

  .stg-web-item-number {
    left: 0;
    transform: none;
  }

  .stg-web-item-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  /* На мобілці всі картинки зверху, текст знизу */
  .stg-web-item:nth-child(odd) .stg-web-item-image,
  .stg-web-item:nth-child(even) .stg-web-item-image {
    order: 1;
    padding: 0;
    width: 100%;
  }

  .stg-web-item:nth-child(odd) .stg-web-item-text,
  .stg-web-item:nth-child(even) .stg-web-item-text {
    order: 2;
    padding: 0;
    text-align: left;
    width: 100%;
  }

  .stg-web-item:last-child::after {
    display: none;
  }

  .stg-web-item-image img {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 16 / 10;
    object-fit: cover;
  }

  .stg-web-item-title {
    font-size: 20px;
  }

  .stg-web-item-description {
    font-size: 14px;
  }
}
