/* BetterDojo Blog Styles
   Matches betterdojo.app branding: blue-to-teal gradient, Poppins + Inter fonts */

/* Fonts loaded via <link> in HTML <head> for better Core Web Vitals */

:root {
  --brand-blue: #2563EB;
  --brand-teal: #0D9488;
  --brand-gradient: linear-gradient(135deg, #2563EB, #0D9488);
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-tertiary: #6B7280;
  --text-light: #9CA3AF;
  --bg-white: #FFFFFF;
  --bg-light: #F9FAFB;
  --bg-blue-tint: #EFF6FF;
  --bg-teal-tint: #F0FDFA;
  --border-light: #E5E7EB;
  --border-medium: #D1D5DB;
  --accent-amber: #F59E0B;
  --accent-purple: #8B5CF6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --max-width-article: 720px;
  --max-width-page: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ─── NAV ────────────────────────────────────────────── */

.blog-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
}
.blog-nav-inner {
  max-width: var(--max-width-page);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.blog-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}
.blog-nav-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}
.blog-nav-brand-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.blog-nav-brand-text span {
  color: var(--text-tertiary);
  font-weight: 500;
  margin-left: 2px;
}
.blog-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--brand-gradient);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.blog-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ─── ARTICLE LAYOUT ─────────────────────────────────── */

.article-hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #F0FDFA 50%, #ECFDF5 100%);
  padding: 80px 24px 60px;
  text-align: center;
}
.article-hero-inner {
  max-width: var(--max-width-article);
  margin: 0 auto;
}
.article-category {
  display: inline-block;
  padding: 4px 14px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}
.article-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.article-hero-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 28px;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-tertiary);
  flex-wrap: wrap;
}
.article-meta-divider { color: var(--border-medium); }

/* ─── ARTICLE BODY ───────────────────────────────────── */

.article-body {
  max-width: var(--max-width-article);
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.article-body h2 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 700;
  color: var(--text-primary);
  margin: 48px 0 16px;
  line-height: 1.3;
}
.article-body h3 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 600;
  color: var(--text-primary);
  margin: 36px 0 12px;
  line-height: 1.35;
}
.article-body p {
  margin-bottom: 20px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
}
.article-body strong {
  color: var(--text-primary);
  font-weight: 600;
}
.article-body a {
  color: var(--brand-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.article-body a:hover { color: var(--brand-blue); }

.article-body ul, .article-body ol {
  margin: 0 0 24px 24px;
  font-size: 17px;
  color: var(--text-secondary);
}
.article-body li {
  margin-bottom: 10px;
  line-height: 1.7;
}
.article-body blockquote {
  border-left: 4px solid var(--brand-teal);
  background: var(--bg-teal-tint);
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}
.article-body blockquote p { margin-bottom: 0; }

/* ─── CALLOUT BOXES ──────────────────────────────────── */

.callout {
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 32px 0;
}
.callout-problem {
  background: #FEF2F2;
  border: 1px solid #FECACA;
}
.callout-solution {
  background: var(--bg-teal-tint);
  border: 1px solid #99F6E4;
}
.callout-insight {
  background: var(--bg-blue-tint);
  border: 1px solid #BFDBFE;
}
.callout-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.callout-problem .callout-title { color: #991B1B; }
.callout-solution .callout-title { color: #115E59; }
.callout-insight .callout-title { color: #1E40AF; }
.callout p {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 0;
}

/* ─── CTA BANNER ─────────────────────────────────────── */

.cta-banner {
  background: var(--brand-gradient);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  margin: 48px 0;
  color: white;
}
.cta-banner h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 12px;
  color: white;
}
.cta-banner p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 24px;
  color: white;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.cta-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: white;
  color: var(--brand-blue);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 16px;
  transition: transform 0.15s, box-shadow 0.2s;
}
.cta-banner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  color: var(--brand-blue);
}

/* ─── COMPARISON TABLE ───────────────────────────────── */

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.comparison-table thead {
  background: var(--bg-light);
}
.comparison-table th {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  text-align: left;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-light);
}
.comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: top;
}
.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table .label-old { color: #991B1B; font-weight: 500; }
.comparison-table .label-new { color: #115E59; font-weight: 500; }

/* ─── FOOTER ─────────────────────────────────────────── */

.blog-footer {
  border-top: 1px solid var(--border-light);
  padding: 40px 24px;
  text-align: center;
  background: var(--bg-light);
}
.blog-footer-inner {
  max-width: var(--max-width-page);
  margin: 0 auto;
}
.blog-footer p {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.blog-footer a {
  color: var(--brand-teal);
  text-decoration: none;
}
.blog-footer a:hover { text-decoration: underline; }

/* ─── BLOG INDEX ─────────────────────────────────────── */

.blog-index-hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #F0FDFA 50%, #ECFDF5 100%);
  padding: 80px 24px 48px;
  text-align: center;
}
.blog-index-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}
.blog-index-hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

.blog-grid {
  max-width: var(--max-width-page);
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.blog-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.blog-card-color {
  height: 6px;
  background: var(--brand-gradient);
}
.blog-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-category {
  display: inline-block;
  padding: 3px 10px;
  background: var(--bg-teal-tint);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-teal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  align-self: flex-start;
}
.blog-card h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.blog-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}
.blog-card-meta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
}

/* ─── RESPONSIVE ─────────────────────────────────────── */

@media (max-width: 640px) {
  .article-hero { padding: 64px 16px 40px; }
  .article-body { padding: 32px 16px 60px; }
  .callout { padding: 20px; }
  .cta-banner { padding: 32px 20px; }
  .blog-nav-cta { padding: 8px 14px; font-size: 13px; }
  .comparison-table { font-size: 13px; }
  .comparison-table th, .comparison-table td { padding: 10px 12px; }
}
