/* 导入共享样式 */
/* === base.css === */
/* base.css - 基础样式（重置、排版） */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body, 'Inter', sans-serif); color: var(--text, #333); line-height: 1.6; background: var(--background, #fff); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading, 'Inter', sans-serif); color: var(--text, #333); line-height: 1.3; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; margin: 2rem 0 1rem; }
h3 { font-size: 1.4rem; margin: 1.5rem 0 0.75rem; }
p { margin-bottom: 1rem; }
a { color: var(--primary, #1a1a2e); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent, #e94560); }
img { max-width: 100%; height: auto; }
ul, ol { margin-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.5rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.btn { display: inline-block; padding: 12px 30px; border-radius: 5px; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.btn-primary { background: var(--accent, #e94560); color: #fff; border: none; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); }

/* Screen reader only - 对搜索引擎可见，对用户隐藏 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 隐藏文章内容中的第一个H1标题（避免与模板标题重复） */
.article-content > h1:first-child {
  display: none;
}

/* === hero.css === */
/* hero.css - Hero 区域样式 */
.page-header { position: relative; overflow: hidden; }

/* Hero 样式（默认） */
.page-header.hero {
  background: linear-gradient(135deg, var(--primary, #1a1a2e) 0%, var(--secondary, #16213e) 100%);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}
.page-header.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.page-header.hero .subtitle { font-size: 1.2rem; opacity: 0.9; margin-bottom: 1.5rem; }

/* Banner 样式 */
.page-header.banner {
  background-color: var(--primary, #1a1a2e);
  color: #fff;
  padding: 40px 0;
  text-align: left;
}
.page-header.banner h1 { font-size: 2rem; }

/* Image 样式 */
.page-header.image {
  position: relative;
  height: 400px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.page-header.image::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
}
.page-header.image h1 {
  position: relative;
  z-index: 1;
  font-size: 3rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* === sidebar.css === */
/* sidebar.css - 侧边栏样式 */
.content-layout { display: flex; gap: 30px; }
.content-main { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }
.sidebar-widget { padding: 20px; background: var(--light, #f5f5f5); border-radius: 8px; margin-bottom: 20px; }
.sidebar-widget h3 { font-size: 1.1rem; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--primary, #1a1a2e); }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { display: inline-block; padding: 5px 12px; background: var(--primary, #1a1a2e); color: #fff; border-radius: 20px; font-size: 0.85rem; transition: background 0.3s; }
.tag-cloud a:hover { background: var(--accent, #e94560); }

/* === faq.css === */
/* faq.css - FAQ 折叠面板样式 */
.faq-section { margin: 40px 0; }
.faq-item { margin-bottom: 10px; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; }
.faq-question {
  padding: 15px 20px;
  background: var(--light, #f5f5f5);
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}
.faq-question:hover { background: #eee; }
.faq-question::after { content: '+'; font-size: 1.2rem; transition: transform 0.3s; }
.faq-item.active .faq-question::after { content: '−'; }
.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 15px 20px;
}

/* === related.css === */
/* related.css - 相关文章样式 */
.related-articles { margin: 40px 0; }
.related-articles h2 { margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}
.related-card:hover { transform: translateY(-5px); box-shadow: 0 5px 20px rgba(0,0,0,0.15); }
.related-card img { width: 100%; height: 180px; object-fit: cover; }
.related-card .card-content { padding: 15px; }
.related-card h4 { font-size: 1rem; margin-bottom: 8px; }
.related-card p { font-size: 0.9rem; color: #666; line-height: 1.5; }

/* 文章列表页 */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.article-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}
.article-card:hover { transform: translateY(-5px); }
.article-card img { width: 100%; height: 200px; object-fit: cover; }
.article-card .card-content { padding: 20px; }
.article-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.article-card .meta { font-size: 0.85rem; color: #999; margin-top: 10px; }

/* === responsive.css === */
/* responsive.css - 响应式样式 */
@media (max-width: 1024px) {
  .content-layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .page-header.hero { padding: 60px 0; }
  .page-header.hero h1 { font-size: 1.8rem; }
  .page-header.image { height: 300px; }
  .page-header.image h1 { font-size: 2rem; }
  .articles-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; }
  .nav-menu { display: none; }
  .nav-menu.active { display: flex; flex-direction: column; }
  .menu-toggle { display: block; }
}

@media (max-width: 480px) {
  .container { padding: 0 15px; }
  .page-header.hero { padding: 40px 0; }
  .page-header.banner { padding: 30px 0; }
  .btn { padding: 10px 20px; }
}

@import "./theme.css";

/* 模板特有样式 */
:root{--font-heading:Inter,sans-serif;--font-body:Inter,sans-serif;--space-unit:8px;--radius:4px;--header-bg:#ffffff;--header-padding:1rem;--primary:#722ed1;--text:#333;--bg:#fff;--light:#f0f2f5}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:var(--font-body);color:var(--text);line-height:1.6}
.container{max-width:1200px;margin:0 auto;padding:0 20px}
.btn{display:inline-block;padding:14px 28px;background:linear-gradient(135deg,var(--primary),#667eea);color:#fff;border-radius:8px;text-decoration:none;transition:transform 0.3s}
.btn:hover{transform:translateY(-2px)}
.site-header{background:#fff;box-shadow:0 4px 20px rgba(0,0,0,0.08);position:sticky;top:0;z-index:1000}
.site-header .container{display:flex;justify-content:space-between;align-items:center;padding:15px 0}
.logo{font-size:28px;font-weight:800;background:linear-gradient(135deg,var(--primary),#667eea);-webkit-background-clip:text;-webkit-text-fill-color:transparent;text-decoration:none}
nav a{margin-left:24px;text-decoration:none;color:var(--text);font-weight:500;transition:color 0.3s}
nav a:hover{color:var(--primary)}
.hero{background:linear-gradient(135deg,var(--primary),#667eea);color:#fff;padding:120px 0;text-align:center}
.hero h1{font-size:56px;margin-bottom:24px;font-weight:800}
.features{padding:100px 0;background:var(--light)}
.features-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:40px}
.feature{text-align:center;padding:40px;background:#fff;border-radius:16px;box-shadow:0 4px 20px rgba(0,0,0,0.06)}
.feature i{font-size:56px;background:linear-gradient(135deg,var(--primary),#667eea);-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-bottom:24px}
.products-preview,.products-page{padding:100px 0}
.product-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:32px}
.product-card{background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 4px 20px rgba(0,0,0,0.06);transition:transform 0.3s,box-shadow 0.3s}
.product-card:hover{transform:translateY(-8px);box-shadow:0 8px 30px rgba(0,0,0,0.12)}
.product-card img{width:100%;height:220px;object-fit:cover}
.price{background:linear-gradient(135deg,var(--primary),#667eea);-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:28px;font-weight:800}
.site-footer{background:linear-gradient(135deg,#1a1a2e,#16213e);color:#fff;padding:60px 0;text-align:center}
@media(max-width:768px){.features-grid,.product-grid{grid-template-columns:1fr}.hero h1{font-size:36px}}
