/*
 * blog.css — ParadeSmart Blog Stylesheet
 * Loaded in addition to styles.css on all blog pages.
 * Follows the Help Center visual pattern: sidebar + content-area layout,
 * same font tokens, same colour system, same eyebrow/rule components.
 *
 * Version 1.0 | July 2026 | Virgo Development
 */

/* ══════════════════════════════════════════════════════════
   1. BLOG INDEX — header, tabs, featured card, post grid
══════════════════════════════════════════════════════════ */

/* Page header banner */
.blog-index-header {
  background: var(--navy);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.blog-index-header::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px,
      rgba(94,187,199,.03) 59px, rgba(94,187,199,.03) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px,
      rgba(94,187,199,.03) 59px, rgba(94,187,199,.03) 60px);
  pointer-events: none;
}
.blog-index-header .lr {
  position: relative;
}
.blog-index-header .dh {
  color: var(--white);
  margin-top: .75rem;
}
.blog-index-sub {
  font-size: 1rem;
  line-height: 1.76;
  color: rgba(255,255,255,.56);
  font-weight: 300;
  max-width: 540px;
  margin-top: .85rem;
}

/* Category filter tabs */
.category-tabs {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  padding: 2rem 0 .25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  height: 34px;
  padding: 0 .85rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--ink-light);
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  transition: all .16s;
  font-family: var(--sans);
}
.cat-tab:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.cat-tab.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
  font-weight: 600;
}
.cat-tab-count {
  font-size: .72rem;
  font-weight: 400;
  opacity: .7;
}
.cat-tab.active .cat-tab-count {
  opacity: .85;
}

/* Blog index body */
.blog-index-body {
  padding-top: 0;
  padding-bottom: 6rem;
}

/* ── Featured post card (large, first post) ── */
.post-card-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  transition: box-shadow .2s;
}
.post-card-featured:hover {
  box-shadow: 0 8px 32px rgba(13,46,86,.08);
}
.post-card-featured .post-card-img-link {
  display: block;
  min-height: 320px;
}
.post-card-featured .post-card-img {
  height: 100%;
  min-height: 320px;
  background-size: cover;
  background-position: center;
}
.post-card-featured .post-card-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.post-card-featured .post-card-title {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
  margin: .6rem 0 .85rem;
  letter-spacing: -.01em;
}
.post-card-featured .post-card-title a {
  text-decoration: none;
  color: inherit;
  transition: color .16s;
}
.post-card-featured .post-card-title a:hover { color: var(--teal); }

/* ── Post grid (2-column below featured) ── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.post-card {
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  background: var(--white);
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover {
  box-shadow: 0 6px 24px rgba(13,46,86,.07);
  transform: translateY(-2px);
}

.post-card-img-link {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.post-card-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform .3s ease;
}
.post-card:hover .post-card-img { transform: scale(1.03); }

.post-card-body {
  padding: 1.4rem;
}
.post-card-title {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--navy);
  margin: .5rem 0 .6rem;
  line-height: 1.28;
}
.post-card-title a {
  text-decoration: none;
  color: inherit;
  transition: color .16s;
}
.post-card-title a:hover { color: var(--teal); }

.post-card-desc {
  font-size: .84rem;
  line-height: 1.65;
  color: var(--ink-light);
  font-weight: 300;
  margin-bottom: .9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta {
  font-size: .76rem;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--sans);
}

/* Category pill */
.post-cat-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 .6rem;
  background: rgba(26,172,204,.1);
  color: var(--deep-blue);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 3px;
  text-decoration: none;
  font-family: var(--sans);
  transition: background .16s;
}
.post-cat-pill:hover {
  background: rgba(26,172,204,.18);
}

/* Blog empty state */
.blog-empty {
  text-align: center;
  padding: 6rem 0;
  color: var(--ink-light);
}


/* ══════════════════════════════════════════════════════════
   2. BLOG POST — sidebar + content layout
══════════════════════════════════════════════════════════ */

.blog-wrap {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 4rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem var(--pad) 6rem;
  align-items: start;
}

/* ── Sidebar ── */
.blog-sidebar {
  position: sticky;
  top: 112px; /* brand-strip + nav height */
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}

