/* ══════════════════════════════════════
       BACK LINK
    ══════════════════════════════════════ */
    .post-back {
      max-width: 820px; margin: 0 auto; padding: 36px 24px 0;
    }
    .post-back a {
      display: inline-flex; align-items: center; gap: 6px;
      color: #64748b; font-size: 0.82rem; text-decoration: none;
      transition: color 0.2s;
    }
    .post-back a:hover { color: #a78bfa; }

    /* ══════════════════════════════════════
       POST HERO
    ══════════════════════════════════════ */
    .post-hero {
      max-width: 820px; margin: 0 auto; padding: 32px 24px 40px;
    }
    .post-hero-meta {
      display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
    }
    .post-cat-badge {
      font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
      text-transform: uppercase; padding: 4px 12px; border-radius: 999px;
    }
    .cat-crm       { background: rgba(59,130,246,0.12); color: #60a5fa; }
    .cat-sales     { background: rgba(34,197,94,0.12);  color: #4ade80; }
    .cat-product   { background: rgba(124,58,237,0.12); color: #a78bfa; }
    .cat-integrations { background: rgba(245,158,11,0.12); color: #fbbf24; }
    .cat-guides    { background: rgba(236,72,153,0.12); color: #f472b6; }

    .post-date, .post-readtime {
      font-size: 0.78rem; color: #475569;
    }
    .post-dot { color: #334155; }

    .post-title {
      font-family: 'Bricolage Grotesque', sans-serif;
      font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; color: #fff;
      line-height: 1.2; margin-bottom: 18px;
    }
    .post-subtitle {
      font-size: 1.1rem; color: #94a3b8; 
      line-height: 1.7; 
      margin-bottom: 28px;
    }

    .post-author-row {
      display: flex; align-items: center; gap: 12px;
      padding: 16px 0; border-top: 1px solid rgba(255,255,255,0.07); border-bottom: 1px solid rgba(255,255,255,0.07);
      margin-bottom: 36px;
    }
    .post-author-avatar {
      width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
      background: linear-gradient(135deg, #7c3aed, #3b82f6);
      display: flex; align-items: center; justify-content: center;
      font-size: 0.75rem; font-weight: 700; color: #fff;
    }
    .post-author-name { font-size: 0.88rem; font-weight: 600; color: #e2e8f0; }
    .post-author-role { font-size: 0.77rem; color: #475569; }

    .post-share-btns {
      display: flex; gap: 8px; margin-left: auto;
    }
    .post-share-btn {
      width: 32px; height: 32px; border-radius: 8px;
      background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
      display: flex; align-items: center; justify-content: center;
      color: #64748b; cursor: pointer; text-decoration: none;
      transition: all 0.2s;
    }
    .post-share-btn:hover { background: rgba(124,58,237,0.15); border-color: rgba(124,58,237,0.35); color: #a78bfa; }

    /* ══════════════════════════════════════
       COVER IMAGE / EMOJI
    ══════════════════════════════════════ */
    .post-cover {
      max-width: 820px; margin: 0 auto 40px; padding: 0 24px;
    }
    .post-cover-inner {
      width: 100%;
      border-radius: 20px; overflow: hidden;
      display: flex; align-items: center; justify-content: center;
      font-size: 5rem;
      background: linear-gradient(135deg, #0f0b2a, #1a1040);
      border: 1px solid rgba(255,255,255,0.07);
    }
    /* Fallback for emoji-only covers (no image) */
    .post-cover-inner:not(:has(img)) {
      aspect-ratio: 16/7;
      position: relative;
    }
    .post-cover-inner:not(:has(img))::before {
      content: '';
      position: absolute; inset: 0;
      background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(124,58,237,0.12), transparent);
    }

    /* ══════════════════════════════════════
       ARTICLE LAYOUT (content + sidebar)
    ══════════════════════════════════════ */
    .post-layout {
      max-width: 1100px; margin: 0 auto; padding: 0 24px 100px;
      display: grid; grid-template-columns: 1fr 280px; gap: 60px;
    }

    /* ── Article body ── */
    .post-content {
      color: #cbd5e1; font-size: 1rem; line-height: 1.85;
    }
    .post-content h2 {
      font-family: 'Bricolage Grotesque', sans-serif;
      font-size: 1.5rem; font-weight: 800; color: #fff;
      margin: 2.4em 0 0.8em; line-height: 1.25;
    }
    .post-content h3 {
      font-family: 'Bricolage Grotesque', sans-serif;
      font-size: 1.15rem; font-weight: 700; color: #e2e8f0;
      margin: 2em 0 0.7em;
    }
    .post-content p { margin-bottom: 1.4em; }
    .post-content a { color: #7c3aed; text-decoration: underline; text-underline-offset: 3px; }
    .post-content a:hover { color: #a78bfa; }
    .post-content ul, .post-content ol {
      padding-left: 1.5em; margin-bottom: 1.4em;
    }
    .post-content li { margin-bottom: 0.45em; }
    .post-content strong { color: #e2e8f0; font-weight: 600; }
    .post-content blockquote {
      border-left: 3px solid #7c3aed; margin: 0 0 1.6em;
      padding: 12px 20px; background: rgba(124,58,237,0.07); border-radius: 0 10px 10px 0;
      color: #94a3b8; font-style: italic;
    }
    .post-content hr {
      border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 2.5em 0;
    }
    .post-content img {
      width: 100%; border-radius: 12px; margin: 1.6em 0;
      border: 1px solid rgba(255,255,255,0.07);
    }
    .post-content pre {
      background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px; padding: 20px 24px; overflow-x: auto;
      font-size: 0.85rem; margin-bottom: 1.6em;
    }
    .post-content code {
      background: rgba(124,58,237,0.12); color: #a78bfa;
      padding: 2px 6px; border-radius: 5px; font-size: 0.88em;
    }
    .post-content pre code { background: transparent; color: #94a3b8; padding: 0; border-radius: 0; }

    /* callout box */
    .post-callout {
      background: rgba(59,130,246,0.07); border: 1px solid rgba(59,130,246,0.2);
      border-radius: 14px; padding: 18px 22px; margin-bottom: 1.6em;
      display: flex; gap: 14px;
    }
    .post-callout-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.6; }
    .post-callout-body { color: #94a3b8; font-size: 0.92rem; line-height: 1.65; }
    .post-callout-body p { margin: 0; }

    /* ── Sidebar ── */
    .post-sidebar {
      display: flex; flex-direction: column; gap: 28px;
      position: sticky;
      top: 90px;
      align-self: start;
      max-height: calc(100vh - 110px);
      overflow-y: auto;
      scrollbar-width: none;
    }
    .post-sidebar::-webkit-scrollbar { display: none; }

    .sidebar-card {
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 16px; padding: 22px;
    }
    .sidebar-card h4 {
      font-family: 'Bricolage Grotesque', sans-serif;
      font-size: 0.9rem; font-weight: 700; color: #e2e8f0;
      margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.05em;
    }

    /* TOC */
    .toc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
    .toc-item a {
      font-size: 0.82rem; color: #64748b; text-decoration: none;
      display: block; padding: 5px 10px; border-radius: 7px;
      border-left: 2px solid transparent;
      transition: all 0.2s;
    }
    .toc-item a:hover { color: #a78bfa; border-left-color: rgba(124,58,237,0.4); background: rgba(124,58,237,0.06); }
    .toc-item.active a { color: #a78bfa; border-left-color: #7c3aed; background: rgba(124,58,237,0.08); }

    /* Related posts */
    .related-list { display: flex; flex-direction: column; gap: 14px; }
    .related-item {
      display: flex; gap: 12px; align-items: flex-start;
      text-decoration: none; padding: 10px; border-radius: 10px;
      transition: background 0.2s;
    }
    .related-item:hover { background: rgba(255,255,255,0.04); }
    .related-thumb {
      width: 48px; height: 48px; border-radius: 8px; flex-shrink: 0;
      background: linear-gradient(135deg, #0f0b2a, #1a1040);
      display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
    }
    .related-info {}
    .related-title { font-size: 0.8rem; color: #cbd5e1; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
    .related-cat { font-size: 0.7rem; color: #475569; }

    /* CTA card */
    .sidebar-cta {
      background: linear-gradient(135deg, rgba(124,58,237,0.14), rgba(59,130,246,0.08));
      border: 1px solid rgba(124,58,237,0.25);
      border-radius: 16px; padding: 22px; text-align: center;
    }
    .sidebar-cta h4 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
    .sidebar-cta p { font-size: 0.8rem; color: #94a3b8; margin-bottom: 16px; line-height: 1.55; }
    .sidebar-cta .btn-demo {
      display: block; text-align: center; text-decoration: none;
      background: linear-gradient(135deg, #7c3aed, #3b82f6);
      color: #fff; font-size: 0.82rem; font-weight: 700;
      padding: 10px 16px; border-radius: 10px; transition: opacity 0.2s;
    }
    .sidebar-cta .btn-demo:hover { opacity: 0.88; }

    /* ── Post footer ── */
    .post-tags {
      display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; padding-top: 32px;
      border-top: 1px solid rgba(255,255,255,0.07);
    }
    .post-tag {
      padding: 5px 14px; border-radius: 999px;
      background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
      font-size: 0.75rem; color: #64748b;
    }

    /* ══════════════════════════════════════
       RESPONSIVE
    ══════════════════════════════════════ */
    @media (max-width: 900px) {
      .post-layout { grid-template-columns: 1fr; gap: 40px; }
      .post-sidebar { order: -1; position: static; max-height: none; overflow-y: visible; }
      .sidebar-card:not(.sidebar-cta) { display: none; } /* hide TOC/related on mobile, keep CTA */
      .sidebar-cta { display: block; }
    }
    @media (max-width: 600px) {
      .post-title { font-size: 1.7rem; }
      .post-share-btns { display: none; }
    }
