/* =====================================================================
   Socialbulk Blog — Shared Stylesheet
   Design System: Modern, Premium, Purple Brand (#6b18d4)
   Font: Inter (Google Fonts)
   ===================================================================== */

/* ── IMPORTS ─────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── RESET & BASE ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:        #6b18d4;
  --brand-dark:   #4f0fa0;
  --brand-light:  #f3eaff;
  --brand-soft:   #ede4f8;
  --text:         #0f172a;
  --text-muted:   #64748b;
  --text-light:   #94a3b8;
  --bg:           #ffffff;
  --bg-soft:      #fafafa;
  --bg-muted:     #f1f5f9;
  --border:       #e2e8f0;
  --border-dark:  #cbd5e1;
  --good:         #16a34a;
  --good-bg:      #f0fdf4;
  --bad:          #dc2626;
  --bad-bg:       #fef2f2;
  --neutral-bg:   #fef9c3;
  --warn:         #d97706;
  --warn-bg:      #fffbeb;
  --info-bg:      #eff6ff;
  --info:         #1d4ed8;
  --tip-bg:       #f0fdf4;
  --tip:          #15803d;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:       0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.1);
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w:        780px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-soft);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── ARTICLE WRAPPER ─────────────────────────────────────────────── */
.sb-blog-article {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  background: var(--bg);
}

/* ── BREADCRUMB ──────────────────────────────────────────────────── */
.sb-breadcrumb { margin-bottom: 1.5rem; }

.sb-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
  list-style: none;
  font-size: .8rem;
  color: var(--text-muted);
}

.sb-breadcrumb__link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
.sb-breadcrumb__link:hover { color: var(--brand-dark); text-decoration: underline; }
.sb-breadcrumb__item--sep { color: var(--border-dark); }
.sb-breadcrumb__item--current { color: var(--text-muted); font-weight: 500; }

/* ── ARTICLE HEADER ──────────────────────────────────────────────── */
.sb-article-header { margin-bottom: 2.5rem; }

.sb-article-meta--top {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}

.sb-article-tag {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sb-article-title {
  font-size: clamp(1.65rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -.025em;
  margin-bottom: 1rem;
}

.sb-article-intro {
  font-size: 1.075rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--brand);
  padding-left: 1rem;
}

.sb-article-meta--byline {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.sb-author-avatar { flex-shrink: 0; margin: 0; }

.sb-author-avatar__img {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid var(--brand-light);
  object-fit: cover;
  display: block;
}

.sb-author-name {
  font-weight: 700;
  font-size: .875rem;
  color: var(--text);
  display: block;
}

.sb-article-date {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── FEATURED IMAGE ──────────────────────────────────────────────── */
.sb-featured-image {
  margin: 0 0 2.5rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.sb-featured-image__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16/9;
}

.sb-featured-image__caption {
  font-size: .78rem;
  color: var(--text-muted);
  text-align: center;
  padding: .625rem 1rem;
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* ── TABLE OF CONTENTS ───────────────────────────────────────────── */
.sb-toc {
  background: linear-gradient(135deg, var(--brand-light) 0%, #faf5ff 100%);
  border: 1px solid #d8b4fe;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 3rem;
}

.sb-toc__title {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brand);
  margin-bottom: .875rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.sb-toc__title::before {
  content: '';
  display: inline-block;
  width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b18d4' stroke-width='2.5'%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Cline x1='3' y1='18' x2='15' y2='18'/%3E%3C/svg%3E") center/contain no-repeat;
}

.sb-toc__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  counter-reset: toc;
}

.sb-toc__list li {
  counter-increment: toc;
}

.sb-toc__link {
  font-size: .875rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  transition: color .15s;
  padding: .15rem 0;
}
.sb-toc__link::before {
  content: counter(toc, decimal-leading-zero);
  font-size: .7rem;
  font-weight: 800;
  color: var(--brand);
  opacity: .7;
  min-width: 22px;
  padding-top: .15rem;
}
.sb-toc__link:hover { color: var(--brand); }

/* ── ARTICLE SECTIONS ────────────────────────────────────────────── */
.sb-article-section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
.sb-article-section:last-of-type { border-bottom: none; }

/* ── HEADINGS ────────────────────────────────────────────────────── */
.sb-article-h2 {
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
  line-height: 1.25;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--brand-light);
  position: relative;
}
.sb-article-h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 3rem;
  height: 2px;
  background: var(--brand);
  border-radius: 1px;
}

.sb-article-h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.015em;
  margin-top: 1.75rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.sb-article-h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  background: var(--brand);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── PARAGRAPHS ──────────────────────────────────────────────────── */
.sb-article-section p {
  font-size: 1rem;
  color: #334155;
  line-height: 1.8;
  margin-bottom: 1rem;
}
.sb-article-section p strong { color: var(--text); font-weight: 700; }

/* ── INLINE CODE ─────────────────────────────────────────────────── */
code {
  background: var(--bg-muted);
  color: var(--brand);
  padding: .1em .4em;
  border-radius: 4px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: .875em;
  border: 1px solid var(--border);
}

/* ── LISTS ───────────────────────────────────────────────────────── */
.sb-list {
  margin: .5rem 0 1rem 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.sb-list li {
  font-size: 1rem;
  color: #334155;
  line-height: 1.65;
  padding-left: 1.75rem;
  position: relative;
}

/* Bullet list */
.sb-list:not(.sb-list--check):not(.sb-list--steps):not(.sb-list--pros):not(.sb-list--cons) li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-size: .85em;
  top: .1em;
}

/* Check list */
.sb-list--check li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--good);
  font-weight: 800;
  top: 0;
}

