/* ===== BLOG SHARED STYLES ===== */
:root {
  --primary: #00C853;
  --primary-light: #D1FAE5;
  --primary-dark: #00A844;
  --foreground: #000;
  --background: #fff;
  --muted: #f8f8f8;
  --muted-dark: #e5e7eb;
  --text-secondary: #555;
  --text-tertiary: #888;
  --border-color: #000;
  --border: 1px solid #000;
  --border-light: 1px solid #e5e7eb;
  --transition: all 0.15s ease;
}

body {
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}


/* ===== SHARED HEADER (matches site-wide style) ===== */

.header {
  background: var(--background);
  border-bottom: 3px solid #000;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 32px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  color: var(--foreground);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.nav a:hover {
  text-decoration: underline;
}

.btn-get-started {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--foreground);
  background: var(--primary);
  color: var(--foreground);
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 3px 3px 0 #000;
  text-decoration: none;
  transition: var(--transition);
}

.btn-get-started:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #000;
  text-decoration: none;
}


/* ================================================
   BLOG INDEX PAGE
   ================================================ */

.blog-hero {
  padding: 4.5rem 0 2rem;
  text-align: center;
}

.blog-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 0.5rem;
  line-height: 1.15;
}

.blog-hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

.blog-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}


/* Category filter pills */

.blog-filters {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0 2.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  justify-content: center;
}

.blog-filters::-webkit-scrollbar { display: none; }

.filter-pill {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--muted-dark);
  background: var(--background);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-secondary);
  font-family: inherit;
  border-radius: 0;
}

.filter-pill:hover {
  border-color: var(--foreground);
  color: var(--foreground);
}

.filter-pill.active {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}


/* Post grid */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 0 0 3rem;
}


/* Blog card */

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--background);
  border: 1px solid var(--foreground);
  text-decoration: none;
  color: var(--foreground);
  transition: var(--transition);
  overflow: hidden;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.06);
}

.blog-card:hover .blog-card-title {
  color: var(--primary-dark);
}

.blog-card-image {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--foreground);
  background: var(--muted);
}

.blog-card-image-placeholder {
  width: 100%;
  aspect-ratio: 2 / 1;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--foreground);
  color: var(--text-tertiary);
}

.blog-card-body {
  padding: 1.25rem 1.4rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-category {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  width: fit-content;
}

.blog-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.45rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}

.blog-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 0.85rem;
  padding-top: 0.7rem;
  border-top: var(--border-light);
}


/* Loading + Empty states */

.blog-loading {
  text-align: center;
  padding: 5rem 1rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-tertiary);
}

.blog-empty {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-secondary);
}


/* Load more button */

.blog-load-more {
  text-align: center;
  padding: 0 0 3.5rem;
}

.btn-load-more {
  display: inline-block;
  padding: 0.7rem 2rem;
  border: 1px solid var(--foreground);
  background: var(--background);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  color: var(--foreground);
  border-radius: 0;
}

.btn-load-more:hover {
  background: var(--foreground);
  color: var(--background);
}


/* Blog index CTA section */

.blog-cta-section {
  padding: 1rem 0 4rem;
}

.blog-cta-box {
  text-align: center;
  padding: 2.5rem 2rem;
  border: 1px solid var(--foreground);
  background: var(--muted);
}

.blog-cta-box h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.blog-cta-box p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.blog-cta-box .btn-cta,
.article-cta-banner .btn-cta {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.92rem;
  border: 1px solid var(--foreground);
  transition: var(--transition);
  border-radius: 0;
}

.blog-cta-box .btn-cta:hover,
.article-cta-banner .btn-cta:hover {
  background: var(--primary-dark);
}


/* ================================================
   BLOG ARTICLE PAGE
   ================================================ */

.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}


/* Back link */

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 2rem 0 0;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.article-back:hover {
  color: var(--foreground);
}

.article-back svg {
  width: 16px;
  height: 16px;
}


/* Article header */

.article-header {
  padding: 2.5rem 0 2rem;
}

.article-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.article-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--text-tertiary);
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.article-meta-divider {
  color: var(--text-tertiary);
  user-select: none;
}


/* Featured image */

.article-featured-image {
  width: 100%;
  border: 1px solid var(--muted-dark);
  border-radius: 6px;
  margin-bottom: 2.5rem;
  display: block;
}


/* ===== Article content — the reading experience ===== */

.article-content {
  line-height: 1.85;
  font-size: 1.075rem;
  color: #222;
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-top: 2.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2.25rem;
  margin-bottom: 0.6rem;
  line-height: 1.35;
  color: var(--foreground);
}

.article-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.article-content p {
  margin-bottom: 1.4rem;
}

.article-content a {
  color: var(--primary-dark);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0, 168, 68, 0.35);
  transition: text-decoration-color 0.15s;
}

.article-content a:hover {
  text-decoration-color: var(--primary-dark);
}

