/* Blog Page Styles */

/* --- Blog Listing (blog.html) --- */

.blog-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.blog-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--color-hero-start), var(--color-hero-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.blog-hero p {
  font-size: 1.25rem;
  color: var(--color-muted);
  line-height: 1.6;
}

/* Filter Bar */
.filter-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--color-outline);
  background: transparent;
  color: var(--color-text);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.blog-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-md); /* Reduced radius */
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  border: 1px solid var(--color-border);
  /* Add a colored accent border on the left instead of top image */
  border-left: 6px solid var(--color-primary); 
  position: relative;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

/* Remove the large image placeholder */
.card-image-placeholder {
  display: none; 
}

/* Abstract patterns for placeholders - kept for reference or future use if needed, but currently hidden via placeholder class */
.hero-emerald {
  background: linear-gradient(120deg, #ecfdf5, #d1fae5);
}
/* ... (rest of hero classes) */

.card-content {
  padding: 2rem; /* Increased padding for better whitespace */
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.meta-separator {
  margin: 0 0.5rem;
  opacity: 0.5;
}

.read-time {
  font-weight: 500;
  color: var(--color-primary);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.category-chip {
  background: rgba(15, 23, 42, 0.05);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
}

.blog-card h3 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 0 0 1rem;
  color: var(--color-text);
  font-weight: 700;
}

.blog-card p {
  color: var(--color-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex: 1;
  /* Limit lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Align to the right */
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

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

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-outline);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
}

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

.read-link {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* --- Individual Blog Post (blogs/*.html) --- */

.post-container {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 2rem;
}

/* Progress Bar */
.reading-progress-container {
  position: fixed;
  top: 72px; /* Matches header height */
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 9;
}

.reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-hero-start), var(--color-hero-end));
  width: 0%;
  transition: width 0.1s ease;
}

/* Back Button */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-muted);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  transition: all 0.2s ease;
}

.back-link:hover {
  background: rgba(15, 23, 42, 0.1);
  color: var(--color-text);
  transform: translateX(-2px);
}

/* Post Header */
.post-header {
  margin-bottom: 3rem;
  text-align: center;
}

.post-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-muted);
  font-weight: 500;
}

.post-title {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.post-lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: rgba(15, 23, 42, 0.8);
  margin-bottom: 2rem;
}

/* Post Content Typography */
.post-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: rgba(15, 23, 42, 0.9);
}

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

.post-content h2 {
  font-size: 1.75rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--color-text);
  font-weight: 700;
}

.post-content h3 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
  font-weight: 600;
}

.post-content ul, 
.post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

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

.post-content blockquote {
  border-left: 4px solid var(--color-primary);
  background: rgba(16, 185, 129, 0.05);
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--color-text);
}

/* Related Posts Section */
.related-section {
  margin-top: 6rem;
  padding-top: 4rem;
  border-top: 1px solid var(--color-border);
}

.related-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Author Bio Card --- */
.author-bio-section {
  max-width: 720px;
  margin: 4rem auto;
  padding: 0 1rem;
}

.author-bio-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.author-bio-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.author-bio-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.author-bio-info {
  flex: 1;
}

.author-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.author-bio-card .author-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.25rem 0;
}

.author-title {
  font-size: 0.9rem;
  color: var(--color-primary);
  font-weight: 500;
  margin: 0;
}

.author-bio-text {
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.author-bio-text p {
  margin: 0;
}

@media (max-width: 640px) {
  .author-bio-header {
    flex-direction: column;
    text-align: center;
  }
  
  .author-bio-avatar {
    width: 80px;
    height: 80px;
  }
}
