/* ==========================================================================
   Code Vise - strict centre alignment layer (public website)
   Loaded LAST on every public page so it wins over page-level inline styles.
   Only alignment / positioning is handled here: no colours, fonts, content
   or animations are changed.
   ========================================================================== */

/* ---------- 1. Text: everything centred ---------- */
html,
body,
body *,
body *::before,
body *::after {
  text-align: center !important;
  text-align-last: center !important;
}
input, textarea, select,
input::placeholder, textarea::placeholder {
  text-align: center !important;
}

/* ---------- 2. Flex rows: content sits in the middle ----------
   (the three scrolling marquees and the project-timeline tick row are
   position-driven, so they keep their own geometry; their text is centred) */
body *:not(.ind-marquee-track):not(.testi-marquee-track):not(.trust-track):not(.gantt-ticks) {
  justify-content: center !important;
}
.builder-summary,
.form-success .summary-row {
  gap: 12px;
}

/* ---------- 3. Header ---------- */
.nav-pill {
  justify-content: center !important;
}
.nav-links.is-open {
  align-items: center !important;
  text-align: center !important;
}
.popular-badge {
  right: auto !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

/* ---------- 4. Footer ---------- */
site-footer .footer-bottom {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}
site-footer .footer-bottom .legal-links {
  justify-content: center !important;
  flex-wrap: wrap;
}

/* ---------- 5. Blocks that were pinned to the left by max-width ---------- */
.section-head,
.section-head p,
.hero-sub,
.hero h1,
.hero-content,
.hero-content h1,
.footer-tag,
.section-text,
.final-cta h2,
.hero-compact .hero h1,
.hero-compact .hero-sub,
.login-container {
  margin-left: auto !important;
  margin-right: auto !important;
}
.why-icon {
  margin-left: auto !important;
  margin-right: auto !important;
}
.step,
.step-num {
  align-items: center !important;
}
.plan-check {
  top: -11px !important;
  right: auto !important;
  left: calc(50% - 11px) !important;
}
.pf-card h2 {
  margin-left: 0 !important;
}

/* ---------- 6. Hero + two-column page layouts become one centred column ---------- */
.hero-grid {
  grid-template-columns: 1fr !important;
  gap: 32px !important;
}
.hero-content h1 {
  max-width: 100% !important;
}
.layout {
  grid-template-columns: 1fr !important;
  max-width: 640px !important;
  gap: 32px !important;
}

/* ---------- 7. Bulleted / arrow lists: marker sits inline with centred text ---------- */
ul, ol {
  list-style-position: inside;
}
.who-list li,
.benefit-list li,
.intro li,
.legal-section ul li {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.who-list li::before,
.benefit-list li::before,
.intro li::before,
.legal-section ul li::before {
  position: static !important;
  display: inline-block !important;
  margin-right: 10px;
}

/* ---------- 8. Portfolio rows: link text centred, preview dots centred below ---------- */
.pf-card li {
  flex-direction: column !important;
  align-items: center !important;
  gap: 0 !important;
}
.pf-card li > .pf-link {
  flex: none !important;
  width: 100%;
}
.pf-dots {
  max-width: 100% !important;
  justify-content: center !important;
}
.pf-card a.pf-link:hover,
.pf-card a.pf-link:focus-visible {
  padding-left: 4px !important;
}

/* ---------- 9. Multi-column grids: last row is centred instead of left-pinned ---------- */
.values-grid,
.services-grid,
.industries-grid,
.checklist,
.sw-grid,
.features-grid,
.related-grid,
.why-list,
.pf-grid {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center !important;
  align-items: stretch;
}
.values-grid > *,
.services-grid > *,
.industries-grid > *,
.checklist > *,
.sw-grid > *,
.features-grid > *,
.related-grid > *,
.why-list > *,
.pf-grid > * {
  min-width: 0;
}

.values-grid { gap: 24px; }
.values-grid > * { flex: 0 0 calc((100% - 48px) / 3); }
.services-grid { gap: 24px; }
.services-grid > * { flex: 0 0 calc((100% - 24px) / 2); }
.industries-grid { gap: 24px; }
.industries-grid > * { flex: 0 0 calc((100% - 48px) / 3); }
.checklist { gap: 14px 20px; }
.checklist > * { flex: 0 0 calc((100% - 20px) / 2); }

.sw-grid { gap: 20px; }
.sw-grid > * { flex: 0 1 350px; }
.features-grid { gap: 16px; }
.features-grid > * { flex: 0 1 260px; }
.related-grid { gap: 16px; }
.related-grid > * { flex: 0 1 260px; }
.why-list { gap: 24px; }
.why-list > * { flex: 0 1 310px; }
.pf-grid { gap: 24px; align-items: flex-start; }
.pf-grid > * { flex: 0 1 350px; }

@media (max-width: 820px) {
  .values-grid > * { flex-basis: calc((100% - 24px) / 2); }
  .services-grid { gap: 16px; }
  .services-grid > * { flex-basis: calc((100% - 16px) / 2); }
  .industries-grid { gap: 16px; }
  .industries-grid > * { flex-basis: calc((100% - 16px) / 2); }
}
@media (max-width: 480px) {
  .values-grid > * { flex-basis: 100%; }
  .services-grid { gap: 12px; }
  .services-grid > * { flex-basis: calc((100% - 12px) / 2); }
  .industries-grid { gap: 12px; }
  .industries-grid > * { flex-basis: calc((100% - 12px) / 2); }
  .checklist > * { flex-basis: 100%; }
}
@media (max-width: 360px) {
  .services-grid > *,
  .industries-grid > * { flex-basis: 100%; }
}
@media (max-width: 640px) {
  .pf-grid { gap: 18px; }
}

/* ---------- 10. Mobile: keep everything centred at every width ---------- */
@media (max-width: 860px) {
  .hero-content,
  .hero-content h1,
  .hero-sub,
  .ownership-strip {
    text-align: center !important;
  }
  .ownership-strip {
    align-items: center !important;
  }
}

/* ---------- 11. Legal pages: lists sit in the centred column ---------- */
.legal-section ul,
.legal-content ul {
  padding-left: 0 !important;
}
