/* =========================
   BASE
========================= */

.stages-block {
  background-color: #F5FAFF;
  padding: 60px 0;
  overflow-x: hidden;
}

.stages-block.style-2 {
  background-color: #fff;
}

.stages-block.style-2 .stage {
  background: #F5FAFF;
}

/* =========================
   STAGES — BASE (NO VIDEO)
========================= */

.stages-block .stages {
  width: 100%;
}

/* Grid ТОЛЬКО для карточек */
.stages-block .stages-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
}

.stages-block .stage {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 15px;
  padding: 30px;
  width: 100%;
}

.stages-block .stage__num {
  color: var(--blue);
  font-size: 54px;
  font-weight: 800;
  line-height: 100%;
  letter-spacing: 2.7px;
  margin-bottom: 10px;
}

.stages-block .stage__name {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

/* =========================
   ACTION TILE
========================= */

.stages-block .action-tile {
  background-color: #fff;
  border-radius: 15px;
  padding: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  grid-column: span 2;
  gap: 10px;
}

.stages-block .action-tile__info {
  max-width: 310px;
  width: 100%;
}

.stages-block .action-tile__title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 10px;
}

.stages-block .action-tile__desc {
  color: var(--grey);
  font-size: 16px;
  line-height: 150%;
}

/* =========================
   VIDEO LAYOUT (DESKTOP)
========================= */

.stages-block .stages.has-video {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
}

.stages-block .stages-video {
  width: 100%;
}

.stages-block .stages-video__inner {
  position: relative;
  width: 100%;
  padding-top: 177%;
  border-radius: 15px;
  overflow: hidden;
  background: #000;
}

.stages-block .stages-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Видео → стадии в 2 колонки */
.stages-block .stages.has-video .stages-list {
  grid-template-columns: repeat(2, 1fr);
}

/* =========================
   TABLET
========================= */

@media (max-width: 769px) {

  .stages-block .stages-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stages-block .stages.has-video {
    grid-template-columns: 1fr;
  }
}

/* =========================
   MOBILE — FLEX COLUMN
========================= */

@media (max-width: 498px) {

  .stages-block {
    padding: 40px 0;
  }

  /* Убиваем все grid */
  .stages-block .stages,
  .stages-block .stages.has-video,
  .stages-block .stages-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .stages-block .stages-video__inner {
    padding-top: 150%;
  }

  .stages-block .action-tile {
    flex-direction: column;
    align-items: flex-start;
  }

  .stages-block .action-tile .btn {
    width: 100%;
  }
}
