/* grid used in news page */
.phantom-grid-layout {
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 1rem;
}

/* ul/li wrapper for card grids: display:contents keeps the list out of the
   grid so its .views-row <li> children stay direct grid items, while native
   list semantics remain exposed to assistive tech. Reset the default list
   chrome so no bullets/indent leak in. */
.phantom-grid-list {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Landmark region wrapping the card list. display:contents so it adds a region
   without generating a box — the .views-row <li> cards stay direct grid items. */
.phantom-grid-list-region {
  display: contents;
}

/* header and form always span full width */
.phantom-grid-layout > .phantom-grid-header,
.phantom-grid-layout > form {
  grid-column: 1 / -1;
}

/* custom spacing after header and form */
.phantom-grid-layout > .phantom-grid-header {
  margin-bottom: 0.5rem;
}

/* 992px — 2 columns for cards */
@media (min-width: 992px) {
  .phantom-grid-layout {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 0;
    row-gap: 0;
  }
}

/* 1200px — 3 columns for cards */
@media (min-width: 1200px) {
  .phantom-grid-layout {
    grid-template-columns: repeat(3, 1fr);

    .card {
      height: 100%;
    }

    nav.pagination-wrapper {
      justify-content: center;
      grid-column: 1 / -1;
    }
  }

  .phantom-grid-layout.phantom-press-review-grid-layout {
    grid-template-columns: repeat(2, 1fr);
  }
}
