.hiw-step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 768px) {
  .hiw-step {
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
  }
  .hiw-step .hiw-card { grid-row: 1; z-index: 5; align-self: start; }
  .hiw-step .hiw-img  { grid-row: 1; z-index: 10; align-self: start; margin-top: 2.5rem; margin-left: -1.5rem; }

  /* Card spans 6 cols, image starts at card end (overlap via card padding) */
  .hiw-step-1 .hiw-card { grid-column: 1 / 7; }
  .hiw-step-1 .hiw-img  { grid-column: 7 / 12; }

  .hiw-step-2 .hiw-card { grid-column: 2 / 8; }
  .hiw-step-2 .hiw-img  { grid-column: 8 / 13; }

  .hiw-step-3 .hiw-card { grid-column: 1 / 7; }
  .hiw-step-3 .hiw-img  { grid-column: 7 / 12; }

  .hiw-step-4 .hiw-card { grid-column: 2 / 8; }
  .hiw-step-4 .hiw-img  { grid-column: 8 / 13; }

  .hiw-step-5 .hiw-card { grid-column: 1 / 7; }
  .hiw-step-5 .hiw-img  { grid-column: 7 / 12; }
}
@media (min-width: 1024px) {
  .hiw-step .hiw-img { margin-top: 3rem; margin-left: -2rem; }

  .hiw-step-1 .hiw-card { grid-column: 1 / 6; }
  .hiw-step-1 .hiw-img  { grid-column: 6 / 11; }

  .hiw-step-2 .hiw-card { grid-column: 3 / 8; }
  .hiw-step-2 .hiw-img  { grid-column: 8 / 12; }

  .hiw-step-3 .hiw-card { grid-column: 1 / 6; }
  .hiw-step-3 .hiw-img  { grid-column: 6 / 11; }

  .hiw-step-4 .hiw-card { grid-column: 3 / 8; }
  .hiw-step-4 .hiw-img  { grid-column: 8 / 12; }

  .hiw-step-5 .hiw-card { grid-column: 1 / 6; }
  .hiw-step-5 .hiw-img  { grid-column: 6 / 11; }
}

/* Card wrapper needs relative for badge positioning */
.hiw-card-inner {
  position: relative;
}

.hiw-subtitle {
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .hiw-subtitle { margin-bottom: 2rem; }
}

.hiw-step-gap {
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .hiw-step-gap { margin-bottom: 4rem; }
}
@media (min-width: 1024px) {
  .hiw-step-gap { margin-bottom: 5rem; }
}

/* Extra right padding on cards so text stays clear of image overlap.
   !important needed to override Tailwind's p-8 shorthand. */
@media (min-width: 768px) {
  .hiw-card-box {
    padding-right: 3rem !important;
    padding-bottom: 2.5rem !important;
  }
}
@media (min-width: 1024px) {
  .hiw-card-box {
    padding-right: 5rem !important;
    padding-bottom: 3rem !important;
  }
}

/* Number badge — overlaps top-left corner of card */
.hiw-badge {
  position: absolute;
  top: -1.125rem;
  left: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1;
}

.hiw-screenshot {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
}

.hiw-reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.hiw-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
