/*
 * WebElders — Single Post Styles
 * Enqueue via functions.php (see instructions below)
 * Brand tokens scraped live from webelders.com
 */

/* ── TOKENS ────────────────────────────────────────────────────── */
:root {
  --we-p:   #7B2FBE;
  --we-pd:  #5A1E96;
  --we-pl:  #EDE6FF;
  --we-bg:  #F4F2F9;
  --we-tx:  #0D0B12;
  --we-mu:  #5B567A;
  --we-br:  #E0DBF0;
  --we-wh:  #ffffff;
  --we-dk:  #110C29;
  --we-fh:  'Outfit', sans-serif;
  --we-fb:  'Inter', sans-serif;
}

/* ── PROGRESS BAR ──────────────────────────────────────────────── */
.we-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--we-p);
  z-index: 9999;
  transition: width .1s linear;
  pointer-events: none;
}

/* ── OUTER WRAP ────────────────────────────────────────────────── */
.we-single-wrap {
  background: var(--we-bg);
}
.we-single-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 56px 5% 100px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  align-items: start;
}

/* ── BREADCRUMB ────────────────────────────────────────────────── */
.we-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--we-mu);
  margin-bottom: 24px;
  font-family: var(--we-fb);
}
.we-breadcrumb a { color: var(--we-mu); text-decoration: none; }
.we-breadcrumb a:hover { color: var(--we-p); }
.we-bc-sep { color: var(--we-br); }

/* ── ARTICLE HEADER ────────────────────────────────────────────── */
.we-art-header { margin-bottom: 32px; }

.we-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--we-p);
  background: var(--we-pl);
  padding: 5px 14px;
  border-radius: 30px;
  margin-bottom: 18px;
  font-family: var(--we-fh);
  text-decoration: none;
}
.we-cat-pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--we-p);
  flex-shrink: 0;
}
.we-cat-pill:hover { background: var(--we-p); color: var(--we-wh); }

.we-art-title {
  font-family: var(--we-fh) !important;
  font-size: clamp(28px, 4vw, 46px) !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  letter-spacing: -.03em !important;
  color: var(--we-tx) !important;
  margin-bottom: 20px !important;
}

.we-art-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--we-mu);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--we-br);
  font-family: var(--we-fb);
}
.we-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.we-meta-item svg {
  width: 14px; height: 14px;
  flex-shrink: 0;
  stroke: currentColor;
}
.we-meta-dot { color: var(--we-br); }

/* ── FEATURED IMAGE ────────────────────────────────────────────── */
.we-feat-img {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  aspect-ratio: 16 / 7;
  background: var(--we-pl);
}
.we-feat-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.we-feat-img--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--we-pl) 0%, rgba(123,47,190,.15) 100%);
  font-family: var(--we-fh);
  font-size: 64px;
  font-weight: 800;
  color: rgba(123, 47, 190, .12);
  letter-spacing: -.05em;
}

/* ── ARTICLE BODY ──────────────────────────────────────────────── */
.we-art-body {
  font-family: var(--we-fb);
  font-size: 17px;
  line-height: 1.78;
  color: var(--we-tx);
}
.we-art-body p { margin-bottom: 22px; }
.we-art-body a { color: var(--we-p); }
.we-art-body a:hover { text-decoration: underline; }
.we-art-body strong { color: var(--we-tx); }

/* Headings */
.we-art-body h2 {
  font-family: var(--we-fh) !important;
  font-size: clamp(22px, 2.5vw, 30px) !important;
  font-weight: 700 !important;
  letter-spacing: -.02em !important;
  color: var(--we-tx) !important;
  margin: 52px 0 16px !important;
  line-height: 1.2 !important;
}
.we-art-body h3 {
  font-family: var(--we-fh) !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  color: var(--we-tx) !important;
  margin: 36px 0 12px !important;
  line-height: 1.3 !important;
}
.we-art-body h4 {
  font-family: var(--we-fh) !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  color: var(--we-tx) !important;
  margin: 24px 0 8px !important;
}

