/* Target only homepage small_blocks */
body.home .divisions_small_blocks .small_blocks {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Top row has 4 columns */
  gap: 20px; /* spacing between blocks */
  justify-items: center; /* centers items in column if fewer than 4 */
}

/* Adjust middle row (3 items) */
body.home .divisions_small_blocks .small_blocks .scf-item:nth-child(n+5):nth-child(-n+7) {
  grid-column: span 1; /* 3 items naturally flow */
}

/* Bottom row: center remaining items */
body.home .divisions_small_blocks .small_blocks .scf-item:nth-child(n+8) {
  grid-column: span 1;
  justify-self: center; /* centers items in last row */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  body.home .divisions_small_blocks .small_blocks {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
  }
}

@media (max-width: 640px) {
  body.home .divisions_small_blocks .small_blocks {
    grid-template-columns: 1fr; /* 1 column on mobile */
  }
}
