/* =========================================================
   TopAIToolRank BLOG CSS (Matches Homepage Theme)
   - Self-contained for blog pages
   - Mobile-first, SEO-friendly typography
========================================================= */

/* =========================
   Base (same as homepage)
========================= */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: #f9fafb;
  color: #1e293b;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

/* Consistent container */
.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

/* =========================
   NAV (same system)
========================= */
.navbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.brand {
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
  color: #1e293b;
  padding: 6px 8px;
  border-radius: 8px;
}
.brand:hover { color: #2563eb; background: #f1f5f9; }

.nav-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a {
  text-decoration: none;
  color: #475569;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 8px;
}
.nav-links a:hover { color: #2563eb; background: #f1f5f9; }

/* =========================
   BLOG HERO (adapted)
========================= */
.hero {
  padding: 40px 0 10px;
  background: #ffffff;
}

.hero h1 {
  font-size: 36px;
  line-height: 1.15;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}

.hero p {
  max-width: 800px;
  margin: 0;
  color: #475569;
  font-size: 16px;
}

.hero-meta {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #64748b;
}

.hero-buttons {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  padding: 12px 20px;
  text-decoration: none;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { filter: brightness(0.95); }

.btn-secondary { background: #e2e8f0; color: #1e293b; }
.btn-secondary:hover { filter: brightness(0.98); }

/* =========================
   BLOG CONTENT LAYOUT
========================= */
.content {
  padding: 28px 0 10px;
  background: #f9fafb;
}

/* Keep your existing “content-grid” behavior */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

/* Article card style consistent with site */
.article-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px;
  background: #ffffff;
  min-width: 0;
}

.article-card h2 {
  margin: 26px 0 10px 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.article-card h3 {
  margin: 18px 0 8px 0;
  font-size: 18px;
}

.article-card p { margin: 0 0 12px 0; color: #1e293b; }
.article-card ul, .article-card ol { margin: 0 0 12px 0; padding-left: 22px; }
.article-card li { margin: 6px 0; }

.article-card a { color: #2563eb; text-decoration: none; font-weight: 700; }
.article-card a:hover { text-decoration: underline; }

/* Code blocks (safe) */
.article-card code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.95em;
}
.article-card pre {
  background: #0b1220;
  color: #e8eefc;
  border-radius: 12px;
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.10);
}
.article-card pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}

/* Tables: do NOT break mobile */
.table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin: 14px 0;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #ffffff;
}
.table-wrap th,
.table-wrap td {
  border-bottom: 1px solid #e2e8f0;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}
.table-wrap th {
  background: #f8fafc;
  color: #1e293b;
  font-weight: 800;
}

/* Callouts / pills (your style) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-weight: 700;
  color: #475569;
}

/* Sidebar (same system) */
.sidebar {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
  position: sticky;
  top: 78px;
  width: 100%;
  min-width: 0;
}

.sidebar-title {
  margin: 0 0 12px 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.sidebar ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.sidebar li a { text-decoration: none; color: #1e293b; font-size: 14px; font-weight: 700; }
.sidebar li a:hover { color: #2563eb; }

/* =========================
   FOOTER (exact homepage theme)
========================= */
footer {
  background: #1e293b;
  color: #cbd5e1;
  padding: 40px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-links a {
  margin-left: 20px;
  color: #cbd5e1;
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }

/* =========================
   MOBILE FRIENDLY (same breakpoints)
========================= */
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; top: auto; }
}

@media (max-width: 680px) {
  .container { width: 92%; }

  .nav-inner { flex-direction: column; align-items: flex-start; }
  .nav-links { width: 100%; justify-content: flex-start; gap: 8px; }
  .nav-links a { padding: 8px 10px; background: #f8fafc; border: 1px solid #e2e8f0; }

  .hero { padding: 34px 0 10px; text-align: left; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }

  .btn-primary, .btn-secondary { width: 100%; }
  .article-card { padding: 16px; }
}