/* Pros list */
.sb-list--pros li::before {
  content: '+';
  position: absolute;
  left: .2rem;
  color: var(--good);
  font-weight: 900;
  font-size: 1.1em;
  top: -.05em;
}

/* Cons list */
.sb-list--cons li::before {
  content: '−';
  position: absolute;
  left: .2rem;
  color: var(--bad);
  font-weight: 900;
  font-size: 1.2em;
  top: -.1em;
}

/* Numbered steps */
.sb-list--steps {
  counter-reset: steps;
}
.sb-list--steps li {
  counter-increment: steps;
  padding-left: 2.75rem;
  padding-top: .25rem;
  padding-bottom: .25rem;
}
.sb-list--steps li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: .1em;
  width: 1.85rem;
  height: 1.85rem;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

ol.sb-list { list-style: none; }

/* ── CALLOUTS ────────────────────────────────────────────────────── */
.sb-callout {
  display: flex;
  gap: .875rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  font-size: .925rem;
  line-height: 1.65;
  border-left: 4px solid;
}
.sb-callout strong { display: block; font-weight: 700; margin-bottom: .25rem; font-size: .95rem; }

.sb-callout--info {
  background: var(--info-bg);
  border-color: var(--info);
  color: #1e3a8a;
}
.sb-callout--tip {
  background: var(--tip-bg);
  border-color: var(--tip);
  color: #14532d;
}
.sb-callout--warning {
  background: var(--warn-bg);
  border-color: var(--warn);
  color: #78350f;
}

/* ── PROS / CONS ─────────────────────────────────────────────────── */
.sb-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1rem 0;
}
@media (max-width: 580px) {
  .sb-pros-cons { grid-template-columns: 1fr; }
}

.sb-pros-cons__column {
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}
.sb-pros-cons__column--pros {
  background: var(--good-bg);
  border: 1px solid #bbf7d0;
}
.sb-pros-cons__column--cons {
  background: var(--bad-bg);
  border: 1px solid #fecaca;
}

.sb-pros-cons__title {
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .875rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.sb-pros-cons__column--pros .sb-pros-cons__title { color: var(--good); }
.sb-pros-cons__column--pros .sb-pros-cons__title::before {
  content: '✓';
  font-size: .9em;
}
.sb-pros-cons__column--cons .sb-pros-cons__title { color: var(--bad); }
.sb-pros-cons__column--cons .sb-pros-cons__title::before {
  content: '✗';
  font-size: .9em;
}

/* ── TABLES ──────────────────────────────────────────────────────── */
.sb-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin: 1.25rem 0 1.5rem;
}

.sb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 500px;
}

.sb-table__caption {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: left;
  padding: .625rem 1rem;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border);
  letter-spacing: .02em;
}

.sb-table__th {
  background: var(--text);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .75rem 1rem;
  text-align: left;
  white-space: nowrap;
}

.sb-table tbody tr { transition: background .1s; }
.sb-table tbody tr:nth-child(even) { background: var(--bg-muted); }
.sb-table tbody tr:hover { background: var(--brand-light); }

.sb-table__td {
  padding: .75rem 1rem;
  color: #334155;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
}
.sb-table tbody tr:last-child .sb-table__td { border-bottom: none; }

.sb-table__td--good {
  color: var(--good);
  font-weight: 600;
}
.sb-table__td--bad {
  color: var(--bad);
  font-weight: 600;
}
.sb-table__td--neutral {
  color: var(--warn);
  font-weight: 600;
}

