/* ============================================================
   SX Industries Served
   Horizontal grid of industry cards, each with an accent color.
   Auto-fits to number of items (5 default). Slate-blue background
   contrasts with the white pillars section above/below.
   ============================================================ */

.sx-industries {
  padding: 80px 0 90px;
  background: #f8fafc;
}

@media (max-width: 767px) {
  .sx-industries { padding: 60px 0; }
}

.sx-industries__header {
  max-width: 720px;
  margin: 0 auto 50px;
  text-align: center;
}

/* Layout — flexbox with fixed-width cards so incomplete last rows
   auto-center (CSS Grid can't do this natively for auto-fit). Works
   for any number of items — 4+3, 5+2, 3+3+1 centered, etc. */
.sx-industries__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.sx-industries__card {
  flex: 0 0 240px;
  max-width: 240px;
}

@media (max-width: 991px) {
  .sx-industries__grid { gap: 18px; }
  .sx-industries__card {
    flex: 0 0 220px;
    max-width: 220px;
  }
}

@media (max-width: 700px) {
  .sx-industries__grid { gap: 14px; }
  .sx-industries__card {
    flex: 1 1 calc(50% - 7px);
    max-width: calc(50% - 7px);
  }
}

@media (max-width: 420px) {
  .sx-industries__card {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* Card */
.sx-industries__card {
  --sx-industry-accent: #376CB4;
  padding: 26px 20px 24px;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

@media (max-width: 767px) {
  .sx-industries__card { padding: 22px 16px 20px; }
}

.sx-industries__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--sx-industry-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.sx-industries__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(15, 30, 60, 0.10);
  border-color: color-mix(in srgb, var(--sx-industry-accent) 25%, transparent);
}

.sx-industries__card:hover::before { transform: scaleX(1); }

@supports not (background: color-mix(in srgb, red, blue)) {
  .sx-industries__card:hover { border-color: #cfd7e0; }
}

/* Accent variants */
.sx-industries__card--green  { --sx-industry-accent: #62BEAC; }
.sx-industries__card--yellow { --sx-industry-accent: #FFD760; }
.sx-industries__card--red    { --sx-industry-accent: #E9465C; }
.sx-industries__card--blue   { --sx-industry-accent: #376CB4; }

/* Icon */
.sx-industries__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--sx-industry-accent) 14%, transparent);
  color: var(--sx-industry-accent);
  margin-bottom: 14px;
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .sx-industries__icon { background: #f0f4f9; }
}

/* Yellow WCAG override */
.sx-industries__card--yellow .sx-industries__icon { color: #b48a08; }

.sx-industries__icon svg {
  width: 28px;
  height: 28px;
}

/* Name */
.sx-industries__name {
  font-size: 17px;
  font-weight: 700;
  color: #12314f;
  margin: 0 0 10px;
  line-height: 1.3;
  letter-spacing: 0.2px;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* Context */
.sx-industries__context {
  font-size: 13.5px;
  color: #4b5563;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: break-word;
  hyphens: auto;
}
