/* blog.css — Blog-specific styles for Convertify */

/* ===== READING PROGRESS BAR ===== */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--primary-red);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ===== BLOG LISTING PAGE ===== */
.blog-listing-hero {
  background: var(--alt-bg);
  padding: 60px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}
.blog-listing-hero h1 {
  font-size: 42px;
  margin-bottom: 15px;
  color: var(--text-main);
}
.blog-listing-hero p {
  font-size: 18px;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}
body.dark-mode .blog-listing-hero p { color: #aaa; }

.blog-listing-section { padding: 60px 0; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.blog-card {
  background: var(--body-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  border-color: var(--primary-red);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.blog-card-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.blog-tag {
  background: var(--primary-red);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.blog-read-time {
  font-size: 13px;
  color: #888;
}

.blog-card h2 {
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 12px;
}
.blog-card h2 a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}
.blog-card h2 a:hover { color: var(--primary-red); }

.blog-card-excerpt {
  font-size: 15px;
  line-height: 1.7;
  color: #666;
  margin-bottom: 20px;
  flex: 1;
}
body.dark-mode .blog-card-excerpt { color: #aaa; }

/* ===== BLOG ARTICLE PAGES ===== */
.blog-article-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 20px 70px;
}

.blog-back-link {
  display: inline-block;
  color: var(--primary-red);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  transition: opacity 0.2s;
}
.blog-back-link:hover { opacity: 0.8; text-decoration: underline; }

.breadcrumb {
  font-size: 13px;
  color: #888;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.breadcrumb a { color: #888; text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-red); }
.breadcrumb .sep { color: #ccc; margin: 0 3px; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #888;
  padding: 15px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 40px;
}
.article-meta strong { color: var(--text-main); }
.article-meta .sep { color: #ddd; }

/* Article Typography */
.article-body h1 {
  font-size: 36px;
  line-height: 1.25;
  margin-bottom: 20px;
  color: var(--text-main);
}
.article-body h2 {
  font-size: 26px;
  line-height: 1.3;
  margin: 50px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-main);
}
.article-body h3 {
  font-size: 20px;
  margin: 30px 0 12px;
  color: var(--text-main);
}
.article-body p {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 20px;
}
.article-body ul,
.article-body ol {
  font-size: 18px;
  line-height: 1.8;
  margin: 0 0 20px 25px;
}
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--primary-red); text-decoration: none; }
.article-body a:hover { text-decoration: underline; }

/* Comparison Table */
.table-wrap {
  overflow-x: auto;
  margin: 25px 0 35px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.blog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 480px;
}
.blog-table th {
  background: var(--primary-red);
  color: white;
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}
.blog-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}
.blog-table tbody tr:last-child td { border-bottom: none; }
.blog-table tbody tr:nth-child(odd) td { background: #F8F8F8; }
.blog-table tbody tr:nth-child(even) td { background: #FFFFFF; }
body.dark-mode .blog-table tbody tr:nth-child(odd) td { background: #1E1E1E; }
body.dark-mode .blog-table tbody tr:nth-child(even) td { background: #2A2A2A; }

/* CTA Box */
.cta-box {
  background: var(--primary-red);
  color: white;
  padding: 35px 30px;
  border-radius: 10px;
  text-align: center;
  margin: 50px 0;
}
.cta-box h3 { font-size: 22px; margin-bottom: 10px; color: white; }
.cta-box p { font-size: 16px; color: rgba(255,255,255,0.9); margin-bottom: 20px; }
.cta-box a.btn {
  background: white;
  color: var(--primary-red);
  font-weight: 700;
  font-size: 16px;
  min-width: 200px;
}
.cta-box a.btn:hover { background: #f0f0f0; }

/* Tip Box */
.tip-box {
  background: #FFFBEA;
  border-left: 4px solid #F39C12;
  padding: 16px 20px;
  margin: 25px 0;
  border-radius: 0 6px 6px 0;
  font-size: 16px;
  line-height: 1.7;
}
.tip-box .tip-label {
  font-weight: 700;
  color: #d68910;
  display: block;
  margin-bottom: 6px;
}
body.dark-mode .tip-box {
  background: #2a2411;
  border-left-color: #F39C12;
}

/* Related Articles */
.related-articles {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid var(--border-color);
}
.related-articles h2 {
  font-size: 22px !important;
  margin-bottom: 25px !important;
  border: none !important;
  padding: 0 !important;
  margin-top: 0 !important;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.related-card {
  background: var(--alt-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 18px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.3s ease;
  display: block;
}
.related-card:hover {
  border-color: var(--primary-red);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.07);
  text-decoration: none;
}
.related-card .card-tag {
  font-size: 11px;
  color: var(--primary-red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
}
.related-card h3 {
  font-size: 14px;
  margin: 0 0 10px;
  color: var(--text-main);
  line-height: 1.4;
  font-weight: 600;
}
.related-card .read-arrow {
  font-size: 13px;
  color: var(--primary-red);
  font-weight: 600;
}

/* Code block */
.code-block {
  background: #1e1e1e;
  color: #ddd;
  padding: 20px;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Courier New', monospace;
  overflow-x: auto;
  margin: 20px 0;
  white-space: pre;
  line-height: 1.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-listing-hero h1 { font-size: 30px; }
  .article-body h1 { font-size: 26px; }
  .article-body h2 { font-size: 22px; }
  .article-body p,
  .article-body ul,
  .article-body ol { font-size: 16px; }
  .related-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 25px 20px; }
  .cta-box h3 { font-size: 19px; }
  .blog-article-wrap { padding: 30px 15px 50px; }
}
@media (max-width: 480px) {
  .article-body h1 { font-size: 22px; }
  .article-body h2 { font-size: 20px; }
  .blog-listing-hero h1 { font-size: 26px; }
}
