/* Blog Post Page Styles */

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 1rem;
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
        MADE BY MD TOUHIDUL ISLAM KANON
   ============================================ */
   
/* Error State */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
}

.error-state svg {
  color: var(--text-light);
}

.error-state h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.error-state p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Blog Post Page Container */
.blog-post-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb svg {
  width: 14px;
  height: 14px;
  color: var(--text-light);
}

.breadcrumb span {
  color: var(--text-dark);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Post Header */
.post-header {
  margin-bottom: 2rem;
}

.post-category-wrapper {
  margin-bottom: 1rem;
}

.post-category {
  display: inline-flex;
  padding: 0.375rem 0.875rem;
  background: var(--primary-light, rgba(21, 109, 149, 0.1));
  color: var(--primary);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.post-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border-radius: 50%;
  color: var(--text-muted);
}

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 500;
  color: var(--text-dark);
}

.post-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.post-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.read-time {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Featured Image */
.post-featured-image {
  margin-bottom: 2.5rem;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--bg-light);
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Post Body Content */
.post-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-dark);
}

.post-body h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  color: var(--text-dark);
  letter-spacing: -0.025em;
}

.post-body h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--text-dark);
}

.post-body h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--text-dark);
}

.post-body p {
  margin-bottom: 1.5rem;
}

.post-body ul,
.post-body ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.post-body li {
  margin-bottom: 0.5rem;
}

.post-body blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1.6;
}

.post-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}

.post-body a:hover {
  opacity: 0.8;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}

.post-body pre {
  background: #1a1a2e;
  color: #e5e7eb;
  padding: 1.5rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  font-family: "Geist Mono", monospace;
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 1.5rem 0;
}

.post-body code {
  background: var(--bg-light);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: "Geist Mono", monospace;
  font-size: 0.9em;
}

.post-body pre code {
  background: none;
  padding: 0;
}

.post-body strong {
  font-weight: 600;
  color: var(--text-dark);
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2.5rem 0;
}

/* Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2.5rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.post-tag {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  background: var(--bg-light);
  color: var(--text-muted);
  border-radius: 9999px;
  font-size: 0.8125rem;
  transition: all 0.2s;
}

.post-tag:hover {
  background: var(--primary-light, rgba(21, 109, 149, 0.1));
  color: var(--primary);
}

/* Share Section */
.share-section {
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin: 2rem 0;
}

.share-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.share-buttons {
  display: flex;
  gap: 0.75rem;
}

.share-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn.twitter {
  background: #1da1f2;
  color: white;
}

.share-btn.twitter:hover {
  background: #0d8ddb;
}

.share-btn.linkedin {
  background: #0077b5;
  color: white;
}

.share-btn.linkedin:hover {
  background: #006699;
}

.share-btn.facebook {
  background: #1877f2;
  color: white;
}

.share-btn.facebook:hover {
  background: #0d6ce5;
}

.share-btn.copy {
  background: var(--bg-light);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.share-btn.copy:hover {
  background: var(--primary-light, rgba(21, 109, 149, 0.1));
  color: var(--primary);
  border-color: var(--primary);
}

/* Back to Blog */
.back-to-blog {
  margin-top: 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.back-link:hover {
  gap: 0.75rem;
}

/* Related Posts Section */
.related-posts-section {
  padding: 4rem 2rem;
  background: var(--bg-light);
}

.related-posts-container {
  max-width: 1200px;
  margin: 0 auto;
}

.related-posts-container h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2rem;
  text-align: center;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Related Post Card */
.related-post-card {
  background: var(--bg-white);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
}

.related-post-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.related-post-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.related-post-card:hover .related-post-image img {
  transform: scale(1.05);
}

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

.related-post-category {
  display: inline-flex;
  padding: 0.25rem 0.625rem;
  background: var(--primary-light, rgba(21, 109, 149, 0.1));
  color: var(--primary);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.related-post-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-post-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-post-page {
    padding: 6rem 1rem 3rem;
  }
  
  .post-title {
    font-size: 1.75rem;
  }
  
  .post-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .post-body {
    font-size: 1rem;
  }
  
  .post-body h2 {
    font-size: 1.5rem;
  }
  
  .post-body h3 {
    font-size: 1.25rem;
  }
  
  .post-body blockquote {
    font-size: 1.125rem;
    padding-left: 1rem;
  }
  
  .related-posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .share-buttons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .breadcrumb span {
    max-width: 120px;
  }
  
  .post-title {
    font-size: 1.5rem;
  }
  
  .author-avatar {
    width: 36px;
    height: 36px;
  }
  
  .share-btn {
    width: 40px;
    height: 40px;
  }
}