/* Lists */
.we-art-body ul,
.we-art-body ol {
  padding-left: 22px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.we-art-body li { font-size: 16px; line-height: 1.68; }

/* Blockquote */
.we-art-body blockquote {
  border-left: 4px solid var(--we-p) !important;
  background: var(--we-pl) !important;
  border-radius: 0 10px 10px 0 !important;
  padding: 20px 24px !important;
  margin: 28px 0 !important;
  font-style: italic !important;
  color: var(--we-mu) !important;
  font-size: 17px !important;
  line-height: 1.7 !important;
}

/* Inline code */
.we-art-body code {
  background: rgba(123, 47, 190, .08) !important;
  border: 1px solid var(--we-br) !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  font-size: 14px !important;
  font-family: monospace !important;
  color: var(--we-p) !important;
}

/* Code block */
.we-art-body pre {
  background: var(--we-dk) !important;
  border-radius: 10px !important;
  padding: 22px 24px !important;
  margin: 24px 0 !important;
  overflow-x: auto !important;
  font-family: monospace !important;
  font-size: 14px !important;
  color: #C4A0F5 !important;
  line-height: 1.65 !important;
}
.we-art-body pre code {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: inherit !important;
}

/* Tables */
.we-art-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15px;
  overflow-x: auto;
  display: block;
}
.we-art-body th {
  background: var(--we-p);
  color: var(--we-wh);
  font-family: var(--we-fh);
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
}
.we-art-body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--we-br);
  font-size: 14px;
  vertical-align: top;
}
.we-art-body tr:nth-child(even) td { background: var(--we-bg); }
.we-art-body tr:last-child td { border-bottom: none; }

/* Images in content */
.we-art-body img {
  max-width: 100%;
  border-radius: 10px;
  margin: 24px 0;
}

/* ── INLINE CTA ────────────────────────────────────────────────── */
.we-inline-cta {
  background: var(--we-p);
  border-radius: 16px;
  padding: 40px;
  margin: 52px 0;
  text-align: center;
}
.we-inline-cta h3 {
  font-family: var(--we-fh);
  font-size: 24px;
  font-weight: 700;
  color: var(--we-wh);
  margin-bottom: 10px;
}
.we-inline-cta p {
  color: rgba(255, 255, 255, .75);
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.65;
}
.we-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--we-wh);
  color: var(--we-p);
  font-weight: 700;
  font-size: 14px;
  padding: 13px 28px;
  border-radius: 6px;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  font-family: var(--we-fb);
}
.we-wa-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  color: var(--we-p);
  text-decoration: none;
}
.we-wa-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── ARTICLE FOOTER ────────────────────────────────────────────── */
.we-art-footer {
  margin-top: 52px;
  padding-top: 32px;
  border-top: 1px solid var(--we-br);
}

/* Tags */
.we-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.we-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--we-p);
  background: var(--we-pl);
  padding: 5px 14px;
  border-radius: 30px;
  text-decoration: none;
  transition: background .15s, color .15s;
  font-family: var(--we-fb);
}
.we-tag:hover { background: var(--we-p); color: var(--we-wh); }

/* Share */
.we-share {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.we-share-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--we-mu);
  font-family: var(--we-fb);
}
.we-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1.5px solid var(--we-br);
  color: var(--we-mu);
  background: var(--we-wh);
  text-decoration: none;
  transition: border-color .15s, color .15s;
  font-family: var(--we-fb);
}
.we-share-btn:hover { border-color: var(--we-p); color: var(--we-p); text-decoration: none; }
.we-share-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Author box */
.we-author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--we-wh);
  border: 1px solid var(--we-br);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 32px;
}
.we-author-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--we-pl);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--we-fh);
  font-size: 22px; font-weight: 700;
  color: var(--we-p);
  flex-shrink: 0;
}
.we-author-name {
  font-family: var(--we-fh);
  font-size: 16px; font-weight: 700;
  color: var(--we-tx);
  margin-bottom: 4px;
}
.we-author-bio { font-size: 14px; color: var(--we-mu); line-height: 1.65; }

/* Post navigation */
.we-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 48px;
}
.we-pnav-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--we-wh);
  border: 1px solid var(--we-br);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.we-pnav-item:hover {
  border-color: var(--we-p);
  box-shadow: 0 4px 16px rgba(123, 47, 190, .1);
}
.we-pnav-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--we-mu);
  font-family: var(--we-fb);
}
.we-pnav-title {
  font-family: var(--we-fh);
  font-size: 14px;
  font-weight: 600;
  color: var(--we-tx);
  line-height: 1.35;
}
.we-pnav-next { text-align: right; }

