/* ============================================================
   RESOURCE ARTICLE — front-end styles
   Loaded conditionally on: single-resource.php + pages
   containing the cpt-resource-hub block.
   ============================================================ */

/* ── Breadcrumb ─────────────────────────────────────────── */
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.article-breadcrumb a {
  color: var(--blue-primary);
  font-weight: 600;
  transition: color 0.15s;
}
.article-breadcrumb a:hover { color: var(--blue-navy); }
.article-breadcrumb-sep { color: var(--border); }

/* ── Article section wrapper ────────────────────────────── */
.article-section {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 64px 0 80px;
}

/* ── Meta row ───────────────────────────────────────────── */
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.article-meta-divider {
  width: 4px;
  height: 4px;
  background: var(--border);
  border-radius: 50%;
  flex-shrink: 0;
}
.article-read-time,
.article-date {
  font-size: 13px;
  color: var(--muted);
}

/* ── Article title (within article body — banner h1 is primary) */
.article-title {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 20px;
}

/* ── Deck ───────────────────────────────────────────────── */
.article-deck,
.article-content p.is-style-article-intro {
  font-size: 18px;
  line-height: 1.75;
  color: var(--body-text);
  border-left: 3px solid var(--blue-primary);
  padding-left: 20px;
  margin-bottom: 40px !important;
}

/* ── Divider ────────────────────────────────────────────── */
.article-divider {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* ── Article content: core WP block overrides ───────────── */
.article-content {
  max-width: 780px;
}

/* Full-width block breakout — cancels margin-narrow at each breakpoint */
.article-content .alignfull {
  width: 100vw;
  margin-left: -48px;
}

@media (min-width: 768px) {
  .article-content .alignfull {
    margin-left: -12vw;
  }
}

@media (min-width: 1024px) {
  .article-content .alignfull {
    margin-left: -20vw;
  }
}

.article-content h2 {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  margin: 48px 0 16px !important;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.article-content h2:first-child { margin-top: 0 !important; }

.article-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin: 32px 0 12px !important;
}

.article-content p,
.article-content .wp-block-paragraph {
  font-size: 16px;
  line-height: 1.82;
  color: var(--body-text);
  margin-bottom: 20px !important;
}
.article-content p a,
.article-content .wp-block-paragraph a {
  color:var(--blue-primary);
}
.article-content p a:hover,
.article-content .wp-block-paragraph a:hover {
  color:var(--blue-navy);
}
.article-content p strong,
.article-content .wp-block-paragraph strong,
.article-content li strong { font-weight:600; }

/* Core list block */
.article-content ul.wp-block-list,
.article-content ol.wp-block-list {
  margin: 0 0 20px 0 !important;
  padding-left: 0 !important;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-content ul.wp-block-list li,
.article-content ol.wp-block-list li {
  font-size: 16px;
  line-height: 1.72;
  color: var(--body-text);
  padding-left: 28px;
  position: relative;
}
.article-content ul.wp-block-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  background: var(--blue-primary);
  border-radius: 50%;
  opacity: 0.5;
}
.article-content ol.wp-block-list {
  counter-reset: article-ol;
}
.article-content ol.wp-block-list li {
  counter-increment: article-ol;
}
.article-content ol.wp-block-list li::before {
  content: counter(article-ol);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--blue-primary);
  line-height: 1.72;
  background: none;
  border-radius: 0;
  opacity: 1;
}

/* ── Block style: Checklist (List block) ────────────────── */
.article-content ul.is-style-checklist,
.article-content ul.wp-block-list.is-style-checklist {
  gap: 12px;
}
.article-content ul.is-style-checklist li,
.article-content ul.wp-block-list.is-style-checklist li {
  padding-left: 34px;
}
.article-content ul.is-style-checklist li::before,
.article-content ul.wp-block-list.is-style-checklist li::before {
  width: 20px;
  height: 20px;
  top: 1px;
  background-color: rgba(15, 91, 186, 0.10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpolyline points='40 144 96 200 224 72' fill='none' stroke='%230F5BBA' stroke-linecap='round' stroke-linejoin='round' stroke-width='28'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 11px 11px;
  background-position: center;
  border: 1px solid rgba(15, 91, 186, 0.22);
  border-radius: 50%;
  opacity: 1;
}

/* ── Core Table block ───────────────────────────────────── */
.article-content .wp-block-table {
  margin: 24px 0 !important;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.article-content .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.article-content .wp-block-table thead th {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.article-content .wp-block-table tbody td {
  padding: 12px 16px;
  color: var(--body-text);
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.article-content .wp-block-table tbody tr:last-child td {
  border-bottom: none;
}
.article-content .wp-block-table tbody tr:nth-child(even) td {
  background: var(--surface);
}

/* ── Callout block (acf/article-callout) ────────────────── */
.article-callout {
  background: rgba(15, 91, 186, 0.06);
  border: 1px solid rgba(15, 91, 186, 0.18);
  border-left: 3px solid var(--blue-primary);
  border-radius: 6px;
  padding: 20px 24px;
  margin: 32px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.article-callout--warning {
  background: rgba(200, 100, 0, 0.06);
  border-color: rgba(200, 100, 0, 0.25);
  border-left-color: #C86400;
}
.article-callout-icon {
  flex-shrink: 0;
  color: var(--blue-primary);
  margin-top: 2px;
}
.article-callout--warning .article-callout-icon { color: #C86400; }
.article-callout-body { flex: 1; }
.article-callout-body strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.article-callout-body p {
  font-size: 14px;
  line-height: 1.72;
  color: var(--body-text);
  margin: 0 !important;
  border: none !important;
  padding: 0 !important;
}

/* ── Filter bar (also used on hub page) ─────────────────── */
.resource-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  justify-content: center;
}
.resource-filter-btn {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.resource-filter-btn:hover {
  background: rgba(255,255,255,0.85);
  color: var(--ink);
}
.resource-filter-btn.is-active {
  background: var(--blue-primary);
  border-color: var(--blue-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(15,91,186,0.28);
}
.resource-filter-select {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background-color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 999px;
  padding: 7px 36px 7px 16px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23535F7A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
  outline: none;
  transition: background-color 0.15s, border-color 0.15s;
}
.resource-filter-select:hover {
  background-color: rgba(255,255,255,0.85);
  color: var(--ink);
}
.resource-filter-select:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(15,91,186,0.12);
}
.resource-filter-select.is-active {
  background-color: var(--blue-primary);
  border-color: var(--blue-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(15,91,186,0.28);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-size: 12px 12px;
}
.resource-card[aria-hidden="true"] { display: none; }
