/* =============================================
   Blog Styles — assets/css/blog.css
   ============================================= */

/* Blog listing grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.blog-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.blog-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #7c3aed, var(--saffron));
  border-radius: 4px 0 0 4px;
}

.blog-card:hover {
  border-color: #7c3aed;
  box-shadow: 0 8px 30px rgba(124,58,237,0.1);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}

.bc-top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

.bc-cat {
  background: #f5f3ff; color: #7c3aed;
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  font-weight: 600; border: 1px solid #e9d5ff;
}

.bc-scheme {
  background: #fff3e0; color: var(--saffron);
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  font-weight: 600; border: 1px solid #ffe0b2;
}

.blog-card h3 {
  font-size: 15px; font-weight: 700; margin-bottom: 4px;
  line-height: 1.4; color: var(--navy);
}

.bc-hi {
  font-size: 12px; color: var(--muted);
  font-family: 'Tiro Devanagari Hindi', serif;
  margin-bottom: 8px;
}

.blog-card p {
  font-size: 13px; color: #555; line-height: 1.6; margin-bottom: 12px;
}

.bc-footer {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}

.bc-read {
  margin-left: auto; color: var(--saffron); font-weight: 600;
}

/* Blog Detail Page */
.blog-detail-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 30px;
  padding-top: 28px;
  padding-bottom: 40px;
  align-items: start;
}

.blog-article {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.blog-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
}

.blog-meta-top { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

.scheme-link-pill {
  background: #fff3e0; color: var(--saffron);
  font-size: 12px; padding: 4px 14px; border-radius: 20px;
  font-weight: 600; border: 1px solid #ffe0b2;
  text-decoration: none; transition: all 0.2s;
}
.scheme-link-pill:hover { background: var(--saffron); color: white; text-decoration: none; }

.blog-header h1 {
  font-size: 26px; font-weight: 800; color: var(--navy);
  line-height: 1.3; margin-bottom: 8px;
}

.blog-title-hi {
  font-size: 16px; font-weight: 400; color: var(--muted);
  font-family: 'Tiro Devanagari Hindi', serif;
  margin-bottom: 12px;
}

.blog-info {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); margin-bottom: 14px;
}

.blog-excerpt {
  font-size: 16px; color: #444; line-height: 1.7;
  background: #f9fafb; padding: 14px 18px;
  border-radius: 8px; border-left: 4px solid #7c3aed;
  margin-top: 12px;
}

/* Blog Content */
.blog-content {
  padding: 28px;
  font-size: 16px;
  line-height: 1.85;
  color: #333;
}

.blog-content h2 { font-size: 22px; font-weight: 700; margin: 28px 0 12px; color: var(--navy); }
.blog-content h3 { font-size: 18px; font-weight: 700; margin: 22px 0 10px; color: var(--navy); }
.blog-content h4 { font-size: 16px; font-weight: 700; margin: 18px 0 8px; }
.blog-content p { margin-bottom: 16px; }
.blog-content ul, .blog-content ol { padding-left: 24px; margin-bottom: 16px; }
.blog-content li { margin-bottom: 8px; }
.blog-content strong { color: var(--navy); }
.blog-content a { color: var(--saffron); }
.blog-content a:hover { text-decoration: underline; }

