/**
 * United Earth — Projects (Overview Grid)
 * --------------------------------------
 * Scope: Projects overview page only (wrapper class: `.ue-projects-grid`)
 *
 * Requirement:
 * - Add class `ue-projects-grid` to the outer container wrapping the
 *   GenerateBlocks Query Block output for the Projects overview.
 */


/* ============================================================
 * Projects overview: force GB Query output into a responsive grid
 * ============================================================ */

.ue-projects-grid .gb-query-loop,
.ue-projects-grid .gb-query-items,
.ue-projects-grid .gb-loop-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 1024px) {
  .ue-projects-grid .gb-query-loop,
  .ue-projects-grid .gb-query-items,
  .ue-projects-grid .gb-loop-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ue-projects-grid .gb-query-loop,
  .ue-projects-grid .gb-query-items,
  .ue-projects-grid .gb-loop-items {
    grid-template-columns: 1fr;
  }
}

/* Ensure each loop item behaves as a grid item (avoid overflow) */
.ue-projects-grid .gb-query-loop > *,
.ue-projects-grid .gb-query-items > *,
.ue-projects-grid .gb-loop-items > * {
  min-width: 0;
}
