/* ═══════════════════════════════════════════════
   Planify Blog Template — Single Post Stylesheet
   Prefixed with .planify-blog-single / pb-
   ═══════════════════════════════════════════════ */

/* ── Design tokens ── */
:root {
  --pb-pk9:#C0236E;--pb-pk8:#D62E7D;--pb-pk7:#E7358A;--pb-pk6:#EA539B;--pb-pk5:#EE72AD;
  --pb-pk4:#F290BF;--pb-pk3:#F5AED0;--pb-pk2:#F9CCE2;--pb-pk1:#FCEAF3;--pb-pk0:#FEF5F9;
  --pb-nv9:#1D3D67;--pb-nv8:#345076;--pb-nv7:#4A6485;--pb-nv6:#617795;--pb-nv5:#778BA4;
  --pb-nv4:#8E9EB3;--pb-nv3:#A5B1C2;--pb-nv2:#BBC5D1;--pb-nv1:#D2D8E1;--pb-nv0:#E8ECF0;
  --pb-bl7:#0B84FF;--pb-bl5:#54A9FF;--pb-bl0:#E7F3FF;
  --pb-gr7:#22C55E;--pb-gr1:#DCFCE7;
  --pb-or7:#F97316;--pb-or1:#FFF7ED;
  --pb-pu7:#A855F7;--pb-pu1:#FAF5FF;
  --pb-logo:linear-gradient(135deg,#E7358A 0%,#EF66A8 50%,#FFA9D1 100%);
  --pb-f:'Poppins',system-ui,sans-serif;
  --pb-rs:6px;--pb-rm:10px;--pb-rl:16px;--pb-rx:24px;--pb-rf:9999px;
}

/* ── Body-level reset for single posts ── */
body.planify-blog-single {
  font-family: var(--pb-f);
  color: var(--pb-nv9);
  background: #F7F8FA;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══ HERO HEADER ═══ */
.pb-post-hero {
  background: #fff;
  border-bottom: 1px solid var(--pb-nv0);
  padding: 48px 40px 40px;
}
.pb-post-hero-inner {
  max-width: 820px;
  margin: 0 auto;
}

/* Breadcrumb */
.pb-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--pb-nv4);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.pb-breadcrumb a {
  color: var(--pb-nv5);
  text-decoration: none;
  transition: color .15s;
}
.pb-breadcrumb a:hover { color: var(--pb-pk7); }
.pb-breadcrumb .sep { color: var(--pb-nv2); }
.pb-breadcrumb .current {
  color: var(--pb-nv9);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

/* Category badges */
.pb-post-cats {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.pb-post-cat {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--pb-rf);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity .15s;
}
.pb-post-cat:hover { opacity: .85; }
.pb-post-cat.diy     { background: var(--pb-pk1); color: var(--pb-pk7); }
.pb-post-cat.seller  { background: var(--pb-or1); color: var(--pb-or7); }
.pb-post-cat.general { background: var(--pb-bl0); color: var(--pb-bl7); }

/* Title */
body.planify-blog-single .pb-post-title {
  font-size: clamp(28px, 3.5vw, 42px) !important;
  font-weight: 900 !important;
  color: var(--pb-nv9) !important;
  line-height: 1.1 !important;
  letter-spacing: -.5px !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  border: none !important;
  font-family: var(--pb-f) !important;
}

/* Meta row */
.pb-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--pb-nv4);
  font-weight: 500;
  flex-wrap: wrap;
}
.pb-meta-dot { color: var(--pb-nv2); }
.pb-reading-time { display: flex; align-items: center; gap: 4px; }

/* ═══ FEATURED IMAGE ═══ */
.pb-post-featured {
  max-width: 820px;
  margin: -20px auto 0;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}
.pb-post-featured img {
  border-radius: var(--pb-rl);
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border: 1px solid var(--pb-nv0);
  box-shadow: 0 8px 40px rgba(29,61,103,.08);
}

/* ═══ MAIN LAYOUT ═══ */
.pb-post-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 60px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

/* ═══ ARTICLE CONTENT CARD ═══ */
.pb-post-content {
  background: #fff;
  border: 1px solid var(--pb-nv0);
  border-radius: var(--pb-rl);
  padding: 40px 44px;
  box-shadow: 0 2px 12px rgba(29,61,103,.03);
  min-width: 0; /* prevent grid blowout */
}

