/*
Theme Name: Helix Insights
Description: Insights theme for hlxpartners.com. Loads the main site's /assets/css/style.css so articles match the rest of the site; this file only adds article-specific styles.
Version: 1.2.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: helix-insights
*/

.nav-links a.is-current { color: var(--white); }

/* ── INSIGHTS INDEX ── */
.insights-hero .inner-hero-copy { color: var(--light); margin-top: 20px; }

.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.insights-grid .e-card {
  max-width: none;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--white);
  overflow: hidden;
  padding: 0;
}

.insight-thumb {
  aspect-ratio: 16 / 9;
  background: var(--dark);
  overflow: hidden;
}

.insight-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.insight-body { padding: 28px 28px 32px; display: flex; flex-direction: column; flex: 1; }

.insight-meta {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 14px;
}

.insights-grid .e-card h3 { font-size: 22px; }

.insight-more {
  margin-top: auto;
  padding-top: 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-light);
}

.insights-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.insights-filter a { text-decoration: none; }
.insights-filter a.current { border-color: var(--purple); color: var(--purple-light); }

.insights-empty { text-align: center; color: var(--mid); padding: 40px 0 80px; }

.insights-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 56px;
}

.insights-pagination .page-numbers {
  min-width: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--light);
  text-decoration: none;
  text-align: center;
  font-size: 13px;
}

.insights-pagination .page-numbers.current,
.insights-pagination a.page-numbers:hover { border-color: var(--purple); color: var(--white); }

/* ── SINGLE ARTICLE ── */
.article-hero { padding-bottom: 40px; }
.article-hero h1 { max-width: 960px; margin: 0 auto; text-wrap: balance; }
.article-hero .insight-meta { margin-top: 24px; margin-bottom: 0; }

.article-cover {
  max-width: 1100px;
  margin: 0 auto 56px;
  padding: 0 48px;
}

.article-cover img { width: 100%; height: auto; border-radius: 24px; display: block; }
.article-cover .insight-meta { text-align: center; margin: 20px 0 0; }

/* With a title card the hero only holds the back link, so tighten it. */
.has-title-card .article-hero { padding-bottom: 28px; }

.article-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: 18px;
  line-height: 1.75;
  color: var(--light);
}

.article-content > * + * { margin-top: 1.2em; }

.article-content h2,
.article-content h3,
.article-content h4 {
  font-family: var(--font-display);
  color: var(--white);
  font-weight: 600;
  line-height: 1.2;
  margin-top: 2em;
  text-wrap: balance;
}

.article-content h2 { font-size: clamp(26px, 3vw, 34px); }
.article-content h3 { font-size: 24px; }
.article-content h4 { font-size: 19px; }

.article-content a { color: var(--purple-light); }
.article-content strong { color: var(--white); font-weight: 600; }
.article-content ul, .article-content ol { padding-left: 1.4em; }
.article-content li + li { margin-top: 0.4em; }

.article-content blockquote {
  border-left: 2px solid var(--purple);
  padding: 4px 0 4px 24px;
  color: var(--white);
  font-size: 21px;
}

.article-content img, .article-content figure { max-width: 100%; height: auto; border-radius: 16px; }
.article-content figcaption { font-size: 13px; color: var(--mid); margin-top: 8px; }
.article-content hr { border: 0; border-top: 1px solid var(--border); }

.article-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.article-content th, .article-content td { border-bottom: 1px solid var(--border); padding: 10px 8px; text-align: left; }

.article-content pre, .article-content code {
  background: var(--card);
  border-radius: 6px;
  font-size: 0.9em;
}
.article-content pre { padding: 16px; overflow-x: auto; }

/* Inline citation markers: <sup class="cite"><a href="#source-1">1</a></sup> */
.article-content sup.cite { font-size: 0.65em; line-height: 0; margin-left: 1px; }
.article-content sup.cite a { text-decoration: none; font-weight: 500; }
/* Separate adjacent markers so "1" + "2" doesn't read as "12". */
.article-content sup.cite + sup.cite::before { content: ","; color: var(--purple-light); }

/* Numbered Sources list: <h2 id="sources">Sources</h2><ol class="article-sources"> */
.article-content #sources {
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--purple-light);
  font-weight: 500;
  margin-top: 3em;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.article-content .article-sources {
  font-size: 14px;
  line-height: 1.6;
  color: var(--mid);
  padding-left: 1.6em;
}

.article-content .article-sources li { scroll-margin-top: 120px; overflow-wrap: anywhere; }
.article-content .article-sources li:target { color: var(--white); }

.article-footer {
  max-width: 760px;
  margin: 64px auto 0;
  padding: 32px 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.article-cta {
  max-width: 1100px;
  margin: 80px auto 0;
  padding: 0 48px;
}

.article-cta .e-card { max-width: none; text-align: center; padding: 56px 32px; }
.article-cta .e-card p { max-width: 560px; margin: 0 auto; }

/* Accessibility helpers WordPress expects */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

@media (max-width: 1024px) {
  .insights-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .insights-grid { grid-template-columns: 1fr; }
  .article-cover, .article-cta { padding: 0 20px; }
  .article-content { font-size: 17px; padding: 0 20px; }
}
