/* resourcehub2.html: the redesigned Resource Hub (drawn by assets/js/resourcehub2.js).
   Only the theme's own colours (style.css :root): --color-primary (green),
   --color-secondary (near black), --color-body (grey text) and, in dark mode,
   --color-success, with the theme's greys #f7f7f7 / #eaeaea and white. No
   orange. Fonts: Exo headings, Albert Sans text. The page is marked .dm-keep
   so the site's dark mode script leaves it alone: its dark colours are set
   here, and document covers stay white in both. */

.rh2 {
  --rh2-green: var(--color-primary, #006834);
  --rh2-dark: var(--color-secondary, #1f1f25);
  --rh2-accent: var(--color-primary, #006834);
  --rh2-ink: var(--color-heading-1, #1f1f25);
  --rh2-muted: var(--color-body, #6e777d);
  --rh2-bg: #ffffff;
  --rh2-soft: #f7f7f7;
  --rh2-card: #ffffff;
  --rh2-line: #eaeaea;
  --rh2-shadow: 0 22px 50px -28px rgba(31, 31, 37, .4);
  font-family: 'Albert Sans', sans-serif;
  color: var(--rh2-ink);
  background: var(--rh2-bg);
}
html[data-theme="dark"] .rh2 {
  --rh2-ink: #ffffff;
  --rh2-muted: #a7b0ab;
  --rh2-accent: var(--color-success, #3eb75e);
  --rh2-bg: #0f1512;
  --rh2-soft: var(--color-secondary, #1f1f25);
  --rh2-card: var(--color-secondary, #1f1f25);
  --rh2-line: rgba(255, 255, 255, .1);
  --rh2-shadow: 0 22px 50px -28px rgba(0, 0, 0, .8);
}
.rh2 h1, .rh2 h2, .rh2 h3 { font-family: 'Exo', sans-serif; font-weight: 700; }
.rh2 a { text-decoration: none; }
.rh2-vh {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------------------------------------------------------- hero */
.rh2-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 120px;
  color: #fff;
  /* the Resource Hub's own banner photo (as on resource-hub.html), darkened so the text and search stay readable */
  background:
    linear-gradient(rgba(31, 31, 37, .62), rgba(31, 31, 37, .62)),
    url('../images/resource-hub/Resource-hub-banner.jpg') center / cover no-repeat,
    var(--rh2-dark);
}
.rh2-hero .container { position: relative; z-index: 1; }

.rh2-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 34px;
  font-size: 14px;
  color: rgba(255, 255, 255, .75);
}
.rh2-crumbs a { color: rgba(255, 255, 255, .86); }
.rh2-crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.rh2-crumbs span { color: #fff; font-weight: 600; }
.rh2-crumbs i { font-size: 10px; opacity: .6; }

.rh2-hero-grid { max-width: 820px; }
.rh2-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: #fff;
}
.rh2-lead {
  max-width: 620px;
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .9);
}
.rh2-search {
  position: relative;
  max-width: 620px;
  margin: 0 0 22px;
}
.rh2-search > i {
  position: absolute;
  left: 22px; top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--rh2-green);
  pointer-events: none;
}
.rh2-search input {
  width: 100%;
  height: 62px;
  padding: 0 60px 0 56px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: #1f1f25;
  font-size: 17px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .45);
}
.rh2-search input::placeholder { color: #6e777d; }
.rh2-search input:focus { outline: 3px solid rgba(255, 255, 255, .7); outline-offset: 3px; }
.rh2-search input::-webkit-search-cancel-button { display: none; }
.rh2-search-clear {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 40px !important; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: #f7f7f7;
  color: #1f1f25;
  cursor: pointer;
}
.rh2-search-clear[hidden] { display: none; }
.rh2-search-clear:hover { background: #eaeaea; }

/* ----------------------------------------------------- the collections */
.rh2-band { position: relative; z-index: 2; margin-top: -64px; }
.rh2-collections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: var(--rh2-card);
  border: 1px solid var(--rh2-line);
  box-shadow: var(--rh2-shadow);
}
.rh2-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 104px;
  padding: 16px;
  border: 0;
  border-radius: 16px;
  background: var(--rh2-soft);
  color: var(--rh2-ink);
  text-align: left;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s;
}
.rh2-tile:hover { transform: translateY(-2px); }
.rh2-tile:focus-visible { outline: 3px solid var(--rh2-accent); outline-offset: 2px; }
.rh2-tile-icon {
  width: 42px; height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--rh2-card);
  color: var(--rh2-accent);
  font-size: 18px;
}
.rh2-tile-name { font-family: 'Exo', sans-serif; font-weight: 700; font-size: 15px; line-height: 1.3; }
.rh2-tile[aria-pressed="true"] { background: var(--rh2-green); color: #fff; }
.rh2-tile[aria-pressed="true"] .rh2-tile-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.rh2-tile.is-loading {
  cursor: default;
  background: linear-gradient(90deg, var(--rh2-soft) 0%, var(--rh2-line) 50%, var(--rh2-soft) 100%) 0 0 / 200% 100%;
  animation: rh2-shimmer 1.4s linear infinite;
}
@keyframes rh2-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ------------------------------------------------------------ the body */
.rh2-body { padding: 56px 0 110px; }

/* a shelf: one collection on "Everything" */
.rh2-shelf + .rh2-shelf { margin-top: 64px; }
.rh2-shelf-head, .rh2-view-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.rh2-shelf-icon {
  flex: 0 0 52px;
  width: 52px; height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--rh2-green);
  color: #fff;
  font-size: 20px;
}
.rh2-shelf-text { flex: 1 1 auto; min-width: 0; }
.rh2-shelf-text h2, .rh2-view-head h2 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.25;
  color: var(--rh2-ink);
}
.rh2-shelf-text p, .rh2-view-head p { margin: 4px 0 0; font-size: 15px; color: var(--rh2-muted); }
.rh2-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.rh2-arrow {
  width: 44px !important; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rh2-line);
  border-radius: 50%;
  background: var(--rh2-card);
  color: var(--rh2-ink);
  cursor: pointer;
  transition: background-color .2s, color .2s, opacity .2s;
}
.rh2-arrow:hover:not(:disabled) { background: var(--rh2-green); border-color: var(--rh2-green); color: #fff; }
.rh2-arrow:disabled { opacity: .35; cursor: default; }
.rh2-btn {
  width: auto !important;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--rh2-green);
  color: #fff;
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s;
}
.rh2-btn:hover { background: var(--rh2-dark); color: #fff; }
html[data-theme="dark"] .rh2-btn:hover { background: #fff; color: var(--rh2-dark); }
.rh2-btn--ghost { background: transparent; color: var(--rh2-ink); border: 1px solid var(--rh2-line); }
.rh2-btn--ghost:hover { background: var(--rh2-soft); color: var(--rh2-ink); }
.rh2-btn:focus-visible, .rh2-arrow:focus-visible { outline: 3px solid var(--rh2-accent); outline-offset: 2px; }

.rh2-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 4px;
  padding: 6px 4px 22px;
  margin: 0 -4px;
  scrollbar-width: thin;
  scrollbar-color: var(--rh2-line) transparent;
}
.rh2-rail > * { scroll-snap-align: start; flex: 0 0 auto; }
.rh2-rail > .rh2-doc { width: 200px; }
.rh2-rail > .rh2-story, .rh2-rail > .rh2-callout { width: 320px; }
.rh2-rail:focus-visible { outline: 3px solid var(--rh2-accent); outline-offset: 4px; border-radius: 12px; }

/* one collection, or search results */
.rh2-view-head { padding-bottom: 20px; border-bottom: 1px solid var(--rh2-line); margin-bottom: 30px; }
.rh2-view-head .rh2-shelf-text { flex: 1 1 auto; }
.rh2-results + .rh2-results { margin-top: 48px; }
.rh2-results h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 19px;
  color: var(--rh2-ink);
}
.rh2-results h3 small { font-family: 'Albert Sans', sans-serif; font-weight: 600; font-size: 14px; color: var(--rh2-muted); }
.rh2-grid { display: grid; gap: 30px 22px; }
.rh2-grid--docs { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.rh2-grid--wide { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

/* ----------------------------------------------------- a document card */
.rh2-doc { display: flex; flex-direction: column; color: var(--rh2-ink); }
.rh2-doc:hover { color: var(--rh2-ink); }
.rh2-paper {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1.3;
  margin: 0 10px 16px 0;
  border-radius: 4px;
  background: #fff;
}
/* a second sheet behind the first page */
.rh2-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: #eaeaea;
  transform: rotate(4deg) translate(6px, 2px);
  transition: transform .35s ease;
}
.rh2-paper-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 14px 28px -14px rgba(31, 31, 37, .5);
  transition: transform .35s ease;
}
.rh2-paper-face img, .rh2-paper-face canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.rh2-doc:hover .rh2-paper-face, .rh2-doc:focus-visible .rh2-paper-face { transform: rotate(-2deg) translateY(-6px); }
.rh2-doc:hover .rh2-paper::before { transform: rotate(7deg) translate(10px, 3px); }
.rh2-doc:focus-visible { outline: none; }
.rh2-doc:focus-visible .rh2-paper-face { box-shadow: 0 0 0 3px var(--rh2-accent), 0 14px 28px -14px rgba(31, 31, 37, .5); }
/* a first page that isn't drawn yet */
.rh2-paper-blank {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 18%;
}
.rh2-paper-blank i { font-size: 34px; color: #006834; margin-bottom: 6px; }
.rh2-paper-blank span {
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(90deg, #eaeaea 0%, #f7f7f7 50%, #eaeaea 100%) 0 0 / 200% 100%;
  animation: rh2-shimmer 1.4s linear infinite;
}
.rh2-paper-blank span:nth-child(3) { width: 80%; }
.rh2-paper-blank span:nth-child(4) { width: 60%; }
.rh2-badge {
  position: absolute;
  right: 8px; bottom: 8px;
  z-index: 1;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--color-primary, #006834);
  color: #fff;
  font-family: 'Exo', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}
.rh2-kicker {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rh2-accent);
}
.rh2-doc-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.rh2-doc:hover .rh2-doc-title { color: var(--rh2-accent); }
.rh2-meta { margin-top: 6px; font-size: 13px; color: var(--rh2-muted); }

/* --------------------------------------------- a story or feature card */
.rh2-story {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: var(--rh2-card);
  border: 1px solid var(--rh2-line);
  color: var(--rh2-ink);
  transition: transform .25s, box-shadow .25s;
}
.rh2-story:hover { transform: translateY(-4px); box-shadow: var(--rh2-shadow); color: var(--rh2-ink); }
.rh2-story:focus-visible { outline: 3px solid var(--rh2-accent); outline-offset: 3px; }
.rh2-story-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--rh2-soft); }
.rh2-story-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.rh2-story:hover .rh2-story-img img { transform: scale(1.05); }
.rh2-story-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 20px 22px 22px; }
.rh2-story-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0 0 8px;
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
}
.rh2-story-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--rh2-muted);
}
.rh2-go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--rh2-accent);
}
.rh2-go i { transition: transform .25s; }
.rh2-story:hover .rh2-go i, .rh2-callout:hover .rh2-go i { transform: translateX(4px); }

