/* ===== BLOG STYLES ===== */

/* Blog Hero Section */
.blog-hero {
  background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.blog-hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.blog-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Blog Grid */
.blog-grid {
  padding: 4rem 0;
}

.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filters button {
  padding: 0.8rem 1.5rem;
  border: 2px solid #4361ee;
  background: white;
  color: #4361ee;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.filters button.active,
.filters button:hover {
  background: #4361ee;
  color: white;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

/* Blog Cards */
.blog-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.category {
  display: inline-block;
  background-color: #f0f4ff;
  color: #4361ee;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  line-height: 1.4;
  color: #1f2937;
}

.excerpt {
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.read-more {
  font-weight: 600;
  color: #4361ee;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s ease;
}

.blog-card:hover .read-more {
  gap: 0.8rem;
}

/* Single Article Page */
.article-page {
  padding: 2rem 0;
}

.article-page .container {
  max-width: 800px;
}

.article-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.article-title {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: #1f2937;
  line-height: 1.2;
}

.article-meta {
  color: #6b7280;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.article-meta .category {
  background-color: #f0f4ff;
  color: #4361ee;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.featured-image {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #374151;
}

/* Styling for content from the Rich Text Editor */
.article-content h1,
.article-content h2,
.article-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1.2rem;
  color: #1f2937;
}

.article-content h1 {
  font-size: 2.2rem;
}

.article-content h2 {
  font-size: 1.8rem;
}

.article-content h3 {
  font-size: 1.5rem;
}

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

.article-content ul,
.article-content ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

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

.article-content a {
  color: #4361ee;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.article-content a:hover {
  color: #3a0ca3;
}

.article-content blockquote {
  border-left: 4px solid #4361ee;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #6b7280;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

.article-content table th,
.article-content table td {
  padding: 0.8rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.article-content table th {
  background-color: #f8fafc;
  font-weight: 600;
}

/* Newsletter Section */
.newsletter {
  background: #f8fafc;
  padding: 4rem 0;
  text-align: center;
}

.newsletter h2 {
  margin-bottom: 1rem;
  color: #1f2937;
}

.newsletter p {
  color: #6b7280;
  margin-bottom: 2rem;
}

.newsletter form {
  display: flex;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

.newsletter input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
}

.newsletter button {
  padding: 0.8rem 2rem;
  background: #4361ee;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.newsletter button:hover {
  background: #3a0ca3;
}

/* Loading and Error States */
.loading-message {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
  font-style: italic;
}

.error-message {
  text-align: center;
  padding: 3rem;
  color: #dc2626;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

/* Responsive Design */
@media (max-width: 768px) {
  .blog-hero h1 {
    font-size: 2.2rem;
  }
  
  .blog-hero p {
    font-size: 1.1rem;
  }
  
  .filters {
    gap: 0.5rem;
  }
  
  .filters button {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .article-title {
    font-size: 2rem;
  }
  
  .article-content {
    font-size: 1rem;
  }
  
  .newsletter form {
    flex-direction: column;
  }
}