/* ================================================================
   BLOG -- Polycopybot.app
   Used by: blog/index.php + all article pages
================================================================ */

/* -- SHARED BADGE ----------------------------------------------- */
.blog-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 100px;
  font-size: .67rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
}
.blog-badge.neon { background: rgba(0,255,136,.1); color: var(--neon); border: 1px solid rgba(0,255,136,.25); }
.blog-badge.blue { background: rgba(0,212,255,.1); color: var(--blue); border: 1px solid rgba(0,212,255,.25); }
.blog-badge.purple { background: rgba(191,95,255,.1); color: var(--purple); border: 1px solid rgba(191,95,255,.25); }

/* ================================================================
   BLOG INDEX
================================================================ */

/* Hero */
.bi-hero {
  padding: 110px 0 64px; position: relative; overflow: hidden;
}
.bi-hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,255,136,.07) 0%, transparent 70%);
  pointer-events: none;
}
.bi-hero-label {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(0,255,136,.07); border: 1px solid rgba(0,255,136,.22);
  border-radius: 100px; padding: 5px 16px;
  font-size: .67rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--neon); margin-bottom: 22px;
}
.bi-hero-label::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--neon); display: inline-block; box-shadow: 0 0 8px var(--neon);
  animation: dot-pulse 2s ease infinite;
}
.bi-hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800;
  line-height: 1.15; margin-bottom: 16px;
}
.bi-hero-sub {
  font-size: .93rem; color: var(--muted); max-width: 560px; line-height: 1.8; margin-bottom: 36px;
}
.bi-hero-link { color: var(--neon); text-decoration: none; font-weight: 600; transition: opacity .2s; }
.bi-hero-link:hover { opacity: .75; }
.bi-hero-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; margin-bottom: 36px; }
.bi-topic-pill {
  display: inline-flex; align-items: center;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 100px; padding: 6px 16px;
  font-size: .74rem; font-weight: 600; color: var(--muted);
  text-decoration: none; transition: background .2s, border-color .2s, color .2s;
}
.bi-topic-pill:hover { background: rgba(0,255,136,.08); border-color: rgba(0,255,136,.3); color: var(--neon); }
.bi-stats-bar { display: flex; gap: 36px; align-items: center; flex-wrap: wrap; }
.bi-stat { display: flex; flex-direction: column; }
.bi-stat-num { font-size: 1.5rem; font-weight: 800; color: #fff; line-height: 1; }
.bi-stat-lbl { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
.bi-stat-sep { width: 1px; height: 38px; background: var(--border); }

/* Section */
.bi-section { padding: 56px 0 90px; }
.bi-section-head { margin-bottom: 36px; display: flex; align-items: baseline; gap: 12px; }
.bi-section-head h2 { font-size: 1.2rem; font-weight: 700; margin: 0; }
.bi-section-head span { font-size: .83rem; color: var(--muted); }

/* Article card */
.bi-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  transition: transform .3s, border-color .3s, box-shadow .3s;
  height: 100%; display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.bi-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0,255,136,.28);
  box-shadow: 0 20px 56px rgba(0,0,0,.45), 0 0 0 1px rgba(0,255,136,.08);
}
.bi-card-thumb {
  height: 140px;
  background: linear-gradient(135deg, rgba(0,255,136,.08), rgba(0,212,255,.06));
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.bi-card-thumb i { font-size: 3.2rem; opacity: .18; color: var(--neon); }
.bi-card-thumb-num {
  position: absolute; bottom: 10px; right: 14px;
  font-size: .65rem; font-weight: 700; color: var(--dim);
  letter-spacing: 1px; text-transform: uppercase;
}
.bi-card-top { padding: 20px 22px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bi-card-meta { display: flex; align-items: center; gap: 10px; font-size: .7rem; color: var(--muted); }
.bi-card-meta i { font-size: .72rem; }
.bi-card-body { padding: 14px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.bi-card-title {
  font-size: 1.08rem; font-weight: 700; color: #fff;
  margin-bottom: 10px; line-height: 1.4;
  transition: color .2s;
}
.bi-card:hover .bi-card-title { color: var(--neon); }
.bi-card-excerpt { font-size: .82rem; color: var(--muted); line-height: 1.75; flex: 1; margin-bottom: 18px; }
.bi-card-footer { display: flex; align-items: center; justify-content: space-between; }
.bi-card-author { display: flex; align-items: center; gap: 8px; }
.bi-card-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700; color: #000;
}
.bi-card-author-name { font-size: .72rem; color: var(--muted); }
.bi-read-link {
  font-size: .76rem; font-weight: 600; color: var(--neon); text-decoration: none;
  display: flex; align-items: center; gap: 5px; transition: gap .2s;
}
.bi-card:hover .bi-read-link { gap: 9px; }

/* Category color accents */
.bi-card-neon { border-left: 3px solid rgba(0,255,136,.25); }
.bi-card-neon:hover { border-left-color: var(--neon); border-color: rgba(0,255,136,.28); box-shadow: 0 20px 56px rgba(0,0,0,.45), 0 0 0 1px rgba(0,255,136,.08); }
.bi-card-blue { border-left: 3px solid rgba(0,212,255,.25); }
.bi-card-blue:hover { border-left-color: var(--blue); border-color: rgba(0,212,255,.28); box-shadow: 0 20px 56px rgba(0,0,0,.45), 0 0 0 1px rgba(0,212,255,.08); }
.bi-card-purple { border-left: 3px solid rgba(191,95,255,.25); }
.bi-card-purple:hover { border-left-color: var(--purple); border-color: rgba(191,95,255,.28); box-shadow: 0 20px 56px rgba(0,0,0,.45), 0 0 0 1px rgba(191,95,255,.08); }
.bi-card-neon .bi-read-link { color: var(--neon); }
.bi-card-blue .bi-read-link { color: var(--blue); }
.bi-card-purple .bi-read-link { color: var(--purple); }

/* Newsletter */
.bi-newsletter {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 40px 48px;
  display: flex; align-items: center; gap: 48px; flex-wrap: wrap;
  margin-top: 16px; margin-bottom: 30px;
}
.bi-nl-icon { font-size: 2.4rem; color: var(--neon); opacity: .7; flex-shrink: 0; }
.bi-nl-text { flex: 1; min-width: 200px; }
.bi-nl-text h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 5px; }
.bi-nl-text p { font-size: .82rem; color: var(--muted); margin: 0; }
.bi-nl-form { display: flex; gap: 10px; flex: 1; min-width: 280px; }
.bi-nl-right { flex: 1; min-width: 280px; }
.bi-nl-input {
  flex: 1; background: rgba(255,255,255,.05); border: 1px solid var(--border);
  border-radius: 8px; padding: 11px 16px; color: var(--text); font-size: .84rem;
  outline: none; transition: border-color .2s; font-family: inherit;
}
.bi-nl-input:focus { border-color: var(--neon); }
.bi-nl-input::placeholder { color: var(--dim); }
.bi-nl-btn {
  background: var(--grad); color: #000; border: none; border-radius: 8px;
  padding: 11px 22px; font-weight: 700; font-size: .84rem; cursor: pointer;
  white-space: nowrap; transition: opacity .2s, transform .2s; font-family: inherit;
}
.bi-nl-btn:hover { opacity: .88; transform: translateY(-1px); }

/* ================================================================
   SINGLE POST
================================================================ */

/* Hero */
.sp-hero { padding: 105px 0 52px; position: relative; overflow: hidden; }
.sp-hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(0,255,136,.07) 0%, transparent 65%);
  pointer-events: none;
}

