/* Blog Common Styles - Consistent styling for all blog posts */

/* Blog Hero Section */
.blog-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(37, 99, 235, 0.1);
  z-index: 1;
}

.blog-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.blog-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.blog-category {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.blog-date, .blog-read-time {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.blog-description {
  font-size: 1.25rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0;
}

/* Blog Content Section */
.blog-content {
  padding: 60px 0;
  background: #f8fafc;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Blog Article */
.blog-article {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.blog-section {
  margin-bottom: 50px;
}

.blog-section h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #2563eb;
}

.blog-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 15px;
  margin-top: 30px;
}

.blog-section h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 12px;
  margin-top: 25px;
}

.blog-section p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #475569;
  margin-bottom: 20px;
}

.blog-section ul, .blog-section ol {
  margin-bottom: 20px;
  padding-left: 25px;
}

.blog-section li {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #475569;
  margin-bottom: 8px;
}

.blog-section strong {
  color: #1e293b;
  font-weight: 600;
}

.blog-section a {
  color: #2563eb;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.blog-section a:hover {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
}

/* Code Blocks */
.blog-section pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.blog-section code {
  background: #f1f5f9;
  color: #e11d48;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}

.blog-section pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

/* Blockquotes */
.blog-section blockquote {
  border-left: 4px solid #2563eb;
  padding-left: 20px;
  margin: 25px 0;
  font-style: italic;
  color: #64748b;
  background: #f8fafc;
  padding: 15px 20px;
  border-radius: 0 8px 8px 0;
}

.blog-section blockquote em {
  color: #475569;
}

/* Table of Contents */
.table-of-contents {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 40px;
}

.table-of-contents h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 15px;
  margin-top: 0;
}

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

.table-of-contents li {
  margin-bottom: 10px;
}

.table-of-contents a {
  color: #475569;
  text-decoration: none;
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.table-of-contents a:hover,
.table-of-contents a.active {
  background: #2563eb;
  color: white;
}

/* Blog Sidebar */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.sidebar-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sidebar-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 15px;
}

.sidebar-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #64748b;
  margin-bottom: 20px;
}

/* Tool Card in Sidebar */
.sidebar-card.tool-card {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
}

.sidebar-card.tool-card h3,
.sidebar-card.tool-card p {
  color: white;
}

.sidebar-card.tool-card .btn {
  background: white;
  color: #2563eb;
  border: none;
}

.sidebar-card.tool-card .btn:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}

/* Related Posts */
.related-posts ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.related-posts li {
  margin-bottom: 12px;
}

.related-posts li:last-child {
  margin-bottom: 0;
}

.related-posts a {
  color: #475569;
  text-decoration: none;
  display: block;
  padding: 10px;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  line-height: 1.4;
}

.related-posts a:hover {
  background: #f8fafc;
  color: #2563eb;
}

/* Categories */
.categories ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.categories li {
  margin-bottom: 0;
}

.categories a {
  color: #64748b;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.categories a:hover {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .blog-sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 60px 0 40px;
  }
  
  .blog-title {
    font-size: 2rem;
  }
  
  .blog-description {
    font-size: 1.1rem;
  }
  
  .blog-meta {
    flex-direction: column;
    gap: 10px;
  }
  
  .blog-article {
    padding: 25px;
  }
  
  .blog-section h2 {
    font-size: 1.5rem;
  }
  
  .blog-section h3 {
    font-size: 1.25rem;
  }
  
  .blog-section p {
    font-size: 1rem;
  }
  
  .blog-section pre {
    font-size: 0.8rem;
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .blog-hero {
    padding: 40px 0 30px;
  }
  
  .blog-title {
    font-size: 1.75rem;
  }
  
  .blog-article {
    padding: 20px;
  }
  
  .blog-section h2 {
    font-size: 1.3rem;
  }
  
  .blog-section h3 {
    font-size: 1.1rem;
  }
  
  .table-of-contents {
    padding: 20px;
  }
  
  .sidebar-card {
    padding: 20px;
  }
}

/* Print Styles */
@media print {
  .blog-hero,
  .blog-sidebar {
    display: none;
  }
  
  .blog-content {
    background: white;
    padding: 0;
  }
  
  .blog-article {
    box-shadow: none;
    padding: 0;
  }
  
  .blog-section a {
    color: inherit;
    text-decoration: underline;
  }
}