.sidebar-back {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  margin-bottom: 1.75rem;
  font-family: var(--sans);
  transition: gap .16s;
}
.sidebar-back:hover { gap: .7rem; }

/* Table of contents */
.blog-toc {
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}
.toc-label {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .65rem;
  font-family: var(--sans);
}
.toc-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: .22rem;
}
.toc-list li a {
  display: block;
  font-size: .81rem;
  color: var(--ink-light);
  text-decoration: none;
  padding: .25rem .5rem;
  border-left: 2px solid transparent;
  border-radius: 0 3px 3px 0;
  line-height: 1.45;
  transition: all .16s;
  font-family: var(--sans);
}
.toc-list li a:hover,
.toc-list li a.active {
  color: var(--navy);
  border-left-color: var(--teal);
  background: var(--pale-blue);
}
.toc-list li.toc-h3 a {
  padding-left: 1rem;
  font-size: .78rem;
}

/* Sidebar section label */
.sidebar-section {
  margin-bottom: 1.5rem;
}
.sidebar-label {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .65rem;
  font-family: var(--sans);
}

/* Sidebar category list */
.sidebar-cat-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.sidebar-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .32rem .5rem;
  font-size: .82rem;
  color: var(--ink-mid);
  text-decoration: none;
  border-radius: 3px;
  transition: all .16s;
  font-family: var(--sans);
}
.sidebar-cat-link:hover {
  background: var(--pale-blue);
  color: var(--navy);
}
.sidebar-cat-link.active {
  background: rgba(26,172,204,.1);
  color: var(--teal);
  font-weight: 600;
  border-left: 2px solid var(--teal);
  padding-left: .4rem;
}
.cat-count {
  font-size: .72rem;
  color: var(--ink-faint);
  font-weight: 400;
}


/* ── Post article ── */
.blog-post {
  min-width: 0; /* prevent overflow in grid */
}

/* Breadcrumb */
.blog-breadcrumb {
  margin-bottom: 1.25rem;
}
.blog-breadcrumb ol {
  display: flex;
  align-items: center;
  gap: .4rem;
  list-style: none;
  padding: 0; margin: 0;
  font-size: .78rem;
  color: var(--ink-faint);
  font-family: var(--sans);
}
.blog-breadcrumb li + li::before {
  content: '/';
  color: var(--rule);
  margin-right: .4rem;
}
.blog-breadcrumb a {
  color: var(--ink-faint);
  text-decoration: none;
  transition: color .16s;
}
.blog-breadcrumb a:hover { color: var(--teal); }

/* Post meta (category pill + date + reading time) */
.post-meta-top {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.post-meta-sep {
  width: 3px; height: 3px;
  background: var(--rule);
  border-radius: 50%;
  display: inline-block;
}
.post-date,
.post-reading-time {
  font-size: .78rem;
  color: var(--ink-faint);
  font-family: var(--sans);
}

/* Post headline */
.post-title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -.01em;
  margin-bottom: 1rem;
}