/* Breadcrumb */
.sp-breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .74rem; color: var(--muted); margin-bottom: 22px;
}
.sp-breadcrumb a { color: var(--muted); text-decoration: none; transition: color .2s; }
.sp-breadcrumb a:hover { color: var(--neon); }
.sp-breadcrumb i { font-size: .6rem; opacity: .6; }

.sp-hero-badge-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.sp-hero-title {
  font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 800;
  line-height: 1.18; margin-bottom: 22px; max-width: 840px;
}
.sp-hero-meta {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-size: .78rem; color: var(--muted);
}
.sp-hero-meta span { display: flex; align-items: center; gap: 6px; }
.sp-hero-meta i { color: var(--neon); font-size: .8rem; }
.sp-meta-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--border2); }

/* Layout */
.sp-layout { padding: 52px 0 88px; }
.sp-main { max-width: 830px; }
.sp-sidebar { position: sticky; top: 88px; }

/* Article content background layer */
article.sp-main {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 40px 48px;
  max-width: 100%;
}

/* ToC sidebar */
.sp-toc {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px 24px; margin-bottom: 20px;
}
.sp-toc-label {
  font-size: .67rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--neon); margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.sp-toc-label::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--neon); box-shadow: 0 0 7px var(--neon);
}
.sp-toc-list { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.sp-toc-list a {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px;
  font-size: .77rem; color: var(--muted); text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
  border-left: 2px solid transparent;
}
.sp-toc-list a::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: var(--dim); flex-shrink: 0; transition: background .2s;
}
.sp-toc-list a:hover, .sp-toc-list a.toc-active {
  background: rgba(0,255,136,.07); color: var(--neon); border-left-color: var(--neon);
}
.sp-toc-list a:hover::before, .sp-toc-list a.toc-active::before {
  background: var(--neon);
}

