/* =========================================================
   Northview Agency — Blog & article styling
   Built on the design tokens defined in styles.css (:root).
   ========================================================= */

/* Push content below the fixed pill nav on interior pages */
.nv-page {
  padding-top: 120px;
}

/* ----- Blog index ----- */
.blog-head {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px var(--pad-x) 10px;
  text-align: center;
}
.blog-head .section__sub { margin-left: auto; margin-right: auto; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--pad-x) 90px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.blog-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 160, 130, 0.55);
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 1px rgba(255, 160, 130, 0.32), 0 22px 50px -20px var(--accent-glow);
}

.blog-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(125, 198, 224, 0.16) 0%, transparent 60%),
    linear-gradient(135deg, rgba(15, 28, 50, 0.5) 0%, rgba(8, 14, 28, 0.7) 100%);
  border-bottom: 1px solid var(--border-subtle);
}
.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.blog-card:hover .blog-card__media img { transform: scale(1.04); }

.blog-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 26px 28px;
  flex: 1;
}
.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.blog-card__cat {
  color: var(--accent-bright);
}
.blog-card__title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.blog-card__title a { transition: color 0.2s ease; }
.blog-card:hover .blog-card__title a { color: var(--accent-bright); }
.blog-card__excerpt {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}
.blog-card__more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-bright);
}
.blog-card__more svg { width: 15px; height: 15px; transition: transform 0.2s ease; }
.blog-card:hover .blog-card__more svg { transform: translateX(4px); }

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 var(--pad-x) 90px;
}
.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-mid);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.blog-pagination .page-numbers:hover { color: var(--text-primary); border-color: var(--border-strong); background: rgba(255,255,255,0.04); }
.blog-pagination .page-numbers.current {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  border-color: transparent;
}

/* ----- Single article ----- */
.article {
  max-width: 820px;
  margin: 0 auto;
  padding: 10px var(--pad-x) 70px;
}
.article__header { text-align: center; margin-bottom: 36px; }
.article__meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.article__meta .article__cat { color: var(--accent-bright); }
.article__title {
  font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.article__excerpt {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}
.article__featured {
  margin: 36px auto 44px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}
.article__featured img { width: 100%; display: block; }

/* Article body typography */
.post-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
}
.post-content > * + * { margin-top: 1.4em; }
.post-content h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-top: 1.8em;
}
.post-content h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1.5em;
}
.post-content h4 { font-size: 19px; font-weight: 700; color: var(--text-primary); }
.post-content a { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { color: var(--accent-soft); }
.post-content strong { color: var(--text-primary); font-weight: 700; }
.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-top: 0.5em; }
.post-content li::marker { color: var(--accent); }
.post-content img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 22px;
  margin-left: 0;
  font-style: italic;
  color: var(--text-primary);
}
.post-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 6px;
}
.post-content pre {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 20px;
  overflow-x: auto;
}
.post-content pre code { background: none; padding: 0; }
.post-content hr { border: none; border-top: 1px solid var(--border-subtle); }

/* Article footer: tags + back link */
.article__footer {
  max-width: 820px;
  margin: 50px auto 0;
  padding: 28px var(--pad-x) 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.article__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.article__tags a {
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(125, 198, 224, 0.12);
  color: var(--accent-cool-bright);
  transition: background 0.2s ease;
}
.article__tags a:hover { background: rgba(125, 198, 224, 0.22); }

/* End-of-article CTA */
.article-cta {
  max-width: 820px;
  margin: 60px auto 0;
  padding: 40px clamp(24px, 4vw, 48px);
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 126, 84, 0.10), rgba(255, 126, 84, 0.04));
  border: 1px solid rgba(255, 126, 84, 0.30);
  border-radius: var(--r-lg);
  backdrop-filter: blur(16px);
}
.article-cta h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.article-cta p { color: var(--text-secondary); margin-bottom: 22px; }

/* Empty state / 404 */
.nv-empty {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 60px var(--pad-x) 100px;
}
.nv-empty h1 { font-size: clamp(40px, 8vw, 90px); font-weight: 800; letter-spacing: -0.03em; }
.nv-empty p { color: var(--text-secondary); margin: 14px 0 28px; font-size: 16px; }

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .blog-grid { grid-template-columns: 1fr; }
  .article__footer { flex-direction: column; align-items: flex-start; }
}
