/*
 * White Papers listing (/white-paper/) — [resource_grid].
 *
 * Standalone CSS: Tailwind (css/app.css) is not enqueued on Divi pages, so the values below are
 * lifted from the Divi-generated CSS of the hand-built cards this grid replaced, to keep the
 * page looking the same.
 *
 * Selectors are deliberately NOT scoped to the .whitepaper-listing body class: that class depends
 * on the page slug (is_page('white-paper') in functions.php), and a different slug on another
 * environment would leave the grid unstyled. The .resource-* names are unique site-wide, and the
 * stylesheet only loads where the shortcode runs.
 */

.resource-grid {
  width: 90%;
  max-width: 1080px;
  margin: 0 auto;
  padding-top: 25px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 3%;
  row-gap: 55px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #f3f3f5;
  border-radius: 12px;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease;
  text-decoration: none;
}

.resource-card:hover,
.resource-card:focus-visible {
  box-shadow: -1px 0 24px 3px rgba(0, 0, 0, 0.3);
}

.resource-card:focus-visible {
  outline: 2px solid #085b7b;
  outline-offset: 2px;
}

.resource-card__media {
  display: block;
  border: 4px solid #f3f3f5;
  border-radius: 12px;
  overflow: hidden;
}

.resource-card__media img {
  display: block;
  width: 100%;
  height: auto;
}

.resource-card__type {
  display: block;
  margin-top: 18px;
  padding: 0 30px 0 36px;
  font-family: 'MaisonNeue Bold', Helvetica, Arial, Lucida, sans-serif;
  font-size: 14px;
  line-height: 1.7em;
  text-transform: uppercase;
  color: #00acc8;
}

.resource-card__title {
  display: block;
  margin-bottom: 3px;
  padding: 0 39px 0 36px;
  font-family: 'MaisonNeue', Helvetica, Arial, Lucida, sans-serif;
  font-size: 20px;
  line-height: 1.3em;
  color: #085b7b;
}

/* Sits directly under the title (cards stretch to equal height, leaving space below). */
.resource-card__arrow {
  display: block;
  padding: 12px 0 30px 36px;
}

.resource-card__arrow img {
  display: block;
  width: 34px;
  height: 32px;
}

/* Pagination */
.resource-grid__pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 90%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 0 9px;
  font-family: 'MaisonNeue', Helvetica, Arial, Lucida, sans-serif;
}

.resource-grid__pager .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
  color: #085b7b;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.resource-grid__pager a.page-numbers:hover,
.resource-grid__pager a.page-numbers:focus-visible {
  border-color: #fc5d19;
  color: #fc5d19;
}

.resource-grid__pager .page-numbers.current {
  background-color: #fc5d19;
  border-color: #fc5d19;
  color: #ffffff;
  font-family: 'MaisonNeue-Demi', 'MaisonNeue Bold', Helvetica, Arial, sans-serif;
}

.resource-grid__pager .page-numbers.dots {
  color: rgba(8, 91, 123, 0.55);
}

.resource-grid__pager .prev,
.resource-grid__pager .next {
  font-size: 22px;
}

.resource-grid--empty {
  display: block;
  text-align: center;
  color: #085b7b;
}

/* Tablet — Divi stacked these cards to a single 58%-wide column below 980px; keep that. */
@media only screen and (max-width: 980px) {
  .resource-grid,
  .resource-grid__pager {
    max-width: 58%;
  }

  .resource-grid {
    grid-template-columns: 1fr;
    row-gap: 30px;
  }
}

/* Phone — one column, 85% max-width as before */
@media only screen and (max-width: 767px) {
  .resource-grid,
  .resource-grid__pager {
    max-width: 85%;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .resource-grid__pager .page-numbers {
    min-width: 44px;
    height: 44px;
  }
}
