/* ============================================================
   LLMS Wrangler — Blog Post Single Styles
   ============================================================ */

/* ─── BREADCRUMB ─────────────────────────────────────── */

.breadcrumb-wrap {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 75px 0 10px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}

.breadcrumb a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--brand-light);
}

.breadcrumb-sep {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.breadcrumb-current {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

/* ─── PAGE LAYOUT ────────────────────────────────────── */

.post-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: start;
  padding-top: 56px;
  padding-bottom: 96px;
}

/* ─── ARTICLE HEADER ─────────────────────────────────── */

.post-header-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width:767px) {
  .post-header-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.post-article {
  min-width: 0;
}

.post-header {
  margin-top: 48px;
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.post-dot {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.post-date,
.post-read {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 500;
}

.post-title {
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
  color: var(--text);
}

.post-title code {
  font-size: 0.85em;
  background: rgba(124,58,237,0.15);
  color: var(--brand-light);
  padding: 3px 10px;
  border-radius: 6px;
  font-family: var(--mono);
}

.post-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 28px;
}

.post-intro p {
  margin: 0;
}

.post-header-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.post-author-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.author-avatar--lg {
  width: 40px;
  height: 40px;
  font-size: 0.75rem;
}

.author-avatar--xl {
  width: 56px;
  height: 56px;
  font-size: 0.9rem;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.author-role {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.post-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn svg {
  flex-shrink: 0;
}

.action-btn:hover {
  color: var(--brand-light);
  border-color: rgba(124,58,237,0.35);
  background: rgba(124,58,237,0.07);
}

/* ─── POST TAGS ──────────────────────────────────────── */

.post-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: opacity 0.2s;
}

.post-tag:hover { opacity: 0.75; }

.post-tag--tutorial   { 
  /* background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3); */
  color: var(--brand);
}
.post-tag--update     { background: rgba(6,182,212,0.12);   color: var(--accent-light); border: 1px solid rgba(6,182,212,0.3); }
.post-tag--ai         { background: rgba(34,197,94,0.1);    color: #86efac;             border: 1px solid rgba(34,197,94,0.25); }
.post-tag--wordpress  { background: rgba(244,63,94,0.1);    color: #fda4af;             border: 1px solid rgba(244,63,94,0.25); }
.post-tag--case-study { background: rgba(251,191,36,0.1);   color: #fde68a;             border: 1px solid rgba(251,191,36,0.25); }

/* ─── ARTICLE BODY TYPOGRAPHY ────────────────────────── */

.post-body {
  font-size: 1.0125rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.post-body > * + * {
  margin-top: 1.5em;
}

.post-body h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin-top: 2.5em;
  margin-bottom: -0.5em;
  scroll-margin-top: 96px;
}

.post-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-top: 2em;
  margin-bottom: -0.5em;
  scroll-margin-top: 96px;
}

.post-body p {
  color: var(--text-muted);
}

.post-body strong {
  color: var(--text);
  font-weight: 700;
}

.post-body a {
  color: var(--brand-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--brand-light);
  transition: text-decoration-color 0.2s;
}

.post-body a:hover {
  text-decoration-color: var(--brand-light);
}

.post-body code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: rgba(0, 0, 0, 0.07);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 5px;
}

.post-body pre {
  background: #0f0f17;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 24px;
  overflow-x: auto;
  margin: 2em 0;
}

.post-body pre code {
  background: none;
  padding: 0;
  font-size: 0.83rem;
  line-height: 1.9;
  color: var(--text-muted);
}

.post-body ul,
.post-body ol {
  padding-left: 1.5em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.post-body ul li { list-style: disc; }
.post-body ol li { list-style: decimal; }

.post-body li::marker {
  color: var(--brand-light);
}

/* Blockquote */

.post-body blockquote {
  border-left: 3px solid var(--brand);
  padding: 20px 28px;
  background: rgba(6, 182, 212, 0.12);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 2em 0;
}

.post-body blockquote p {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.7;
}

.post-body blockquote cite {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-style: normal;
  font-weight: 600;
}

/* Images */

.post-body img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  display: block;
}

.post-body figure {
  margin: 2em 0;
}

.post-body figcaption {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 10px;
}

.post-featured-image {
  margin-bottom: 48px;
}

.post-featured-image img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}

/* WP Table */
.wp-block-table th {
  text-align: left;
  background: var(--bg-card);
}

/* WP blocks: code block */

.wp-block-code,
.post-body .code-block {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 2em 0;
}

.wp-block-code code {
  font-family: var(--mono);
  font-size: 0.83rem;
  line-height: 1.9;
  background: #0f0f17;
  padding: 24px;
  display: block;
  overflow-x: auto;
  color: var(--text-muted);
}

/* Callouts (via wp:group or shortcode) */

.callout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 2em 0;
}

.callout--tip {
  background: rgba(34,197,94,0.07);
  border: 1px solid rgba(34,197,94,0.2);
}

.callout--warning {
  background: rgba(251,191,36,0.07);
  border: 1px solid rgba(251,191,36,0.2);
}

.callout--info {
  background: rgba(6,182,212,0.07);
  border: 1px solid rgba(6,182,212,0.2);
}

.callout--cta {
  background: linear-gradient(135deg, rgba(124,58,237,0.12) 0%, rgba(6,182,212,0.06) 100%);
  border: 1px solid rgba(124,58,237,0.3);
  text-decoration: none;
  display: flex;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.callout--cta:hover {
  border-color: rgba(124,58,237,0.55);
  background: linear-gradient(135deg, rgba(124,58,237,0.18) 0%, rgba(6,182,212,0.1) 100%);
}

.callout-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.callout-body strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.callout-body span {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.callout-arrow {
  color: var(--brand-light);
  font-size: 1.1rem;
  align-self: center;
  flex-shrink: 0;
}

/* Info grid */

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 2em 0;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
}

.info-card-name {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-light);
  margin-bottom: 8px;
}

.info-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ─── ARTICLE FOOTER ─────────────────────────────────── */

.post-footer {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.post-tags,
.post-share {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.post-tag-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.share-btn {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: none;
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn:hover {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--brand);
}

/* ─── AUTHOR BIO ─────────────────────────────────────── */

.author-bio {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 48px;
  padding: 32px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.author-bio-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.author-bio-content .author-name {
  font-size: 1rem;
  font-weight: 800;
}

.author-bio-content .author-role {
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.author-bio-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* ─── PREV / NEXT NAV ────────────────────────────────── */

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.25s, background 0.25s;
}

.post-nav-item:hover {
  border-color: rgba(124,58,237,0.35);
  background: rgba(124,58,237,0.05);
}

.post-nav-item--next {
  text-align: right;
  align-items: flex-end;
}

.post-nav-dir {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-light);
}

.post-nav-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  max-width: 280px;
}

/* ─── SIDEBAR ────────────────────────────────────────── */

.post-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
}

.sidebar-widget-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}

/* Sidebar hidden when empty TOC */

#toc-widget:has(#post-toc:empty) {
  display: none;
}

