/* ============================================================
   blog-post.css — Shared styles for all blog post pages
   DigitalBacklinger
   ============================================================ */

/* ── POST HERO ── */
.post-hero {
  padding: 9rem 5rem 4rem;
  background: var(--ink);
  position: relative; overflow: hidden;
}
.post-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,168,122,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,168,122,.05) 1px, transparent 1px);
  background-size: 55px 55px;
}
.post-hero-inner { position: relative; z-index: 1; max-width: 860px; }
.post-breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  font-size: .72rem; font-weight: 500; letter-spacing: .06em;
  color: rgba(255,255,255,.4); margin-bottom: 1.5rem;
}
.post-breadcrumb a { color: var(--teal); text-decoration: none; }
.post-breadcrumb a:hover { text-decoration: underline; }
.post-breadcrumb span { color: rgba(255,255,255,.25); }
.post-tag {
  display: inline-block; font-size: .65rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .25rem .85rem; border-radius: 100px;
  background: rgba(0,168,122,.15); color: var(--teal);
  margin-bottom: 1.2rem;
}
.post-hero h1 {
  font-family: 'Fraunces', serif; font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.1; letter-spacing: -.03em;
  color: #fff; margin-bottom: 1.2rem;
}
.post-hero h1 em { font-style: italic; font-weight: 300; color: var(--teal); }
.post-meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  font-size: .78rem; color: rgba(255,255,255,.45);
  margin-bottom: 1.5rem;
}
.post-meta span { display: flex; align-items: center; gap: .35rem; }
.post-intro {
  font-size: 1.05rem; font-weight: 300; line-height: 1.75;
  color: rgba(255,255,255,.65); max-width: 700px;
}
.post-intro strong { color: #fff; font-weight: 500; }

/* ── LAYOUT ── */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 5rem 6rem;
  align-items: start;
}

/* ── ARTICLE BODY ── */
.post-body { min-width: 0; }
.post-body h2 {
  font-family: 'Fraunces', serif; font-weight: 700;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  letter-spacing: -.02em; color: var(--ink);
  margin: 2.5rem 0 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--teal-light);
}
.post-body h3 {
  font-family: 'Fraunces', serif; font-weight: 700;
  font-size: 1.2rem; letter-spacing: -.01em;
  color: var(--ink); margin: 2rem 0 .75rem;
}
.post-body h4 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600; font-size: 1rem;
  color: var(--ink); margin: 1.5rem 0 .5rem;
}
.post-body p {
  font-size: .95rem; color: var(--ink2);
  line-height: 1.85; margin-bottom: 1.2rem; font-weight: 400;
}
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body em { color: var(--teal); font-style: normal; font-weight: 500; }
.post-body a {
  color: var(--teal); text-decoration: underline;
  text-decoration-color: rgba(0,168,122,.3);
  transition: text-decoration-color .2s;
}
.post-body a:hover { text-decoration-color: var(--teal); }

/* Lists */
.post-body ul, .post-body ol {
  margin: 1rem 0 1.5rem 0;
  padding-left: 0;
  list-style: none;
  display: flex; flex-direction: column; gap: .6rem;
}
.post-body ul li, .post-body ol li {
  font-size: .93rem; color: var(--ink2); line-height: 1.7;
  padding-left: 1.6rem; position: relative;
}
.post-body ul li::before {
  content: '→'; color: var(--teal); font-weight: 700;
  position: absolute; left: 0;
}
.post-body ol { counter-reset: item; }
.post-body ol li { counter-increment: item; }
.post-body ol li::before {
  content: counter(item);
  position: absolute; left: 0;
  font-family: 'Fraunces', serif; font-weight: 700;
  font-size: .85rem; color: var(--teal);
  width: 22px; height: 22px;
  background: var(--teal-light); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  top: .15rem;
}

/* Blockquote */
.post-body blockquote {
  border-left: 3px solid var(--teal);
  padding: 1rem 1.5rem;
  background: var(--teal-light);
  border-radius: 0 10px 10px 0;
  margin: 1.5rem 0;
}
.post-body blockquote p {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: 1rem; color: var(--ink); margin-bottom: 0;
}

/* Highlight box */
.highlight-box {
  background: var(--ink); border-radius: 12px;
  padding: 1.5rem 2rem; margin: 2rem 0;
  position: relative; overflow: hidden;
}
.highlight-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), #0055cc);
}
.highlight-box h4 {
  font-family: 'Fraunces', serif; font-weight: 700;
  font-size: 1rem; color: var(--teal);
  margin-bottom: .6rem; margin-top: 0;
}
.highlight-box p { color: rgba(255,255,255,.65); font-size: .88rem; margin-bottom: 0; }
.highlight-box ul li { color: rgba(255,255,255,.65); font-size: .88rem; }
.highlight-box ul li::before { color: var(--teal); }

