/* =====================================================================
   BLOG STYLES — StackVerdict
   Imported by blog.html and blog-post.html alongside styles.css
   ===================================================================== */

/* ─── Shared blog typography base ─────────────────────────────────────────── */
:root {
  --article-width: 720px;
  --cat-ai:         #00c8ff;
  --cat-automation: #c084fc;
  --cat-tools:      #4ade80;
  --cat-review:     #fbbf24;
  --cat-business:   #fb923c;
}

/* ─── Category badges ─────────────────────────────────────────────────────── */
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid;
}
.cat-ai         { color: var(--cat-ai);         background: rgba(0,200,255,.09);    border-color: rgba(0,200,255,.22);    }
.cat-automation { color: var(--cat-automation);  background: rgba(192,132,252,.09);  border-color: rgba(192,132,252,.22);  }
.cat-tools      { color: var(--cat-tools);       background: rgba(74,222,128,.09);   border-color: rgba(74,222,128,.22);   }
.cat-review     { color: var(--cat-review);      background: rgba(251,191,36,.09);   border-color: rgba(251,191,36,.22);   }
.cat-business   { color: var(--cat-business);    background: rgba(251,146,60,.09);   border-color: rgba(251,146,60,.22);   }

/* Thumbnail gradients that echo each category colour */
.thumb-ai         { background: linear-gradient(135deg, #05001a 0%, #001833 100%); }
.thumb-automation { background: linear-gradient(135deg, #100020 0%, #28004a 100%); }
.thumb-tools      { background: linear-gradient(135deg, #001208 0%, #002616 100%); }
.thumb-review     { background: linear-gradient(135deg, #151000 0%, #2e2000 100%); }
.thumb-business   { background: linear-gradient(135deg, #150600 0%, #2e1000 100%); }


/* ─── Blog listing: hero ──────────────────────────────────────────────────── */
.blog-hero {
  padding: calc(var(--nav-height) + 4.5rem) 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/radar-bg.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.blog-hero > * { position: relative; }
.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}
.blog-hero > p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto 2rem;
}

/* Category filter tabs */
.cat-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.cat-tab {
  padding: 0.4rem 1.1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  background: transparent;
  transition: all 0.2s ease;
  font-family: inherit;
}
.cat-tab:hover,
.cat-tab.active {
  background: var(--accent-cyan-dim);
  border-color: rgba(0,200,255,.35);
  color: var(--accent-cyan);
}


/* ─── Featured post ───────────────────────────────────────────────────────── */
.featured-section { padding: 4rem 0 2.5rem; }

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
}
.featured-card:hover {
  border-color: rgba(0,200,255,.35);
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
}

.featured-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 280px;
}
.featured-thumb .thumb-icon {
  font-size: 5rem;
  opacity: 0.22;
  position: relative;
  z-index: 1;
}
.thumb-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 55%; height: 55%;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.6;
}
.thumb-glow-ai         { background: var(--cat-ai); }
.thumb-glow-automation { background: var(--cat-automation); }
.thumb-glow-tools      { background: var(--cat-tools); }
.thumb-glow-review     { background: var(--cat-review); }
.thumb-glow-business   { background: var(--cat-business); }

.featured-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}

.featured-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-body h2 {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.featured-body .excerpt {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.post-meta span { display: flex; align-items: center; gap: 0.35rem; }


/* ─── Post grid ───────────────────────────────────────────────────────────── */
.posts-section { padding: 0 0 6rem; }

.section-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}
.section-row h2 { font-size: 1.35rem; font-weight: 700; }

.view-all {
  font-size: 0.84rem;
  color: var(--accent-cyan);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.2s;
}
.view-all:hover { gap: 0.6rem; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Post card */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.post-card:hover {
  border-color: rgba(0,200,255,.32);
  transform: translateY(-5px);
  box-shadow: 0 20px 55px rgba(0,0,0,.45);
}

.post-thumb {
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-thumb .thumb-icon { font-size: 2.75rem; opacity: 0.22; position: relative; z-index: 1; }

.post-body {
  padding: 1.35rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-body h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0.55rem 0 0.45rem;
  letter-spacing: -0.01em;
}
.post-body .excerpt {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}
.read-more {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 600;
  transition: gap 0.2s;
}
.post-card:hover .read-more { gap: 0.65rem; }


/* ─── Blog post / article page ────────────────────────────────────────────── */
.reading-progress {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent-cyan);
  z-index: 1001;
  box-shadow: 0 0 10px rgba(0,200,255,.55);
  transition: width 0.1s linear;
}

.article-header {
  padding: calc(var(--nav-height) + 4.5rem) 0 3rem;
  position: relative;
  overflow: hidden;
}
.article-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/radar-bg.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.article-header > .container { position: relative; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 500;
  margin-bottom: 1.75rem;
  transition: color 0.2s, gap 0.2s;
}
.back-link:hover { color: var(--text-primary); gap: 0.7rem; }

.article-header h1 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: var(--article-width);
  margin-bottom: 1.25rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.article-meta span { display: flex; align-items: center; gap: 0.35rem; }

.article-divider {
  width: 3rem; height: 3px;
  background: var(--accent-cyan);
  border-radius: 2px;
  margin: 1.5rem 0 0;
}

/* Disclosure banner */
.affiliate-disclosure {
  background: rgba(251,191,36,.06);
  border: 1px solid rgba(251,191,36,.2);
  border-radius: 10px;
  padding: 0.75rem 1.1rem;
  font-size: 0.79rem;
  color: rgba(251,191,36,.85);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* Table of contents */
.toc-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius);
  padding: 1.35rem 1.65rem;
  margin-bottom: 3rem;
}
.toc-box h4 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  margin-bottom: 0.9rem;
}
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.toc-list a {
  color: var(--text-muted);
  font-size: 0.87rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  transition: color 0.2s;
}
.toc-list a::before {
  content: '';
  width: 18px; height: 1px;
  background: var(--border-subtle);
  flex-shrink: 0;
}
.toc-list a:hover { color: var(--text-primary); }

/* Article content */
.article-layout { padding-bottom: 5rem; }

.article-content {
  max-width: var(--article-width);
  font-size: 1.02rem;
  line-height: 1.87;
  color: rgba(255,255,255,.88);
}
.article-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 3rem 0 1rem;
  scroll-margin-top: calc(var(--nav-height) + 1.5rem);
}
.article-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
}
.article-content p { margin-bottom: 1.35rem; }
.article-content a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0,200,255,.35);
  transition: text-decoration-color 0.2s;
}
.article-content a:hover { text-decoration-color: var(--accent-cyan); }
.article-content ul,
.article-content ol { padding-left: 1.5rem; margin-bottom: 1.35rem; }
.article-content li { margin-bottom: 0.45rem; }
.article-content strong { color: var(--text-primary); font-weight: 700; }
.article-content blockquote {
  border-left: 3px solid var(--accent-cyan);
  padding: 0.75rem 1.5rem;
  background: rgba(0,200,255,.04);
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Affiliate recommendation box */
.affiliate-box {
  background: linear-gradient(135deg, rgba(0,200,255,.05), rgba(107,33,168,.05));
  border: 1px solid rgba(0,200,255,.25);
  border-radius: 16px;
  padding: 1.65rem;
  margin: 2.5rem 0;
}
.aff-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--accent-cyan);
  color: var(--bg-primary);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.18rem 0.6rem;
  border-radius: 100px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.aff-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.aff-icon {
  width: 48px; height: 48px;
  background: var(--accent-cyan-dim);
  border: 1px solid rgba(0,200,255,.22);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.3rem;
  flex-shrink: 0;
}
.aff-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.15rem; }
.aff-sub   { font-size: 0.8rem; color: var(--text-muted); }
.aff-body  { font-size: 0.91rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.25rem; }
.aff-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  background: var(--accent-cyan);
  color: var(--bg-primary);
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  transition: all 0.2s;
}
.aff-cta:hover {
  background: #33d4ff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,200,255,.3);
}

/* Related posts */
.related-posts {
  padding: 4rem 0 6rem;
  border-top: 1px solid var(--border-subtle);
}
.related-posts h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 1.75rem; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* ─── "From the Blog" teaser (used on index.html) ─────────────────────────── */
.blog-teaser { padding: 6rem 0; }
.blog-teaser .posts-grid { margin-top: 0; }


/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-thumb { min-height: 220px; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
  .posts-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .cat-tabs { gap: 0.4rem; }
  .article-content { font-size: 0.97rem; }
  .featured-body { padding: 1.5rem; }
}