/* Table of Contents */

.toc {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-item {
  display: block;
  font-size: 0.83rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all 0.18s;
  line-height: 1.4;
}

.toc-item:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border-left-color: var(--border-strong);
}

.toc-item--active {
  color: var(--brand-light);
  background: rgba(6, 182, 212, 0.1);
  border-left-color: var(--brand-light);
  font-weight: 600;
}

/* Related Posts */

.related-posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.related-post {
  display: block;
  /* display: flex;
  flex-direction: column;
  gap: 7px; */
  text-decoration: none;
  transition: opacity 0.2s;
}

.related-post:hover {
  opacity: 0.8;
}

.related-post-title {
  display: block;
  font-size: 0.855rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

/* Sidebar CTA */

.sidebar-widget--cta {
  background: rgba(6 182 212 / .1);
  border: 1px solid rgb(6 182 212);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.sidebar-cta-icon {
  font-size: 1.8rem;
  color: var(--brand-light);
  line-height: 1;
  margin-bottom: 4px;
}

.sidebar-cta-icon img {
  width: 100px;
}

.sidebar-widget--cta h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.sidebar-widget--cta p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 4px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.sidebar-cta-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  margin-top: 4px;
  transition: color 0.2s;
}

.sidebar-cta-link:hover {
  color: var(--brand-light);
}

/* ─── RESPONSIVE ─────────────────────────────────────── */

@media (max-width: 960px) {
  .post-main {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .post-sidebar {
    position: static;
    margin-top: 56px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .sidebar-widget--cta {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .post-main {
    padding-top: 36px;
    padding-bottom: 64px;
  }

  .post-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar-widget--cta {
    grid-column: span 1;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-item--next {
    text-align: left;
    align-items: flex-start;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .author-bio {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }

  .post-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-header-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .post-title {
    font-size: 1.6rem;
  }

  .breadcrumb-current {
    max-width: 160px;
  }
}
