/* ===== CareSlip Blog Styles ===== */

/* Design tokens (shared with landing.html & calculator.html) */
:root {
  --ink: #1e293b;
  --ink-secondary: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --bg: #f8fafc;
  --accent: #1e40af;
  --accent-light: #3b82f6;
  --accent-bg: #eff6ff;
  --accent-border: #bfdbfe;
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #86efac;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

/* Base */
* { box-sizing: border-box; font-family: 'Inter', Arial, sans-serif; margin: 0; padding: 0; }
html { font-size: 17.6px; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); min-height: 100vh; line-height: 1.6; }

/* ===== Header ===== */
.header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 1.5rem;
  display: flex;
  direction: ltr;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header .brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.header-nav {
  display: flex;
  gap: 1.2rem;
  margin-left: auto;
}
.header-nav a {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.header-nav a:hover { color: var(--accent); }

/* ===== Breadcrumb ===== */
.breadcrumb {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1.5rem 0;
  font-size: 0.82rem;
  color: var(--muted);
  direction: rtl;
}
.breadcrumb a {
  color: var(--accent-light);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 0.4rem; }

/* ===== Blog Index ===== */
.blog-hero {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}
.blog-hero h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.blog-hero p {
  font-size: 1rem;
  color: var(--ink-secondary);
  max-width: 500px;
  margin: 0 auto;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}
.blog-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.blog-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.blog-card p {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: 0.7rem;
}
.blog-card-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ===== Article ===== */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  direction: rtl;
}
.article-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
}
.article-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 0.7rem;
}
.article-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Article content typography */
.article-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin: 2rem 0 0.8rem;
  line-height: 1.4;
}
.article-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 1.5rem 0 0.6rem;
}
.article-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 1rem;
}
.article-content ul,
.article-content ol {
  margin: 0.8rem 1.5rem 1rem 0;
  padding: 0;
}
.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
.article-content strong { font-weight: 600; }
.article-content a {
  color: var(--accent-light);
  text-decoration: none;
}
.article-content a:hover { text-decoration: underline; }

/* Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
}
.article-content th,
.article-content td {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  text-align: right;
}
.article-content th {
  background: var(--accent-bg);
  font-weight: 600;
  color: var(--ink);
}
.article-content tr:nth-child(even) { background: var(--bg); }

/* Callout box */
.callout {
  background: var(--accent-bg);
  border-right: 4px solid var(--accent);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  margin: 1.2rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* CTA box */
.article-cta {
  background: var(--accent-bg);
  border: 1.5px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  margin: 2.5rem 0;
}
.article-cta p {
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 1rem;
  font-weight: 500;
}
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.7rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: var(--accent-light);
}

/* Related articles */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.related-articles h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.related-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}
.related-card:hover { box-shadow: var(--shadow-md); }
.related-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.3rem;
  line-height: 1.4;
}
.related-card p {
  font-size: 0.82rem;
  color: var(--ink-secondary);
  line-height: 1.5;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.footer-links { margin-bottom: 0.5rem; }
.footer-links a {
  color: var(--accent-light);
  text-decoration: none;
  margin: 0 0.8rem;
  font-size: 0.88rem;
}
.footer-links a:hover { text-decoration: underline; }

/* ===== Mobile ===== */
@media (max-width: 600px) {
  .blog-hero { padding: 2rem 1.2rem 1.5rem; }
  .blog-hero h1 { font-size: 1.4rem; }
  .blog-grid { grid-template-columns: 1fr; }
  .article { padding: 1.5rem 1.2rem 2rem; }
  .article-header h1 { font-size: 1.4rem; }
  .article-content h2 { font-size: 1.15rem; }
  .related-grid { grid-template-columns: 1fr; }
  .header-nav { gap: 0.8rem; padding-right: 1rem; }
  .header-nav a { font-size: 0.82rem; }
}
