/* ===== SaaS Savvy Hub - 主样式 ===== */

:root {
  --bg: #ffffff;
  --text: #1a1a2e;
  --text-light: #555;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f59e0b;
  --border: #e5e7eb;
  --bg-card: #f9fafb;
  --max-width: 780px;
}

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

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

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

/* ===== 导航栏 ===== */
.navbar {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  position: sticky; top: 0; background: var(--bg);
  z-index: 10;
}
.navbar-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.navbar .logo { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.navbar .logo:hover { text-decoration: none; color: var(--primary); }
.nav-links { display: flex; gap: 1.5rem; font-size: 0.9rem; }
.nav-links a { color: var(--text-light); }
.nav-links a:hover { color: var(--primary); text-decoration: none; }

/* ===== 主容器 ===== */
.container {
  max-width: var(--max-width); margin: 0 auto; padding: 2rem 1.5rem;
}

/* ===== 首页 ===== */
.hero {
  text-align: center; padding: 3rem 0 1rem;
}
.hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.hero p { color: var(--text-light); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* ===== 分类导航 ===== */
.category-nav {
  display: flex; gap: 1rem; justify-content: center;
  margin: 2rem 0; flex-wrap: wrap;
}
.category-nav a {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.9rem; color: var(--text-light);
  transition: all 0.2s;
}
.category-nav a:hover, .category-nav a.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  text-decoration: none;
}

/* ===== 文章卡片 ===== */
.post-card {
  padding: 1.5rem 0; border-bottom: 1px solid var(--border);
}
.post-card:last-child { border-bottom: none; }
.post-card .post-category {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--primary); font-weight: 600; margin-bottom: 0.25rem;
}
.post-card h2 { font-size: 1.35rem; margin-bottom: 0.35rem; }
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--primary); text-decoration: none; }
.post-card .post-meta { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.5rem; }
.post-card .post-excerpt { color: var(--text-light); font-size: 0.95rem; }

/* ===== 文章详情页 ===== */
.post-header { margin-bottom: 2rem; }
.post-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.post-content { font-size: 1.05rem; }
.post-content h2 { font-size: 1.5rem; margin: 2rem 0 0.75rem; }
.post-content h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
.post-content p { margin-bottom: 1rem; }
.post-content ul, .post-content ol { margin: 0 0 1rem 1.5rem; }
.post-content li { margin-bottom: 0.35rem; }
.post-content blockquote {
  border-left: 3px solid var(--primary); padding: 0.5rem 1rem;
  margin: 1rem 0; background: var(--bg-card); color: var(--text-light);
}
.post-content img { max-width: 100%; border-radius: 8px; }
.post-content code {
  background: var(--bg-card); padding: 0.15rem 0.4rem; border-radius: 4px;
  font-size: 0.9em;
}
.post-content pre {
  background: #1e1e2e; color: #cdd6f4; padding: 1rem; border-radius: 8px;
  overflow-x: auto; margin-bottom: 1rem;
}
.post-content pre code { background: none; padding: 0; color: inherit; }

/* ===== 页面（About / Privacy / Contact） ===== */
.page-title { font-size: 2rem; margin-bottom: 1.5rem; }

/* ===== 联系表单 ===== */
.contact-form { margin-top: 1.5rem; }
.contact-form label { display: block; font-weight: 600; margin: 1rem 0 0.25rem; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 0.75rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 1rem; font-family: inherit;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.contact-form button {
  margin-top: 1rem; padding: 0.75rem 2rem;
  background: var(--primary); color: #fff; border: none;
  border-radius: 8px; font-size: 1rem; cursor: pointer;
  font-weight: 600;
}
.contact-form button:hover { background: var(--primary-dark); }

/* ===== 底栏 ===== */
.footer {
  border-top: 1px solid var(--border); text-align: center;
  padding: 2rem 1.5rem; margin-top: 3rem;
  font-size: 0.85rem; color: var(--text-light);
}
.footer a { color: var(--text-light); }
.footer .footer-links { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 0.5rem; }

/* ===== 搜索框 ===== */
.search-box { margin: 1.5rem 0; }
.search-box input {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 1rem;
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .navbar-inner { flex-direction: column; gap: 0.5rem; }
  .hero { padding: 2rem 0 0; }
  .hero h1 { font-size: 1.5rem; }
  .post-card h2 { font-size: 1.15rem; }
}
