/* ═══════════════════════════════════════════════════════════
   iLogix — Blog Detail Page CSS
   EEAT-optimised: author box, trust signals, schema hooks,
   ToC, related posts, service CTAs, reading progress bar
   ═══════════════════════════════════════════════════════════ */

/* ── Reading progress bar ──────────────────────────────── */
#reading-progress {
  position: fixed; top: 0; left: 0; z-index: 1000;
  height: 3px; width: 0%; background: var(--red);
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── Post hero ─────────────────────────────────────────── */
.post-hero {
  background: var(--navy);
  padding: 100px 0 0;
  position: relative; overflow: hidden;
}
.post-hero-blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.12; pointer-events: none;
}
.post-hero-inner {
  position: relative; z-index: 2;
  max-width: 760px;
}
.post-hero-cats { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.post-hero-cat {
  font-size: 11px; font-weight: 600;
  padding: 4px 12px; border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.post-hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 800; line-height: 1.1;
  color: var(--white); letter-spacing: -1px;
  margin-bottom: 18px;
}
.post-hero-excerpt {
  font-size: 17px; color: rgba(255,255,255,0.6);
  line-height: 1.65; margin-bottom: 28px; max-width: 680px;
}
.post-hero-meta {
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap; padding-bottom: 32px;
}
.post-hero-author { display: flex; align-items: center; gap: 10px; }
.post-hero-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 14px;
  font-weight: 800; color: var(--white); flex-shrink: 0;
}
.post-hero-author-info .author-name {
  font-size: 13px; font-weight: 500; color: var(--white);
}
.post-hero-author-info .author-role {
  font-size: 11px; color: rgba(255,255,255,0.45);
}
.post-hero-stats {
  display: flex; align-items: center; gap: 16px;
  font-size: 12px; color: rgba(255,255,255,0.4);
}
.post-hero-stats-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
}

/* ── EEAT trust bar ────────────────────────────────────── */
.post-trust-bar {
  background: var(--off-white);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 0;
}
.post-trust-inner {
  display: flex; align-items: center; gap: 24px;
  flex-wrap: wrap;
}
.post-trust-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text-mid);
}
.post-trust-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
}

/* ── Main layout ───────────────────────────────────────── */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 56px 0 80px;
  align-items: start;
}

/* ── Article body ──────────────────────────────────────── */
.post-body { min-width: 0; }

