/* ============================================================
   resource.css
   Styles the MAIN CONTENT column of Resource Pages
   Scope: everything lives under .bch-resource-page so these
   rules never leak into other templates.

   NOT styled here (already handled elsewhere):
   - Hero .......... style.css (.interior-hero, shared with FAQs)
   - Sidebar ....... sidebar.css (.bch-sidebar, .bch-side-card, etc.)
   - Layout grid ... sidebar.css (.bch-sidebar-wrap, .bch-sidebar-layout)
   - FCRA button ... sidebar.css (.bch-side-fcra-btn)
   ============================================================ */

.bch-resource-page .bch-resource-main {
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
}

.bch-resource-page .bch-resource-main h2 {
  color: var(--navy);
  font-size: 22px;
  font-weight: 700;
  margin: 34px 0 12px;
  scroll-margin-top: 20px; /* keeps jump-links from hiding under the top edge */
}

/* Sub-headings. Direct child only, so the teal card titles inside
   .bch-components-grid are not overridden by this rule. */

.bch-resource-page .bch-resource-main > h3 {
  color: var(--teal);
  font-size: 16px;
  font-weight: 700;
  margin: 22px 0 8px;
}

.bch-resource-page .bch-resource-main > h2:first-child {
  margin-top: 0;
}

.bch-resource-page .bch-resource-main a {
  color: var(--teal);
  text-decoration: underline;
}

.bch-resource-page .bch-resource-main a:hover {
  color: var(--navy);
}

/* ---- Lists ---- */
.bch-resource-page .bch-resource-main ul,
.bch-resource-page .bch-resource-main ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.bch-resource-page .bch-resource-main ul li,
.bch-resource-page .bch-resource-main ol li {
  margin-bottom: 7px;
  padding-left: 4px;
}

/* Inline emphasis label at the start of a bullet (e.g. "County searches") */
.bch-resource-page .bch-resource-main ul li strong,
.bch-resource-page .bch-resource-main ol li strong {
  font-weight: 700;
  color: var(--text);
}

/* ---- Divider between major sections (optional hairline) ---- */
.bch-resource-page .bch-resource-main hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 30px 0;
}

/* ---- Callout box (used sparingly for a key caveat) ----
   Teal = general. One restrained callout per page, max. */

.bch-resource-page .bch-resource-callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--soft-teal);
  border-left: 4px solid var(--teal);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 0 0 22px;
}

.bch-resource-page .bch-resource-callout-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin-top: 2px;
}

.bch-resource-page .bch-resource-callout-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bch-resource-page .bch-resource-callout p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: #04342c;
}

.bch-resource-page .bch-resource-callout strong {
  font-weight: 700;
}

.bch-resource-page .bch-resource-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 6px 0 24px;
  font-size: 15px;
  box-shadow: 0 8px 22px rgba(7, 31, 63, 0.05);
}

.bch-resource-page .bch-resource-table th,
.bch-resource-page .bch-resource-table td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}

.bch-resource-page .bch-resource-table td:first-child {
  color: var(--teal);
  font-weight: 700;
  width: 34%;
  white-space: normal;
}

.bch-resource-page .bch-resource-main h2#faqs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bch-resource-page .bch-resource-main h2#faqs::before {
  content: "";
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: url("https://backgroundcheckhub.com/wp-content/uploads/2026/07/question-mark1-teal.png") center / contain no-repeat;
}

.bch-resource-page .bch-faq {
  margin: 6px 0 10px;
  border-top: 1px solid var(--border);
}

.bch-resource-page .bch-faq-item {
  border-bottom: 1px solid var(--border);
}

.bch-resource-page .bch-faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 2px;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
}

.bch-resource-page .bch-faq-q:hover {
  color: var(--teal);
}

/* The +/- indicator on the right */
.bch-resource-page .bch-faq-q::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1;
  flex-shrink: 0;
}

.bch-resource-page .bch-faq-item.open .bch-faq-q::after {
  content: "\2212"; /* minus sign */
}

/* Answer: hidden until the item is open */
.bch-resource-page .bch-faq-a {
  display: none;
  padding: 0 2px 16px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

.bch-resource-page .bch-faq-item.open .bch-faq-a {
  display: block;
}

/* Keyboard focus visibility for accessibility */

.bch-resource-page .bch-faq-q:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}


/* ---- Related Components sidebar list (scrollable, ~5 visible) ----
   Uses the shared .bch-side-card wrapper from sidebar.css.
   This just adds the fixed-height scroll + current-page highlight. */

.bch-related-components-list {
  max-height: 232px;      /* ~5 rows visible, rest scroll */
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bch-related-components-list li {
  margin: 0;
}

.bch-related-components-list a {
  display: block;
  padding: 7px 10px;
  color: var(--navy);
  text-decoration: none;
  font-size: 14px;
  border-radius: 5px;
}

.bch-related-components-list a:hover {
  background: var(--lightblue);
}

/* Current page highlighted teal (mirrors Browse State Laws active state) */

.bch-related-components-list a.active {
  background: var(--soft-teal);
  color: var(--teal);
  font-weight: 700;
}

/* Scrollbar styling to match the site's teal accent */
.bch-related-components-list::-webkit-scrollbar {
  width: 8px;
}
.bch-related-components-list::-webkit-scrollbar-thumb {
  background: var(--teal);
  border-radius: 4px;
}
.bch-related-components-list::-webkit-scrollbar-track {
  background: #eef3f2;
}

/* ---- Responsive ----
   The two-column -> single-column collapse is already handled by
   .bch-sidebar-layout in sidebar.css. These are body-only tweaks. */

@media (max-width: 768px) {
  .bch-resource-page .bch-resource-main {
    font-size: 15px;
  }
  .bch-resource-page .bch-resource-main h2 {
    font-size: 20px;
  }
  .bch-resource-page .bch-resource-table td:first-child {
    width: 40%;
  }
}

/* ============================================================
   SCREENING COMPONENTS HUB PAGE
   Two-column grid of component cards (icon + name + description).
   Hub-specific; used on the Screening Components hub page only.
   ============================================================ */

.bch-components-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 4px 0 8px;
}

/* Breathing room after every 4th card. The :not() skips the final group so the
   grid does not end with dangling space above the band below it. */
.bch-components-grid--grouped .bch-component-card:nth-child(4n):not(:nth-last-child(-n+2)),
.bch-components-grid--grouped .bch-component-card:nth-child(4n+3):not(:nth-last-child(-n+2)) {
  margin-bottom: 18px;
}

.bch-component-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px 16px 20px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(7, 31, 63, 0.05);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.bch-component-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.bch-component-card-icon {
  flex-shrink: 0;
  width: 65px;
  height: 65px;
  border-radius: 10px;
  background: var(--soft-teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bch-component-card-icon img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.bch-component-card-text h3 {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 15px;
  font-weight: 700;
}

.bch-component-card-text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 768px) {
  .bch-components-grid {
    grid-template-columns: 1fr;
  }

  .bch-components-grid--grouped .bch-component-card:nth-child(4n+3) {
    margin-bottom: 0;
  }
}

/* Family tint on the hero icon backdrop. Source colors are saturated
   on purpose; the .07 opacity on ::before is what makes them pastel. */
.bch-resource-page.is-component .bch-resource-hero-icon::before {
  background: var(--orange);
}

.bch-resource-page.is-industry .bch-resource-hero-icon::before {
  background: var(--rose);
}

.bch-resource-page.is-position .bch-resource-hero-icon::before {
  background: var(--purple);
}