/* ─── SHARED VARIABLES (matches landing page) ──────────── */
:root {
  --bg-base: #eef5ff;
  --bg-surface: rgba(255, 255, 255, 0.92);
  --bg-elevated: #f8fbff;
  --text-1: #070f1a;
  --text-2: #404350;
  --text-3: #657786;
  --border: rgba(7, 15, 26, 0.08);
  --border-hover: rgba(7, 15, 26, 0.14);
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-alpha: rgba(37, 99, 235, 0.12);
  --accent-grad: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 52%, #bfdbfe 100%);
  --success: #10b981;
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --shadow-sm: 0 1px 2px rgba(7, 15, 26, 0.05), 0 1px 3px rgba(7, 15, 26, 0.06);
  --shadow-md: 0 4px 12px rgba(7, 15, 26, 0.07), 0 2px 4px rgba(7, 15, 26, 0.04);
  --shadow-lg: 0 20px 40px -12px rgba(7, 15, 26, 0.12), 0 8px 16px -8px rgba(7, 15, 26, 0.06);
}

/* ─── RESET & BASE ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  background: var(--bg-base);
  color: var(--text-2);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ─── NAV (matches landing page) ──────────────────────── */
nav {
  position: sticky; top: 0; z-index: 1000;
  background: linear-gradient(180deg, #092757 0%, #092052 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 24px rgba(7, 29, 77, 0.22);
}
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.125rem; color: #7e70bc; text-decoration: none; }
.nav-logo-img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { font-size: 0.875rem; font-weight: 500; color: rgba(255, 255, 255, 0.9); text-decoration: none; transition: color 0.2s ease; }
.nav-links a:hover { color: #747db4; }
.nav-cta { padding: 10px 22px; border-radius: var(--radius-pill); background: var(--accent-grad); color: #ffffff; font-weight: 600; font-size: 0.875rem; text-decoration: none; transition: all 0.2s ease; box-shadow: var(--shadow-sm); }
.nav-cta:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* ─── FOOTER (matches landing page) ───────────────────── */
footer { background: #1e3a8a; padding: 64px 24px 48px; text-align: center; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-brand { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.25rem; color: #ffffff; margin-bottom: 16px; }
.footer-copy { font-size: 0.9375rem; color: rgba(255, 255, 255, 0.7); }

/* ─── AUTH MODAL (matches landing page) ───────────────── */
.auth-overlay { display: none; position: fixed; inset: 0; z-index: 10000; background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(24px); align-items: center; justify-content: center; }
.auth-overlay.active { display: flex; }
.auth-card { background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(48px); border: 1px solid rgba(255, 255, 255, 0.9); border-radius: var(--radius-lg); padding: 48px; width: 100%; max-width: 480px; position: relative; box-shadow: var(--shadow-lg); }
.auth-close { position: absolute; top: 20px; right: 20px; width: 36px; height: 36px; border-radius: 50%; background: #ffffff; border: 1px solid var(--border); color: var(--text-2); font-size: 1.25rem; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.auth-logo { display: flex; align-items: center; gap: 12px; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.35rem; color: var(--text-1); margin-bottom: 24px; }
.auth-logo-img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; }
.auth-title { font-weight: 700; font-size: 1.75rem; margin-bottom: 8px; color: var(--text-1); }
.auth-subtitle { font-size: 0.9375rem; color: var(--text-3); margin-bottom: 36px; }
.auth-field { margin-bottom: 24px; }
.auth-field label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.auth-field input { width: 100%; padding: 16px 20px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(7, 15, 26, 0.1); color: var(--text-1); font-family: 'Poppins', sans-serif; font-size: 0.9375rem; outline: none; transition: border-color 0.3s; }
.auth-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.auth-field input::placeholder { color: var(--text-3); }
.auth-btn { width: 100%; padding: 18px; border-radius: var(--radius-sm); background: var(--accent-grad); color: #ffffff; border: none; cursor: pointer; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.05rem; margin-top: 12px; }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-switch { text-align: center; margin-top: 28px; font-size: 0.9375rem; color: var(--text-2); }
.auth-switch a { color: var(--primary); text-decoration: none; font-weight: 600; cursor: pointer; }
.auth-error { background: rgba(239, 68, 68, 0.06); border: 1px solid rgba(239, 68, 68, 0.2); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 24px; color: #ef4444; display: none; }
.auth-error.visible { display: block; }
.auth-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ─── BLOG SHARED ──────────────────────────────────────── */
.blog-container { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* ─── BLOG LISTING ─────────────────────────────────────── */
.blog-listing { padding: 80px 0 96px; }
.blog-listing-header { text-align: center; margin-bottom: 64px; }
.blog-listing-header h1 { font-family: 'Poppins', sans-serif; font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; color: var(--text-1); margin-bottom: 16px; }
.blog-listing-header p { font-size: 1.1rem; color: var(--text-2); font-weight: 300; max-width: 500px; margin: 0 auto; }

.blog-grid { display: grid; grid-template-columns: 1fr; gap: 32px; max-width: 800px; margin: 0 auto; }
.blog-card { display: block; text-decoration: none; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-hover); }
.blog-card-image { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-elevated); }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 28px 32px; }
.blog-card-tags { display: flex; gap: 8px; margin-bottom: 12px; }
.blog-tag-sm { font-size: 0.6875rem; font-weight: 600; color: var(--primary); background: var(--primary-alpha); padding: 4px 10px; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: 0.05em; }
.blog-card-body h2 { font-family: 'Poppins', sans-serif; font-size: 1.35rem; font-weight: 600; color: var(--text-1); margin-bottom: 12px; line-height: 1.35; }
.blog-card-body p { font-size: 0.9375rem; color: var(--text-2); line-height: 1.6; margin-bottom: 16px; }
.blog-card-meta { display: flex; gap: 16px; font-size: 0.8125rem; color: var(--text-3); font-weight: 500; }

.blog-pagination { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 64px; }
.page-link { font-size: 0.9375rem; font-weight: 600; color: var(--primary); text-decoration: none; padding: 10px 20px; border-radius: var(--radius-sm); border: 1px solid var(--border); transition: all 0.2s; }
.page-link:hover { background: var(--primary-alpha); border-color: var(--primary); }
.page-info { font-size: 0.875rem; color: var(--text-3); }

/* ─── BLOG POST ────────────────────────────────────────── */
.blog-post { padding: 48px 0 96px; }

.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--text-3); margin-bottom: 40px; flex-wrap: wrap; }
.breadcrumb a { color: var(--primary); text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--border-hover); }

.blog-header { margin-bottom: 48px; }
.blog-tags { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.blog-tag { font-size: 0.6875rem; font-weight: 700; color: var(--primary); background: var(--primary-alpha); padding: 6px 14px; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: 0.06em; }
.blog-header h1 { font-family: 'Poppins', sans-serif; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; color: var(--text-1); line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 20px; }
.blog-meta { display: flex; gap: 16px; font-size: 0.875rem; color: var(--text-3); font-weight: 500; flex-wrap: wrap; }
.blog-meta .blog-author { color: var(--text-1); font-weight: 600; }

.blog-hero-image { margin-bottom: 48px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.blog-hero-image img { width: 100%; display: block; }

/* ─── BLOG CONTENT (prose) ─────────────────────────────── */
.blog-content { font-size: 1.0625rem; line-height: 1.8; color: var(--text-2); }
.blog-content h2 { font-family: 'Poppins', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--text-1); margin: 48px 0 16px; letter-spacing: -0.02em; }
.blog-content h3 { font-family: 'Poppins', sans-serif; font-size: 1.25rem; font-weight: 600; color: var(--text-1); margin: 36px 0 12px; }
.blog-content p { margin-bottom: 24px; }
.blog-content strong { font-weight: 600; color: var(--text-1); }
.blog-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.blog-content a:hover { color: var(--primary-hover); }
.blog-content ul, .blog-content ol { margin: 0 0 24px 24px; }
.blog-content li { margin-bottom: 8px; }
.blog-content blockquote { margin: 32px 0; padding: 20px 24px; border-left: 4px solid var(--primary); background: var(--bg-elevated); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; color: var(--text-1); }
.blog-content code { font-size: 0.9em; background: var(--bg-elevated); border: 1px solid var(--border); padding: 2px 6px; border-radius: 6px; }
.blog-content pre { margin: 24px 0; padding: 24px; background: #0f172a; color: #e2e8f0; border-radius: var(--radius-sm); overflow-x: auto; font-size: 0.875rem; line-height: 1.6; }
.blog-content pre code { background: none; border: none; padding: 0; color: inherit; }
.blog-content img { max-width: 100%; border-radius: var(--radius-sm); margin: 24px 0; }
.blog-content hr { border: none; height: 1px; background: var(--border); margin: 48px 0; }

/* ─── BLOG CTA ─────────────────────────────────────────── */
.blog-cta { margin-top: 64px; padding: 48px; background: rgba(255, 255, 255, 0.65); backdrop-filter: blur(32px); border: 1px solid rgba(255, 255, 255, 0.8); border-radius: var(--radius-lg); text-align: center; box-shadow: var(--shadow-md); }
.blog-cta h3 { font-family: 'Poppins', sans-serif; font-size: 1.35rem; font-weight: 700; color: var(--text-1); margin-bottom: 12px; }
.blog-cta p { font-size: 1rem; color: var(--text-2); margin-bottom: 28px; max-width: 400px; margin-left: auto; margin-right: auto; }
.blog-cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-primary { display: inline-flex; align-items: center; padding: 14px 32px; border-radius: var(--radius-sm); background: var(--accent-grad); color: #ffffff; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 0.9375rem; text-decoration: none; transition: all 0.3s ease; box-shadow: 0 4px 14px rgba(79, 70, 229, 0.22); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(79, 70, 229, 0.32); }
.btn-secondary { display: inline-flex; align-items: center; padding: 14px 32px; border-radius: var(--radius-sm); background: transparent; border: 2px solid rgba(99, 102, 241, 0.4); color: var(--primary); font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 0.9375rem; cursor: pointer; transition: all 0.3s ease; }
.btn-secondary:hover { background: var(--primary-alpha); border-color: var(--primary); }

/* ─── RELATED POSTS ────────────────────────────────────── */
.blog-related { margin-top: 64px; }
.blog-related h3 { font-family: 'Poppins', sans-serif; font-size: 1.25rem; font-weight: 700; color: var(--text-1); margin-bottom: 24px; }
.blog-related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.blog-related-card { display: block; text-decoration: none; padding: 24px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.3s ease; }
.blog-related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-hover); }
.blog-related-date { font-size: 0.75rem; color: var(--text-3); font-weight: 500; margin-bottom: 8px; }
.blog-related-card h4 { font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 600; color: var(--text-1); margin-bottom: 8px; line-height: 1.35; }
.blog-related-card p { font-size: 0.8125rem; color: var(--text-3); line-height: 1.5; }

/* ─── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .blog-related-grid { grid-template-columns: 1fr; }
  .blog-cta { padding: 32px 24px; }
  .blog-card-body { padding: 20px 24px; }
}