/* Share sidebar */
.sp-share-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px 24px;
}
.sp-share-label {
  font-size: .67rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.sp-share-btns { display: flex; flex-direction: column; gap: 7px; }
.sp-share-btn {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 8px;
  font-size: .77rem; font-weight: 600; text-decoration: none; color: var(--text);
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  transition: background .2s, transform .15s, color .2s;
}
.sp-share-btn:hover { background: rgba(255,255,255,.08); transform: translateX(3px); color: #fff; }

/* AI Ask sidebar */
.sp-ai-share-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px 24px; margin-top: 16px;
}
.sp-ai-share-label {
  font-size: .67rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.sp-ai-share-btns { display: flex; flex-direction: column; gap: 7px; }
.sp-ai-share-btn {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 8px;
  font-size: .77rem; font-weight: 600; text-decoration: none; color: var(--text);
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  transition: background .2s, transform .15s, color .2s;
}
.sp-ai-share-btn img { width: 18px; height: 18px; object-fit: contain; border-radius: 3px; }
.sp-ai-share-btn:hover { background: rgba(255,255,255,.08); transform: translateX(3px); color: #fff; }

/* Inline ToC (mobile) */
.sp-toc-inline {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px 26px; margin-bottom: 2.2rem;
  display: none;
}
.sp-toc-inline-label {
  font-size: .7rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--neon); margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.sp-toc-inline ol { padding-left: 1.3rem; margin: 0; }
.sp-toc-inline li { margin-bottom: .45rem; }
.sp-toc-inline a {
  color: var(--muted); text-decoration: none; font-size: .83rem; transition: color .2s;
}
.sp-toc-inline a:hover { color: var(--neon); }

/* Article body */
.sp-body { font-size: .96rem; line-height: 1.88; color: var(--text); }
.sp-body p { margin-bottom: 1.45rem; }
.sp-body h2 {
  font-size: 1.32rem;
  font-weight: 700;
  margin: 2.8rem 0 1rem;
  color: #fff;
  letter-spacing: -.018em;
  padding-bottom: .6rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  scroll-margin-top: 100px;
}
.sp-body h3 {
  font-size: 1.1rem; font-weight: 700; margin: 2.2rem 0 .85rem;
  color: var(--blue); scroll-margin-top: 100px;
}
.sp-body ul, .sp-body ol { padding-left: 1.5rem; margin-bottom: 1.45rem; }
.sp-body li { margin-bottom: .55rem; }
.sp-body strong { color: #fff; font-weight: 700; }
.sp-body a { color: var(--neon); text-decoration: none; transition: opacity .2s; }
.sp-body a:hover { opacity: .75; }
.sp-body blockquote {
  margin: 2.2rem 0; padding: 20px 26px;
  background: rgba(0,255,136,.05); border-left: 3px solid var(--neon);
  border-radius: 0 10px 10px 0; font-size: .93rem; color: var(--muted); font-style: italic;
}
.sp-body blockquote strong { color: var(--neon); font-style: normal; }

/* Key insight box */
.sp-key-box {
  background: rgba(0,212,255,.05); border: 1px solid rgba(0,212,255,.2);
  border-radius: 12px; padding: 20px 26px; margin: 2rem 0;
}
.sp-key-box-label {
  font-size: .67rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--blue); margin-bottom: 8px; display: flex; align-items: center; gap: 7px;
}
.sp-key-box p { margin: 0; font-size: .88rem; line-height: 1.75; }

/* Inline CTA */
.sp-cta-box {
  background: linear-gradient(135deg, rgba(0,255,136,.08), rgba(0,212,255,.05));
  border: 1px solid rgba(0,255,136,.22); border-radius: var(--r);
  padding: 30px 34px; margin: 2.8rem 0; text-align: center; position: relative; overflow: hidden;
}
.sp-cta-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--grad); opacity: .5;
}
.sp-cta-box h3 { font-size: 1.12rem; margin-bottom: 8px; color: #fff; }
.sp-cta-box p { font-size: .84rem; color: var(--muted); margin-bottom: 20px; max-width: 480px; margin-left: auto; margin-right: auto; }
.sp-cta-box .btn-neon { font-size: .88rem; padding: 12px 28px; }

/* Comparison table */
.sp-body table { width: 100%; border-collapse: collapse; margin-bottom: 1.8rem; font-size: .85rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sp-body table th {
  background: rgba(0,255,136,.07); color: var(--neon); padding: 10px 16px;
  text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
}
.sp-body table td { padding: 10px 16px; border-bottom: 1px solid rgba(38,38,74,.5); color: var(--text); }
.sp-body table tr:hover td { background: rgba(255,255,255,.02); }

/* FAQ */
.sp-faq {
  margin-top: 3.2rem;
  padding-top: 2.2rem;
  border-top: 1px solid rgba(255,255,255,.07);
}

.sp-faq-heading {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
  margin: 0 0 1.4rem;
  padding: 0;
  border: none;
  display: block;
  scroll-margin-top: 100px;
}
.sp-faq-item {
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; overflow: hidden;
  background: var(--bg3);
  transition: border-color .2s;
}
.sp-faq-item:hover { border-color: var(--border2); }
.sp-faq-item[open] { border-color: rgba(0,255,136,.2); background: var(--bg3); }
.sp-faq-item summary {
  padding: 15px 20px; font-weight: 600; font-size: .88rem; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  list-style: none; color: var(--text); transition: color .2s; user-select: none;
  background: transparent;
}
.sp-faq-item summary::-webkit-details-marker { display: none; }
.sp-faq-item summary::after {
  content: '+'; color: var(--neon); font-size: 1.25rem; font-weight: 300;
  transition: transform .25s; flex-shrink: 0; margin-left: 12px;
}
.sp-faq-item[open] summary { color: #fff; }
.sp-faq-item[open] summary::after { transform: rotate(45deg); }
.sp-faq-item p { padding: 0 20px 16px; font-size: .85rem; color: var(--muted); margin: 0; line-height: 1.78; }

/* Author box */
.sp-author-box {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 28px 32px;
  display: flex; gap: 22px; align-items: flex-start; margin-top: 3.2rem;
}
.sp-author-avatar {
  width: 56px; height: 56px; min-width: 56px; border-radius: 50%;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800; color: #000;
}
.sp-author-name { font-size: .95rem; font-weight: 700; color: #fff; margin-bottom: 3px; }
.sp-author-role { font-size: .74rem; color: var(--neon); margin-bottom: 8px; }
.sp-author-bio { font-size: .82rem; color: var(--muted); line-height: 1.72; margin: 0; }

/* Related posts */
.sp-related { padding: 52px 0 80px; border-top: 1px solid var(--border); }
.sp-related-heading { font-size: 1.15rem; font-weight: 700; margin-bottom: 28px; }

/* -- RESPONSIVE ------------------------------------------------- */
@media (max-width: 991px) {
  .sp-sidebar { position: static; margin-top: 40px; }
  .sp-toc, .sp-share-box, .sp-ai-share-box { display: none; }
  .sp-toc-inline { display: block; }
  .bi-newsletter { padding: 28px 28px; gap: 24px; }
  article.sp-main { padding: 30px 32px; }
}
@media (max-width: 767px) {
  .bi-hero { padding: 88px 0 48px; }
  .sp-hero { padding: 88px 0 40px; }
  .sp-author-box { flex-direction: column; gap: 16px; }
  .sp-cta-box { padding: 24px 20px; }
  .sp-body h2 { font-size: 1.18rem; }
  .bi-nl-form { flex-direction: column; }
  article.sp-main { padding: 22px 18px; }
}
