/* =============================================================
   PlumberArchive — Resource Hub styles
   Loaded only on /resources/ hub + category pages.
   Palette (PART 5 spec):
     --navy #0a1628  --navy-mid #1a2a45  --orange #f59e0b
     --text-light #e2e8f0  --text-muted #94a3b8
   ============================================================= */

:root {
  --rh-navy: #0a1628;
  --rh-navy-mid: #1a2a45;
  --rh-orange: #f59e0b;
  --rh-text-light: #e2e8f0;
  --rh-text-muted: #94a3b8;
}

/* ---------- hero ---------- */
.resource-hub-hero {
  background: linear-gradient(160deg, var(--rh-navy) 0%, var(--rh-navy-mid) 100%);
  color: var(--rh-text-light);
  padding: 64px 0 56px;
}
.resource-hub-hero .container { max-width: 900px; }
.resource-hub-hero h1 {
  color: #ffffff;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  margin: 0 0 0.75rem;
}
.resource-hub-hero p {
  color: var(--rh-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 1.75rem;
  max-width: 640px;
}
.rh-category-hero { padding: 48px 0 40px; }
.rh-category-hero .rh-count {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--rh-orange);
}

/* ---------- search box (2c) ---------- */
.resource-search-box { max-width: 520px; }
.resource-search-box input,
#resource-search {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  color: var(--rh-navy);
  background: #ffffff;
  border: 2px solid transparent;
  border-radius: 10px;
  outline: none;
}
#resource-search::placeholder { color: #64748b; }
#resource-search:focus { border-color: var(--rh-orange); }

/* ---------- generic section wrapper ---------- */
.rh-section { padding: 48px 0; }
.rh-section:nth-of-type(even) { background: #f4f7fb; }
.rh-section > .container > h2 {
  font-size: 1.5rem;
  color: var(--rh-navy);
  margin: 0 0 1.5rem;
}

/* ---------- category grid (2d) ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.category-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.category-card:hover {
  border-color: var(--rh-orange);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.08);
}
.category-card-label { margin: 0; font-size: 1.1rem; color: var(--rh-navy); }
.category-card-desc { margin: 0; font-size: 0.9rem; line-height: 1.5; color: #475569; flex: 1; }
.category-card-count {
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--rh-orange);
}

/* ---------- filter bar (2h) ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.75rem;
}
.filter-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rh-navy);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-btn:hover { border-color: var(--rh-orange); }
.filter-btn.active {
  background: var(--rh-orange);
  border-color: var(--rh-orange);
  color: var(--rh-navy);
}

/* ---------- resource card grid + card (2i) ---------- */
.resource-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.resource-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.resource-card:hover {
  border-color: var(--rh-orange);
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.08);
}
.resource-card-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}
.resource-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  flex: 1;
}
.resource-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.resource-card-title { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.resource-card-title a { color: var(--rh-navy); text-decoration: none; }
.resource-card-title a:hover { color: var(--rh-orange); }
.resource-card-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #475569;
  flex: 1;
  /* ~160 char visual truncation — CSS only, full text stays in the HTML */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.resource-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.78rem;
  color: #64748b;
  border-top: 1px solid #eef2f7;
  padding-top: 10px;
}

/* ---------- category badge (on cards) ---------- */
.category-badge {
  display: inline-block;
  background: var(--rh-orange);
  color: var(--rh-navy);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}

/* ---------- no-results message (2h / PART 4) ---------- */
.rh-no-results {
  margin: 0 0 1.5rem;
  padding: 20px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #475569;
  text-align: center;
  font-size: 0.95rem;
}

