/* Blog Page Styles */

.content-container:has(.blog-page) {
  padding: 0;
  max-width: none;
}

/* Blog Header */
.blog-header {
  background: white;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--dark);
}

.blog-header h1 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.blog-header p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin: 0;
}

/* Blog Content Area */
.blog-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* New Post Button */
.blog-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
}

.blog-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

/* Blog Card */
.blog-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Card Image */
.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--ultra-light) 0%, var(--light) 100%);
}

/* Card Body */
.blog-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--medium);
  margin-bottom: 0.75rem;
}

.blog-card-meta i {
  color: var(--primary);
}

.blog-card-title {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card-title a:hover {
  color: var(--primary);
}

.blog-card-excerpt {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--medium);
  flex: 1;
  margin-bottom: 1rem;
}

.blog-card-excerpt p {
  margin: 0;
}

/* Card Footer */
.blog-card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--ultra-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-card-footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

/* Empty State */
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--ultra-light);
  border-radius: 1rem;
}

.blog-empty i {
  font-size: 3rem;
  color: var(--medium);
  margin-bottom: 1rem;
  display: block;
}

.blog-empty p {
  font-size: 1.125rem;
  color: var(--medium);
  margin: 0;
}

/* ==========================================
   Post Detail Page
   ========================================== */

.post-detail-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

/* Post Header */
.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--ultra-light);
}

.post-title {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 1.5rem;
  line-height: 1.3;
  text-align: center;
}

.post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--medium);
}

.post-meta-item i {
  color: var(--primary);
}

.post-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.post-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Post Content */
.post-content {
  line-height: 1.9;
  font-size: 1.125rem;
  color: #4a5568;
}

.post-content p {
  margin: 1.5rem 0;
}

.post-content img {
  border-radius: 0.75rem;
  margin: 2rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.post-content h2 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--dark);
  margin: 2.5rem 0 1rem;
}

.post-content h3 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--dark);
  margin: 2rem 0 0.75rem;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--ultra-light);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--medium);
}

.post-content code {
  background: var(--ultra-light);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

.post-content pre {
  background: var(--dark);
  color: #e5e7eb;
  padding: 1.25rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content pre code {
  background: none;
  padding: 0;
}

/* Comments Section */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ultra-light);
}

.comments-header {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dark);
  text-align: center;
  margin: 0 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.comments-header i {
  color: var(--primary);
}

/* Comment Form */
.comment-form {
  background: var(--ultra-light);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.comment-form .form-group {
  margin-bottom: 1rem;
}

.comment-form textarea {
  min-height: 100px;
  resize: vertical;
}

.comment-form .btn {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Login prompt for comments */
.comment-login-prompt {
  background: rgba(99, 102, 241, 0.1);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.comment-login-prompt p {
  color: var(--medium);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.comment-login-prompt i {
  color: var(--primary);
}

/* Load more button */
.comments-load-more {
  text-align: center;
  margin-top: 1.5rem;
}

.comments-load-more .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 768px) {
  /* Blog List */
  .blog-header {
    padding: 3rem 1.5rem;
  }
  
  .blog-header h1 {
    font-size: 2rem;
  }
  
  .blog-content {
    padding: 2rem 1rem;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .blog-card-body {
    padding: 1.25rem;
  }
  
  .blog-card-footer {
    padding: 1rem 1.25rem;
  }
  
  /* Post Detail */
  .post-detail-page {
    padding: 1.5rem;
  }
  
  .post-title {
    font-size: 1.75rem;
  }
  
  .post-meta {
    gap: 1rem;
  }
  
  .post-content {
    font-size: 1rem;
  }
  
  .comment-form .btn {
    position: static;
    width: 100%;
    margin-top: 1rem;
    justify-content: center;
  }
}

