/* ============================================================
   VEEP CAPITAL BLOG — Single Post CSS
   ============================================================ */

/* ── Hero ─────────────────────────────────────────── */
.post-hero {
  position: relative;
  height: 420px;
  overflow: hidden;
  margin-bottom: -80px;
}
.post-hero img { width: 100%; height: 100%; object-fit: cover; }
.post-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 30%, var(--bg) 100%);
}

/* ── Layout ───────────────────────────────────────── */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
  position: relative;
}
@media(max-width:900px) { .post-layout { grid-template-columns: 1fr; } }

/* ── Article header ───────────────────────────────── */
.post-article { min-width: 0; }

.post-header {
  padding: 3rem 0 2.5rem;
}
.post-header-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  margin-bottom: 1.25rem;
}
.post-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 1rem;
}
.post-subtitle {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 720px;
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
}

/* ── Prose (content) ──────────────────────────────── */
.prose {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5 {
  font-family: var(--font-serif);
  color: var(--white);
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
  scroll-margin-top: 80px;
}
.prose h1 { font-size: 2rem; }
.prose h2 { font-size: 1.6rem; border-bottom: 1px solid var(--border); padding-bottom: .5rem; }
.prose h3 { font-size: 1.3rem; }
.prose h4 { font-size: 1.1rem; color: var(--gold); }

.prose p { margin-bottom: 1.5rem; }
.prose p:last-child { margin-bottom: 0; }

.prose a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--gold-light); }

.prose strong { color: var(--white); font-weight: 700; }
.prose em { font-style: italic; color: var(--text-2); }

.prose blockquote {
  border-left: 3px solid var(--gold);
  background: var(--bg-card);
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-2);
  font-style: italic;
}
.prose blockquote p { margin-bottom: 0; }

.prose pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.75rem 0;
  font-family: var(--font-mono);
  font-size: .875rem;
  line-height: 1.6;
  color: #c9d0d9;
}
.prose code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .15rem .45rem;
  font-family: var(--font-mono);
  font-size: .85em;
  color: var(--gold-light);
}
.prose pre code {
  background: none; border: none; padding: 0;
  color: inherit; font-size: inherit;
}

.prose ul, .prose ol {
  margin: 1.25rem 0 1.25rem 1.5rem;
  display: flex; flex-direction: column; gap: .4rem;
}
.prose li::marker { color: var(--gold); }

.prose img {
  border-radius: var(--radius);
  margin: 2rem auto;
  max-width: 100%;
  box-shadow: var(--shadow);
}

.prose table {
  width: 100%; border-collapse: collapse; margin: 2rem 0;
  font-size: .9rem;
}
.prose th {
  background: var(--bg-card); color: var(--gold);
  padding: .75rem 1rem; text-align: left;
  font-weight: 600; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
}
.prose td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-2); }
.prose tr:hover td { background: var(--bg-card); color: var(--text); }

.prose hr {
  border: none; border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ── Post meta footer ──────────────────────────────── */
.post-tags {
  display: flex; align-items: center; gap: .5rem;
  flex-wrap: wrap; padding: 1.5rem 0;
  font-size: .85rem; color: var(--text-3);
  border-bottom: 1px solid var(--border);
}

.post-share {
  display: flex; align-items: center; gap: .75rem;
  flex-wrap: wrap; padding: 1.5rem 0;
  font-size: .875rem; color: var(--text-3);
}
.share-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: 6px;
  font-size: .8rem; font-weight: 600; cursor: pointer;
  transition: opacity .2s;
  border: none;
}
.share-btn:hover { opacity: .8; }
.share-x  { background: #000; color: #fff; }
.share-li { background: #0077B5; color: #fff; }
.share-copy { background: var(--bg-card); border: 1px solid var(--border) !important; color: var(--text-2); }

/* ── Sticky sidebar ────────────────────────────────── */
.post-sidebar {
  position: sticky; top: 80px;
  display: flex; flex-direction: column; gap: 1.5rem;
}
@media(max-width:900px) { .post-sidebar { display: none; } }

/* TOC */
.toc-widget { display: none; }
.toc-widget.has-items { display: block; }
#toc { display: flex; flex-direction: column; gap: .35rem; }
#toc a {
  font-size: .82rem; color: var(--text-3);
  padding: .3rem .5rem; border-radius: 4px;
  border-left: 2px solid transparent;
  transition: all .2s;
  line-height: 1.4;
}
#toc a:hover, #toc a.active {
  color: var(--gold); border-left-color: var(--gold);
  background: var(--gold-dim);
}
#toc a.h3 { padding-left: 1.25rem; }
#toc a.h4 { padding-left: 2rem; }