/* ---------- empty category state (3e) ---------- */
.empty-state {
  padding: 40px 24px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  text-align: center;
}
.empty-state p { margin: 0 0 14px; color: #475569; font-size: 0.98rem; }
.empty-state a {
  display: inline-block;
  font-weight: 700;
  color: var(--rh-navy);
  background: var(--rh-orange);
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
}
.empty-state a:hover { background: #e08c08; }

/* ---------- breadcrumb (3b) ---------- */
.rh-breadcrumb {
  background: #f4f7fb;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.85rem;
  padding: 12px 0;
}
.rh-breadcrumb a { color: var(--rh-navy); text-decoration: none; }
.rh-breadcrumb a:hover { color: var(--rh-orange); }
.rh-breadcrumb span { color: #94a3b8; margin: 0 6px; }
.rh-breadcrumb .current { color: #475569; margin: 0; }

/* ---------- back link (3f) ---------- */
.rh-back { margin: 2rem 0 0; }
.rh-back a { color: var(--rh-navy); font-weight: 600; text-decoration: none; }
.rh-back a:hover { color: var(--rh-orange); }

/* =============================================================
   Licensing & Regulations — state pages + national hub
   Palette additions: --rh-green (official-sources callout)
   ============================================================= */
:root {
  --rh-green: #10b981;
  --rh-line: #e2e8f0;
  --rh-ink: #475569;
}

/* ---------- state page: header + verified bar ---------- */
.state-license-header {
  background: linear-gradient(160deg, var(--rh-navy) 0%, var(--rh-navy-mid) 100%);
  color: var(--rh-text-light);
  padding: 48px 0 36px;
}
.state-license-header h1 {
  color: #ffffff;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin: 0 0 0.9rem;
}
.last-verified-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: baseline;
  font-size: 0.9rem;
  color: var(--rh-text-muted);
}
.last-verified-bar .last-verified {
  font-weight: 700;
  color: var(--rh-orange);
}
.last-verified-bar .licensing-authority a { color: var(--rh-text-light); }
.last-verified-bar .licensing-authority a:hover { color: var(--rh-orange); }

.state-license-main { padding: 40px 0 8px; }
.state-license-main > section { margin: 0 0 40px; }
.state-license-main h2 {
  font-size: 1.35rem;
  color: var(--rh-navy);
  margin: 0 0 1rem;
}

/* ---------- license types table ---------- */
.license-types-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}
.license-types-table th {
  background: var(--rh-navy);
  color: var(--rh-orange);
  text-align: left;
  padding: 0.7rem 0.8rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.license-types-table td {
  border: 1px solid var(--rh-line);
  padding: 0.7rem 0.8rem;
  color: var(--rh-ink);
  vertical-align: top;
}
.license-types-table tbody tr:nth-child(even),
.license-types-table tbody tr:nth-child(even) { background: #f4f7fb; }

/* horizontal scroll wrapper so wide credential tables never break the layout */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; }
.table-scroll .license-types-table { margin: 0; }

.fee-to { color: var(--rh-text-muted); font-size: 0.85em; white-space: nowrap; }

/* per-credential detail blocks under the comparison table */
.credential-detail {
  border: 1px solid var(--rh-line);
  border-left: 3px solid var(--rh-orange);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 0 0 14px;
  background: #ffffff;
}
.credential-detail h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--rh-navy);
}
.credential-detail p { margin: 0 0 0.6rem; color: var(--rh-ink); line-height: 1.6; }
.credential-detail p:last-child { margin-bottom: 0; }
.credential-eligibility {
  margin: 0.4rem 0 0.6rem 1.1rem;
  padding: 0;
  color: var(--rh-ink);
  font-size: 0.92rem;
  line-height: 1.55;
}
.credential-eligibility li { margin: 0 0 0.35rem; }
.credential-otherfees { font-size: 0.9rem; color: var(--rh-ink); }
.credential-notes {
  font-size: 0.9rem;
  color: var(--rh-text-muted);
  border-top: 1px solid #eef2f7;
  padding-top: 0.6rem;
}

/* ---------- CE / reciprocity / bond & insurance blocks ---------- */
.ce-section,
.reciprocity-section,
.bond-insurance-section {
  border: 1px solid var(--rh-line);
  border-radius: 12px;
  padding: 20px 22px;
  background: #ffffff;
}
.ce-section p,
.reciprocity-section p,
.bond-insurance-section p {
  margin: 0 0 0.6rem;
  color: var(--rh-ink);
  line-height: 1.6;
}
.ce-section p:last-child,
.reciprocity-section p:last-child,
.bond-insurance-section p:last-child { margin-bottom: 0; }
.reciprocity-section ul { margin: 0.4rem 0 0.6rem 1.2rem; color: var(--rh-ink); }

/* ---------- no statewide licensing notice ---------- */
.no-statewide-notice {
  border-left: 4px solid var(--rh-orange);
  background: var(--rh-navy-mid);
  color: var(--rh-text-light);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  border-radius: 0 6px 6px 0;
}
.no-statewide-notice p { margin: 0; line-height: 1.6; }

/* ---------- Official Sources component ---------- */
.official-sources-box {
  border-left: 4px solid var(--rh-green);
  background: #ffffff;
  border-top: 1px solid var(--rh-line);
  border-right: 1px solid var(--rh-line);
  border-bottom: 1px solid var(--rh-line);
  border-radius: 0 10px 10px 0;
  padding: 20px 22px;
}
.official-sources-heading {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  color: var(--rh-navy);
}
.official-sources-intro {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  color: var(--rh-ink);
  line-height: 1.55;
}
.official-sources-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.official-source-item {
  padding: 8px 0;
  border-top: 1px solid #eef2f7;
  font-size: 0.92rem;
  line-height: 1.5;
}
.official-source-item:first-child { border-top: 0; }
.official-source-link {
  color: var(--rh-navy);
  font-weight: 600;
  text-decoration: none;
}
.official-source-link:hover { color: var(--rh-orange); }
.official-source-desc { color: var(--rh-text-muted); }

/* ---------- bottom disclaimer ---------- */
.licensing-disclaimer {
  margin: 8px 0 40px;
  padding: 16px 18px;
  background: #f4f7fb;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--rh-ink);
}
.licensing-disclaimer strong { color: var(--rh-navy); }

/* ---------- national hub ---------- */
.licensing-hub-hero .container { max-width: 900px; }

.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.state-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--rh-line);
  border-radius: 10px;
  background: #ffffff;
  text-decoration: none;
}
.state-card.complete {
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.state-card.complete:hover {
  border-color: var(--rh-orange);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.08);
}
.state-card.forthcoming {
  background: #f1f5f9;
  border-style: dashed;
  opacity: 0.75;
  cursor: default;
}
.state-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rh-navy);
}
.state-card.forthcoming .state-card-name { color: #64748b; }
.state-card-status {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.state-card.complete .state-card-status { color: var(--rh-orange); }
.state-card.forthcoming .state-card-status { color: #94a3b8; }

/* ---------- hub summary table ---------- */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.summary-table th {
  background: var(--rh-navy);
  color: var(--rh-orange);
  text-align: left;
  padding: 0.65rem 0.8rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.summary-table td {
  border: 1px solid var(--rh-line);
  padding: 0.65rem 0.8rem;
  color: var(--rh-ink);
}
.summary-table tbody tr:nth-child(even) { background: #f4f7fb; }