/* ── Entry content typography ── */
/* !important overrides Astra theme global heading styles */
body.planify-blog-single .pb-entry-content h1,
body.planify-blog-single .pb-entry-content h2,
body.planify-blog-single .pb-entry-content h3,
body.planify-blog-single .pb-entry-content h4,
body.planify-blog-single .pb-entry-content h5,
body.planify-blog-single .pb-entry-content h6 {
  font-family: var(--pb-f) !important;
  letter-spacing: -.3px !important;
}
body.planify-blog-single .pb-entry-content h2 {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: var(--pb-nv9) !important;
  margin: 36px 0 14px !important;
  line-height: 1.25 !important;
  padding-top: 20px !important;
  border-top: 1px solid var(--pb-nv0) !important;
}
body.planify-blog-single .pb-entry-content h2:first-child {
  border-top: none !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}
body.planify-blog-single .pb-entry-content h3 {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: var(--pb-nv8) !important;
  margin: 28px 0 10px !important;
  line-height: 1.3 !important;
}
body.planify-blog-single .pb-entry-content h4 {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--pb-nv9) !important;
  margin: 24px 0 8px !important;
  line-height: 1.35 !important;
}
body.planify-blog-single .pb-entry-content p {
  font-size: 15px !important;
  color: var(--pb-nv6) !important;
  line-height: 1.72 !important;
  margin-bottom: 16px !important;
}
body.planify-blog-single .pb-entry-content a {
  color: var(--pb-pk7) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  border-bottom: 2px solid var(--pb-pk2) !important;
  transition: border-color .15s !important;
}
body.planify-blog-single .pb-entry-content a:hover {
  border-bottom-color: var(--pb-pk7) !important;
}
body.planify-blog-single .pb-entry-content strong {
  color: var(--pb-nv9) !important;
  font-weight: 700 !important;
}
body.planify-blog-single .pb-entry-content img {
  border-radius: var(--pb-rm) !important;
  margin: 20px 0 !important;
  border: 1px solid var(--pb-nv0) !important;
  height: auto !important;
}
.pb-entry-content .wp-block-image {
  margin: 20px 0;
}
.pb-entry-content .wp-block-image img {
  margin: 0;
}
.pb-entry-content figcaption,
.pb-entry-content .wp-element-caption {
  font-size: 12px;
  color: var(--pb-nv4);
  text-align: center;
  margin-top: 8px;
  margin-bottom: 20px;
}
body.planify-blog-single .pb-entry-content ul,
body.planify-blog-single .pb-entry-content ol {
  padding-left: 20px !important;
  margin-bottom: 16px !important;
}
body.planify-blog-single .pb-entry-content li {
  font-size: 15px !important;
  color: var(--pb-nv6) !important;
  line-height: 1.72 !important;
  margin-bottom: 8px !important;
}
body.planify-blog-single .pb-entry-content blockquote {
  background: var(--pb-pk0) !important;
  border-left: 4px solid var(--pb-pk7) !important;
  border-right: none !important;
  border-top: none !important;
  border-bottom: none !important;
  border-radius: 0 var(--pb-rm) var(--pb-rm) 0 !important;
  padding: 18px 22px !important;
  margin: 24px 0 !important;
  font-size: 14px !important;
  color: var(--pb-pk9) !important;
  font-weight: 500 !important;
}
body.planify-blog-single .pb-entry-content blockquote p {
  color: var(--pb-pk9) !important;
  margin-bottom: 0 !important;
}

/* Responsive video embeds */
.pb-entry-content .wp-block-embed,
.pb-entry-content iframe {
  max-width: 100%;
  border-radius: var(--pb-rm);
  margin: 20px 0;
}
.pb-entry-content .wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--pb-rm);
}
.pb-entry-content .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--pb-rm);
  margin: 0;
}

/* ── Table of Contents (in-article) ── */
.pb-toc-box {
  background: var(--pb-pk0);
  border: 1px solid var(--pb-pk2);
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 32px;
}
.pb-toc-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--pb-pk7);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pb-toc-box ol {
  padding-left: 18px;
  margin-bottom: 0;
}
.pb-toc-box li {
  font-size: 13px;
  color: var(--pb-nv6);
  line-height: 1.6;
  margin-bottom: 4px;
}
.pb-toc-box li a {
  color: var(--pb-nv6);
  font-weight: 500;
  border: none;
  transition: color .12s;
}
.pb-toc-box li a:hover {
  color: var(--pb-pk7);
  border: none;
}