/* ── ARTICLE FIGURES ─────────────────────────────────────────────── */
.sb-article-figure {
  margin: 2rem 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.sb-article-figure__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.sb-article-figure__caption {
  font-size: .78rem;
  color: var(--text-muted);
  text-align: center;
  padding: .625rem 1rem;
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  font-style: italic;
  line-height: 1.5;
}

/* ── BLOCKQUOTE ──────────────────────────────────────────────────── */
.sb-blockquote {
  position: relative;
  margin: 2rem 0;
  padding: 1.75rem 1.75rem 1.75rem 2.25rem;
  background: linear-gradient(135deg, var(--brand-light), #fdf8ff);
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  box-shadow: var(--shadow-sm);
}
.sb-blockquote::before {
  content: '\201C';
  position: absolute;
  top: -.25rem;
  left: .75rem;
  font-size: 4rem;
  color: var(--brand);
  opacity: .25;
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
}
.sb-blockquote p {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
  font-weight: 500;
  line-height: 1.7;
  margin-bottom: .75rem !important;
}
.sb-blockquote__footer {
  font-size: .82rem;
  color: var(--brand);
  font-weight: 700;
  font-style: normal;
}

/* ── CHECKLIST ───────────────────────────────────────────────────── */
.sb-checklist {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1rem 0;
}

.sb-checklist .sb-article-h3 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--brand);
  margin-top: 1.25rem;
  margin-bottom: .625rem;
}
.sb-checklist .sb-article-h3:first-child { margin-top: 0; }

.sb-checklist__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1rem;
}
.sb-checklist__item {
  font-size: .925rem;
  color: #334155;
  padding: .5rem .75rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  line-height: 1.55;
  cursor: default;
  display: flex;
  align-items: flex-start;
  gap: .625rem;
}

/* ── FAQ ─────────────────────────────────────────────────────────── */
.sb-faq {
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

.sb-faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.sb-faq__item[open] {
  box-shadow: 0 4px 20px rgba(107,24,212,.1);
  border-color: #d8b4fe;
}

.sb-faq__question {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  padding: 1rem 3.5rem 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: background .15s;
  line-height: 1.45;
}
.sb-faq__question::-webkit-details-marker { display: none; }
.sb-faq__question::after {
  content: '+';
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--brand);
  font-weight: 300;
  line-height: 1;
  transition: transform .25s;
}
.sb-faq__item[open] .sb-faq__question {
  background: var(--brand-light);
  color: var(--brand-dark);
}
.sb-faq__item[open] .sb-faq__question::after {
  content: '−';
  transform: translateY(-50%);
}

.sb-faq__answer {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.sb-faq__answer p {
  font-size: .925rem;
  color: #334155;
  line-height: 1.7;
  margin: 0;
}

/* ── SUMMARY SECTION ─────────────────────────────────────────────── */
.sb-summary {
  background: linear-gradient(135deg, #faf5ff, var(--bg));
  border: 1px solid #d8b4fe;
  border-radius: var(--radius-xl);
  padding: 1.75rem;
}
.sb-summary .sb-article-h2 { border-bottom-color: #d8b4fe; }

/* ── CTA ─────────────────────────────────────────────────────────── */
.sb-cta {
  margin: 3rem 0;
  background: linear-gradient(135deg, var(--brand) 0%, #4f0fa0 100%);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: 0 12px 40px rgba(107,24,212,.35);
  position: relative;
  overflow: hidden;
}
.sb-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='20' fill='none' stroke='rgba(255,255,255,.05)' stroke-width='1'/%3E%3C/svg%3E") 0 0 / 60px 60px;
  pointer-events: none;
}

.sb-cta__content { position: relative; z-index: 1; text-align: center; }

.sb-cta__title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.02em;
  margin-bottom: .75rem;
}

.sb-cta__text {
  font-size: .975rem;
  color: rgba(255,255,255,.85);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 1.75rem;
}

.sb-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
}

.sb-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .875rem 1.75rem;
  border-radius: var(--radius);
  font-size: .925rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
  letter-spacing: .01em;
}
.sb-cta__btn--primary {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.sb-cta__btn--primary:hover {
  background: var(--brand-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.sb-cta__btn--secondary {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.35);
}
.sb-cta__btn--secondary:hover {
  background: rgba(255,255,255,.22);
  transform: translateY(-1px);
}

/* ── ARTICLE FOOTER ──────────────────────────────────────────────── */
.sb-article-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.sb-article-footer__text {
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── LINKS ───────────────────────────────────────────────────────── */
.sb-link {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color .15s;
}
.sb-link:hover { color: var(--brand-dark); }

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .sb-blog-article { padding: 1.25rem 1rem 3rem; }
  .sb-cta { padding: 1.75rem 1.25rem; }
  .sb-cta__title { font-size: 1.25rem; }
  .sb-toc { padding: 1.25rem; }
  .sb-list--steps li { padding-left: 2.5rem; }
  .sb-pros-cons { gap: .875rem; }
  .sb-table { min-width: 400px; }
}

@media (min-width: 900px) {
  .sb-blog-article {
    padding: 3rem 2rem 5rem;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
}
