/* Resource Center, Webinars and Guides: thumbnail cards in the shared frame
   (ResourceGrid), the wide featured card, format tiles and type pills.
   Frames, PanelHead, PageHero and the demo band are shared. */

/* ---------- Card grid ---------- */

@media (min-width: 600px) {
  .res-grid.frame-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .res-grid.frame-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* A short last row stays white: each card draws its own hairline instead of
   the grid's ground showing through the empty cells. */
.res-grid { background: var(--kit-white); }
.res-grid > li { box-shadow: 0 0 0 1px var(--frame-line); }

.res-card { display: flex; }

.res-card a {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  color: var(--kit-text-strong);
  text-decoration: none;
}

.res-media {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--kit-stroke-subtle);
  aspect-ratio: 1200 / 628;
  background: var(--kit-ivory-tint);
}

.res-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.res-card a:hover .res-media img { transform: scale(1.04); }

.res-body .frame-num { margin: 0; }

.res-title {
  margin: 10px 0 0;
  font-size: var(--type-h5);
  font-weight: var(--type-subhead-weight);
  line-height: var(--type-h5-lh);
  letter-spacing: var(--type-h5-ls, 0);
  color: var(--kit-text-strong);
}

.res-card a:hover .res-title,
.res-card a:focus-visible .res-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .res-media img { transition: none; }
  .res-card a:hover .res-media img { transform: none; }
}

/* ---------- Featured: one wide card ---------- */

@media (min-width: 1024px) {
  .res-grid--lead .res-card a {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 48px;
  }
}

.res-grid--lead .res-title {
  font-size: var(--type-h3);
  font-weight: var(--type-heading-weight);
  line-height: var(--type-h3-lh);
  letter-spacing: var(--type-h3-ls);
}

/* ---------- Parts of a page ---------- */

.res-part + .res-part { margin-top: var(--l-section-gap, 48px); }
.res-part .panel-head { margin-bottom: 24px; }

/* ---------- Format tiles (Resource Center) ---------- */

.res-formats > li { padding: 0; }

.res-formats a {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 20px 24px;
  font-size: var(--type-body);
  font-weight: 500;
  line-height: var(--type-body-lh);
  color: var(--kit-text-strong);
  text-decoration: none;
  transition: background-color .2s;
}

.res-formats a:hover { background: var(--kit-ivory-tint); }

.res-formats .icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--kit-teal-medium);
}

.res-formats .res-arrow {
  margin-left: auto;
  color: var(--kit-teal-medium);
}

@media (min-width: 600px) {
  .res-formats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .res-formats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .res-formats a { padding: 24px 32px; }
}

/* ---------- Type pills (Resource Center) ---------- */

.res-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.res-pills-label {
  margin-right: 4px;
  font-family: var(--font-mono);
  font-size: var(--type-label-s);
  letter-spacing: var(--type-label-tracking);
  color: var(--kit-ivory-dark);
  text-transform: uppercase;
}

.res-pills a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--kit-stroke-light);
  border-radius: 999px;
  font-size: var(--type-small);
  line-height: var(--type-body-lh);
  color: var(--kit-text-strong);
  text-decoration: none;
  transition: background-color .2s, border-color .2s;
}

.res-pills a:hover {
  border-color: var(--kit-teal-medium);
  background: var(--kit-teal-highlight);
}

/* ---------- Ivory ground for a second section ---------- */

.res-ivory {
  background: var(--kit-ivory-tint);
  border-top: 1px solid var(--kit-ivory-medium);
}

/* ---------- Phones: compact rows (thumbnail beside the title) ---------- */

@media (max-width: 599.98px) {
  .res-grid:not(.res-grid--lead) > li { padding: 16px; }
  .res-grid:not(.res-grid--lead) .res-card a {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
  }
  .res-grid:not(.res-grid--lead) .res-title {
    margin-top: 6px;
    font-size: var(--type-body);
    line-height: var(--type-body-lh);
  }
}