/* ── Inline CTA (shortcode) ── */
.pb-cta-inline {
  background: linear-gradient(135deg, #1D3D67 0%, #345076 100%);
  border-radius: var(--pb-rl);
  padding: 28px 32px;
  margin: 32px 0;
  display: flex;
  align-items: center;
  gap: 20px;
}
.pb-cta-inline-text { flex: 1; }
.pb-cta-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--pb-pk4);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 4px;
}
.pb-cta-inline-text h3 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.2;
  border: none;
  padding: 0;
}
.pb-cta-inline-text p {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  line-height: 1.5;
  margin: 0;
}
.pb-btn-cta {
  height: 40px;
  padding: 0 22px;
  border-radius: var(--pb-rm);
  background: var(--pb-pk7);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 14px rgba(231,53,138,.35);
  flex-shrink: 0;
  text-decoration: none;
  transition: background .15s;
}
.pb-btn-cta:hover { background: var(--pb-pk8); color: #fff; }

/* ── Post footer (tags + share) ── */
.pb-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--pb-nv0);
  margin-top: 32px;
  flex-wrap: wrap;
  gap: 12px;
}
.pb-post-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pb-post-tags a {
  font-size: 11px;
  font-weight: 600;
  color: var(--pb-nv5);
  background: var(--pb-nv0);
  padding: 4px 12px;
  border-radius: var(--pb-rf);
  transition: all .15s;
  text-decoration: none;
  border: none;
}
.pb-post-tags a:hover {
  background: var(--pb-pk1);
  color: var(--pb-pk7);
}
.pb-post-share {
  display: flex;
  gap: 8px;
}
.pb-share-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--pb-rm);
  border: 1px solid var(--pb-nv0);
  background: #fff;
  color: var(--pb-nv5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  padding: 0;
}
.pb-share-btn:hover {
  border-color: var(--pb-pk3);
  color: var(--pb-pk7);
  background: var(--pb-pk0);
}
.pb-share-btn.copied {
  border-color: var(--pb-gr7);
  color: var(--pb-gr7);
  background: var(--pb-gr1);
}

/* ═══ SIDEBAR ═══ */
.pb-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Sidebar: Author */
.pb-sb-author {
  background: #fff;
  border: 1px solid var(--pb-nv0);
  border-radius: var(--pb-rl);
  padding: 24px;
  text-align: center;
}
.pb-sb-author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.pb-sb-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.pb-sb-author-name { font-size: 14px; font-weight: 800; color: var(--pb-nv9); margin-bottom: 2px; }
.pb-sb-author-role { font-size: 11.5px; color: var(--pb-nv5); margin-bottom: 12px; }
.pb-sb-author-bio  { font-size: 12px; color: var(--pb-nv5); line-height: 1.55; margin: 0; }

/* Sidebar: Related / Section */
.pb-sb-section {
  background: #fff;
  border: 1px solid var(--pb-nv0);
  border-radius: var(--pb-rl);
  padding: 20px;
}
.pb-sb-section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--pb-nv4);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pb-sb-section-title .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--pb-pk7);
  display: inline-block;
}
.pb-sb-post {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--pb-nv0);
  transition: all .15s;
  text-decoration: none;
}
.pb-sb-post:last-child { border-bottom: none; padding-bottom: 0; }
.pb-sb-post:hover .pb-sb-post-title { color: var(--pb-pk7); }
.pb-sb-post-img {
  width: 64px;
  height: 48px;
  border-radius: var(--pb-rs);
  background: var(--pb-nv0);
  flex-shrink: 0;
  overflow: hidden;
}
.pb-sb-post-img img { width: 100%; height: 100%; object-fit: cover; }
.pb-sb-post-info { flex: 1; min-width: 0; }
.pb-sb-post-cat {
  font-size: 9px;
  font-weight: 700;
  color: var(--pb-pk7);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.pb-sb-post-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--pb-nv9);
  line-height: 1.35;
  transition: color .15s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pb-sb-post-meta { font-size: 10px; color: var(--pb-nv4); margin-top: 3px; }

/* Sidebar: TOC sticky */
.pb-sb-toc {
  background: #fff;
  border: 1px solid var(--pb-nv0);
  border-radius: var(--pb-rl);
  padding: 20px;
}
.pb-sb-toc-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--pb-nv4);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 12px;
}
.pb-sb-toc ol { padding-left: 16px; margin: 0; }
.pb-sb-toc li {
  font-size: 12px;
  color: var(--pb-nv5);
  margin-bottom: 5px;
  line-height: 1.45;
}
.pb-sb-toc li a {
  color: var(--pb-nv5);
  transition: color .12s;
  font-weight: 500;
  text-decoration: none;
}
.pb-sb-toc li a:hover { color: var(--pb-pk7); }
.pb-sb-toc li.active a {
  color: var(--pb-pk7);
  font-weight: 700;
}

