/* BorderIQ Blog - Shared Styles */
/* Matches the dark theme of the Flutter app */

:root {
  --bg: #0B0F17;
  --surface: #161F30;
  --surface-elevated: #111827;
  --border: #1F2937;
  --border-muted: #374151;
  --text-primary: #FFFFFF;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --primary: #2563EB;
  --accent: #38BDF8;
  --success: #10B981;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* Header */
.site-header {
  background-color: var(--surface-elevated);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.site-logo span {
  color: var(--accent);
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  margin-left: 1.5rem;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--text-primary);
}

/* Main content */
.main-content,
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* Header container (used in articles 3-6) */
.site-header .container {
  max-width: 960px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Article styles */
article {
  margin-bottom: 3rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-meta time {
  color: var(--text-secondary);
}

.article-tag {
  display: inline-block;
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-primary);
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary);
  text-decoration: underline;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.5rem;
}

.callout {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.callout-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.callout p {
  margin-bottom: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background-color: var(--surface);
  color: var(--text-primary);
  font-weight: 600;
}

td {
  color: var(--text-secondary);
}

.blog-list {
  list-style: none;
  padding: 0;
}

.blog-list-item {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.blog-list-item:hover {
  border-color: var(--border-muted);
}

.blog-list-item h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.blog-list-item h2 a {
  color: var(--text-primary);
  text-decoration: none;
}

.blog-list-item h2 a:hover {
  color: var(--accent);
}

.blog-list-item .excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.blog-list-item .meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ad-slot {
  text-align: center;
  min-height: 90px;
  margin: 2rem 0;
}

.site-footer {
  background-color: var(--surface-elevated);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-secondary);
  margin: 0 0.75rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
  text-decoration: none;
}

.back-link:hover {
  color: var(--text-secondary);
  text-decoration: none;
}

/* Breadcrumb (back to blog link) */
.breadcrumb {
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--text-secondary);
}

/* Article meta (date, read time) */
.meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Article content wrapper */
.content {
  margin-bottom: 2rem;
}

/* Related articles */
.related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related h3 {
  margin-bottom: 1rem;
}

.related-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-grid a {
  color: var(--accent);
  font-size: 0.95rem;
}

/* Header logo and nav (used in articles 3-6) */
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.site-header nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  margin-left: 1.5rem;
  transition: color 0.2s;
}

.site-header nav a:hover,
.site-header nav a.active {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .main-content, .container { padding: 1.5rem 1rem 3rem; }
  .site-header-inner { flex-direction: column; gap: 0.75rem; }
  .site-header .container { flex-direction: column; gap: 0.75rem; }
  .site-nav a { margin-left: 0; margin-right: 1rem; }
  .site-header nav a { margin-left: 0; margin-right: 1rem; }
}
