/* Service-page visuals: photo banners, step diagrams, two-bin illustration.
   Used by vmi.html, bin-setup.html, kitting.html, kit-builder.php and related checklist pages. */

.sv-banner {
  margin: var(--space-8, 2rem) auto 0;
  position: relative;
  border-radius: var(--radius-xl, 18px);
  overflow: hidden;
  box-shadow: 0 18px 40px -24px rgb(31 48 57 / 0.55);
  background: var(--color-surface-2);
}
.sv-banner img {
  display: block;
  width: 100%;
  height: clamp(200px, 30vw, 380px);
  object-fit: cover;
}
.sv-banner figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.25rem 1.25rem 0.9rem;
  background: linear-gradient(to top, rgb(20 24 27 / 0.78), rgb(20 24 27 / 0));
  color: #fff8ec;
  font-size: 0.95rem;
  line-height: 1.4;
}
.sv-banner figcaption strong { color: #fff; }

/* Step diagram */
.sv-steps {
  list-style: none;
  margin: var(--space-6, 1.5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(var(--sv-cols, 4), minmax(0, 1fr));
  gap: 1rem;
  counter-reset: svstep;
}
.sv-steps > li {
  position: relative;
  counter-increment: svstep;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg, 14px);
  padding: 1.25rem 1.1rem 1.15rem;
  min-width: 0;
}
.sv-steps > li::before {
  content: counter(svstep);
  position: absolute;
  top: 0.9rem; right: 1rem;
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--color-text-faint);
}
.sv-steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%; right: -0.85rem;
  width: 0.7rem; height: 0.7rem;
  border-top: 2px solid var(--color-primary);
  border-right: 2px solid var(--color-primary);
  transform: translateY(-50%) rotate(45deg);
  z-index: 1;
}
.sv-steps.sv-loop > li:last-child::after {
  content: "\21BB  repeats";
  position: absolute;
  bottom: -1.6rem; left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}
.sv-steps.sv-loop { margin-bottom: 1.6rem; }
.sv-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  margin-bottom: 0.8rem;
}
.sv-icon svg { width: 30px; height: 30px; }
.sv-steps h3 { margin: 0 0 0.35rem; font-size: 1.05rem; line-height: 1.25; }
.sv-steps p { margin: 0; font-size: 0.92rem; color: var(--color-text-muted); line-height: 1.45; }

/* Photo + copy split */
.sv-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-8, 2rem);
  align-items: center;
}
.sv-split figure { margin: 0; }
.sv-split img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-xl, 18px);
  box-shadow: 0 18px 40px -26px rgb(31 48 57 / 0.6);
}
.sv-split figcaption { margin-top: 0.6rem; font-size: 0.85rem; color: var(--color-text-muted); }
.sv-checks { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.6rem; }
.sv-checks li { position: relative; padding-left: 1.9rem; line-height: 1.45; }
.sv-checks li::before {
  content: ""; position: absolute; left: 0; top: 0.15rem;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--color-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.9rem no-repeat;
}

/* Two-bin illustration */
.sv-twobin {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--space-8, 2rem);
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl, 18px);
  padding: clamp(1rem, 3vw, 2rem);
}
.sv-twobin svg { width: 100%; height: auto; display: block; }
.sv-twobin .sv-t-label { font: 700 15px/1 system-ui, sans-serif; fill: var(--color-text); }
.sv-twobin .sv-t-small { font: 600 12px/1 system-ui, sans-serif; fill: var(--color-text-muted); }
.sv-twobin ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.7rem; }
.sv-twobin ol li { line-height: 1.45; }

/* Kit builder intro band */
.kb-visual {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg, 14px);
  padding: 0.9rem;
  margin: 0 0 1rem;
}
.kb-visual img {
  display: block; width: 100%; height: 150px; object-fit: cover;
  border-radius: 10px;
}
.kb-visual .sv-steps { margin: 0; --sv-cols: 3; gap: 0.9rem; }
.kb-visual .sv-steps > li { padding: 0.85rem 0.9rem; }
.kb-visual .sv-icon { width: 40px; height: 40px; border-radius: 11px; margin-bottom: 0.5rem; }
.kb-visual .sv-icon svg { width: 24px; height: 24px; }
.kb-visual .sv-steps h3 { font-size: 0.98rem; }
.kb-visual .sv-steps p { font-size: 0.85rem; }
.kb-visual-copy { margin: 0.75rem 0 0; font-size: 0.9rem; color: var(--color-text-muted); }

/* Call-to-action panels that hold more than a heading and one button were
   squeezing their text into a narrow column. Stack them instead. */
.cta-panel:has(> :nth-child(4)) {
  grid-template-columns: 1fr;
  justify-items: start;
  gap: var(--space-4, 1rem);
}
.cta-panel:has(> :nth-child(4)) > * { margin: 0; }
.cta-panel:has(> :nth-child(4)) > .button { display: inline-flex; }
.cta-panel .sv-cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cta-panel a:not(.button) { color: inherit; text-decoration: underline; }

@media (max-width: 900px) {
  .sv-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-steps > li:nth-child(2n)::after { display: none; }
  .sv-split, .sv-twobin { grid-template-columns: 1fr; }
  .kb-visual { grid-template-columns: 1fr; }
  .kb-visual img { height: 130px; }
}
@media (max-width: 560px) {
  .sv-steps, .kb-visual .sv-steps { grid-template-columns: 1fr; }
  .sv-steps > li::after { display: none; }
  .sv-steps > li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.85rem; align-items: start; }
  .sv-steps > li .sv-icon { grid-row: span 2; margin-bottom: 0; }
  .kb-visual img { display: none; }
  .kb-visual { padding: 0.75rem; }
  .sv-banner figcaption { font-size: 0.85rem; padding: 1.75rem 0.9rem 0.7rem; }
}