/* Sidebar: Newsletter */
.pb-sb-newsletter {
  background: linear-gradient(135deg, #1D3D67, #2A5280);
  border-radius: var(--pb-rl);
  padding: 24px;
  color: #fff;
}
.pb-sb-nl-title { font-size: 16px; font-weight: 800; margin-bottom: 6px; line-height: 1.2; }
.pb-sb-nl-sub   { font-size: 12px; color: rgba(255,255,255,.65); line-height: 1.5; margin: 0 0 14px; }
.pb-nl-form { display: flex; flex-direction: column; gap: 8px; }
.pb-nl-input {
  width: 100%;
  height: 40px;
  border: 2px solid rgba(255,255,255,.2);
  border-radius: var(--pb-rm);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 13px;
  font-family: var(--pb-f);
  padding: 0 14px;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}
.pb-nl-input::placeholder { color: rgba(255,255,255,.4); }
.pb-nl-input:focus { border-color: var(--pb-pk5); }
.pb-btn-nl {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: var(--pb-rm);
  background: var(--pb-pk7);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(231,53,138,.3);
  transition: background .15s;
  font-family: var(--pb-f);
}
.pb-btn-nl:hover { background: var(--pb-pk8); }

/* ═══ PREV / NEXT NAV ═══ */
.pb-post-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.pb-post-nav-card {
  background: #fff;
  border: 1px solid var(--pb-nv0);
  border-radius: var(--pb-rl);
  padding: 20px 24px;
  transition: all .15s;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.pb-post-nav-card:hover {
  border-color: var(--pb-pk3);
  background: var(--pb-pk0);
}
.pb-post-nav-card .pn-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--pb-nv4);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
  display: block;
}
.pb-post-nav-card .pn-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--pb-nv9);
  line-height: 1.35;
  display: block;
}
.pb-post-nav-card.next { text-align: right; }

/* ═══ RELATED POSTS GRID ═══ */
.pb-related-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 60px;
}
.pb-related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
body.planify-blog-single .pb-related-header h2 {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: var(--pb-nv9) !important;
  letter-spacing: -.3px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  line-height: 1.3 !important;
}
.pb-related-header h2 .em {
  font-size: 12px;
  font-weight: 700;
  color: var(--pb-pk7);
  background: var(--pb-pk1);
  padding: 3px 9px;
  border-radius: var(--pb-rf);
}
.pb-view-all {
  font-size: 13px;
  font-weight: 700;
  color: var(--pb-pk7);
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}
.pb-view-all:hover { text-decoration: underline; }

.pb-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pb-r-card {
  background: #fff;
  border: 1px solid var(--pb-nv0);
  border-radius: var(--pb-rl);
  overflow: hidden;
  transition: all .2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.pb-r-card:hover {
  border-color: var(--pb-pk3);
  box-shadow: 0 8px 32px rgba(29,61,103,.1);
  transform: translateY(-3px);
}
.pb-r-card-img {
  aspect-ratio: 16/9;
  background: var(--pb-nv0);
  overflow: hidden;
}
.pb-r-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
  border: none;
  border-radius: 0;
  margin: 0;
}
.pb-r-card:hover .pb-r-card-img img { transform: scale(1.04); }
.pb-r-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.pb-r-card-cat {
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.pb-r-card-cat.diy     { color: var(--pb-pk7); }
.pb-r-card-cat.seller  { color: var(--pb-or7); }
.pb-r-card-cat.general { color: var(--pb-bl7); }
.pb-r-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--pb-nv9);
  line-height: 1.4;
  margin-bottom: 8px;
  flex: 1;
}
.pb-r-card-excerpt {
  font-size: 12.5px;
  color: var(--pb-nv5);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pb-r-card-meta {
  font-size: 11px;
  color: var(--pb-nv4);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 960px) {
  .pb-post-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .pb-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .pb-sb-newsletter { grid-column: 1 / -1; }
  .pb-related-grid  { grid-template-columns: 1fr 1fr; }
  .pb-post-nav      { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .pb-post-hero     { padding: 32px 20px 28px; }
  .pb-post-featured { padding: 0 20px; }
  .pb-post-layout   { padding: 24px 20px 40px; }
  .pb-post-content  { padding: 28px 24px; }
  .pb-sidebar       { grid-template-columns: 1fr; }
  .pb-related-section { padding: 0 20px 40px; }
  .pb-related-grid  { grid-template-columns: 1fr; }
  .pb-post-nav      { padding: 0 20px 32px; grid-template-columns: 1fr; }
  .pb-cta-inline    { flex-direction: column; text-align: center; }
  .pb-entry-content h2 { font-size: 19px; }
}
