/* ==========================================================
   blog-post.css  —  SMEdigital Detailed Blog Post Page
   Theme: Dark (#000) + Orange (#eb601f) + Montserrat / Lora
   Focus: Readable long-form content, minimal animations,
          strong SEO-friendly semantic structure
   ========================================================== */

:root {
  --orange:        #eb601f;
  --orange-dim:    rgba(235, 96, 31, 0.10);
  --orange-border: rgba(235, 96, 31, 0.25);
  --white:         #ffffff;
  --muted:         rgba(255,255,255,0.50);
  --border:        rgba(255,255,255,0.08);
  --card-bg:       rgba(17,17,17,0.85);
  --font-display:  'Montserrat', sans-serif;
  --font-body:     'Lora', Georgia, serif;
  --content-max:   720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display) !important;
  background: #000 !important;
  color: #fff !important;
}

/* Canvas */
#glow-particles {
  position: fixed;
  top: 0; left: 0;
  z-index: 0;
  pointer-events: none;
}

/* ==============================================
   HERO
   ============================================== */
.post-hero {
  position: relative;
  z-index: 10;
  padding-top: 10rem;
}

.post-hero__container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* Breadcrumb */
.post-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
}
.post-breadcrumb a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.post-breadcrumb a:hover { color: var(--orange); }
.post-breadcrumb svg { stroke: rgba(255,255,255,0.2); flex-shrink: 0; }
.post-breadcrumb span { color: rgba(255,255,255,0.5); }

/* Category + meta row */
.post-hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1.5rem;
}
.post-cat-badge {
  display: inline-block;
  background: var(--orange);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 0.25rem 0.65rem;
}
.post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.post-meta-item svg { stroke: rgba(255,255,255,0.3); }
.post-meta-sep { color: rgba(255,255,255,0.15); }

/* Title */
.post-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 1.5rem;
}

/* Intro paragraph */
.post-hero__intro {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.8;
  margin-bottom: 2rem;
  font-family: var(--font-body);
  font-style: italic;
}

/* Share */
.post-share {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0;
}
.post-share__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}
.post-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.post-share__btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-dim);
}

/* Hero image */
.post-hero__img-wrap {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
  overflow: visible;
}
.post-hero__img-wrap img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
  border-radius: 1.25rem;
  box-shadow:
    0 8px 24px rgba(0,0,0,0.5),
    0 24px 64px rgba(0,0,0,0.4),
    0 2px 0 rgba(255,255,255,0.04) inset;
}
.post-hero__img-overlay {
  position: absolute;
  inset: 0 1.5rem 0 1.5rem;
  border-radius: 1.25rem;
  background: linear-gradient(to bottom, transparent 55%, rgba(0,0,0,0.55));
  pointer-events: none;
}
@media (max-width: 768px) {
  .post-hero__img-wrap img { height: 220px; border-radius: 0.75rem; }
  .post-hero__img-overlay  { border-radius: 0.75rem; }
}

/* ==============================================
   TWO-COLUMN LAYOUT: TOC + ARTICLE
   ============================================== */
.post-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  gap: 4rem;
  align-items: stretch;
  position: relative;
  z-index: 10;
  /* Critical: no overflow:hidden on this element or any parent.
     overflow:hidden creates a new scroll context that breaks sticky. */
}

@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ==============================================
   TABLE OF CONTENTS
   ============================================== */

/* The outer column must stretch (align-items:stretch above),
   giving it the same height as the article column.
   No overflow, no position:sticky here — just a tall container. */
.post-toc {
  position: relative;
}

/* The inner box is sticky relative to the page scroll (body).
   It works because: parent has no overflow set, grid stretches
   the column to article height, so sticky has room to travel. */
.post-toc__inner {
  position: sticky;
  top: 7rem;
  max-height: calc(100vh - 9rem);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  background: rgba(17,17,17,0.7);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
}
.post-toc__inner::-webkit-scrollbar { display: none; }

@media (max-width: 1024px) {
  .post-toc { display: none; }
}

.post-toc__title {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 1rem;
}

.post-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  counter-reset: toc-counter;
}

.post-toc__list li { counter-increment: toc-counter; }

.post-toc__list a {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  line-height: 1.4;
}
.post-toc__list a:hover {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.04);
}
.post-toc__list a.is-active {
  color: var(--orange);
  border-left-color: var(--orange);
  background: var(--orange-dim);
}

/* ==============================================
   ARTICLE CONTENT
   ============================================== */
.post-content {
  min-width: 0; /* prevent overflow in grid */
}

.entry-content {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.75);
  max-width: var(--content-max);
}

/* Paragraphs */
.entry-content p {
  margin: 0 0 1.35rem;
}

/* Headings */
.entry-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 3rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.entry-content h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }

.entry-content h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin: 2rem 0 0.75rem;
  line-height: 1.3;
}

