/* ============================================
   WordSearch Solver — Blog styles
   Uses the design tokens defined in styles.css
   ============================================ */
.blog-main { max-width: 1120px; margin: 0 auto; padding: calc(var(--header-h) + 20px) 20px 64px; }

.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--text-light); }
.breadcrumbs a { color: var(--teal-dark); }
.breadcrumbs a:hover { text-decoration: underline; }

/* ---------- Post header ---------- */
.post-header { max-width: 820px; margin: 0 auto 28px; }
.post-kind { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--teal); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.post-kind.game { background: var(--coral); }
.post-header h1 { font-size: clamp(1.75rem, 5.2vw, 2.9rem); margin-bottom: 12px; }
.post-meta { color: var(--text-muted); font-size: .92rem; margin-bottom: 22px; }
.post-hero img { width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); aspect-ratio: 1200 / 630; object-fit: cover; }

/* ---------- Layout: TOC + content ---------- */
.post-layout { display: grid; grid-template-columns: 1fr; gap: 24px; max-width: 1040px; margin: 0 auto; }
.toc { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.toc summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.toc ol { margin: 12px 0 2px 1.1rem; list-style: decimal; display: grid; gap: 7px; font-size: .94rem; }
.toc a { color: var(--teal-dark); }
.toc a:hover { text-decoration: underline; }

.post-content { min-width: 0; max-width: 760px; font-size: 1.06rem; line-height: 1.78; }
.post-content section { margin-bottom: 36px; scroll-margin-top: calc(var(--header-h) + 16px); }
.post-content h2 { font-size: clamp(1.4rem, 3.8vw, 1.9rem); margin: 8px 0 14px; }
.post-content h3 { font-size: 1.2rem; margin: 22px 0 8px; }
.post-content p { margin-bottom: 16px; }
.post-content ul, .post-content ol { margin: 0 0 18px 1.3rem; display: grid; gap: 8px; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content a { color: var(--teal-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(42,157,143,.4); }
.post-content a:hover { color: var(--coral); text-decoration-color: currentColor; }
.callout { background: #fff6e6; border-left: 5px solid var(--amber); border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; margin: 20px 0; }
.callout p { margin: 0; }
.table-wrap { overflow-x: auto; margin: 18px 0 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--warm-white); }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 480px; font-size: .95rem; }
.table-wrap th, .table-wrap td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-wrap th { background: var(--navy); color: #fff; font-weight: 600; }
.table-wrap tr:last-child td { border-bottom: 0; }

/* ---------- CTA ---------- */
.cta-box { background: linear-gradient(135deg, var(--navy), var(--teal-dark)); color: #fff; border-radius: var(--radius-lg); padding: 28px 24px; margin: 8px 0 40px; text-align: center; }
.cta-box h2 { color: #fff; margin: 0 0 8px; font-size: 1.5rem; }
.cta-box p { color: rgba(255,255,255,.88); margin-bottom: 18px; }
.cta-btn { display: inline-block; background: var(--amber); color: var(--ink) !important; font-weight: 700; padding: 13px 26px; border-radius: 999px; text-decoration: none !important; transition: transform var(--transition), background var(--transition); }
.cta-btn:hover { background: var(--gold); transform: translateY(-2px); }

/* ---------- FAQ ---------- */
.faq-item { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.faq-item summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.faq-item div { margin-top: 10px; }
.faq-item p { margin: 0; }

/* ---------- Related / blog grid ---------- */
.related { max-width: 1040px; margin: 24px auto 0; padding-top: 32px; border-top: 1px solid var(--border); }
.related > h2 { font-size: 1.6rem; margin-bottom: 18px; }
.rel-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.rel-card { display: flex; flex-direction: column; background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); }
.rel-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.rel-card img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.rel-kind { margin: 14px 16px 0; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-dark); }
.rel-card h2, .rel-card h3 { font-size: 1.08rem; margin: 6px 16px 8px; line-height: 1.3; }
.rel-card p { margin: 0 16px 16px; font-size: .9rem; color: var(--text-muted); line-height: 1.55; }

/* ---------- Blog index ---------- */
.blog-hero { max-width: 760px; margin: 0 auto 32px; text-align: center; }
.blog-hero h1 { font-size: clamp(1.9rem, 6vw, 3rem); margin-bottom: 12px; }
.blog-hero p { color: var(--text-muted); font-size: 1.08rem; }
.blog-grid { max-width: 1120px; margin: 0 auto; }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) { .rel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .rel-grid { grid-template-columns: repeat(3, 1fr); }
  .post-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
  .toc-wrap { position: sticky; top: calc(var(--header-h) + 20px); }
}
@media (max-width: 480px) {
  .blog-main { padding-left: 16px; padding-right: 16px; }
  .post-content { font-size: 1.02rem; }
  .cta-box { padding: 24px 18px; }
}
@media (prefers-reduced-motion: reduce) { .rel-card, .cta-btn { transition: none; } }
