/* ============================================
   FireKnow 电气安全知识网 - 全站样式
   主色：深空青灰蓝 #1a3a4a
   辅助色：低饱和安全橙 #e07b39
   ============================================ */

/* ===== 全局重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: #1a3a4a; text-decoration: none; transition: color 0.2s; }
a:hover { color: #e07b39; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ===== 容器 ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 顶部导航 ===== */
.header {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: #1a3a4a;
  letter-spacing: -0.5px;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #1a3a4a 0%, #2a5a6a 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
}
.logo-text small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #888;
  margin-top: -2px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  padding: 8px 14px;
  font-size: 15px;
  color: #444;
  border-radius: 6px;
  transition: all 0.2s;
}
.nav a:hover,
.nav a.active {
  color: #1a3a4a;
  background: #f0f4f6;
}
.nav a.nav-contact {
  color: #888;
  font-weight: 400;
}
.nav a.nav-contact:hover {
  color: #e07b39;
  background: #fff7f0;
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #1a3a4a;
  padding: 4px 8px;
}

/* ===== Hero 区 ===== */
.hero {
  background: linear-gradient(135deg, #f5f8fa 0%, #eaf0f3 100%);
  padding: 50px 0 40px;
  border-bottom: 1px solid #eef2f4;
}
.hero h1 {
  font-size: 32px;
  color: #1a3a4a;
  margin-bottom: 10px;
  font-weight: 700;
}
.hero p {
  font-size: 16px;
  color: #666;
  max-width: 700px;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 16px 0;
  font-size: 14px;
  color: #999;
  border-bottom: 1px solid #f0f0f0;
}
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #e07b39; }
.breadcrumb span { margin: 0 8px; color: #ccc; }

/* ===== 主内容区 ===== */
.main {
  padding: 40px 0 60px;
}
.main-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

/* ===== 文章列表 ===== */
.section-title {
  font-size: 22px;
  color: #1a3a4a;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #1a3a4a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title a.more {
  font-size: 14px;
  font-weight: 400;
  color: #888;
}
.section-title a.more:hover { color: #e07b39; }

.article-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.article-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
}
.article-card:last-child { border-bottom: none; }
.article-card-img {
  width: 220px;
  height: 140px;
  background: #f0f4f6;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aab8bf;
  font-size: 40px;
  flex-shrink: 0;
}
.article-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-card-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.5;
}
.article-card-body h3 a { color: #222; }
.article-card-body h3 a:hover { color: #e07b39; }
.article-card-body p {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-meta {
  font-size: 13px;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.article-meta .tag {
  display: inline-block;
  padding: 2px 8px;
  background: #f0f4f6;
  color: #1a3a4a;
  border-radius: 4px;
  font-size: 12px;
}
.article-meta .tag-hot {
  background: #fff3eb;
  color: #e07b39;
}

/* ===== 栏目入口 ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 50px;
}
.category-card {
  background: #fff;
  border: 1px solid #e8eef1;
  border-radius: 10px;
  padding: 28px 24px;
  transition: all 0.25s;
  display: block;
}
.category-card:hover {
  border-color: #1a3a4a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,58,74,0.08);
}
.category-card-icon {
  width: 48px;
  height: 48px;
  background: #f0f4f6;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 14px;
}
.category-card h3 {
  font-size: 17px;
  color: #1a3a4a;
  margin-bottom: 6px;
  font-weight: 600;
}
.category-card p {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
}
.category-card .count {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: #e07b39;
  font-weight: 500;
}

/* ===== 热门阅读 ===== */
.sidebar-widget {
  background: #fafbfc;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
}
.sidebar-widget h4 {
  font-size: 16px;
  color: #1a3a4a;
  margin-bottom: 16px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8eef1;
}
.hot-list li {
  padding: 10px 0;
  border-bottom: 1px dashed #e8eef1;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.hot-list li:last-child { border-bottom: none; }
.hot-list .rank {
  width: 22px;
  height: 22px;
  background: #e0e8ec;
  color: #666;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.hot-list li:nth-child(1) .rank { background: #e07b39; color: #fff; }
.hot-list li:nth-child(2) .rank { background: #f09055; color: #fff; }
.hot-list li:nth-child(3) .rank { background: #f5a878; color: #fff; }
.hot-list a {
  font-size: 14px;
  color: #444;
  line-height: 1.5;
}
.hot-list a:hover { color: #e07b39; }

/* ===== 标签云 ===== */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-cloud a {
  padding: 5px 12px;
  background: #fff;
  border: 1px solid #e0e8ec;
  border-radius: 20px;
  font-size: 13px;
  color: #555;
  transition: all 0.2s;
}
.tag-cloud a:hover {
  background: #1a3a4a;
  border-color: #1a3a4a;
  color: #fff;
}

/* ===== 文章详情页 ===== */
.article-header {
  margin-bottom: 30px;
}
.article-header h1 {
  font-size: 28px;
  color: #1a3a4a;
  line-height: 1.4;
  margin-bottom: 14px;
  font-weight: 700;
}
.article-content {
  font-size: 16px;
  line-height: 1.9;
  color: #333;
}
.article-content h2 {
  font-size: 22px;
  color: #1a3a4a;
  margin: 32px 0 16px;
  font-weight: 600;
  padding-left: 12px;
  border-left: 4px solid #1a3a4a;
}
.article-content h3 {
  font-size: 18px;
  color: #2a5a6a;
  margin: 24px 0 12px;
  font-weight: 600;
}
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}
.article-content ul li {
  list-style: disc;
  margin-bottom: 8px;
}
.article-content ol li {
  list-style: decimal;
  margin-bottom: 8px;
}
.article-content strong { color: #1a3a4a; }
.article-content blockquote {
  border-left: 4px solid #e07b39;
  background: #fff9f5;
  padding: 14px 20px;
  margin: 20px 0;
  color: #666;
  font-size: 15px;
  border-radius: 0 6px 6px 0;
}
.article-content img {
  border-radius: 8px;
  margin: 20px auto;
  max-width: 100%;
}
.article-tags {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.article-tags span {
  font-size: 14px;
  color: #888;
  margin-right: 4px;
}
.article-tags a {
  padding: 4px 12px;
  background: #f0f4f6;
  color: #1a3a4a;
  border-radius: 4px;
  font-size: 13px;
}
.article-tags a:hover { background: #1a3a4a; color: #fff; }

/* 免责声明框 */
.disclaimer-box {
  margin-top: 40px;
  padding: 16px 20px;
  background: #f8f9fa;
  border: 1px solid #e8eef1;
  border-radius: 8px;
  font-size: 13px;
  color: #888;
  line-height: 1.7;
}
.disclaimer-box strong { color: #e07b39; }

/* 相关文章 */
.related-posts {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}
.related-posts h3 {
  font-size: 18px;
  color: #1a3a4a;
  margin-bottom: 16px;
  font-weight: 600;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.related-item {
  padding: 14px 16px;
  background: #fafbfc;
  border-radius: 8px;
  border-left: 3px solid #1a3a4a;
  transition: all 0.2s;
}
.related-item:hover {
  background: #f0f4f6;
  border-left-color: #e07b39;
}
.related-item a {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  display: block;
}
.related-item a:hover { color: #e07b39; }
.related-item .date {
  font-size: 12px;
  color: #aaa;
  margin-top: 6px;
}

/* 上下篇导航 */
.post-nav {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.post-nav a {
  padding: 14px 18px;
  background: #fafbfc;
  border-radius: 8px;
  font-size: 14px;
  color: #555;
  transition: all 0.2s;
}
.post-nav a:hover { background: #f0f4f6; color: #1a3a4a; }
.post-nav .prev { text-align: left; }
.post-nav .next { text-align: right; }
.post-nav .label {
  display: block;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 4px;
}

/* ===== 静态页面 ===== */
.static-page {
  max-width: 800px;
  margin: 0 auto;
}
.static-page h1 {
  font-size: 28px;
  color: #1a3a4a;
  margin-bottom: 24px;
  font-weight: 700;
}
.static-page h2 {
  font-size: 20px;
  color: #1a3a4a;
  margin: 28px 0 14px;
  font-weight: 600;
}
.static-page p {
  margin-bottom: 16px;
  color: #444;
  line-height: 1.9;
}
.static-page ul {
  margin: 16px 0;
  padding-left: 24px;
}
.static-page ul li {
  list-style: disc;
  margin-bottom: 10px;
  color: #444;
}
.contact-highlight {
  background: #f0f4f6;
  padding: 24px;
  border-radius: 10px;
  margin: 24px 0;
  text-align: center;
}
.contact-highlight .phone {
  font-size: 28px;
  font-weight: 700;
  color: #e07b39;
  margin: 8px 0;
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid #e0e8ec;
  border-radius: 6px;
  font-size: 14px;
  color: #555;
  background: #fff;
  transition: all 0.2s;
}
.pagination a:hover {
  border-color: #1a3a4a;
  color: #1a3a4a;
}
.pagination .current {
  background: #1a3a4a;
  border-color: #1a3a4a;
  color: #fff;
}
.pagination .disabled {
  color: #ccc;
  cursor: not-allowed;
}

/* ===== 页脚 ===== */
.footer {
  background: #1a2a33;
  color: #a0aab0;
  padding: 40px 0 20px;
  margin-top: 60px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}
.footer-brand h4 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 10px;
}
.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  color: #8895a0;
}
.footer-col h5 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col a {
  color: #8895a0;
  font-size: 13px;
}
.footer-col a:hover { color: #e07b39; }
.footer-bottom {
  border-top: 1px solid #2a3a44;
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #66707a;
}
.footer-bottom a { color: #8895a0; }
.footer-bottom a:hover { color: #e07b39; }
.footer-slogan {
  font-size: 12px;
  color: #66707a;
  margin-top: 8px;
}

/* ===== 栏目页头部 ===== */
.page-header {
  background: linear-gradient(135deg, #f5f8fa 0%, #eaf0f3 100%);
  padding: 40px 0;
  border-bottom: 1px solid #eef2f4;
}
.page-header h1 {
  font-size: 28px;
  color: #1a3a4a;
  margin-bottom: 8px;
  font-weight: 700;
}
.page-header p {
  color: #666;
  font-size: 15px;
}

/* 带背景图的 Banner 样式 */
.page-header.banner-page {
  min-height: 500px;
  display: flex;
  align-items: center;
  padding: 60px 0;
  border-radius: 0;
  margin-bottom: 40px;
  border-bottom: none;
  background-position: center center !important;
}
.page-header.banner-page h1 {
  color: #fff !important;
  font-size: 36px;
  margin-bottom: 15px;
}
.page-header.banner-page p {
  color: rgba(255,255,255,0.85) !important;
  font-size: 17px;
}

/* ===== 404 页面 ===== */
.error-page {
  text-align: center;
  padding: 80px 20px;
}
.error-page h1 {
  font-size: 72px;
  color: #1a3a4a;
  margin-bottom: 16px;
}
.error-page p {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
}
.error-page a {
  display: inline-block;
  padding: 10px 28px;
  background: #1a3a4a;
  color: #fff;
  border-radius: 6px;
  font-size: 15px;
}
.error-page a:hover { background: #2a5a6a; }

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .sidebar { order: 2; }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 10px 20px;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 12px 14px;
    width: 100%;
  }
  .mobile-menu-btn { display: block; }
  
  .hero { padding: 30px 0 24px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 14px; }
  
  .article-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .article-card-img {
    width: 100%;
    height: 180px;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
  
  .post-nav {
    grid-template-columns: 1fr;
  }
  
  .article-header h1 { font-size: 22px; }
  .article-content { font-size: 15px; }
  .article-content h2 { font-size: 19px; }
  
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .section-title { font-size: 18px; }
  
  .page-header { padding: 28px 0; }
  .page-header h1 { font-size: 22px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 20px; }
  .logo { font-size: 18px; }
  .logo-text small { display: none; }
}

/* ===== 栏目页 Banner 背景图 ===== */
.page-header[style*="background: linear-gradient"] h1 {
  color: #fff !important;
}
.page-header[style*="background: linear-gradient"] p {
  color: rgba(255,255,255,0.8) !important;
}

/* ===== 栏目 Banner 高度和文字 ===== */
.page-header[style*="background: linear-gradient"] {
  min-height: 400px;
  display: flex;
  align-items: center;
  padding: 60px 0;
  border-radius: 0;
  margin-bottom: 40px;
}
.page-header[style*="background: linear-gradient"] h1 {
  color: #fff !important;
  font-size: 36px;
  margin-bottom: 15px;
}
.page-header[style*="background: linear-gradient"] p {
  color: rgba(255,255,255,0.85) !important;
  font-size: 17px;
}

/* ===== 首页 Hero 深色背景白字 ===== */
.hero.hero-dark h1 {
  color: #fff !important;
}
.hero.hero-dark p {
  color: rgba(255,255,255,0.85) !important;
}
