/* EnergyTech Corporate Theme v1.0
 * Modern Energy Technology Style
 * Color Scheme: Tech Blue / Eco Green / Clean White
 */

:root {
  /* --- 能源科技主题配色 --- */
  --energy-primary: #0A6EDF;  /* 科技蓝 - 主色 */
  --energy-secondary: #00A877; /* 环保绿 - 辅助色 */
  --energy-accent: #FFD700;   /* 金色 - 强调色 */
  
  /* --- 基础背景与文字 --- */
  --bg-body: #F5F9FF;         /* 浅蓝背景 */
  --bg-card: #FFFFFF;          /* 卡片白 */
  --text-main: #1A2B3C;       /* 深灰文字 */
  --text-secondary: #4A5B6C;  /* 中灰文字 */
  --text-light: #7D8E9F;      /* 浅灰文字 */
  
  /* --- 布局参数 --- */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --header-height: 80px;
  --max-width: 1300px;
  --shadow-card: 0 8px 24px rgba(0, 50, 120, 0.08);
  --shadow-hover: 0 12px 32px rgba(0, 50, 120, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === 全局重置 === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none;
}

body {
  background-color: var(--bg-body);
  color: var(--text-secondary);
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* 防止水平滚动 */
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, li {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* === 容器 === */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 30px;
}

/* === 头部导航 === */
.site-header {
  background: var(--bg-card);
  height: var(--header-height);
  box-shadow: 0 4px 16px rgba(0, 50, 120, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.header-inner {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--energy-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.desktop-nav a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  position: relative;
}

.desktop-nav a:hover {
  color: var(--energy-primary);
}

.desktop-nav a.active {
  color: var(--energy-primary);
  font-weight: 600;
}

.desktop-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--energy-secondary);
}

.mobile-menu-trigger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-main);
}

/* === 移动端菜单样式（新增）=== */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-card);
  z-index: 2000;
  flex-direction: column;
  padding: 20px;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.logo-mobile {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--energy-primary);
}

.close-btn {
  font-size: 2.5rem;
  color: var(--text-main);
  cursor: pointer;
  line-height: 1;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mobile-nav-links a {
  font-size: 1.2rem;
  color: var(--text-main);
  padding: 15px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 500;
}

.mobile-nav-links a:hover {
  color: var(--energy-primary);
}

/* === Hero Section === */
.hero-section {
  background: linear-gradient(135deg, var(--energy-primary) 0%, #004A8F 100%);
  color: #fff;
  padding: 120px 0;
  text-align: center;
  margin-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="25" cy="25" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="50" r="1.5" fill="rgba(255,255,255,0.15)"/></svg>');
  opacity: 0.6;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 25px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 50px;
  opacity: 0.95;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.primary-btn {
  background: var(--energy-secondary);
  color: #fff;
  border: none;
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 168, 119, 0.3);
}

.secondary-btn {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #fff;
}

.secondary-btn:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* === Info Section === */
.info-section {
  margin-bottom: 100px;
  position: relative;
}

.info-section::before {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--energy-primary), transparent);
  opacity: 0.1;
}

.center-header {
  text-align: center;
  margin-bottom: 60px;
}

.center-header h2 {
  font-size: 2.5rem;
  color: var(--text-main);
  margin-bottom: 15px;
  font-weight: 700;
}

.center-header p {
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 1rem;
  font-weight: 500;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}

.info-card {
  background: var(--bg-card);
  padding: 50px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  border: 1px solid rgba(0, 100, 200, 0.08);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--energy-primary);
}

.info-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.info-card .icon {
  font-size: 3rem;
  margin-bottom: 30px;
  color: var(--energy-secondary);
}

.info-card h3 {
  font-size: 1.5rem;
  color: var(--text-main);
  margin-bottom: 20px;
  font-weight: 600;
}

.info-card p {
  color: var(--text-secondary);
  margin-bottom: 25px;
  font-size: 1.05rem;
}