/* a collection inside a collection (e.g. the federal public institutions documents) */
.rh2-callout {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  min-height: 260px;
  padding: 26px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--rh2-green);
  color: #fff;
  transition: transform .25s, box-shadow .25s;
}
.rh2-callout::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .1) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%);
          mask-image: linear-gradient(to bottom, #000, transparent 70%);
}
.rh2-callout > * { position: relative; }
.rh2-callout:hover { transform: translateY(-4px); box-shadow: var(--rh2-shadow); color: #fff; }
.rh2-callout:focus-visible { outline: 3px solid var(--rh2-accent); outline-offset: 3px; }
.rh2-callout .rh2-kicker { color: rgba(255, 255, 255, .8); margin: 0; }
.rh2-callout strong { font-family: 'Exo', sans-serif; font-size: 22px; line-height: 1.25; }
.rh2-callout p { margin: 0 0 8px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .85); }
.rh2-callout .rh2-go { color: #fff; margin-top: 4px; }
.rh2-grid .rh2-callout { min-height: 100%; }

mark.rh2-hit { padding: 0 2px; border-radius: 3px; background: rgba(0, 104, 52, .14); color: inherit; }
html[data-theme="dark"] mark.rh2-hit { background: rgba(62, 183, 94, .25); }

/* nothing found, loading */
.rh2-empty {
  max-width: 560px;
  margin: 30px auto;
  padding: 36px;
  border-radius: 20px;
  background: var(--rh2-soft);
  text-align: center;
  color: var(--rh2-muted);
  font-size: 16px;
  line-height: 1.6;
}
.rh2-empty strong { display: block; margin-bottom: 6px; font-family: 'Exo', sans-serif; font-size: 20px; color: var(--rh2-ink); }
.rh2-empty a { color: var(--rh2-accent); font-weight: 700; text-decoration: underline; }
.rh2-empty .rh2-btn { margin-top: 16px; }
.rh2-skeleton { display: flex; gap: 22px; overflow: hidden; }
.rh2-skeleton span {
  flex: 0 0 200px;
  height: 300px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--rh2-soft) 0%, var(--rh2-line) 50%, var(--rh2-soft) 100%) 0 0 / 200% 100%;
  animation: rh2-shimmer 1.4s linear infinite;
}

