/* Blog Content Typography - Beautiful Markdown Rendering */

.blog-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #d1fae5;
  line-height: 1.2;
}

.blog-content h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.25rem;
  margin-top: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  line-height: 1.3;
}

.blog-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  line-height: 1.4;
}

.blog-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.75rem;
  margin-top: 1rem;
  line-height: 1.5;
}

.blog-content p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.75;
  color: #374151;
}

.blog-content a {
  color: #059669;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s;
}

.blog-content a:hover {
  color: #047857;
}

.blog-content strong {
  font-weight: 700;
  color: #111827;
}

.blog-content em {
  font-style: italic;
  color: #1f2937;
}

.blog-content ul {
  list-style: disc;
  list-style-position: inside;
  margin-bottom: 1.5rem;
  margin-left: 1rem;
  color: #374151;
}

.blog-content ul li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.blog-content ol {
  list-style: decimal;
  list-style-position: inside;
  margin-bottom: 1.5rem;
  margin-left: 1rem;
  color: #374151;
}

.blog-content ol li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.blog-content li ul,
.blog-content li ol {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

.blog-content blockquote {
  border-left: 4px solid #34d399;
  padding-left: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  background: linear-gradient(to right, rgba(167, 243, 208, 0.1), transparent);
  border-radius: 0 0.5rem 0.5rem 0;
  position: relative;
}

.blog-content blockquote::before {
  content: '"';
  font-size: 3rem;
  color: #34d399;
  position: absolute;
  left: -0.25rem;
  top: -0.5rem;
  opacity: 0.3;
  font-family: Georgia, serif;
}

.blog-content blockquote p {
  color: #374151;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.75;
  margin-bottom: 0;
}

.blog-content pre {
  background-color: #111827;
  color: #f3f4f6;
  border-radius: 0.75rem;
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875rem;
  line-height: 1.7;
}

.blog-content code {
  background-color: #f3f4f6;
  color: #059669;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-family: 'Courier New', Courier, monospace;
}

.blog-content pre code {
  background-color: transparent;
  color: #f3f4f6;
  padding: 0;
  border-radius: 0;
  font-size: 1rem;
}

.blog-content table {
  width: 100%;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.blog-content thead {
  background: linear-gradient(to right, #059669, #0d9488);
  color: white;
}

.blog-content th {
  padding: 0.75rem 1.5rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-content tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s;
}

.blog-content tbody tr:hover {
  background-color: #f9fafb;
}

.blog-content td {
  padding: 1rem 1.5rem;
  color: #374151;
}

.blog-content tbody tr:last-child {
  border-bottom: none;
}

.blog-content hr {
  margin: 2rem 0;
  border-color: #d1d5db;
  border-width: 1px;
}

.blog-content img {
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  margin: 2rem 0;
  max-width: 100%;
  height: auto;
}

/* Better spacing for nested elements */
.blog-content > *:first-child {
  margin-top: 0;
}

.blog-content > *:last-child {
  margin-bottom: 0;
}

/* Special styling for first paragraph after heading */
.blog-content h1 + p,
.blog-content h2 + p,
.blog-content h3 + p {
  margin-top: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .blog-content h1 {
    font-size: 1.875rem;
  }

  .blog-content h2 {
    font-size: 1.5rem;
  }

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

  .blog-content p,
  .blog-content li {
    font-size: 1rem;
  }

  .blog-content blockquote p {
    font-size: 1.125rem;
  }

  .blog-content pre {
    padding: 1rem;
    font-size: 0.75rem;
  }
}

/* Animation for blog cards */
.blog-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
  transform: translateY(-4px);
}

/* Gradient text animation */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-text {
  background: linear-gradient(270deg, #059669, #0d9488, #14b8a6);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 3s ease infinite;
}

/* Line clamp utilities for older browsers */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Custom scrollbar for code blocks */
.blog-content pre::-webkit-scrollbar {
  height: 8px;
}

.blog-content pre::-webkit-scrollbar-track {
  background: #374151;
  border-radius: 4px;
}

.blog-content pre::-webkit-scrollbar-thumb {
  background: #6b7280;
  border-radius: 4px;
}

.blog-content pre::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}