/* ═══════════════════════════════════════════════════════════
   BLOG FEED — Editorial layout
═══════════════════════════════════════════════════════════ */

/* Feed wrapper */
.blog-feed-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.5rem) 1rem 4rem;
}

/* Category tabs — segmented-control look that blends with content */
.blog-filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 68px;
  z-index: 90;
  padding: .85rem 0;
  backdrop-filter: saturate(1.1);
}

.blog-filter-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}

.blog-cat-tab {
  background: none;
  border: none;
  border-radius: var(--radius-full);
  padding: .4rem 1rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
  letter-spacing: -.005em;
}

.blog-cat-tab:hover {
  background: var(--surface);
  color: var(--text-primary);
}

.blog-cat-tab.active {
  background: var(--heading);
  color: var(--white);
}

[data-theme="dark"] .blog-cat-tab.active {
  background: var(--gold);
  color: var(--white);
}

.blog-post-count {
  margin-left: auto;
  font-size: .78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ── Individual feed post ── */
.feed-post {
  padding: 2.25rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  animation: fadeUp .4s ease both;
}

.feed-post:last-child { border-bottom: none; }
.feed-post[style*="display:none"] { display: none !important; }

/* Image */
.feed-post-img-link {
  display: block;
  text-decoration: none;
  margin-bottom: 1.35rem;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.feed-post-img-wrap {
  width: 100%;
  height: 360px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  overflow: hidden;
  position: relative;
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}

.feed-post-img-link:hover .feed-post-img-wrap {
  transform: scale(1.025);
}

/* Category image backgrounds */
.feed-img--solicitation { background: linear-gradient(135deg, #000000 0%, #0a0a0a 40%, #1d4ed8 100%); }
.feed-img--recompete    { background: linear-gradient(135deg, #000000 0%, #111111 40%, #2563eb 100%); }
.feed-img--scandal      { background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 40%, #7f1d1d 100%); }
.feed-img--policy       { background: linear-gradient(135deg, #000000 0%, #0a0a0a 40%, #1e40af 100%); }
.feed-img--won          { background: linear-gradient(135deg, #000000 0%, #111111 40%, #1d4ed8 100%); }
.feed-img--industry     { background: linear-gradient(135deg, #000000 0%, #141414 50%, #1e1e1e 100%); }
.feed-img--strategy     { background: linear-gradient(135deg, #000000 0%, #0a0a0a 40%, #2563eb 100%); }

/* PRO badge on image */
.feed-pro-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--navy);
  color: var(--gold);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3em .75em;
  border-radius: 3rem;
  z-index: 2;
}

/* Meta row */
.feed-post-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
  font-size: .78rem;
  color: var(--text-muted);
}

.feed-post-date,
.feed-post-readtime {
  font-size: .78rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.feed-post-meta > span + span:not(.badge)::before,
.feed-post-meta .feed-post-readtime::before {
  content: '·';
  color: var(--text-muted);
  margin-right: .5rem;
  opacity: .5;
}

/* Title */
.feed-post-title {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 .9rem;
  letter-spacing: -.015em;
}

.feed-post-title a {
  color: var(--heading);
  text-decoration: none;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size .25s ease, color .15s;
}

.feed-post-title a:hover {
  color: var(--gold);
  background-size: 100% 2px;
}

/* Pro title (slightly muted) */
.feed-post--pro .feed-post-title a { color: var(--text-primary); }

/* Excerpt */
.feed-post-excerpt {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  max-width: 68ch;
}

/* Pro excerpt blur */
.feed-post--pro .feed-post-excerpt {
  position: relative;
  overflow: hidden;
  max-height: 4.5em;
}

.feed-post--pro .feed-post-excerpt::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3em;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

/* Actions row */
.feed-post-actions {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-wrap: wrap;
}

.feed-read-btn {
  border-radius: 2rem !important;
  font-size: .85rem !important;
  padding: .45rem 1.2rem !important;
  font-weight: 600 !important;
}

.feed-read-btn--pro {
  background: var(--gold) !important;
  color: var(--white) !important;
  border-color: var(--gold) !important;
}

/* Like button */
.feed-like-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: .4rem .9rem;
  font-size: .83rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 500;
  transition: all .18s;
}

.feed-like-btn:hover {
  border-color: #f43f5e;
  color: #f43f5e;
  background: #fff1f2;
}

.feed-like-btn.liked {
  border-color: #e11d48;
  color: #e11d48;
  background: #fff1f2;
}

.like-heart { font-size: 1rem; line-height: 1; }

/* Author */
.feed-post-author {
  font-size: .78rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Divider — now handled by feed-post border-bottom,
   keep the class for backwards compat but render nothing */
.feed-divider { display: none; }

/* ── Pro paywall card ── */
.feed-pro-gate {
  background: linear-gradient(135deg, var(--navy), #0d2a4a);
  border-radius: 14px;
  padding: 2.25rem;
  text-align: center;
  margin: 2rem 0;
}

.feed-pro-gate-label {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .6rem;
}

.feed-pro-gate h3 {
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: .5rem;
}

.feed-pro-gate p {
  color: rgba(255,255,255,.72);
  font-size: .88rem;
  margin-bottom: 1.5rem;
}

.feed-pro-gate-btns {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Comments section (on article pages) ── */
.comments-section {
  max-width: 920px;
  margin: 0 auto;
  padding: 3rem 1rem;
  border-top: none;
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.comments-header h3 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--heading);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.comment-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.comment-item--reply {
  margin-left: 3rem;
  border-left: 3px solid var(--gold);
  background: var(--white);
}

.comment-reply-indicator {
  font-size: .78rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: .3rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.comment-reply-indicator::before {
  content: '↳';
  font-size: 1rem;
}

.comment-mention {
  color: var(--gold);
  font-weight: 700;
}

.inline-reply-box {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .4s ease, opacity .35s ease, margin .35s ease;
  margin-top: 0;
}

.inline-reply-box.open {
  max-height: 500px;
  opacity: 1;
  margin-top: .75rem;
  overflow: visible;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: .85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comment-body { flex: 1; }

.comment-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .4rem;
}

.comment-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.comment-date {
  font-size: .75rem;
  color: var(--text-muted);
}

.comment-text {
  font-size: .9rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.comment-actions-row {
  display: flex;
  gap: .75rem;
  margin-top: .6rem;
}

.comment-action-btn {
  background: none;
  border: none;
  font-size: .75rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color .15s;
}

.comment-action-btn:hover { color: var(--navy); }

/* Comment form */
.comment-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}

.comment-form-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.25rem;
}

.comment-gate {
  text-align: center;
  padding: 1.5rem;
}

.comment-gate p {
  font-size: .9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.comment-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.comment-form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.comment-form-group label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.comment-form-group input,
.comment-form-group textarea {
  padding: .65rem .85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .88rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text-primary);
  outline: none;
  transition: border-color .2s;
}

.comment-form-group input:focus,
.comment-form-group textarea:focus {
  border-color: var(--navy);
}

.comment-form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Single-textarea composer (used inside article.html) */
.comment-textarea {
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: .95rem;
  font-family: inherit;
  resize: vertical;
  min-height: 160px;
  background: var(--white);
  color: var(--text-primary);
  line-height: 1.5;
}
.comment-submit-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .5rem;
  margin-top: .5rem;
}
.comment-toolbar { position: relative; display: inline-flex; gap: .4rem; }
.comment-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.comment-toolbar-btn:hover { border-color: var(--gold); color: var(--gold); }
.form-success {
  margin-top: .5rem;
  font-size: .85rem;
  color: var(--green);
  font-weight: 600;
}

.comment-form-full { grid-column: 1 / -1; }

/* Article like bar */
.article-like-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 2rem 0;
  flex-wrap: wrap;
}

.article-like-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--surface);
  border: none;
  border-radius: 8px;
  padding: .5rem 1rem;
  font-size: .82rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 600;
  transition: all .18s;
}

.article-like-btn:hover {
  color: #e11d48;
  background: #fff1f2;
}

.article-like-btn.liked {
  color: #e11d48;
  background: #fff1f2;
}

.article-share-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--surface);
  border: none;
  border-radius: 8px;
  padding: .5rem 1rem;
  font-size: .82rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 600;
  transition: all .18s;
  text-decoration: none;
}

.article-share-btn:hover {
  color: var(--text-primary);
  background: var(--border);
}

/* Comment embedded image */
.comment-img {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
  display: block;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .feed-post-img-wrap { height: 240px; font-size: 3.5rem; }
  .feed-post-title { font-size: 1.4rem; }
  .blog-filter-inner { gap: .35rem; }
  .blog-cat-tab { font-size: .75rem; padding: .3rem .7rem; }
  .comment-form-grid { grid-template-columns: 1fr; }
  .feed-post-author { display: none; }
}

/* ============================================================
   DARK MODE — Blog
   ============================================================ */
[data-theme="dark"] .blog-filter-bar {
  background: #111119;
  border-bottom-color: #2a2a3a;
}
[data-theme="dark"] .blog-cat-tab {
  color: #94a3b8;
  border-color: #2a2a3a;
  background: #1a1a2e;
}
[data-theme="dark"] .blog-cat-tab:hover,
[data-theme="dark"] .blog-cat-tab.active {
  background: #2563EB;
  color: #fff;
  border-color: #2563EB;
}
[data-theme="dark"] .feed-post {
  background: #161622;
  border-color: #2a2a3a;
}
[data-theme="dark"] .feed-post:hover {
  border-color: #3b82f6;
}
[data-theme="dark"] .feed-post-title,
[data-theme="dark"] .feed-post-title a {
  color: #e2e8f0;
}
[data-theme="dark"] .feed-post-title a:hover,
[data-theme="dark"] .feed-post:hover .feed-post-title a {
  color: #93c5fd;
}
[data-theme="dark"] .feed-post-excerpt {
  color: #94a3b8;
}
[data-theme="dark"] .feed-post-meta {
  color: #64748b;
}
[data-theme="dark"] .feed-post-author {
  color: #94a3b8;
}
[data-theme="dark"] .feed-post-date {
  color: #64748b;
}
[data-theme="dark"] .comment-card {
  background: #161622;
  border-color: #2a2a3a;
}
[data-theme="dark"] .comment-author {
  color: #e2e8f0;
}
[data-theme="dark"] .comment-body {
  color: #cbd5e1;
}
[data-theme="dark"] .comment-date {
  color: #64748b;
}
[data-theme="dark"] .comment-form textarea,
[data-theme="dark"] .comment-form input {
  background: #1a1a2e;
  border-color: #2a2a3a;
  color: #e2e8f0;
}
[data-theme="dark"] .feed-read-count {
  color: #64748b;
}