/* Lede / description */
.post-lede {
  font-size: 1.1rem;
  line-height: 1.72;
  color: var(--ink-mid);
  font-weight: 300;
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

/* Hero image */
.post-hero-img {
  margin: 0 0 2.25rem;
  border-radius: 4px;
  overflow: hidden;
}
.post-hero-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* Post body — typography for long-form reading */
.post-body {
  font-size: 1rem;
  line-height: 1.82;
  color: var(--ink-mid);
  font-weight: 300;
  min-width: 0;
  overflow-wrap: anywhere;
}
.post-body h2 {
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 400;
  color: var(--navy);
  margin: 2.5rem 0 .85rem;
  line-height: 1.2;
  letter-spacing: -.01em;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 120px;
}
.post-body h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--navy);
  margin: 1.75rem 0 .6rem;
  scroll-margin-top: 120px;
}
.post-body h4 {
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 600;
  color: var(--navy);
  margin: 1.25rem 0 .4rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.post-body p {
  margin: 0 0 1.25rem;
}
.post-body p:last-child { margin-bottom: 0; }
.post-body a {
  color: var(--deep-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .16s;
  overflow-wrap: anywhere;
}
.post-body a:hover { color: var(--teal); }
.post-body strong { font-weight: 600; color: var(--ink); }
.post-body em { font-style: italic; }
.post-body ul, .post-body ol {
  margin: .5rem 0 1.25rem 1.5rem;
  padding: 0;
}
.post-body li {
  margin-bottom: .5rem;
  line-height: 1.7;
}
.post-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}
/* Tables */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .88rem;
}
.post-body th {
  background: var(--navy);
  color: var(--white);
  padding: .55rem .85rem;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  font-family: var(--sans);
}
.post-body td {
  padding: .55rem .85rem;
  border: 1px solid var(--rule);
  color: var(--ink-mid);
}
.post-body tr:nth-child(even) td { background: var(--surface); }
/* Blockquote */
.post-body blockquote {
  border-left: 3px solid var(--teal);
  padding: .85rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--pale-blue);
  border-radius: 0 4px 4px 0;
}
.post-body blockquote p {
  font-size: .97rem;
  color: var(--ink-mid);
  font-style: italic;
  margin: 0;
}
/* Code */
.post-body code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: .85em;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: .1rem .35rem;
  color: var(--navy);
}
.post-body pre {
  background: var(--navy);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.post-body pre code {
  background: none;
  border: none;
  color: var(--pale-blue);
  font-size: .88rem;
  padding: 0;
}

/* Callout shortcode */
.callout {
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: .92rem;
  line-height: 1.7;
}
.callout-tip     { background: var(--tint-teal);   border-left: 3px solid var(--teal); }
.callout-info    { background: #E3F2FB;             border-left: 3px solid #1B6CA8; }
.callout-warning { background: var(--tint-yellow);  border-left: 3px solid var(--yellow); }
.callout-success { background: var(--tint-green);   border-left: 3px solid var(--sage); }
.callout-danger  { background: #FBE6E4;             border-left: 3px solid #C0392B; }

/* Inline stat shortcode */
.inline-stat {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 0 .5rem;
}
.inline-stat-n {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--navy);
  line-height: 1;
}
.inline-stat-l {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-family: var(--sans);
}

/* Tags */
.post-tags {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.post-tags svg { color: var(--ink-faint); flex-shrink: 0; }
.post-tag {
  display: inline-flex;
  height: 26px;
  padding: 0 .65rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-size: .74rem;
  font-weight: 500;
  color: var(--ink-mid);
  text-decoration: none;
  align-items: center;
  font-family: var(--sans);
  transition: all .16s;
}
.post-tag:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--pale-blue);
}

/* Author / byline strip */
.post-byline {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.byline-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-size: .76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--sans);
}
.byline-text {
  font-size: .84rem;
  font-family: var(--sans);
}
.byline-text strong {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .15rem;
}
.byline-text span { color: var(--ink-light); }
.byline-text a {
  color: var(--deep-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .16s;
}
.byline-text a:hover { border-bottom-color: var(--deep-blue); }

/* Prev / Next pagination */
.post-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 2.5rem;
}
.pagination-prev,
.pagination-next {
  background: var(--white);
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.pagination-next { text-align: right; }
.pag-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-family: var(--sans);
}
.pag-title {
  font-size: .9rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  line-height: 1.4;
  font-family: var(--sans);
  transition: color .16s;
}
.pag-title:hover { color: var(--teal); }

/* Related posts */
.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.related-card {
  padding: 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  transition: border-color .18s, background .18s;
}
.related-card:hover {
  border-color: var(--teal);
  background: var(--pale-blue);
}
.related-cat {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .45rem;
  font-family: var(--sans);
}
.related-title {
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: .5rem;
  font-family: var(--sans);
}
.related-title a {
  color: var(--navy);
  text-decoration: none;
  transition: color .16s;
}
.related-title a:hover { color: var(--teal); }
.related-date {
  font-size: .74rem;
  color: var(--ink-faint);
  font-family: var(--sans);
}


/* ══════════════════════════════════════════════════════════
   3. RESPONSIVE
══════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
  .post-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .blog-wrap {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
  }
  .blog-toc { display: none; } /* hide ToC on mobile — too long */
  .post-card-featured {
    grid-template-columns: 1fr;
  }
  .post-card-featured .post-card-img-link,
  .post-card-featured .post-card-img {
    min-height: 220px;
  }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-pagination { grid-template-columns: 1fr; }
  .pagination-next { text-align: left; }
  .category-tabs { gap: .25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