/* ToC */
.post-toc {
  background: var(--off-white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 36px;
}
.post-toc-title {
  font-family: var(--font-display); font-size: 13px;
  font-weight: 700; color: var(--text-dark);
  margin-bottom: 12px; text-transform: uppercase;
  letter-spacing: 0.06em;
}
.post-toc ol {
  margin: 0; padding: 0 0 0 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.post-toc li { font-size: 13px; color: var(--text-mid); }
.post-toc a {
  color: var(--text-mid); text-decoration: none;
  transition: color 0.15s;
}
.post-toc a:hover { color: var(--red); }

/* Article typography */
.post-content { font-size: 16px; line-height: 1.8; color: var(--text-mid); }
.post-content h2 {
  font-family: var(--font-display); font-size: 26px;
  font-weight: 800; color: var(--text-dark);
  margin: 48px 0 16px; letter-spacing: -0.3px;
  line-height: 1.2; scroll-margin-top: 80px;
}
.post-content h3 {
  font-family: var(--font-display); font-size: 19px;
  font-weight: 700; color: var(--text-dark);
  margin: 32px 0 12px; scroll-margin-top: 80px;
}
.post-content p { margin-bottom: 20px; }
.post-content ul, .post-content ol {
  margin: 0 0 20px 24px; display: flex;
  flex-direction: column; gap: 8px;
}
.post-content li { line-height: 1.65; }
.post-content strong { color: var(--text-dark); font-weight: 600; }
.post-content a {
  color: var(--red); text-decoration: underline;
  text-decoration-color: rgba(232,49,74,0.3);
  transition: text-decoration-color 0.15s;
}
.post-content a:hover { text-decoration-color: var(--red); }

/* Callout boxes */
.post-callout {
  border-radius: var(--radius-sm);
  padding: 20px 22px; margin: 28px 0;
  display: flex; gap: 14px; align-items: flex-start;
}
.post-callout.stat {
  background: var(--navy); border: none;
}
.post-callout.tip {
  background: var(--green-light);
  border-left: 4px solid var(--green);
}
.post-callout.warning {
  background: var(--amber-light);
  border-left: 4px solid var(--amber);
}
.post-callout.insight {
  background: var(--purple-light);
  border-left: 4px solid var(--purple);
}
.post-callout-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.post-callout-body {}
.post-callout-title {
  font-family: var(--font-display); font-size: 14px;
  font-weight: 700; margin-bottom: 4px;
}
.post-callout.stat .post-callout-title { color: var(--white); }
.post-callout.tip .post-callout-title { color: #0F6E56; }
.post-callout.warning .post-callout-title { color: #633806; }
.post-callout.insight .post-callout-title { color: #3C3489; }
.post-callout-text { font-size: 14px; line-height: 1.6; }
.post-callout.stat .post-callout-text { color: rgba(255,255,255,0.7); }
.post-callout.tip .post-callout-text { color: #0F6E56; }
.post-callout.warning .post-callout-text { color: #633806; }
.post-callout.insight .post-callout-text { color: #3C3489; }

/* Stat highlight */
.post-stat-num {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 800;
  color: var(--white); line-height: 1; margin-bottom: 4px;
}

/* Comparison table */
.post-table-wrap { overflow-x: auto; margin: 28px 0; }
.post-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
.post-table th {
  background: var(--navy); color: var(--white);
  padding: 11px 16px; text-align: left;
  font-family: var(--font-display); font-size: 13px;
  font-weight: 700;
}
.post-table td {
  padding: 11px 16px; border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
.post-table tr:nth-child(even) td { background: var(--off-white); }
.post-table tr:last-child td { border-bottom: none; }
.post-table .check { color: var(--green); font-weight: 700; }
.post-table .cross { color: var(--red); font-weight: 700; }
.post-table .partial { color: var(--amber); font-weight: 700; }

/* FAQ section */
.post-faq { margin: 48px 0 0; }
.post-faq-title {
  font-family: var(--font-display); font-size: 24px;
  font-weight: 800; color: var(--text-dark);
  margin-bottom: 20px; letter-spacing: -0.3px;
}
.faq-item {
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm); margin-bottom: 10px;
  overflow: hidden;
}
.faq-q {
  padding: 16px 20px; font-size: 15px; font-weight: 600;
  color: var(--text-dark); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  user-select: none; transition: background 0.15s;
}
.faq-q:hover { background: var(--off-white); }
.faq-arrow { font-size: 12px; color: var(--text-light); transition: transform 0.2s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a {
  display: none; padding: 0 20px 16px;
  font-size: 14px; color: var(--text-mid);
  line-height: 1.65; border-top: 1px solid var(--border-light);
  padding-top: 14px;
}
.faq-item.open .faq-a { display: block; }

/* ── In-content CTA block (links to services/fintralis) ─ */
.post-cta-block {
  border-radius: var(--radius);
  padding: 28px 32px; margin: 40px 0;
  display: flex; gap: 24px; align-items: center;
  border: 1.5px solid var(--border-light);
  background: var(--white);
  transition: border-color 0.2s;
}
.post-cta-block:hover { border-color: var(--red); }
.post-cta-block.dark {
  background: var(--navy); border-color: var(--navy);
}
.post-cta-icon { font-size: 36px; flex-shrink: 0; }
.post-cta-text { flex: 1; }
.post-cta-text h4 {
  font-family: var(--font-display); font-size: 16px;
  font-weight: 700; color: var(--text-dark); margin-bottom: 5px;
}
.post-cta-block.dark .post-cta-text h4 { color: var(--white); }
.post-cta-text p {
  font-size: 13px; color: var(--text-mid);
  line-height: 1.55; margin: 0;
}
.post-cta-block.dark .post-cta-text p { color: rgba(255,255,255,0.6); }

/* Sources / references */
.post-sources {
  border-top: 1px solid var(--border-light);
  margin-top: 48px; padding-top: 24px;
}
.post-sources-title {
  font-size: 12px; font-weight: 600; color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px;
}
.post-sources ol {
  padding-left: 18px; display: flex; flex-direction: column; gap: 6px;
}
.post-sources li { font-size: 12px; color: var(--text-light); line-height: 1.55; }

/* Tags */
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.post-tag {
  font-size: 12px; font-weight: 500;
  padding: 4px 12px; border-radius: var(--radius-pill);
  background: var(--off-white); color: var(--text-mid);
  text-decoration: none; border: 1px solid var(--border-light);
  transition: all 0.15s;
}
.post-tag:hover { border-color: var(--red); color: var(--red); }

/* ── EEAT Author box ──────────────────────────────────── */
.post-author-box {
  background: var(--off-white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px; margin-top: 48px;
}
.post-author-box-inner { display: flex; gap: 20px; align-items: flex-start; }
.post-author-box-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 22px;
  font-weight: 800; color: var(--white); flex-shrink: 0;
}
.post-author-box-info h4 {
  font-family: var(--font-display); font-size: 16px;
  font-weight: 700; color: var(--text-dark); margin-bottom: 2px;
}
.post-author-role {
  font-size: 12px; color: var(--text-mid); margin-bottom: 10px;
}
.post-author-bio { font-size: 14px; color: var(--text-mid); line-height: 1.65; }
.post-author-credentials {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px;
}
.post-author-cred {
  font-size: 11px; font-weight: 500; padding: 3px 9px;
  border-radius: var(--radius-pill); background: var(--white);
  color: var(--text-mid); border: 1px solid var(--border-light);
}

/* ── SIDEBAR ───────────────────────────────────────────── */
.post-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  background: var(--white); border: 1.5px solid var(--border-light);
  border-radius: var(--radius); overflow: hidden;
}
.sidebar-card-header {
  padding: 14px 18px; border-bottom: 1.5px solid var(--border-light);
  font-family: var(--font-display); font-size: 13px;
  font-weight: 700; color: var(--text-dark);
  background: var(--off-white);
}
.sidebar-card-body { padding: 16px 18px; }

/* Sticky ToC sidebar */
.sidebar-toc { position: sticky; top: 80px; }
.sidebar-toc ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.sidebar-toc li a {
  display: block; font-size: 13px; color: var(--text-mid);
  text-decoration: none; padding: 6px 10px;
  border-left: 2px solid var(--border-light);
  transition: all 0.15s; line-height: 1.4;
}
.sidebar-toc li a:hover,
.sidebar-toc li a.active {
  color: var(--red); border-left-color: var(--red);
  background: var(--red-light);
}

/* Sidebar service links */
.sidebar-service-links { display: flex; flex-direction: column; gap: 0; }
.sidebar-service-link {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--border-light);
  text-decoration: none; transition: all 0.15s;
}
.sidebar-service-link:last-child { border-bottom: none; }
.sidebar-service-link:hover .ssl-arrow { transform: translateX(3px); }
.ssl-icon { font-size: 16px; flex-shrink: 0; }
.ssl-text { font-size: 13px; font-weight: 500; color: var(--text-dark); flex: 1; }
.ssl-arrow { font-size: 12px; color: var(--text-light); transition: transform 0.15s; }

/* Sidebar fintralis CTA */
.sidebar-fintralis-cta {
  background: var(--navy); border-radius: var(--radius);
  padding: 22px; text-align: center;
}
.sidebar-fintralis-cta h4 {
  font-family: var(--font-display); font-size: 15px;
  font-weight: 800; color: var(--white); margin-bottom: 8px; line-height: 1.3;
}
.sidebar-fintralis-cta p {
  font-size: 12px; color: rgba(255,255,255,0.55);
  line-height: 1.55; margin-bottom: 14px;
}

/* ── Related posts ─────────────────────────────────────── */
.post-related { padding: 64px 0; background: var(--off-white); }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.related-card {
  background: var(--white); border: 1.5px solid var(--border-light);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: all 0.25s;
  text-decoration: none;
}
.related-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(11,22,40,0.09); border-color: transparent; }
.related-thumb { height: 140px; display: flex; align-items: center; justify-content: center; font-size: 40px; position: relative; }
.related-cat { position: absolute; top: 12px; left: 12px; font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: 0.05em; }
.related-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.related-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-dark); line-height: 1.3; margin-bottom: 8px; flex: 1; }
.related-meta { font-size: 11px; color: var(--text-light); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 960px) {
  .post-layout { grid-template-columns: 1fr; gap: 32px; }
  .post-sidebar { order: -1; }
  .sidebar-toc { position: static; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .post-cta-block { flex-direction: column; gap: 14px; }
}
@media (max-width: 600px) {
  .post-hero { padding: 80px 0 0; }
  .post-hero-title { font-size: 28px; }
  .post-content h2 { font-size: 22px; }
  .related-grid { grid-template-columns: 1fr; }
  .post-author-box-inner { flex-direction: column; }
}
