/* 
  ========================================
  n8n Ambassador Program - Blog Styles
  ========================================
*/

/* Blog Layout & Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-12);
}

.filter-btn {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--n8n-gradient);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

.blog-card {
  display: flex;
  flex-direction: column;
}

.blog-card.hidden {
  display: none;
}

.blog-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  background-color: var(--surface-light);
}

.blog-load-more {
  text-align: center;
  margin-top: var(--space-8);
}

.blog-load-more.hidden {
  display: none;
}

/* Single Article Styles */
.article-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-12);
  padding-top: var(--space-8);
}

.article-meta-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.article-category {
  color: var(--n8n-pink);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  margin-bottom: var(--space-8);
  line-height: 1.1;
}

.article-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

.article-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--surface-light);
  object-fit: cover;
}

.article-author-info {
  text-align: left;
}

.article-author-name {
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.article-author-role {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.article-featured-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-12);
  background-color: var(--surface-light);
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  max-width: var(--max-width);
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: 250px 1fr 250px;
    gap: var(--space-12);
  }
}

.article-toc-container {
  display: none;
}

@media (min-width: 1024px) {
  .article-toc-container {
    display: block;
    position: sticky;
    top: calc(80px + var(--space-8));
    align-self: start;
    padding-right: var(--space-4);
  }
}

.article-toc-title {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.article-toc-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: var(--text-sm);
}

.article-toc-list a {
  color: var(--text-secondary);
  transition: color var(--transition);
}

.article-toc-list a:hover {
  color: var(--n8n-pink);
}

.article-content {
  max-width: 800px;
  font-size: var(--text-lg);
  line-height: 1.8;
  color: #D1D1E0; /* Slightly lighter than secondary for better readability */
}

/* Typography inside article */
.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--text-primary);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
}

.article-content h2 {
  font-size: var(--text-3xl);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-color);
}

.article-content p {
  margin-bottom: var(--space-6);
}

.article-content a {
  color: var(--n8n-pink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.article-content ul,
.article-content ol {
  margin-bottom: var(--space-6);
  padding-left: var(--space-6);
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: var(--space-2);
}

.article-content img {
  border-radius: var(--radius-md);
  margin: var(--space-8) 0;
}

.article-content blockquote {
  border-left: 4px solid var(--n8n-pink);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--text-primary);
}

/* Share Section */
.article-share {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.article-share-title {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 600;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--surface-light);
  color: var(--text-primary);
  transition: all var(--transition);
}

.share-btn:hover {
  background: var(--text-primary);
  color: var(--bg-color);
  transform: translateY(-2px);
}

/* Related Articles */
.related-articles {
  margin-top: var(--space-16);
  padding-top: var(--space-16);
  border-top: 1px solid var(--border-color);
}

.related-articles-title {
  text-align: center;
  margin-bottom: var(--space-8);
}