.read-more {
  color: var(--energy-primary);
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.read-more:hover {
  color: var(--energy-secondary);
}

/* === Main Content Area === */
.main-content-area {
  min-height: 500px;
  margin-bottom: 100px;
}

.section-header {
  margin-bottom: 40px;
  border-left: 5px solid var(--energy-primary);
  padding-left: 25px;
  position: relative;
}

.section-header h2 {
  font-size: 2.2rem;
  color: var(--text-main);
  font-weight: 700;
}

.cat-desc {
  margin-top: 15px;
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* === Post Grid === */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 40px;
}

.grid-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  border: 1px solid rgba(0, 100, 200, 0.08);
  display: flex;
  flex-direction: column;
}

.grid-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card-cover-wrapper {
  display: block;
  width: 100%;
  height: 240px;
  background: #eee;
  overflow: hidden;
  position: relative;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.grid-card:hover .card-img {
  transform: scale(1.04);
}

.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e9f2ff 0%, #d4e6ff 100%);
  color: var(--energy-primary);
  font-weight: 700;
  font-size: 1.3rem;
}

.card-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 15px;
  font-weight: 500;
}

.cat-tag {
  color: var(--energy-secondary);
  font-weight: 600;
  background: rgba(0, 168, 119, 0.08);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.grid-card h3 {
  font-size: 1.35rem;
  margin-bottom: 15px;
  line-height: 1.4;
  color: var(--text-main);
  font-weight: 600;
}

.excerpt {
  font-size: 1rem;
  color: var(--text-secondary);
  flex-grow: 1;
  margin-bottom: 20px;
}

.card-tags {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 100, 200, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-badge {
  font-size: 0.8rem;
  color: var(--energy-primary);
  background: rgba(10, 110, 223, 0.08);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.tag-badge:hover {
  background: var(--energy-primary);
  color: #fff;
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 60px;
}

.page-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 100, 200, 0.2);
  border-radius: 50%;
  color: var(--text-main);
  background: var(--bg-card);
  font-weight: 500;
}

.page-btn:hover {
  background: var(--energy-primary);
  color: #fff;
  border-color: var(--energy-primary);
}

.page-current {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--energy-primary);
  color: #fff;
  font-weight: 600;
}

/* === 文章详情页 === */
.single-post {
  background: var(--bg-card);
  padding: 50px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0, 100, 200, 0.08);
}

.single-header {
  border-bottom: 2px solid rgba(0, 100, 200, 0.1);
  padding-bottom: 30px;
  margin-bottom: 40px;
}

.breadcrumb {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.breadcrumb span {
  color: var(--text-secondary);
}

.single-header h1 {
  font-size: 2.8rem;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.3;
  font-weight: 700;
}

.meta-line {
  font-size: 1rem;
  color: var(--text-light);
  display: flex;
  gap: 25px;
  align-items: center;
  flex-wrap: wrap;
}

/* Markdown 内容样式 */
.markdown-body {
  color: var(--text-main);
  font-size: 1.1rem;
  line-height: 1.8;
}

.markdown-body h2 {
  font-size: 2rem;
  color: var(--text-main);
  margin: 2em 0 1em;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(0, 100, 200, 0.1);
  font-weight: 600;
}

.markdown-body p {
  margin-bottom: 1.6em;
  color: var(--text-secondary);
}

.markdown-body hr {
  margin: 3em 0;
  height: 1px;
  border: none;
  background: linear-gradient(90deg, transparent, var(--energy-primary), transparent);
  opacity: 0.1;
}

.markdown-body img {
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 50, 120, 0.1);
  margin: 30px 0;
  border: 1px solid rgba(0, 100, 200, 0.08);
}

.markdown-body a {
  color: var(--energy-primary);
  border-bottom: 2px solid rgba(10, 110, 223, 0.2);
  font-weight: 500;
}

.markdown-body a:hover {
  border-bottom-color: var(--energy-primary);
}