/* Related posts */
.we-related { margin-top: 12px; }
.we-related-title {
  font-family: var(--we-fh);
  font-size: 22px;
  font-weight: 700;
  color: var(--we-tx);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--we-br);
}
.we-related-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.we-related-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--we-wh);
  border: 1px solid var(--we-br);
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.we-related-card:hover {
  border-color: var(--we-p);
  box-shadow: 0 4px 16px rgba(123, 47, 190, .1);
}
.we-rel-img {
  width: 80px; height: 60px;
  border-radius: 8px;
  background: var(--we-pl);
  flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--we-fh);
  font-size: 18px; font-weight: 700;
  color: rgba(123, 47, 190, .2);
}
.we-rel-img img { width: 100%; height: 100%; object-fit: cover; }
.we-rel-cat {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--we-p); margin-bottom: 4px;
  font-family: var(--we-fh);
}
.we-rel-title {
  font-family: var(--we-fh);
  font-size: 14px; font-weight: 600;
  color: var(--we-tx); line-height: 1.35;
  margin-bottom: 3px;
}
.we-rel-date { font-size: 12px; color: var(--we-mu); }

/* ── SIDEBAR ───────────────────────────────────────────────────── */
.we-sidebar { position: sticky; top: 96px; }

/* TOC */
.we-toc {
  background: var(--we-wh);
  border: 1px solid var(--we-br);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
.we-toc-title {
  font-family: var(--we-fh);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--we-tx);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--we-br);
}
.we-toc-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.we-toc-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--we-mu);
  padding: 5px 8px;
  border-radius: 6px;
  text-decoration: none;
  line-height: 1.4;
  transition: background .15s, color .15s;
  font-family: var(--we-fb);
}
.we-toc-link::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--we-br);
  flex-shrink: 0;
  margin-top: 6px;
}
.we-toc-link:hover,
.we-toc-link.active {
  background: var(--we-pl);
  color: var(--we-p);
  text-decoration: none;
}
.we-toc-link.active::before { background: var(--we-p); }
.we-toc-h3 { padding-left: 20px; }

/* Sidebar CTA */
.we-sidebar-cta {
  background: var(--we-p);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 24px;
}
.we-sidebar-cta h3 {
  font-family: var(--we-fh);
  font-size: 18px !important; font-weight: 700;
  color: var(--we-wh) !important;
  margin-bottom: 8px; line-height: 1.3;
}
.we-sidebar-cta p {
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  margin-bottom: 20px; line-height: 1.6;
}
.we-sidebar-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--we-wh);
  color: var(--we-p);
  font-weight: 700; font-size: 13px;
  padding: 11px 20px;
  border-radius: 6px;
  text-decoration: none;
  transition: transform .15s;
  font-family: var(--we-fb);
}
.we-sidebar-wa:hover { transform: translateY(-1px); text-decoration: none; color: var(--we-p); }
.we-sidebar-wa svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Sidebar recent */
.we-sidebar-recent {
  background: var(--we-wh);
  border: 1px solid var(--we-br);
  border-radius: 16px;
  padding: 24px;
}
.we-sidebar-recent-title {
  font-family: var(--we-fh);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--we-tx);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--we-br);
}
.we-recent-item {
  display: flex;
  gap: 12px; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--we-br);
  text-decoration: none;
  color: inherit;
  transition: color .15s;
}
.we-recent-item:last-child { border-bottom: none; padding-bottom: 0; }
.we-recent-item:hover .we-recent-title { color: var(--we-p); }
.we-recent-num {
  font-family: var(--we-fh);
  font-size: 18px; font-weight: 800;
  color: var(--we-pl);
  min-width: 28px;
}
.we-recent-body { display: flex; flex-direction: column; gap: 3px; }
.we-recent-title {
  font-size: 13px; font-weight: 600;
  color: var(--we-tx); line-height: 1.35;
  transition: color .15s;
}
.we-recent-date { font-size: 11px; color: var(--we-mu); }

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .we-single-inner { grid-template-columns: 1fr; gap: 48px; }
  .we-sidebar { position: static; }
}
@media (max-width: 640px) {
  .we-single-inner { padding: 36px 5% 64px; }
  .we-post-nav { grid-template-columns: 1fr; }
  .we-pnav-next { text-align: left; }
  .we-author-box { flex-direction: column; }
  .we-inline-cta { padding: 28px 20px; }
}
