/* ═══════════════════════════════════════════════════════════════
   BLOG STYLES
   Blog home page catalog + individual blog post pages
   ═══════════════════════════════════════════════════════════════ */

/* ═══ BLOG HOME — CATALOG ═══════════════════════════════════════ */
.blog-hero {
  padding: 120px var(--gutter) 48px;
  text-align: center;
  background: var(--off);
}
.blog-hero-h {
  font-family: var(--fh);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.blog-hero-h .hl-yellow { color: var(--yellow); }
.blog-hero-h .hl-blue { color: var(--blue); }
.blog-hero-sub {
  font-family: var(--fb);
  font-size: 1.05rem;
  color: var(--ink-light);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Category Filter ── */
.blog-filter {
  max-width: var(--max-w);
  margin: 0 auto 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.blog-filter-btn {
  font-family: var(--fb);
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-light);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 8px 20px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.blog-filter-btn:hover {
  border-color: var(--navy);
  color: var(--navy);
}
.blog-filter-btn.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ── Blog Grid ── */
.blog-catalog {
  padding: 0 var(--gutter) 80px;
  background: var(--off);
}
.blog-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: box-shadow .25s, border-color .25s, transform .25s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  border-color: var(--border-mid);
  box-shadow: 0 4px 16px rgba(27,45,74,.1), 0 12px 40px rgba(27,45,74,.08);
  transform: translateY(-3px);
}
.blog-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.blog-card-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-tag {
  font-family: var(--fb);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--purple);
  margin-bottom: 8px;
}
.blog-card-title {
  font-family: var(--fh);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
  line-height: 1.35;
  margin-bottom: 16px;
  flex: 1;
}
.blog-card-title a {
  color: inherit;
  text-decoration: none;
}
.blog-card-title a:hover {
  color: var(--navy);
}
.blog-card-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--fb);
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  padding: 8px 16px;
  width: fit-content;
  transition: background .2s, border-color .2s;
}
.blog-card-read:hover {
  background: var(--off);
  border-color: rgba(56,162,255,.3);
}

/* ═══ BLOG POST — INDIVIDUAL PAGE ═══════════════════════════════ */
.bp-hero {
  padding: 100px var(--gutter) 40px;
  background: var(--off);
}
.bp-hero-inner {
  max-width: 780px;
  margin: 0 auto;
}
.bp-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--fb);
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-light);
  text-decoration: none;
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  padding: 8px 16px;
  margin-bottom: 32px;
  transition: background .2s, border-color .2s;
}
.bp-back:hover {
  background: var(--white);
  border-color: rgba(56,162,255,.3);
}
.bp-back svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bp-title {
  font-family: var(--fh);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}
.bp-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--fb);
  font-size: .82rem;
  color: var(--ink-light);
  margin-bottom: 32px;
}
.bp-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-light);
  opacity: .5;
}
.bp-hero-img {
  width: 100%;
  border-radius: var(--r-md);
  display: block;
  margin-bottom: 0;
}

/* ── Blog Post Content Layout ── */
.bp-content {
  padding: 48px var(--gutter) 80px;
  background: var(--off);
}
.bp-layout {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}

/* ── Table of Contents ── */
.bp-toc {
  position: sticky;
  top: 100px;
}
.bp-toc-title {
  font-family: var(--fh);
  font-size: .95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}
.bp-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.bp-toc-list li {
  margin-bottom: 10px;
}
.bp-toc-list a {
  font-family: var(--fb);
  font-size: .85rem;
  color: var(--ink-light);
  text-decoration: none;
  line-height: 1.45;
  display: block;
  transition: color .2s;
}
.bp-toc-list a:hover,
.bp-toc-list a.active {
  color: var(--navy);
  font-weight: 600;
}

/* ── Article Body ── */
.bp-body h2 {
  font-family: var(--fh);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.02em;
  margin: 48px 0 16px;
  scroll-margin-top: 100px;
}
.bp-body h2:first-child {
  margin-top: 0;
}
.bp-body h3 {
  font-family: var(--fh);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 32px 0 12px;
}
.bp-body p {
  font-family: var(--fb);
  font-size: .95rem;
  color: var(--ink-light);
  line-height: 1.8;
  margin-bottom: 18px;
}
.bp-body ul,
.bp-body ol {
  padding-left: 24px;
  margin-bottom: 18px;
}
.bp-body li {
  font-family: var(--fb);
  font-size: .95rem;
  color: var(--ink-light);
  line-height: 1.75;
  margin-bottom: 8px;
}
.bp-body strong {
  color: var(--ink);
  font-weight: 600;
}
.bp-body a {
  color: var(--purple);
  text-decoration: underline;
}
.bp-body blockquote {
  border-left: 3px solid var(--purple);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--purple-pale);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.bp-body blockquote p {
  margin-bottom: 0;
  color: var(--ink);
  font-style: italic;
}

/* ═══ RECOMMENDED SECTION ═══════════════════════════════════════ */
.bp-recommended {
  padding: 64px var(--gutter) 80px;
  background: var(--off);
}
.bp-rec-inner {
  max-width: 780px;
  margin: 0 auto;
}
.bp-rec-h {
  font-family: var(--fh);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  margin-bottom: 36px;
}
.bp-rec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 40px;
}
.bp-rec-link {
  font-family: var(--fb);
  font-size: .9rem;
  color: var(--navy);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.45;
  transition: color .2s;
}
.bp-rec-link:hover {
  color: var(--purple);
}

/* ═══ RESPONSIVE ════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .bp-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .bp-toc {
    position: static;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
  }
}
@media (max-width: 600px) {
  .blog-filter {
    gap: 8px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .blog-filter-btn {
    font-size: .75rem;
    padding: 6px 14px;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .bp-rec-grid {
    grid-template-columns: 1fr;
  }
  .bp-title {
    font-size: 1.5rem;
  }
}
