﻿/* ═══════════════════════════════════════════════════════════
   INNOMERC TECH, ARTICLE / INSIGHT DETAIL PAGE STYLES
   Used by: insights/*.html article pages
   Supplements: style.css + pages.css
   Variables: uses style.css tokens (--text, --surface-2, etc.)
   ═══════════════════════════════════════════════════════════ */

/* ── ARTICLE LAYOUT ─────────────────────────────────────── */
.article-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}
.article-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

/* ── ARTICLE BODY ────────────────────────────────────────── */
.article-body { max-width: 72ch; }

/* Override pages.css h2/h3 to use article-specific sizing */
.article-body h2 {
  font-family: var(--font-d);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 .75rem;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.article-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teal);
  margin: 2rem 0 .5rem;
}
.article-body p {
  font-size: .97rem;
  line-height: 1.8;
  color: var(--text-2);
  margin-bottom: 1rem;
}
.article-body ul,
.article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.article-body li {
  font-size: .97rem;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: .4rem;
}
.article-body strong { color: var(--text); }
.article-body a { color: var(--teal); transition: opacity .2s; }
.article-body a:hover { opacity: .8; }

/* blockquote, uses pages.css style but override for article spacing */
.article-body blockquote {
  border-left: 3px solid var(--teal);
  padding: .85rem 1.25rem;
  background: var(--teal-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.75rem 0;
  font-style: italic;
  color: var(--text-2);
}

/* ── CALLOUT / WARNING BOX ───────────────────────────────── */
.article-body .callout {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
}
.article-body .callout strong { color: var(--orange); }

/* ── ARTICLE META BAR ────────────────────────────────────── */
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  font-size: .82rem;
  color: var(--text-3);
}
.article-meta-tag,
.article-tag {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-dim);
  padding: .25rem .65rem;
  border-radius: 99px;
}

/* ── SIDEBAR CARD ────────────────────────────────────────── */
.sidebar-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-card h4 {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-3);
  margin-bottom: 1rem;
}

/* ── TABLE OF CONTENTS (sidebar) ─────────────────────────── */
.sidebar-toc a {
  display: block;
  font-size: .83rem;
  color: var(--text-2);
  padding: .35rem 0;
  border-bottom: 1px solid var(--border);
  transition: color .2s;
  line-height: 1.4;
}
.sidebar-toc a:hover { color: var(--teal); }
.sidebar-toc a:last-child { border-bottom: none; }

/* ── ARTICLE CTA CARD ────────────────────────────────────── */
.article-cta {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-top: 2px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
}
.article-cta h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
}
.article-cta p {
  font-size: .85rem;
  color: var(--text-2);
  margin-bottom: 1.25rem;
}
.article-cta .btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 0;
}

/* ── RELATED ARTICLES (sidebar) ──────────────────────────── */
.related-articles a {
  display: block;
  font-size: .83rem;
  color: var(--text-2);
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  transition: color .2s;
  line-height: 1.45;
}
.related-articles a:hover { color: var(--teal); }
.related-articles a:last-child { border-bottom: none; }

/* ── ARTICLE FAQ ─────────────────────────────────────────── */
.article-faq { margin-top: 2.5rem; }

/* Scoped faq-icon overrides for article pages:
   pages.css draws a circle with ::before/::after lines.
   Article FAQs instead show a "+" character that rotates to ×.
   We reset the circle and hide the pseudo-element lines here. */
.article-faq .faq-item {
  border-left: 3px solid transparent;
}
.article-faq .faq-item.active {
  border-left-color: var(--teal);
}
.article-faq .faq-icon {
  width: auto;
  height: auto;
  border: none;
  border-radius: 0;
  background: none !important;
  font-size: 1.2rem;
  font-style: normal;
  transition: transform .25s;
  flex-shrink: 0;
  margin-left: .5rem;
}
.article-faq .faq-icon::before,
.article-faq .faq-icon::after { display: none; }
.article-faq .faq-item.active .faq-icon { transform: rotate(45deg); }
.article-faq .faq-q { color: var(--text); }
.article-faq .faq-q:hover { color: var(--teal); }

/* ── COMPARISON TABLE ────────────────────────────────────── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .88rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.compare-table th {
  padding: .7rem 1rem;
  background: var(--teal-dim);
  color: var(--teal);
  font-weight: 600;
  text-align: left;
  border: 1px solid var(--border);
  letter-spacing: .02em;
}
.compare-table td {
  padding: .65rem 1rem;
  border: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
  line-height: 1.55;
}
.compare-table tr:nth-child(even) td { background: var(--surface-3); }

[data-theme="light"] .compare-table th {
  background: rgba(13,148,136,.07);
  color: var(--teal);
}
[data-theme="light"] .compare-table tr:nth-child(even) td {
  background: rgba(15,23,42,.025);
}

/* ── TRAINING MODULES GRID ───────────────────────────────── */
.training-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.training-module {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  transition: border-color .2s;
}
.training-module:hover { border-color: rgba(44,188,182,.2); }
.training-module strong {
  display: block;
  font-size: .9rem;
  color: var(--text);
  margin-bottom: .35rem;
}
.training-module span {
  font-size: .82rem;
  color: var(--text-2);
  line-height: 1.55;
}

/* ── RED FLAG LIST ────────────────────────────────────────── */
.red-flag-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.red-flag-list li {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .85rem 1.1rem;
  background: rgba(242,145,0,.05);
  border: 1px solid rgba(242,145,0,.18);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  color: var(--text-2);
  line-height: 1.55;
}
.red-flag-list li::before {
  content: '⚠';
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: .05rem;
  line-height: 1.4;
}

/* ── EVALUATION CHECKLIST ────────────────────────────────── */
.checklist {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
  color: var(--text-2);
  line-height: 1.55;
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: '✓';
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: .05rem;
}

/* ── LIGHT THEME OVERRIDES ───────────────────────────────── */
[data-theme="light"] .sidebar-card {
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(15,23,42,.05);
}
[data-theme="light"] .article-cta {
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(15,23,42,.05);
}
[data-theme="light"] .article-body .callout {
  background: rgba(234,88,12,.04);
  border-color: rgba(234,88,12,.18);
}
[data-theme="light"] .training-module {
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(15,23,42,.04);
}
[data-theme="light"] .red-flag-list li {
  background: rgba(234,88,12,.04);
  border-color: rgba(234,88,12,.15);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .article-wrap {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
  }
}
@media (max-width: 600px) {
  .training-modules {
    grid-template-columns: 1fr;
  }
}
