/* ==========================================================================
   LawBits Blog — shared stylesheet
   Used by every page under /blog/ (index + all posts + template).
   Design tokens mirror the main site so the blog stays visually consistent.
   ========================================================================== */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1B2A4A;
  background: #fff;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---------- TOKENS ---------- */
:root {
  --navy: #1B2A4A;
  --navy-light: #243556;
  --navy-dark: #111D33;
  --gold: #E6D7B2;
  --gold-light: #F0E4C5;
  --gold-dark: #CEBA87;
  --sky: #5E96C8;
  --sky-light: #7EB6E8;
  --sky-deep: #2E6899;
  --sky-soft: rgba(94,150,200,0.14);
  --white: #FFFFFF;
  --gray-50: #F8F9FB;
  --gray-100: #F1F3F7;
  --gray-200: #E2E6EE;
  --gray-300: #C9CFDB;
  --gray-400: #9BA3B5;
  --gray-500: #6B7489;
  --gray-600: #4A5568;
  --gray-700: #2D3748;
  --shadow-sm: 0 1px 3px rgba(27,42,74,0.06), 0 1px 2px rgba(27,42,74,0.04);
  --shadow-md: 0 4px 14px rgba(27,42,74,0.08), 0 2px 6px rgba(27,42,74,0.04);
  --shadow-lg: 0 10px 40px rgba(27,42,74,0.1), 0 4px 12px rgba(27,42,74,0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 48px; } }
@media (min-width: 1280px) { .container { padding: 0 64px; } }