.markdown-body blockquote {
  border-left: 4px solid var(--energy-secondary);
  background: rgba(0, 168, 119, 0.05);
  padding: 25px 30px;
  color: var(--text-main);
  margin: 30px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.post-tags-container {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid rgba(0, 100, 200, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.tags-label {
  font-weight: 700;
  color: var(--text-main);
  font-size: 1.1rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  background: rgba(10, 110, 223, 0.08);
  color: var(--energy-primary);
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

.tag-pill:hover {
  background: var(--energy-primary);
  color: #fff;
}

.post-cta {
  margin-top: 50px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
  padding: 40px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 100, 200, 0.1);
}

.post-cta p {
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 25px;
}

.post-cta .btn {
  padding: 14px 38px;
  font-size: 1.1rem;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid rgba(0, 100, 200, 0.1);
}

.nav-prev, .nav-next {
  display: flex;
  flex-direction: column;
  max-width: 48%;
}

.nav-prev small, .nav-next small {
  color: var(--text-light);
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-prev span, .nav-next span {
  color: var(--text-main);
  font-weight: 600;
  font-size: 1.1rem;
}

.nav-prev:hover span, .nav-next:hover span {
  color: var(--energy-primary);
}

/* === FAQ 修正 === */
.faq-section {
  background: var(--bg-card);
  padding: 80px 0;
  border-top: 1px solid rgba(0, 100, 200, 0.08);
  border-bottom: 1px solid rgba(0, 100, 200, 0.08);
}

.faq-item {
  border-bottom: 1px solid rgba(0, 100, 200, 0.08);
  padding: 30px 0;
}

.faq-question {
  padding: 10px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text-main);
  font-size: 1.15rem;
}

.faq-question:hover {
  color: var(--energy-primary);
}

.faq-question .arrow {
  font-size: 1.5rem;
  color: var(--text-light);
  transition: transform 0.3s;
  min-width: 20px;
  text-align: center;
}

.faq-question.active .arrow {
  transform: rotate(45deg);
  color: var(--energy-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.faq-answer p {
  padding: 20px 0 10px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 404 页面样式 */
.error-404 {
  text-align: center;
  padding: 100px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin: 50px auto;
  max-width: 600px;
}

.error-404 h1 {
  font-size: 6rem;
  color: var(--energy-primary);
  margin-bottom: 20px;
  font-weight: 700;
}

.error-404 p {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* === 页脚 === */
.site-footer {
  background: linear-gradient(135deg, #0A1B3A 0%, #1A2B3C 100%);
  color: #AAB8C5;
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 50px;
  margin-bottom: 60px;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 25px;
  font-size: 1.35rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 12px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--energy-secondary);
}

.footer-col p {
  margin-bottom: 15px;
  font-size: 1.05rem;
  color: #DDE5EE;
  line-height: 1.7;
}

.footer-col a {
  display: block;
  margin-bottom: 12px;
  font-size: 1.05rem;
  color: #DDE5EE;
  font-weight: 500;
  transition: var(--transition);
}

.footer-col a:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer-bottom {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
  color: #AAB8C5;
}

.footer-bottom a {
  color: #DDE5EE;
  margin-left: 10px;
}

.footer-bottom a:hover {
  color: #fff;
}

/* === 响应式设计 === */
@media (max-width: 992px) {
  .desktop-nav {
    display: none;
  }
  
  .mobile-menu-trigger {
    display: block;
  }
  
  .hero-content h1 {
    font-size: 2.8rem;
  }
  
  .single-post {
    padding: 35px;
  }
  
  .post-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  
  .container {
    padding: 0 20px;
  }
  
  .hero-content h1 {
    font-size: 2.4rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 40px;
  }
  
  .center-header h2 {
    font-size: 2.1rem;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .info-card {
    padding: 35px;
  }
  
  .post-grid {
    grid-template-columns: 1fr;
  }
  
  .post-navigation {
    flex-direction: column;
    gap: 30px;
  }
  
  .nav-prev, .nav-next {
    max-width: 100%;
  }
  
  .single-post {
    padding: 25px;
  }
  
  .single-header h1 {
    font-size: 2.2rem;
  }
  
  .breadcrumb {
    font-size: 0.9rem;
  }
  
  .meta-line {
    gap: 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 80px 0;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .btn {
    padding: 12px 28px;
    font-size: 0.95rem;
  }
  
  .single-post {
    padding: 20px;
  }
  
  .markdown-body h2 {
    font-size: 1.7rem;
  }
  
  .section-header h2 {
    font-size: 1.8rem;
  }
  
  .cat-desc {
    font-size: 0.95rem;
  }
  
  .faq-question {
    font-size: 1rem;
  }
  
  .error-404 h1 {
    font-size: 4rem;
  }
  
  .error-404 p {
    font-size: 1.1rem;
  }
}