/* =============================================
   CODESQUAD — Blog Post Page Styles
   Extends blog.css (nav, canvas, footer shared)
   ============================================= */

/* ── Page layout ───────────────────────────── */
main {
  position: relative;
  z-index: 10;
  padding-top: 90px;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 56px;
  padding-right: 56px;
}

/* ── Post header ───────────────────────────── */
.post-header {
  padding: 56px 0 36px;
  max-width: 760px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  margin-bottom: 22px;
  transition: gap 0.2s;
}
.back-link:hover { gap: 10px; }

.post-cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.pc-business { background: rgba(0,212,255,0.08); color: var(--cyan);   border: 1px solid rgba(0,212,255,0.2); }
.pc-product  { background: rgba(123,47,255,0.08); color: var(--violet); border: 1px solid rgba(123,47,255,0.2); }
.pc-local    { background: rgba(0,255,136,0.08);  color: var(--green);  border: 1px solid rgba(0,255,136,0.2); }
.pc-tech     { background: rgba(0,212,255,0.08);  color: var(--cyan);   border: 1px solid rgba(0,212,255,0.2); }

.post-title {
  font-family: var(--font-h);
  font-size: clamp(26px, 3.8vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.post-meta {
  font-size: 13px;
  color: var(--gray2);
}

/* ── Two-column layout ─────────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 52px;
  padding-bottom: 100px;
}

/* ── Article body ──────────────────────────── */
.article-body { max-width: 700px; }

.article-body h2 {
  font-family: var(--font-h);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 40px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border2);
  color: var(--white);
}

.article-body h3 {
  font-family: var(--font-h);
  font-size: 16px;
  font-weight: 600;
  margin: 26px 0 10px;
  color: var(--white);
}

.article-body p {
  font-size: 15px;
  line-height: 1.85;
  color: #adb8c8;
  margin-bottom: 18px;
}

.article-body strong { color: var(--white); }

.article-body a { color: var(--cyan); text-decoration: none; }
.article-body a:hover { text-decoration: underline; }

.article-body ul,
.article-body ol {
  margin: 10px 0 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-body li {
  font-size: 15px;
  line-height: 1.75;
  color: #adb8c8;
}

/* ── TOC sidebar ───────────────────────────── */
.toc {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 18px;
  border: 1px solid var(--border2);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(12px);
}

.toc h2 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}

.toc a {
  display: block;
  font-size: 12px;
  color: var(--gray);
  text-decoration: none;
  padding: 5px 0 5px 10px;
  border-left: 2px solid var(--border2);
  transition: color 0.2s, border-color 0.2s;
  line-height: 1.45;
}

.toc a:hover,
.toc a.active {
  color: var(--cyan);
  border-left-color: var(--cyan);
}

/* ── Share row ─────────────────────────────── */
.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 40px 0 28px;
  padding: 18px 20px;
  border: 1px solid var(--border2);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
}

.share-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray);
}

.share-row a {
  padding: 6px 14px;
  border: 1px solid var(--border2);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.share-row a:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0,212,255,0.05);
}

/* ── Related posts ─────────────────────────── */
.related {
  margin-bottom: 32px;
}

.related h2 {
  font-family: var(--font-h);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--white);
  letter-spacing: -0.3px;
}

.related-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.related-links a {
  padding: 9px 16px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--cyan);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.related-links a:hover {
  border-color: var(--cyan);
  background: rgba(0,212,255,0.05);
}

/* ── CTA block ─────────────────────────────── */
.post-cta {
  margin-top: 8px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0,212,255,0.03);
  backdrop-filter: blur(12px);
  text-align: center;
}

.post-cta h2 {
  font-family: var(--font-h);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--white);
  border: none;
  letter-spacing: -0.5px;
  padding: 0;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border: none;
  border-radius: 8px;
  color: var(--white);
  font-family: var(--font-h);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0,212,255,0.25);
  text-decoration: none;
}

/* ── Mobile ────────────────────────────────── */
@media (max-width: 768px) {
  main { padding-left: 18px; padding-right: 18px; }
  .post-header { padding: 40px 0 24px; }
  .post-title { font-size: clamp(22px, 6vw, 30px); letter-spacing: -0.8px; }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 60px;
  }

  /* Show TOC above article on mobile */
  .toc { position: static; order: -1; }

  .article-body h2 { font-size: 18px; margin: 28px 0 10px; }
  .article-body p, .article-body li { font-size: 14px; }

  .share-row { gap: 8px; }
  .post-cta { padding: 22px 18px; }
  .post-cta h2 { font-size: 17px; }
}
