/* ── BLOG LISTING & POST PAGES ── */

/* == HERO (listing) == */
.blog-hero {
  padding: calc(var(--nav-h) + 80px) 0 56px;
  text-align: center;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -15%, rgba(109,24,221,0.09) 0%, transparent 65%),
    radial-gradient(circle at 85% 70%, rgba(232,201,31,0.06) 0%, transparent 45%);
  pointer-events: none;
}
.blog-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(109,24,221,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109,24,221,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.blog-hero > .container { position: relative; z-index: 1; }
.blog-hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.blog-hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.75;
}

/* == FILTER TABS == */
.blog-filters {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}
.blog-filter-btn {
  padding: 7px 18px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.blog-filter-btn.active,
.blog-filter-btn:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

/* == FEATURED ARTICLE == */
.blog-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.25s, transform 0.25s;
}
.blog-featured:hover { box-shadow: 0 24px 60px rgba(30,17,64,0.18); transform: translateY(-3px); }
.blog-featured-img {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.blog-featured-img-icon {
  font-size: 88px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.35));
}
.blog-featured-body {
  padding: 44px 40px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.blog-featured-body .blog-tag { margin-bottom: 16px; align-self: flex-start; }
.blog-featured-body h2 {
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: var(--text);
}
.blog-featured-body > p {
  font-size: 0.97rem;
  color: var(--muted);
  line-height: 1.72;
  margin-bottom: 20px;
  flex: 1;
}
.blog-featured-meta { margin-bottom: 20px; }
.blog-featured-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--purple);
  transition: gap 0.15s;
}
.blog-featured:hover .blog-featured-link { gap: 10px; }

/* == TAG PILL == */
.blog-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple);
  background: var(--purple-xxl);
  padding: 4px 11px;
  border-radius: var(--r-full);
  border: 1px solid var(--purple-xl);
}

/* == META ROW == */
.blog-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.blog-meta .blog-author { font-weight: 600; color: var(--text); }
.blog-dot { color: var(--muted2); }

/* == POSTS GRID == */
.blog-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.blog-section-head h2 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* == BLOG CARD == */
.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
}
.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(124,58,237,0.25);
}
.blog-card-img {
  height: 152px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  flex-shrink: 0;
}
.blog-card-body {
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-body .blog-tag { margin-bottom: 11px; align-self: flex-start; }
.blog-card-body h3 {
  font-size: 0.97rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 9px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.blog-card-body > p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-body .blog-meta { margin-top: auto; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   INDIVIDUAL POST PAGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.post-hero {
  padding: calc(var(--nav-h) + 56px) 0 48px;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.post-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% -10%, rgba(109,24,221,0.07) 0%, transparent 65%);
}
.post-hero > .container { position: relative; }
.post-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.post-hero-inner .blog-tag { margin-bottom: 16px; }
.post-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}
.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.post-hero-meta .blog-author { font-weight: 600; color: var(--text); }

/* Post banner (coloured strip) */
.post-banner {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 88px;
  position: relative;
  overflow: hidden;
}
.post-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Article body */
.post-body-wrap {
  padding: 64px 0 80px;
  background: #fff;
}
.post-body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}
.post-body h2 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 48px 0 16px;
  color: var(--text);
  padding-top: 24px;
  border-top: 1px solid var(--border-lg);
}
.post-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--text);
}
.post-body p { margin-bottom: 20px; color: var(--muted); }
.post-body > p:first-of-type {
  font-size: 1.12rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.8;
}
.post-body ul, .post-body ol {
  padding-left: 0;
  margin-bottom: 20px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-body ul li {
  padding-left: 20px;
  position: relative;
  color: var(--muted);
}
.post-body ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  top: 4px;
}
.post-body ol { counter-reset: list-counter; }
.post-body ol li {
  padding-left: 28px;
  position: relative;
  color: var(--muted);
  counter-increment: list-counter;
}
.post-body ol li::before {
  content: counter(list-counter);
  position: absolute;
  left: 0;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--purple);
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 3px;
}
.post-body strong { color: var(--text); font-weight: 700; }
.post-body .callout {
  background: var(--purple-xxl);
  border-left: 3px solid var(--purple);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 18px 22px;
  margin: 28px 0;
}
.post-body .callout p { margin: 0; color: var(--text); font-size: 0.97rem; }

/* Related articles */
.post-related {
  padding: 56px 0;
  background: var(--bg-alt2);
  border-top: 1px solid var(--border-lg);
}
.post-related-head {
  margin-bottom: 24px;
}
.post-related-head h3 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.post-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* == RESPONSIVE == */
@media (max-width: 900px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-img { min-height: 200px; }
  .blog-featured-body { padding: 28px 24px; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .post-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-filters { gap: 6px; }
  .post-related-grid { grid-template-columns: 1fr; }
  .post-banner { height: 200px; font-size: 60px; }
  .post-body { font-size: 1rem; }
}