/* -------------------------------------------------------------- smaller */
@media (max-width: 1199px) {
  .rh2-collections { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .rh2-hero { padding-bottom: 100px; }
  .rh2-collections { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .rh2-hero { padding: 28px 0 90px; }
  .rh2-lead { font-size: 16px; }
  .rh2-search input { height: 56px; font-size: 16px; }
  .rh2-band { margin-top: -56px; }
  .rh2-collections {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px;
    gap: 10px;
  }
  .rh2-tile { flex: 0 0 140px; min-height: 96px; scroll-snap-align: start; }
  .rh2-body { padding: 40px 0 80px; }
  .rh2-shelf-head { flex-wrap: wrap; }
  .rh2-shelf-icon { flex-basis: 44px; width: 44px; height: 44px; font-size: 18px; }
  .rh2-shelf-text { flex-basis: calc(100% - 62px); }
  .rh2-tools { width: 100%; }
  .rh2-tools .rh2-arrow { display: none; }
  .rh2-tools .rh2-btn { width: 100% !important; justify-content: center; }
  .rh2-rail > .rh2-doc { width: 160px; }
  .rh2-rail > .rh2-story, .rh2-rail > .rh2-callout { width: 270px; }
  .rh2-view-head { flex-wrap: wrap; }
  .rh2-grid--docs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
  .rh2-grid--wide { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .rh2-tile, .rh2-paper-face, .rh2-paper::before, .rh2-story, .rh2-story-img img, .rh2-callout { transition: none; animation: none; }
  .rh2-tile.is-loading, .rh2-paper-blank span, .rh2-skeleton span { animation: none; }
}

/* ------------------------------------- subsections of a collection (a, b, ...) */
.rh2-view-head ~ .rh2-shelf { margin-top: 36px; }
.rh2-shelf-head--sub { padding-top: 26px; border-top: 1px solid var(--rh2-line); }
.rh2-shelf-head--sub h3 { margin: 0; font-size: clamp(19px, 2vw, 23px); line-height: 1.3; color: var(--rh2-ink); }
.rh2-shelf-letter {
  flex-basis: 44px; width: 44px; height: 44px;
  background: transparent; border: 2px solid var(--rh2-accent); color: var(--rh2-accent);
  font: 700 19px/1 'Exo', sans-serif; text-transform: lowercase;
}

/* ----------------------- a card opening an interactive page (DARES components) */
.rh2-feature {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 20px; background: var(--rh2-card); border: 1px solid var(--rh2-line); color: var(--rh2-ink);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.rh2-feature:hover { transform: translateY(-6px); box-shadow: var(--rh2-shadow); border-color: var(--rh2-accent); color: var(--rh2-ink); }
.rh2-feature:focus-visible { outline: 3px solid var(--rh2-accent); outline-offset: 3px; }
.rh2-feature-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--rh2-dark); }
.rh2-feature-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.rh2-feature:hover .rh2-feature-img img { transform: scale(1.07); }
.rh2-feature-chip {
  position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px; background: var(--rh2-green); color: #fff; font: 700 12px/1 'Albert Sans', sans-serif; letter-spacing: .02em;
}
.rh2-feature-chip i { animation: rh2-tap 2.4s ease-in-out infinite; }
@keyframes rh2-tap { 0%, 60%, 100% { transform: none; } 70% { transform: translateY(-2px) rotate(-12deg); } 80% { transform: translateY(1px); } }
.rh2-feature:hover .rh2-go i { transform: translateX(4px); }
.rh2-rail > .rh2-feature { width: 320px; }
@media (max-width: 767px) { .rh2-rail > .rh2-feature { width: 270px; } }
@media (prefers-reduced-motion: reduce) { .rh2-feature, .rh2-feature-img img { transition: none; } .rh2-feature-chip i { animation: none; } }
.rh2-view-head + .rh2-shelf .rh2-shelf-head--sub { padding-top: 0; border-top: 0; }
