/* Blog specific styles - Mobile-first */

/* Blog Listing */
.blog-header {
  text-align: center;
  padding: 2rem 0;
}

.blog-header h1 {
  margin-bottom: 0.75rem;
}

.blog-header p {
  color: var(--text-light);
  font-size: 1.125rem;
}

/* Category Filter */
.category-filter {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2rem 0;
  padding: 0 1rem;
}

.category-btn {
  padding: 0.625rem 1.25rem;
  border: 2px solid var(--border);
  background: var(--white);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  color: var(--text-dark);
  text-decoration: none;
  display: inline-block;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.category-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(76, 175, 80, 0.05);
}

.category-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Article Grid */
.articles-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.article-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.article-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow);
  border-color: var(--primary);
}

.article-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.article-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.article-item h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  line-height: 1.4;
}

.article-item h3 a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.2s;
}

.article-item h3 a:hover {
  color: var(--primary);
}

.article-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  align-items: center;
}

.article-excerpt {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.2s;
  font-size: 0.95rem;
}

.read-more:hover {
  gap: 0.5rem;
}

/* Article Page */
.article-header {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}

.article-header h1 {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.article-header .article-meta {
  justify-content: center;
  margin-top: 1rem;
}

.article-hero {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  margin-bottom: 2rem;
  border-radius: 12px;
}

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

/* Table of Contents */
.toc {
  background: var(--bg-light);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
}

.toc h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.toc ul {
  list-style: none;
  padding-left: 0;
}

.toc li {
  margin-bottom: 0.5rem;
}

.toc a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  padding: 0.25rem 0;
}

.toc a:hover {
  color: var(--primary);
  padding-left: 0.5rem;
}

/* Article Content */
.article-content-wrapper h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
  scroll-margin-top: 80px;
}

.article-content-wrapper h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 80px;
}

.article-content-wrapper p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

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

.article-content-wrapper li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-content-wrapper strong {
  color: var(--text-dark);
  font-weight: 700;
}

.article-content-wrapper em {
  font-style: italic;
}

.article-content-wrapper a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(76, 175, 80, 0.3);
  text-decoration-thickness: 2px;
  transition: all 0.2s;
}

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

/* Inline CTA in article */
.inline-cta {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 2rem;
  margin: 2.5rem 0;
  border-radius: 12px;
  text-align: center;
}

.inline-cta h3 {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.inline-cta p {
  margin-bottom: 1.25rem;
  opacity: 0.95;
}

.inline-cta .btn-primary {
  background: var(--white);
  color: var(--primary);
}

.inline-cta .btn-primary:hover {
  background: var(--bg-light);
}

/* Related Articles in article page */
.related-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.related-section h3 {
  text-align: center;
  margin-bottom: 2rem;
}

.related-grid {
  display: grid;
  gap: 1.5rem;
}

/* Share Buttons (optional) */
.share-section {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--bg-light);
  border-radius: 8px;
  text-align: center;
}

.share-section h4 {
  margin-bottom: 1rem;
}

/* Tablet */
@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-header h1 {
    font-size: 2.5rem;
  }

  .article-hero {
    height: 400px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .article-header h1 {
    font-size: 3rem;
  }

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

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 0.625rem 1rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.2s;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(76, 175, 80, 0.05);
}

.pagination .active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