/* Lists */
.entry-content ul,
.entry-content ol {
  padding-left: 1.4rem;
  margin: 0 0 1.35rem;
}
.entry-content li {
  margin-bottom: 0.45rem;
  line-height: 1.75;
}
.entry-content ul li::marker { color: var(--orange); }
.entry-content ol li::marker {
  color: var(--orange);
  font-weight: 700;
  font-family: var(--font-display);
}

/* Nested lists */
.entry-content ul ul,
.entry-content ol ul {
  margin-top: 0.45rem;
  margin-bottom: 0.45rem;
}

/* Strong / em */
.entry-content strong { color: #fff; font-weight: 700; }
.entry-content em     { color: rgba(255,255,255,0.7); }

/* Links */
.entry-content a {
  color: var(--orange);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.entry-content a:hover { color: #fff; text-decoration-color: #fff; }

/* Callout box */
.post-callout {
  background: var(--orange-dim);
  border-left: 4px solid var(--orange);
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1.1rem 1.5rem;
  margin: 1.75rem 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.5;
}

/* FAQ accordion */
.post-faq {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  margin: 1.5rem 0;
}

.post-faq__item {
  border-bottom: 1px solid var(--border);
}
.post-faq__item:last-child { border-bottom: none; }

.post-faq__q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}
.post-faq__q:hover { background: rgba(255,255,255,0.04); }
.post-faq__item.is-open .post-faq__q {
  color: var(--orange);
  background: var(--orange-dim);
}

.post-faq__icon {
  stroke: rgba(255,255,255,0.35);
  flex-shrink: 0;
  transition: transform 0.3s ease, stroke 0.2s;
}
.post-faq__item.is-open .post-faq__icon {
  transform: rotate(180deg);
  stroke: var(--orange);
}

.post-faq__a {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.75;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.post-faq__item.is-open .post-faq__a {
  max-height: 400px;
  padding: 0 1.5rem 1.25rem;
}

/* ==============================================
   AUTHOR BOX
   ============================================== */
.post-author-box {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem;
  margin-top: 3.5rem;
  max-width: var(--content-max);
}
.post-author-box__avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--orange);
  color: #000;
  font-size: 0.72rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-display);
}
.post-author-box__name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.35rem;
}
.post-author-box__bio {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.65;
  margin: 0;
}

/* ==============================================
   TAGS
   ============================================== */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  max-width: var(--content-max);
}
.post-tags__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  flex-shrink: 0;
}
.post-tag {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.post-tag:hover {
  border-color: var(--orange-border);
  color: var(--orange);
  background: var(--orange-dim);
}

/* ==============================================
   RELATED POSTS
   ============================================== */
.post-related {
  border-top: 1px solid var(--border);
  padding: 5rem 1.5rem;
  position: relative;
  z-index: 10;
}
.post-related__container {
  max-width: 1180px;
  margin: 0 auto;
}
.post-related__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.post-related__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  margin: 0;
}
.post-related__all {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: letter-spacing 0.2s;
}
.post-related__all:hover { letter-spacing: 0.09em; }

.post-related__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 640px) { .post-related__grid { grid-template-columns: 1fr; } }

.rel-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.rel-card:hover {
  border-color: var(--orange-border);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(235,96,31,0.12);
}
.rel-card__img-wrap {
  display: block;
  overflow: hidden;
  height: 180px;
}
.rel-card__img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.rel-card:hover .rel-card__img-wrap img { transform: scale(1.05); }
.rel-card__body { padding: 1.25rem; }
.rel-card__cat {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.5rem;
}
.rel-card__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.5rem;
}
.rel-card__title a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}
.rel-card__title a:hover { color: var(--orange); }
.rel-card__meta {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.28);
  font-weight: 600;
}

/* ==============================================
   CTA SECTION
   ============================================== */
.post-cta {
  position: relative;
  z-index: 10;
  padding: 0 1.5rem 7rem;
}
.post-cta__container { max-width: 1180px; margin: 0 auto; }
.post-cta__inner {
  background: rgba(235,96,31,0.06);
  border: 1px solid var(--orange-border);
  border-radius: 1.5rem;
  padding: 4rem 3.5rem;
  text-align: center;
}
.post-cta__eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1rem;
}
.post-cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.post-cta__accent { color: var(--orange); }
.post-cta__sub {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 2.5rem;
}
.post-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 2.25rem;
  background: var(--orange);
  color: #000;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.04em;
  box-shadow: 0 0 28px rgba(235,96,31,0.3);
  transition: background 0.25s, box-shadow 0.25s, color 0.25s;
}
.post-cta__btn:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 0 50px rgba(235,96,31,0.5);
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 768px) {
  .post-hero__container { padding: 0 1rem 2.5rem; }
  .post-hero { padding-top: 8rem; }
  .post-layout { padding: 2.5rem 1rem 4rem; }
  .post-cta__inner { padding: 2.5rem 1.5rem; }
  .entry-content { font-size: 1rem; }
  .post-author-box { flex-direction: column; }
}