/* Related posts in sidebar */
.related-list { list-style: none; display: flex; flex-direction: column; gap: .85rem; }
.related-list li { display: flex; gap: .75rem; align-items: flex-start; }
.related-img { width: 56px; height: 56px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.related-img img { width: 100%; height: 100%; object-fit: cover; }
.related-title { font-size: .83rem; color: var(--text-2); line-height: 1.4; display: block; transition: color .2s; }
.related-title:hover { color: var(--gold); }

/* ── Reactions ──────────────────────────────────────── */
.post-reactions {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.reactions-label { font-size: .85rem; color: var(--text-3); margin-right: .25rem; }
.reaction-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: .5rem .9rem; cursor: pointer;
  font-size: .875rem; color: var(--text-2);
  transition: all .2s;
}
.reaction-btn:hover { border-color: var(--gold); color: var(--text); transform: translateY(-2px); }
.reaction-btn.reacted { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }
.reaction-emoji { font-size: 1.1rem; }
.reaction-count { font-weight: 600; }

/* ── Newsletter box ─────────────────────────────────── */
.newsletter-box {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(201,168,76,0.05) 100%);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius-lg); padding: 2rem;
  margin: 2rem 0;
}
.newsletter-inner { display: flex; flex-direction: column; gap: 1.25rem; }
.newsletter-title { font-family: var(--font-serif); font-size: 1.3rem; color: var(--white); }
.newsletter-sub { color: var(--text-2); font-size: .9rem; margin-top: .25rem; }
.newsletter-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.nl-input {
  flex: 1; min-width: 150px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; padding: .65rem .9rem; color: var(--text); font-size: .875rem;
  outline: none; transition: border-color .2s;
}
.nl-input:focus { border-color: var(--gold); }
.nl-btn {
  background: var(--gold); color: var(--bg); border: none;
  border-radius: 6px; padding: .65rem 1.25rem; font-weight: 700;
  cursor: pointer; font-size: .875rem; transition: background .2s; white-space: nowrap;
}
.nl-btn:hover { background: var(--gold-light); }
.newsletter-msg { font-size: .875rem; color: var(--gold); }

/* ── Comments ───────────────────────────────────────── */
.comments-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.comments-title { font-family: var(--font-serif); font-size: 1.4rem; color: var(--white); margin-bottom: 1.5rem; }
.comments-list { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 2.5rem; }
.comment { display: flex; gap: 1rem; align-items: flex-start; }
.comment-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--gold-dim); border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--gold); font-size: .95rem;
}
.comment-body { flex: 1; }
.comment-meta { display: flex; align-items: center; gap: .75rem; margin-bottom: .4rem; }
.comment-meta strong { font-size: .9rem; color: var(--text); }
.comment-meta span { font-size: .78rem; color: var(--text-3); }
.comment-text { font-size: .9rem; color: var(--text-2); line-height: 1.65; }
.comment-form-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; }
.comment-form-title { font-size: 1rem; font-weight: 600; color: var(--white); margin-bottom: 1.25rem; }
.comment-form { display: flex; flex-direction: column; gap: .85rem; }
.comment-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
@media(max-width:600px) { .comment-form-row { grid-template-columns: 1fr; } }
.comment-input {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; padding: .7rem .9rem; color: var(--text);
  font-size: .875rem; font-family: var(--font-sans); outline: none;
  transition: border-color .2s;
}
.comment-input:focus { border-color: var(--gold); }
.comment-textarea { resize: vertical; min-height: 110px; }
.btn-comment-submit {
  align-self: flex-start; background: var(--gold); color: var(--bg);
  border: none; border-radius: 6px; padding: .7rem 1.5rem;
  font-weight: 700; font-size: .875rem; cursor: pointer; transition: background .2s;
}
.btn-comment-submit:hover { background: var(--gold-light); }
.alert { padding: .75rem 1rem; border-radius: 6px; font-size: .875rem; }
.alert-error { background: rgba(224,84,84,.1); border: 1px solid rgba(224,84,84,.3); color: #e05454; }
.alert-success { background: rgba(76,175,122,.1); border: 1px solid rgba(76,175,122,.3); color: #4caf7a; }