/* Warning box */
.warn-box {
  background: var(--orange-light); border: 1.5px solid rgba(232,92,26,.25);
  border-radius: 10px; padding: 1.2rem 1.5rem; margin: 1.5rem 0;
}
.warn-box p { color: var(--orange); margin-bottom: 0; font-size: .88rem; }
.warn-box p::before { content: '⚠️ '; }

/* Table */
.post-body table {
  width: 100%; border-collapse: collapse;
  margin: 1.5rem 0; font-size: .88rem;
}
.post-body th {
  background: var(--ink); color: #fff;
  font-family: 'Fraunces', serif; font-weight: 700;
  font-size: .8rem; text-transform: uppercase; letter-spacing: .06em;
  padding: .8rem 1rem; text-align: left;
}
.post-body td {
  padding: .75rem 1rem; border-bottom: 1px solid var(--faint);
  color: var(--ink2); vertical-align: top;
}
.post-body tr:hover td { background: var(--bg2); }

/* ── SIDEBAR ── */
.post-sidebar { display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 7rem; }
.sidebar-card {
  background: #fff; border: 1.5px solid var(--faint);
  border-radius: 14px; padding: 1.5rem; overflow: hidden; position: relative;
}
.sidebar-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), #0055cc);
}
.sidebar-card h4 {
  font-family: 'Fraunces', serif; font-weight: 700;
  font-size: .95rem; color: var(--ink); margin-bottom: 1rem;
  letter-spacing: -.01em;
}
.toc-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.toc-list li::before { display: none; }
.toc-list li { padding-left: 0; }
.toc-list a {
  font-size: .8rem; color: var(--muted); text-decoration: none;
  display: block; padding: .3rem .5rem; border-radius: 6px;
  transition: background .2s, color .2s; line-height: 1.4;
}
.toc-list a:hover { background: var(--teal-light); color: var(--teal); }
.related-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.related-list li { padding-left: 0; }
.related-list li::before { display: none; }
.related-list a {
  font-size: .8rem; color: var(--ink2); text-decoration: none;
  display: flex; align-items: flex-start; gap: .5rem; line-height: 1.4;
  transition: color .2s;
}
.related-list a::before { content: '→'; color: var(--teal); flex-shrink: 0; font-size: .75rem; margin-top: .1rem; }
.related-list a:hover { color: var(--teal); }
.cta-sidebar {
  background: var(--ink); border-radius: 14px; padding: 1.5rem;
  position: relative; overflow: hidden;
}
.cta-sidebar::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--g1);
}
.cta-sidebar h4 { font-family: 'Fraunces', serif; font-weight: 700; font-size: .95rem; color: #fff; margin-bottom: .6rem; }
.cta-sidebar p { font-size: .8rem; color: rgba(255,255,255,.5); margin-bottom: 1rem; line-height: 1.6; }

/* ── POST FOOTER / MORE POSTS ── */
.post-more {
  background: var(--bg2);
  border-top: 1px solid var(--faint);
  padding: 4rem 5rem;
}
.post-more h3 {
  font-family: 'Fraunces', serif; font-weight: 700;
  font-size: 1.5rem; color: var(--ink); margin-bottom: 2rem;
}
.more-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; }
.more-card {
  background: #fff; border: 1.5px solid var(--faint);
  border-radius: 12px; padding: 1.4rem;
  text-decoration: none; display: block;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.more-card:hover { border-color: var(--teal); transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.08); }
.more-card-tag { font-size: .62rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: .5rem; }
.more-card h4 { font-family: 'Fraunces', serif; font-weight: 700; font-size: .9rem; color: var(--ink); line-height: 1.35; margin-bottom: .4rem; }
.more-card p { font-size: .75rem; color: var(--muted); line-height: 1.5; }

/* RESPONSIVE */
@media (max-width: 1024px) { .post-layout { grid-template-columns: 1fr; } .post-sidebar { position: static; } }
@media (max-width: 768px) {
  .post-hero { padding: 7rem 1.5rem 3rem; }
  .post-layout { padding: 3rem 1.5rem 4rem; }
  .post-more { padding: 3rem 1.5rem; }
  .more-grid { grid-template-columns: 1fr; }
}
