/* =========================================================
   STEPS
========================================================= */

.steps {
  display: grid;
  gap: 16px;
  width: 100%;
  margin: 30px 0;
}

/* =========================================================
   CARD
========================================================= */

.step-card {
  position: relative;
  isolation: isolate;

  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(280px, 36%);

  grid-template-areas: 'content media';

  align-items: stretch;

  min-height: 210px;

  padding: 12px;

  overflow: hidden;

  border: 1px solid rgba(105, 190, 236, 0.13);
  border-radius: 18px;

  background: radial-gradient(circle at 15% 0%, rgba(31, 169, 241, 0.07), transparent 36%), linear-gradient(135deg, rgba(16, 48, 66, 0.96), rgba(10, 35, 50, 0.98));

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);

  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

@media (hover: hover) and (pointer: fine) {
  .step-card:hover {
    transform: translateY(-2px);

    border-color: rgba(79, 185, 240, 0.26);

    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
  }
}

/* =========================================================
   CONTENT
========================================================= */

.step-card__content {
  grid-area: content;

  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  justify-content: center;

  min-width: 0;

  padding: 54px 38px 34px;
}

/* =========================================================
   NUMBER
========================================================= */

.step-card__number {
  position: absolute;
  top: 26px;
  left: 32px;
  z-index: 5;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 30px;

  border: 1px solid rgba(77, 188, 244, 0.25);
  border-radius: 9px;

  background: linear-gradient(180deg, rgba(35, 156, 219, 0.18), rgba(20, 105, 151, 0.12));

  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);

  color: #ffffff;

  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

/* =========================================================
   TITLE
========================================================= */

.step-card__title {
  max-width: 650px;

  margin: 0 0 10px;
  padding: 0;

  color: var(--text);

  font-size: clamp(19px, 1.55vw, 23px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

/* =========================================================
   DESCRIPTION
========================================================= */

.step-card__description {
  max-width: 680px;

  color: var(--muted);

  font-size: 14px;
  line-height: 1.65;
}

.step-card__description p {
  margin: 0 0 10px;
}

.step-card__description p:last-child {
  margin-bottom: 0;
}

.step-card__description ul,
.step-card__description ol {
  margin: 10px 0 0;
  padding-left: 19px;
}

.step-card__description li + li {
  margin-top: 5px;
}

.step-card__description a {
  color: #62c5f5;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .step-card__description a:hover {
    text-decoration: underline;
  }
}

/* =========================================================
   MEDIA
========================================================= */

.step-card__media {
  grid-area: media;

  position: relative;
  z-index: 2;

  min-width: 0;
  min-height: 186px;

  overflow: hidden;

  border: 1px solid rgba(122, 194, 230, 0.11);
  border-radius: 13px;

  background: rgba(6, 25, 38, 0.55);
}

.step-card__media::after {
  content: '';

  position: absolute;
  inset: 0;
  z-index: 2;

  pointer-events: none;

  border-radius: inherit;

  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.step-card__image {
  display: block;

  width: 100%;
  height: 100%;
  min-height: 186px;

  margin: 0;

  object-fit: cover;
  object-position: center;

  transition:
    transform 0.4s ease,
    filter 0.4s ease;
}

@media (hover: hover) and (pointer: fine) {
  .step-card:hover .step-card__image {
    transform: scale(1.025);
  }
}

/* =========================================================
   SUBTLE DECOR
========================================================= */

.step-card::before {
  content: '';

  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;

  width: 3px;

  background: linear-gradient(180deg, transparent, rgba(47, 178, 242, 0.6), transparent);

  opacity: 0.65;
}

/* =========================================================
   WITHOUT IMAGE
========================================================= */

.step-card:not(:has(.step-card__media)) {
  grid-template-columns: 1fr;
  grid-template-areas: 'content';
}

.step-card:not(:has(.step-card__media)) .step-card__content {
  min-height: 160px;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {
  .step-card {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(230px, 36%);

    grid-template-areas: 'content media';

    min-height: 190px;
  }

  .step-card__content {
    padding: 52px 26px 26px;
  }

  .step-card__number {
    top: 23px;
    left: 25px;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {
  .steps {
    gap: 14px;
    margin: 24px 0;
  }

  .step-card {
    display: flex;
    flex-direction: column;

    min-height: 0;

    padding: 10px;

    border-radius: 16px;
  }

  .step-card__media {
    order: 1;

    width: 100%;
    height: 190px;
    min-height: 190px;

    border-radius: 11px;
  }

  .step-card__image {
    height: 100%;
    min-height: 0;
  }

  .step-card__content {
    order: 2;

    padding: 52px 10px 16px;
  }

  .step-card__number {
    top: 218px;
    left: 20px;

    width: 36px;
    height: 29px;
  }

  .step-card__title {
    font-size: 18px;
  }

  .step-card__description {
    font-size: 13px;
    line-height: 1.58;
  }

  .step-card::before {
    top: auto;
    right: 12px;
    bottom: 0;
    left: 12px;

    width: auto;
    height: 2px;

    background: linear-gradient(90deg, transparent, rgba(47, 178, 242, 0.48), transparent);
  }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {
  .step-card__media {
    height: 165px;
    min-height: 165px;
  }

  .step-card__number {
    top: 193px;
  }

  .step-card__content {
    padding: 50px 8px 14px;
  }

  .step-card__title {
    font-size: 17px;
  }

  .step-card__description {
    font-size: 12.5px;
  }
}