.article-content img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--muted-dark);
  margin: 2rem 0;
  display: block;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.4rem;
  padding-left: 1.4rem;
}

.article-content li {
  margin-bottom: 0.45rem;
  line-height: 1.8;
  padding-left: 0.2rem;
}

.article-content li::marker {
  color: var(--primary);
}

.article-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  background: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.article-content blockquote p {
  margin-bottom: 0;
}

.article-content blockquote p + p {
  margin-top: 0.75rem;
}

.article-content pre {
  background: #111;
  color: #e2e8f0;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 1px solid #333;
  font-size: 0.88rem;
  line-height: 1.65;
  border-radius: 0;
}

.article-content code {
  background: var(--muted);
  padding: 0.15rem 0.4rem;
  font-size: 0.88em;
  border: 1px solid var(--muted-dark);
  font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
  border-radius: 0;
}

.article-content pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: inherit;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.article-content th,
.article-content td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--muted-dark);
}

.article-content th {
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--foreground);
}

.article-content tr:last-child td {
  border-bottom: none;
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--muted-dark);
  margin: 2.5rem 0;
}

.article-content strong {
  font-weight: 600;
  color: var(--foreground);
}

.article-content .blog-cta-btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--foreground);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
  margin: 1rem 0;
  border-radius: 0;
}

.article-content .blog-cta-btn:hover {
  background: var(--primary-dark);
  text-decoration: none;
  color: #fff;
}

/* Table responsive wrapper */
.article-content .table-wrap {
  overflow-x: auto;
  margin: 1.75rem 0;
  -webkit-overflow-scrolling: touch;
}

.article-content .table-wrap table {
  margin: 0;
  min-width: 480px;
}


/* Article divider */

.article-divider {
  border: none;
  border-top: 1px solid var(--muted-dark);
  margin: 3rem 0 0;
}


/* Social sharing */

.article-share {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 0 1.5rem;
}

.article-share-label {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-right: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--muted-dark);
  background: var(--background);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-tertiary);
  border-radius: 0;
}

.share-btn:hover {
  border-color: var(--foreground);
  color: var(--foreground);
  background: var(--muted);
}


/* CTA banner */

.article-cta-banner {
  background: var(--muted);
  border: 1px solid var(--foreground);
  padding: 2.5rem 2rem;
  margin: 0 0 2.5rem;
  text-align: center;
}

.article-cta-banner h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.article-cta-banner p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
}


/* Related posts */

.related-posts {
  padding: 1.5rem 0 3.5rem;
}

.related-posts h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}

.related-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.related-card {
  display: block;
  padding: 1rem 0;
  text-decoration: none;
  color: var(--foreground);
  transition: var(--transition);
  border-bottom: var(--border-light);
}

.related-card:first-child {
  border-top: var(--border-light);
}

.related-card:hover .related-card-title {
  color: var(--primary-dark);
}

.related-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  line-height: 1.35;
  transition: color 0.15s;
}

.related-card-meta {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}


/* 404 state */

.article-not-found {
  text-align: center;
  padding: 6rem 1rem;
}

.article-not-found h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.article-not-found p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.article-not-found a {
  color: var(--primary-dark);
  font-weight: 600;
}


/* Breadcrumb (legacy support) */

.article-breadcrumb {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: none;
}


/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 768px) {
  .header .nav {
    display: none !important;
  }

  .header-content {
    padding: 0.75rem 1rem !important;
  }

  .blog-hero {
    padding: 3rem 0 1.5rem;
  }

  .blog-hero h1 {
    font-size: 1.65rem;
  }

  .blog-hero p {
    font-size: 0.95rem;
  }

  .blog-filters {
    justify-content: flex-start;
    padding-bottom: 2rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .blog-card-body {
    padding: 1rem 1.15rem 1.25rem;
  }

  .blog-card-title {
    font-size: 1rem;
  }

  .article-header {
    padding: 1.75rem 0 1.5rem;
  }

  .article-title {
    font-size: 1.7rem;
    line-height: 1.2;
  }

  .article-content {
    font-size: 1.02rem;
    line-height: 1.8;
  }

  .article-content h2 {
    font-size: 1.3rem;
    margin-top: 2.25rem;
  }

  .article-content h3 {
    font-size: 1.1rem;
    margin-top: 1.75rem;
  }

  .article-content blockquote {
    padding: 0.75rem 1rem;
    margin: 1.5rem 0;
  }

  .article-content pre {
    padding: 1rem;
    font-size: 0.82rem;
    margin-left: -2rem;
    margin-right: -2rem;
    border-left: none;
    border-right: none;
  }

  .article-cta-banner {
    padding: 2rem 1.25rem;
  }

  .article-cta-banner h3 {
    font-size: 1.15rem;
  }

  .blog-cta-box {
    padding: 2rem 1.25rem;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