/* ---------- NAVBAR (matches main site) ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 10px 0; background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(27,42,74,0.08);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--navy); }
.navbar-logo span { color: var(--gold-dark); }
.navbar-links { display: flex; align-items: center; gap: 32px; }
.navbar-links a { font-size: 0.9rem; font-weight: 500; color: var(--gray-600); position: relative; transition: color var(--transition); }
.navbar-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--sky); transition: width var(--transition); }
.navbar-links a:hover { color: var(--navy); }
.navbar-links a:hover::after { width: 100%; }
.navbar-cta {
  padding: 10px 24px; background: var(--gold); color: var(--navy) !important;
  border-radius: 100px; font-weight: 600; font-size: 0.875rem;
  border: 2px solid var(--gold); transition: all var(--transition);
}
.navbar-cta:hover { background: var(--gold-light); border-color: var(--gold-light); transform: translateY(-1px); }
.navbar-cta::after { display: none !important; }
.mobile-toggle { display: none; flex-direction: column; gap: 6px; cursor: pointer; padding: 8px; z-index: 1001; }
.mobile-toggle span { width: 28px; height: 2.5px; background: var(--navy); border-radius: 2px; transition: all var(--transition); }

/* ---------- PAGE HERO (navy band; used by index + posts) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 40%, var(--navy-light) 100%);
  padding: 140px 0 64px; position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; top: -40%; right: -10%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(94,150,200,0.10) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; max-width: 820px; }
.page-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sky-light); margin-bottom: 14px;
}
.page-hero .eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--sky-light); border-radius: 2px; }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 2.9rem); font-weight: 800; color: var(--white); letter-spacing: -0.02em; margin-bottom: 14px; line-height: 1.12; }
.page-hero .lead { color: rgba(255,255,255,0.72); font-size: 1.05rem; max-width: 620px; }
.page-hero .post-meta { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.page-hero .post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.page-hero .post-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,0.4); }
.page-hero .back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--sky-light); font-size: 0.85rem; font-weight: 600; margin-bottom: 20px; }
.page-hero .back-link:hover { color: var(--white); }

/* ---------- BLOG INDEX GRID ---------- */
.blog-list { padding: 64px 0 96px; background: var(--gray-50); }
.blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  max-width: 1100px; margin: 0 auto;
}
.blog-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--sky-soft); }
.blog-card-thumb { aspect-ratio: 16 / 9; background: var(--gray-100); overflow: hidden; }
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 24px 24px 28px; display: flex; flex-direction: column; flex: 1; }
.blog-card-cat { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sky-deep); margin-bottom: 10px; }
.blog-card h2 { font-size: 1.22rem; font-weight: 800; color: var(--navy); line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 10px; }
.blog-card p { font-size: 0.93rem; color: var(--gray-500); line-height: 1.6; margin-bottom: 18px; }
.blog-card-meta { margin-top: auto; font-size: 0.8rem; color: var(--gray-400); display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.blog-card-readmore { color: var(--sky-deep); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 6px; }
.blog-card:hover .blog-card-readmore { gap: 9px; }

/* ---------- ARTICLE (single post reading column) ---------- */
.article-wrap { padding: 56px 0 80px; background: var(--white); }
.article { max-width: 720px; margin: 0 auto; }
.article-hero { margin: 0 auto 40px; max-width: 860px; }
.article-hero img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.article p { color: var(--gray-700); font-size: 1.05rem; line-height: 1.85; margin-bottom: 24px; }
.article h2 { font-size: 1.5rem; font-weight: 800; color: var(--navy); letter-spacing: -0.01em; line-height: 1.25; margin: 48px 0 16px; }
.article h3 { font-size: 1.18rem; font-weight: 700; color: var(--navy); line-height: 1.3; margin: 34px 0 12px; }
.article a { color: var(--sky-deep); font-weight: 500; border-bottom: 1px solid var(--sky-soft); }
.article a:hover { color: var(--sky); border-bottom-color: var(--sky); }
.article strong { color: var(--navy); font-weight: 700; }
.article ul, .article ol { margin: 0 0 24px; padding-left: 24px; }
.article ul { list-style: disc; }
.article ol { list-style: decimal; }
.article li { color: var(--gray-700); font-size: 1.05rem; line-height: 1.8; margin-bottom: 10px; }
.article li::marker { color: var(--sky-deep); }
.article blockquote {
  margin: 32px 0; padding: 20px 28px; border-left: 4px solid var(--gold-dark);
  background: var(--gray-50); border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1.12rem; font-style: italic; color: var(--navy); line-height: 1.7;
}
.article figure { margin: 36px 0; }
.article figure img { width: 100%; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.article figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--gray-400); text-align: center; }
.article-callout {
  margin: 36px 0; padding: 24px 28px; background: var(--sky-soft);
  border: 1px solid var(--sky-soft); border-radius: var(--radius-md);
}
.article-callout p { margin-bottom: 0; font-size: 0.98rem; color: var(--navy); }
.article-callout strong { color: var(--navy); }
.article-divider { height: 1px; background: var(--gray-200); border: 0; margin: 48px 0; }

/* Table of contents (for long posts) */
.article-toc { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 24px 28px; margin: 0 0 40px; }
.article-toc .toc-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sky-deep); margin-bottom: 14px; }
.article-toc ol { margin: 0; padding-left: 20px; list-style: decimal; }
.article-toc li { font-size: 0.95rem; line-height: 1.5; margin-bottom: 8px; color: var(--gray-600); }
.article-toc a { color: var(--gray-700); border-bottom: none; }
.article-toc a:hover { color: var(--sky-deep); }
.article h2[id], .article h3[id] { scroll-margin-top: 90px; }

