/* ===========================================================
   Spacivo How It Works — centered title above a row of circular step
   icons connected by a dashed line, each with a caption underneath, and a
   pill-shaped CTA button below the row. Self-contained plugin CSS (no
   theme dependency beyond the theme's own .container wrapper). Title/
   caption text font/size/color come from inline styles (admin-
   configurable); this file only handles layout + the button's shape.
   =========================================================== */

.spacivo-hiw-section { padding: 3.5rem 0; text-align: center; }
.spacivo-hiw-heading { margin: 0 0 2.5rem; }

.spacivo-hiw-steps {
  display: flex; align-items: flex-start; justify-content: center;
  flex-wrap: wrap; gap: 1.5rem 2.5rem; max-width: 1200px; margin: 0 auto;
}

.spacivo-hiw-step {
  position: relative; flex: 1 1 120px; min-width: 120px; max-width: 180px;
  display: flex; flex-direction: column; align-items: center; padding: 0 .5rem;
}

/* Dashed connector between consecutive steps — drawn on every step except
   the first, positioned to cross from the previous step's icon center
   through to this one's, vertically centered on the icon circle. */
.spacivo-hiw-step:not(:first-child)::before {
  content: '';
  position: absolute; top: 60px; right: 50%; width: 100%; height: 0;
  border-top: 1px dashed #ccc; z-index: 0;
}

.spacivo-hiw-step__icon {
  position: relative; z-index: 1;
  width: 120px; height: 120px; border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .85rem; flex-shrink: 0; overflow: hidden;
}
/* object-fit:cover (not contain) so the image fills the circle edge to
   edge with no empty padding ring around it, per "let the image fit full
   in the circle" — width/height 100% of the icon box rather than a
   percentage smaller than it. */
.spacivo-hiw-step__icon img { width: 100%; height: 100%; object-fit: cover; }
.spacivo-hiw-step__text { margin: 0; line-height: 1.4; }

.spacivo-hiw-cta { margin-top: 2.5rem; }
.spacivo-hiw-button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .9rem 2.25rem; border-radius: 999px;
  background: var(--hiw-btn-bg, #E8695C); color: var(--hiw-btn-text, #fff);
  font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; transition: opacity .2s ease;
}
.spacivo-hiw-button:hover { opacity: .9; color: var(--hiw-btn-text, #fff); }

.spacivo-hiw-unconfigured-notice {
  font-size: .85rem; color: #a22022; background: #fff3f3; border: 1px dashed #a22022;
  padding: .75rem 1rem; margin: 1rem auto; max-width: 1280px;
}

@media (max-width: 750px) {
  /* The desktop connector is a horizontal dashed line crossing from one
     step's icon center to the next's — that positioning only makes sense
     in a single horizontal row. In the previous 2-column wrapped grid it
     couldn't correctly bridge steps across the wrap (e.g. step 2 -> step 3
     jumps down AND back to the left edge), so it was just turned off
     entirely, silently dropping the flow line on mobile. Stacking to a
     single column instead lets a plain vertical dashed connector bridge
     every consecutive pair correctly, same as the desktop line's job. */
  .spacivo-hiw-steps { flex-direction: column; align-items: center; gap: 2.5rem; }
  .spacivo-hiw-step { flex: 1 1 auto; width: 100%; max-width: 220px; margin-bottom: 0; }
  .spacivo-hiw-step:not(:first-child)::before {
    display: block;
    top: -2.5rem; left: 50%; right: auto; bottom: auto;
    width: 0; height: 2.5rem;
    border-top: none; border-left: 1px dashed #ccc;
    transform: translateX(-50%);
  }
}
