/* ===== BLOG SHARED STYLES ===== */
:root {
  --primary: #21c45d;
  --black: #000;
  --white: #fff;
  --gray: #f5f5f5;
  --gray-dark: #737373;
  --gray-medium: #e5e7eb;
  --border: 2px solid #000;
  --border-thick: 3px solid #000;
  --shadow: 4px 4px 0 #000;
  --shadow-lg: 6px 6px 0 #000;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
}

/* ===== BLOG INDEX - GRID PAGE ===== */

.blog-hero {
  padding: 3rem 0 2rem;
  text-align: center;
  border-bottom: var(--border-thick);
}

.blog-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.blog-hero p {
  font-size: 1.1rem;
  color: var(--gray-dark);
  max-width: 600px;
  margin: 0 auto;
}

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

/* Category filter pills */
.blog-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.filter-pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 2px solid var(--black);
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  text-decoration: none;
  color: var(--black);
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--primary);
  color: var(--white);
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0 var(--black);
}

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

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

@media (max-width: 639px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-hero h1 {
    font-size: 1.8rem;
  }
}

/* Blog card */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: var(--border-thick);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--black);
  transition: all 0.15s;
  overflow: hidden;
}

.blog-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}

.blog-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-bottom: var(--border);
  background: var(--gray);
}

.blog-card-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--gray) 0%, var(--gray-medium) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: var(--border);
  font-size: 2rem;
  color: var(--gray-dark);
}

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

.blog-card-category {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--black);
  margin-bottom: 0.75rem;
  width: fit-content;
}

.blog-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: var(--gray-dark);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  font-size: 0.8rem;
  color: var(--gray-dark);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-medium);
}

/* Load more button */
.blog-load-more {
  text-align: center;
  padding: 0 0 3rem;
}

.btn-load-more {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: var(--border-thick);
  background: var(--white);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  box-shadow: var(--shadow);
}

.btn-load-more:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
  background: var(--primary);
  color: var(--white);
}

.blog-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--gray-dark);
}

.blog-loading {
  text-align: center;
  padding: 4rem 1rem;
  font-weight: 600;
}

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

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

/* Breadcrumb */
.article-breadcrumb {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--gray-dark);
}

.article-breadcrumb a {
  color: var(--gray-dark);
  text-decoration: none;
}

.article-breadcrumb a:hover {
  color: var(--black);
  text-decoration: underline;
}

.article-breadcrumb span {
  margin: 0 0.4rem;
}

/* Article header */
.article-header {
  padding-bottom: 2rem;
}

.article-category {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--black);
  margin-bottom: 1rem;
}

.article-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

@media (max-width: 639px) {
  .article-title {
    font-size: 1.65rem;
  }
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--gray-dark);
}

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

/* Featured image */
.article-featured-image {
  width: 100%;
  border: var(--border-thick);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  display: block;
}

/* Article content typography */
.article-content {
  line-height: 1.8;
  font-size: 1.05rem;
}

.article-content h2 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

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

.article-content a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

.article-content a:hover {
  color: var(--black);
}

.article-content img {
  max-width: 100%;
  height: auto;
  border: var(--border);
  box-shadow: 3px 3px 0 var(--black);
  margin: 1.5rem 0;
  display: block;
}

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

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--gray);
  font-style: italic;
}

.article-content pre {
  background: var(--black);
  color: var(--white);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: var(--border-thick);
  font-size: 0.9rem;
  line-height: 1.5;
}

.article-content code {
  background: var(--gray);
  padding: 0.15rem 0.4rem;
  font-size: 0.9em;
  border: 1px solid var(--gray-medium);
}

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

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border: var(--border);
}

.article-content th,
.article-content td {
  padding: 0.75rem;
  text-align: left;
  border: 1px solid var(--gray-medium);
}

.article-content th {
  background: var(--gray);
  font-weight: 700;
}

/* CTA buttons in article content (inserted via admin editor) */
.article-content .blog-cta-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 3px solid var(--black);
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: all 0.15s;
  margin: 1rem 0;
}

.article-content .blog-cta-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
  text-decoration: none;
}

/* Social sharing */
.article-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 0;
  margin-top: 2rem;
  border-top: var(--border);
}

.article-share-label {
  font-weight: 700;
  font-size: 0.9rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--black);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 1rem;
  text-decoration: none;
  color: var(--black);
}

.share-btn:hover {
  background: var(--primary);
  color: var(--white);
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0 var(--black);
}

/* CTA banner at bottom */
.article-cta-banner {
  background: var(--black);
  color: var(--white);
  padding: 2.5rem;
  margin: 2.5rem 0;
  text-align: center;
  border: var(--border-thick);
  box-shadow: var(--shadow);
}

.article-cta-banner h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.article-cta-banner p {
  color: #aaa;
  margin-bottom: 1.5rem;
}

.article-cta-banner .btn-cta {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--primary);
  color: var(--white);
  border: 3px solid var(--white);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.15s;
  box-shadow: 4px 4px 0 rgba(255,255,255,0.3);
}

.article-cta-banner .btn-cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(255,255,255,0.3);
}

/* Related posts */
.related-posts {
  padding: 2.5rem 0;
}

.related-posts h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

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

.related-card {
  display: block;
  border: var(--border);
  padding: 1rem;
  text-decoration: none;
  color: var(--black);
  transition: all 0.15s;
  box-shadow: 3px 3px 0 var(--black);
}

.related-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--black);
}

.related-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.related-card-meta {
  font-size: 0.8rem;
  color: var(--gray-dark);
}

/* 404 state */
.article-not-found {
  text-align: center;
  padding: 5rem 1rem;
}

.article-not-found h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

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