/* CTA strip a post can drop in (links to pricing/start) */
.article-cta {
  margin: 48px auto 0; max-width: 720px; text-align: center;
  background: linear-gradient(135deg, var(--navy-dark), var(--navy)); color: var(--white);
  border-radius: var(--radius-lg); padding: 40px 32px;
}
.article-cta h3 { color: var(--white); font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.article-cta p { color: rgba(255,255,255,0.72); font-size: 0.98rem; margin-bottom: 20px; }
.article-cta a {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px;
  background: var(--gold); color: var(--navy); border-radius: 100px; font-weight: 700; font-size: 0.95rem;
  border: 0; transition: all var(--transition);
}
.article-cta a:hover { background: var(--gold-light); transform: translateY(-1px); }

/* Newsletter CTA block (navy — matches the SuiteDash form's dark styling so input text is visible) */
.article-newsletter {
  margin: 48px auto 0; max-width: 720px; text-align: center;
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  border: 1px solid rgba(230,215,178,0.22); border-radius: var(--radius-lg);
  padding: 36px 32px;
}
.article-newsletter .label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.article-newsletter h3 { font-size: 1.3rem; font-weight: 800; color: var(--white); margin-bottom: 8px; }
.article-newsletter p { color: rgba(255,255,255,0.72); font-size: 0.98rem; margin: 0 auto 20px; max-width: 460px; }
.article-newsletter .nl-embed { max-width: 460px; margin: 0 auto; }
.article-newsletter .nl-embed iframe { width: 100% !important; border: 0 !important; display: block; background: transparent !important; }

/* ---------- RELATED POSTS ---------- */
.related-section { padding: 56px 0 88px; background: var(--gray-50); border-top: 1px solid var(--gray-200); }
.related-head { max-width: 1100px; margin: 0 auto 28px; }
.related-head .label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sky-deep); margin-bottom: 6px; }
.related-head h2 { font-size: 1.5rem; font-weight: 800; color: var(--navy); letter-spacing: -0.01em; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1100px; margin: 0 auto; }
.related-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 22px 22px 24px; display: flex; flex-direction: column;
  transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--sky-soft); }
.related-card .cat { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sky-deep); margin-bottom: 8px; }
.related-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); line-height: 1.35; margin-bottom: 8px; }
.related-card p { font-size: 0.88rem; color: var(--gray-500); line-height: 1.55; margin-bottom: 14px; }
.related-card .readmore { margin-top: auto; color: var(--sky-deep); font-weight: 600; font-size: 0.85rem; }

/* ---------- FOOTER (matches main site, software-only) ---------- */
.footer { padding: 64px 0 32px; background: var(--navy-dark); border-top: 1px solid rgba(255,255,255,0.05); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand .navbar-logo { font-size: 1.3rem; margin-bottom: 16px; display: inline-block; color: var(--white); }
.footer-brand .navbar-logo span { color: var(--gold); }
.footer-brand p { font-size: 0.88rem; color: rgba(255,255,255,0.45); line-height: 1.7; max-width: 300px; margin-bottom: 24px; }
.footer-col h4 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); margin-bottom: 20px; }
.footer-col a { display: block; font-size: 0.9rem; color: rgba(255,255,255,0.6); margin-bottom: 12px; transition: color var(--transition); }
.footer-col a:hover { color: var(--sky-light); }
.footer-social { display: flex; gap: 12px; margin-top: 8px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; margin-bottom: 0; transition: all var(--transition); }
.footer-social a:hover { background: var(--sky-light); }
.footer-social a svg { width: 16px; height: 16px; fill: rgba(255,255,255,0.6); transition: fill var(--transition); }
.footer-social a:hover svg { fill: var(--navy); }
.footer-bottom { padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.06); display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.footer-disclaimer { font-size: 0.78rem; color: rgba(255,255,255,0.35); line-height: 1.7; max-width: 700px; }
.footer-legal-links { display: flex; gap: 20px; flex-shrink: 0; }
.footer-legal-links a { font-size: 0.78rem; color: rgba(255,255,255,0.35); white-space: nowrap; transition: color var(--transition); }
.footer-legal-links a:hover { color: var(--sky-light); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 768px) {
  .navbar-links { display: none; }
  .mobile-toggle { display: flex; }
  .navbar-links.active {
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--navy); align-items: center; justify-content: center; gap: 24px; z-index: 1000;
  }
  .navbar-links.active a { color: rgba(255,255,255,0.85); font-size: 1.1rem; }
  .mobile-toggle.active span { background: var(--white); }
  .mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .mobile-toggle.active span:nth-child(2) { opacity: 0; }
  .mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
  .footer-bottom { flex-direction: column; }
  .article p, .article li { font-size: 1rem; }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; max-width: 460px; }
  .related-grid { grid-template-columns: 1fr; max-width: 460px; }
  .footer-grid { grid-template-columns: 1fr; }
}
