/**
 * Blog Section Styles for String Art Generator
 * Consistent with main site design system
 */

/* Blog Listing Page Styles */
.blog-listing {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.blog-header {
  text-align: center;
  margin-bottom: 4rem;
}

.blog-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(to bottom, hsl(222, 47%, 11%), hsl(222, 47%, 20%));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-header p {
  font-size: 1.25rem;
  color: hsl(215.4, 16.3%, 46.9%);
  max-width: 700px;
  margin: 0 auto;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

/* Blog Card Styles */
.blog-card {
  display: flex;
  flex-direction: column;
  background: white;
  border: 2px solid hsl(214.3, 31.8%, 91.4%);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: hsl(221, 83%, 53%);
}

.blog-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: hsl(210, 40%, 96%);
}

.blog-card-content {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: hsl(215.4, 16.3%, 46.9%);
  margin-bottom: 1rem;
}

.blog-card-date::before {
  content: "📅 ";
}

.blog-card-reading-time::before {
  content: "⏱️ ";
}

.blog-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  color: hsl(222, 47%, 11%);
}

.blog-card-excerpt {
  font-size: 1rem;
  line-height: 1.6;
  color: hsl(215.4, 16.3%, 46.9%);
  flex: 1;
  margin-bottom: 1.25rem;
}

.blog-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(221, 83%, 53%);
  font-weight: 600;
  font-size: 0.95rem;
  transition: gap 0.2s ease;
}

.blog-card:hover .blog-card-cta {
  gap: 0.75rem;
}

/* Breadcrumb Navigation */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: hsl(221, 83%, 53%);
  text-decoration: none;
  transition: opacity 0.2s;
}

.breadcrumb a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.breadcrumb-separator {
  margin: 0 0.5rem;
  color: hsl(215.4, 16.3%, 46.9%);
}

/* Article Page Styles */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  position: relative;
  z-index: 1;
}

.article-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid hsl(214.3, 31.8%, 91.4%);
}

.article-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: hsl(222, 47%, 11%);
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  font-size: 0.95rem;
  color: hsl(215.4, 16.3%, 46.9%);
  flex-wrap: wrap;
}

.article-meta time::before {
  content: "📅 ";
}

.article-meta .reading-time::before {
  content: "⏱️ ";
}

/* Featured Image */
.featured-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2rem 0 3rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Table of Contents */
.table-of-contents {
  background: hsl(210, 40%, 98%);
  border: 2px solid hsl(214.3, 31.8%, 91.4%);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0 3rem;
}

.table-of-contents h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: hsl(222, 47%, 11%);
}

.table-of-contents ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.table-of-contents li {
  margin-bottom: 0.75rem;
}

.table-of-contents a {
  color: hsl(221, 83%, 53%);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-block;
}

.table-of-contents a:hover {
  transform: translateX(4px);
  text-decoration: underline;
}

/* Article Content */
.article-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: hsl(222, 47%, 11%);
}

.article-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 3rem 0 1.25rem;
  line-height: 1.3;
  color: hsl(222, 47%, 11%);
  scroll-margin-top: 2rem;
}

.article-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  line-height: 1.4;
  color: hsl(222, 47%, 11%);
  scroll-margin-top: 2rem;
}

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

.article-content a {
  color: hsl(221, 83%, 53%);
  text-decoration: underline;
  font-weight: 500;
  transition: opacity 0.2s;
}

.article-content a:hover {
  opacity: 0.7;
}

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

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

.article-content strong {
  font-weight: 700;
  color: hsl(222, 47%, 11%);
}

.article-content img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-content blockquote {
  border-left: 4px solid hsl(221, 83%, 53%);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: hsl(215.4, 16.3%, 46.9%);
}

/* Pro Tips / Info Boxes */
.info-box {
  background: hsl(210, 40%, 98%);
  border-left: 4px solid hsl(221, 83%, 53%);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.info-box h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: hsl(221, 83%, 53%);
}

.warning-box {
  background: hsl(48, 96%, 95%);
  border-left: 4px solid hsl(48, 96%, 53%);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

/* FAQ Section */
.faq-section {
  margin: 3rem 0;
}

.faq-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: hsl(210, 40%, 98%);
  border-radius: 8px;
  border: 1px solid hsl(214.3, 31.8%, 91.4%);
}

.faq-item h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem 0 !important;
  color: hsl(222, 47%, 11%);
}

.faq-item p {
  margin: 0;
}

/* CTA Box */
.cta-box {
  background: linear-gradient(135deg, hsl(221, 83%, 53%), hsl(221, 83%, 45%));
  color: white;
  padding: 2.5rem;
  border-radius: 12px;
  text-align: center;
  margin: 3rem 0;
}

.cta-box h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1rem 0 !important;
  color: white !important;
}

.cta-box p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.cta-button {
  display: inline-block;
  background: white;
  color: hsl(221, 83%, 53%);
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Related Articles */
.related-articles {
  margin: 4rem 0 2rem;
  padding-top: 3rem;
  border-top: 2px solid hsl(214.3, 31.8%, 91.4%);
}

.related-articles h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  color: hsl(222, 47%, 11%);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.related-card {
  display: flex;
  flex-direction: column;
  background: white;
  border: 2px solid hsl(214.3, 31.8%, 91.4%);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: hsl(221, 83%, 53%);
}

.related-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.related-card-content {
  padding: 1.25rem;
}

.related-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 !important;
  line-height: 1.4;
  color: hsl(222, 47%, 11%);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .article-container {
    padding: 2rem 1rem;
  }

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

  .article-content {
    font-size: 1.0625rem;
  }

  .article-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
  }

  .article-content h3 {
    font-size: 1.25rem;
  }

  .table-of-contents {
    padding: 1.5rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .article-meta {
    gap: 1rem;
  }
}

/* Print Styles */
@media print {
  .breadcrumb,
  .related-articles,
  .cta-box,
  header,
  footer {
    display: none;
  }

  .article-container {
    max-width: 100%;
    padding: 0;
  }

  .article-content a {
    text-decoration: none;
    color: inherit;
  }

  .article-content a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}