.blog-content table {
  width: 100%; border-collapse: collapse; margin: 20px 0;
  font-size: 14px;
}
.blog-content table th {
  background: var(--navy); color: white; padding: 10px 14px; text-align: left;
}
.blog-content table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.blog-content table tr:hover td { background: #f9fafb; }

.blog-content blockquote {
  border-left: 4px solid var(--saffron); margin: 20px 0;
  padding: 14px 20px; background: #fff7ed; border-radius: 0 8px 8px 0;
  font-style: italic; color: #555;
}

.blog-content .info-box {
  background: #eff6ff; border: 1px solid #bfdbfe;
  padding: 16px 20px; border-radius: 10px; margin: 20px 0;
}

.blog-content .warn-box {
  background: #fff7ed; border: 1px solid #fed7aa;
  padding: 16px 20px; border-radius: 10px; margin: 20px 0;
}

/* Tags */
.blog-tags {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  font-size: 13px;
}

.tag-link {
  background: #f5f3ff; color: #7c3aed;
  padding: 4px 12px; border-radius: 20px; font-size: 12px;
  text-decoration: none; border: 1px solid #e9d5ff; font-weight: 600;
  transition: all 0.2s;
}
.tag-link:hover { background: #7c3aed; color: white; text-decoration: none; }

/* Scheme CTA Box */
.scheme-cta-box {
  margin: 0 28px 28px;
  background: linear-gradient(135deg, #fff3e0, #fff8f0);
  border: 2px solid var(--saffron);
  border-radius: 14px; padding: 20px;
  display: flex; justify-content: space-between;
  align-items: center; gap: 16px; flex-wrap: wrap;
}

.cta-left { display: flex; align-items: center; gap: 14px; }
.cta-icon { font-size: 36px; }
.cta-label { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.cta-scheme { font-size: 17px; font-weight: 800; color: var(--navy); }
.cta-scheme-hi { font-size: 13px; color: var(--muted); font-family: 'Tiro Devanagari Hindi', serif; }

.cta-btn {
  background: var(--saffron); color: white;
  padding: 12px 24px; border-radius: 10px; font-size: 14px;
  font-weight: 700; text-decoration: none; transition: all 0.2s;
  white-space: nowrap;
}
.cta-btn:hover { background: #c55200; text-decoration: none; color: white; }

/* Sidebar blog links */
.sidebar-blog-link {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text); transition: color 0.2s;
}
.sidebar-blog-link:hover { color: var(--saffron); text-decoration: none; }
.sb-icon { font-size: 20px; flex-shrink: 0; }
.sb-title { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 3px; }
.sb-date { font-size: 11px; color: var(--muted); }

/* Related blogs section */
.related-blogs {
  background: #f9fafb;
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

/* ---- Related blogs ON SCHEME DETAIL PAGE ---- */
.scheme-related-blogs {
  margin-top: 30px;
}

.scheme-related-blogs .blog-list-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: white; border: 1px solid var(--border);
  border-radius: 10px; padding: 16px;
  margin-bottom: 12px; transition: all 0.2s;
  text-decoration: none; color: var(--text);
  position: relative; overflow: hidden;
}

.scheme-related-blogs .blog-list-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(to bottom, #7c3aed, var(--saffron));
}

.scheme-related-blogs .blog-list-item:hover {
  border-color: #7c3aed;
  box-shadow: 0 4px 16px rgba(124,58,237,0.1);
  text-decoration: none; color: var(--text);
}

.blog-item-icon {
  font-size: 28px; flex-shrink: 0;
  width: 50px; height: 50px;
  background: #f5f3ff; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}

.blog-item-body { flex: 1; }
.blog-item-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--navy); line-height: 1.4; }
.blog-item-hi { font-size: 12px; color: var(--muted); font-family: 'Tiro Devanagari Hindi', serif; margin-bottom: 6px; }
.blog-item-excerpt { font-size: 13px; color: #555; line-height: 1.6; margin-bottom: 8px; }
.blog-item-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.blog-item-read { color: #7c3aed; font-weight: 700; margin-left: auto; }

/* Blog Sidebar on scheme detail */
.blog-sidebar { position: sticky; top: 80px; }

/* Admin blog section */
.blog-status-published { background: #f0fdf4; color: #166534; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.blog-status-draft { background: #fef9c3; color: #854d0e; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }

@media (max-width: 768px) {
  .blog-detail-wrap { grid-template-columns: 1fr; }
  .blog-sidebar { display: none; }
  .blog-header { padding: 18px; }
  .blog-content { padding: 18px; }
  .scheme-cta-box { flex-direction: column; }
  .blog-grid { grid-template-columns: 1fr; }
}
