/* ============================================================
   KuraManga — Blog / Article Styles
   ============================================================ */

/* ── Outer two-column layout ──────────────────────────────── */
.blog-main {
  padding: 0 0 72px;
}

.blog-outer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}

/* ── Single-column article container (no sidebar) ─────────── */
.blog-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Left: article content ───────────────────────────────── */
.blog-content {
  min-width: 0;
}

/* ── Breadcrumbs ─────────────────────────────────────────── */
.blog-content .breadcrumbs,
.blog-container .breadcrumbs {
  margin: 18px 0 24px;
}

/* ── 1. Title ────────────────────────────────────────────── */
.blog-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 16px;
  letter-spacing: -.4px;
}

/* ── 2. Meta header ──────────────────────────────────────── */
.blog-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-subtle);
}

.blog-meta-author {
  font-weight: 700;
  color: var(--accent);
}

.blog-meta-divider { opacity: .35; }

.blog-meta-updated {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.blog-meta-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e53e3e;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(229,62,62,.25), 0 0 8px 2px rgba(229,62,62,.4);
  animation: blog-dot-pulse 2.4s ease-in-out infinite;
}

@keyframes blog-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(229,62,62,.25), 0 0 8px 2px rgba(229,62,62,.4); }
  50%       { box-shadow: 0 0 0 4px rgba(229,62,62,.12), 0 0 14px 4px rgba(229,62,62,.55); }
}

/* ── 3. Intro ────────────────────────────────────────────── */
.blog-intro { margin-bottom: 40px; }

.blog-intro p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.blog-intro p:last-child { margin-bottom: 0; }

/* ── Shared section title ────────────────────────────────── */
.blog-section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -.2px;
}

.blog-section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--border-subtle);
  border-radius: 2px;
}

/* ── 4. Quick Picks ──────────────────────────────────────── */
.blog-tldr {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin-bottom: 44px;
}

.blog-tldr .blog-section-title { font-size: 16px; margin-bottom: 14px; }
.blog-tldr .blog-section-title::after { display: none; }

.blog-quicklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.blog-quicklist li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 8px 0 8px 22px;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

.blog-quicklist li:last-child { border-bottom: none; }

.blog-quicklist li::before {
  content: "▸";
  position: absolute;
  left: 2px;
  color: var(--accent);
  font-size: 11px;
  top: 50%;
  transform: translateY(-50%);
}

.blog-quicklist a {
  color: var(--text-primary);
  font-weight: 700;
  transition: color .18s ease;
}

.blog-quicklist a:hover { color: var(--accent); }

/* Title row outside body — hidden on desktop, shown on mobile */
.blog-pick .blog-pick-title-row { display: none; }

/* ── 5. Pick cards ───────────────────────────────────────── */
.blog-picks { margin-bottom: 44px; }

.blog-pick {
  display: block;
  padding: 26px 0;
  border-bottom: 1px solid var(--border-subtle);
}

/* Grid layout only when a cover image is present */
.blog-pick:has(.blog-pick-cover) {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0 22px;
}

/* Single-column articles (blog-container) — force block regardless */
.blog-container .blog-pick {
  display: block;
}

.blog-pick:last-child { border-bottom: none; }

.blog-pick-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-pick-list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.blog-pick-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
}

/* Cover image — with homepage-style hover */
.blog-pick-cover {
  grid-column: 1;
  grid-row: 1 / 3;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  width: 200px;
  height: 285px;
  flex-shrink: 0;
  transition: transform .3s cubic-bezier(.4,0,.2,1),
              box-shadow .3s cubic-bezier(.4,0,.2,1),
              border-color .3s cubic-bezier(.4,0,.2,1);
}

.blog-pick-cover:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}

.blog-pick-cover:hover .blog-pick-cover-img {
  filter: saturate(150%);
}

.blog-pick-cover-img {
  width: 200px;
  height: 285px;
  object-fit: cover;
  display: block;
  transition: filter .3s cubic-bezier(.4,0,.2,1);
}

.blog-pick-cover-placeholder {
  width: 200px;
  height: 285px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

/* Content column */
.blog-pick-body { grid-column: 2; }

.blog-pick-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.3;
  letter-spacing: -.2px;
}

.blog-pick-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  border-radius: 4px;
  flex-shrink: 0;
  padding: 0 5px;
}

html:not(.dark) .blog-pick-num {
  background: var(--accent-yellow);
  color: var(--accent);
}

.blog-pick-body p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

/* CTA button — matches navbar .nav-btn */
.blog-pick-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

html:not(.dark) .blog-pick-cta {
  background: var(--accent-yellow);
  color: var(--accent);
  border-color: var(--accent-yellow);
}

html:not(.dark) .blog-pick-cta:hover {
  background: #FFB800;
}

html.dark .blog-pick-cta:hover {
  background: var(--bg-elevated);
}

/* ── 6. Supporting section ───────────────────────────────── */
.blog-support {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 26px 30px;
  margin-bottom: 44px;
}

.blog-support p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

.blog-support p:last-child { margin-bottom: 0; }

/* ── 7. Final CTA section ────────────────────────────────── */
.blog-footer-section {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, color-mix(in srgb, var(--accent) 8%, var(--bg-elevated)) 100%);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 28px 32px;
}

.blog-footer-section p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

.blog-footer-section p:last-of-type { margin-bottom: 18px; }

.blog-explore-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 6px;
  text-decoration: none;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #fff;
  transition: filter .2s, transform .2s;
}

.blog-explore-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

/* ── Right: sidebar ──────────────────────────────────────── */
.blog-sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 66px;
}

/* TOC */
.blog-toc {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 20px 20px 14px;
  overflow: hidden;
}

.blog-toc-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.blog-toc-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.blog-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.blog-toc-list li {
  border-bottom: 1px solid var(--border-subtle);
}

.blog-toc-list li:last-child {
  border-bottom: none;
}

.blog-toc-list a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 6px;
  border-radius: 5px;
  transition: background .15s, color .15s;
  line-height: 1.4;
}

.blog-toc-list a:hover,
.blog-toc-list a.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.blog-toc-list a.is-active {
  font-weight: 700;
}

/* Ad slot placeholder */
.blog-ad-slot {
  background: var(--bg-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .blog-outer {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
    display: none; /* hide sidebar on mobile — show TOC inline instead */
  }
}

@media (max-width: 600px) {
  .blog-title { font-size: 24px; }

  .blog-section-title { font-size: 21px; }

  .blog-pick-title { font-size: 18px; }

  /* Stack: title (row 1) → cover (row 2) → body text (row 3) */
  .blog-pick:has(.blog-pick-cover) {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "cover"
      "body";
  }

  .blog-pick-title-row  { grid-area: title; }
  .blog-pick-body       { grid-area: body; }

  .blog-pick-cover {
    grid-area: cover;
    width: 75%;
    max-width: 280px;
    height: auto;
    margin: 12px auto 14px;
  }

  .blog-pick-cover-img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
  }

  .blog-pick-cover-placeholder {
    width: 100%;
    aspect-ratio: 2 / 3;
    height: auto;
  }

  /* Show the outer title row, hide the duplicate inside body */
  .blog-pick .blog-pick-title-row { display: flex; }
  .blog-pick-body > .blog-pick-title { display: none; }

  .blog-tldr, .blog-support { padding: 16px 18px; }
  .blog-footer-section { padding: 22px 18px; }
}
