/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

body {
  background: #f7f9fc;
  color: #1e2a3a;
  line-height: 1.7;
  scroll-behavior: smooth;
}

a {
  color: #1e6f9f;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 导航吸顶 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #2c3e50;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: background 0.3s;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  flex-wrap: wrap;
}

.logo a {
  font-size: 1.8rem;
  font-weight: 700;
  color: #f39c12;
  letter-spacing: 1px;
}

.logo a:hover {
  text-decoration: none;
  color: #e67e22;
}

.nav-menu {
  display: flex;
  gap: 18px;
  list-style: none;
  flex-wrap: wrap;
}

.nav-menu li a {
  color: #ecf0f1;
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background 0.2s;
}

.nav-menu li a:hover {
  background: #34495e;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid #fff;
  color: #fff;
  padding: 6px 12px;
  font-size: 1.2rem;
  border-radius: 4px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
  }

  .nav-menu.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

/* 面包屑 */
.breadcrumb {
  background: #fff;
  padding: 10px 0;
  border-bottom: 1px solid #e5e9f0;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #1e6f9f;
}

.breadcrumb span {
  color: #5d6d7e;
}

/* 头部banner */
.hero {
  background: linear-gradient(135deg, #243949 0%, #517fa4 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px;
  opacity: 0.9;
}

.hero .btn {
  background: #f39c12;
  color: #1e2a3a;
  padding: 14px 36px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s;
  display: inline-block;
}

.hero .btn:hover {
  background: #e67e22;
  transform: scale(1.02);
  text-decoration: none;
}

/* 轮播 */
.carousel {
  position: relative;
  overflow: hidden;
  max-height: 420px;
  background: #1a2a3a;
}

.carousel-slide {
  display: none;
  width: 100%;
  padding: 40px 20px;
  text-align: center;
  color: #fff;
}

.carousel-slide.active {
  display: block;
  animation: fade 0.8s;
}

@keyframes fade {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}

.carousel-slide h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.carousel-slide p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.carousel-indicators span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.carousel-indicators span.active {
  background: #f39c12;
}

/* 通用区块 */
.section {
  padding: 50px 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
  color: #1e2a3a;
}

.section-title span {
  color: #f39c12;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 25px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-4px);
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #1e2a3a;
}

.card p {
  color: #3a4a5a;
}

.card .meta {
  font-size: 0.85rem;
  color: #7f8c8d;
  margin-bottom: 8px;
}

.card a.readmore {
  color: #1e6f9f;
  font-weight: 500;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid #e5e9f0;
  padding: 18px 0;
}

.faq-question {
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding-top: 8px;
  color: #3a4a5a;
}

.faq-item.active .faq-answer {
  max-height: 600px;
}

/* 数字动画 */
.stats {
  background: #2c3e50;
  color: #fff;
  padding: 40px 0;
  text-align: center;
}

.stats .grid-4 {
  color: #fff;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #f39c12;
}

/* 返回顶部 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #2c3e50;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #1e2a3a;
}

/* 暗黑模式 */
.dark-mode-toggle {
  position: fixed;
  bottom: 90px;
  right: 30px;
  background: #2c3e50;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  font-size: 1.2rem;
  border: none;
}

body.dark {
  background: #121820;
  color: #e0e6ed;
}

body.dark .card {
  background: #1e2a3a;
  color: #e0e6ed;
}

body.dark .navbar {
  background: #0f1a24;
}

body.dark .breadcrumb {
  background: #1a2530;
  border-bottom-color: #2c3e50;
}

body.dark .breadcrumb a {
  color: #6ab0de;
}

body.dark .faq-item {
  border-bottom-color: #2c3e50;
}

body.dark .stats {
  background: #0f1a24;
}

/* 文章列表 */
.article-list .card {
  margin-bottom: 20px;
}

/* 页脚 */
.footer {
  background: #1e2a3a;
  color: #b0bec5;
  padding: 40px 0 20px;
}

.footer a {
  color: #b0bec5;
}

.footer a:hover {
  color: #fff;
}

.footer .grid-4 {
  color: #b0bec5;
}

.footer h4 {
  color: #fff;
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 6px;
}

.copyright {
  text-align: center;
  border-top: 1px solid #2c3e50;
  padding-top: 20px;
  margin-top: 30px;
  font-size: 0.9rem;
}

/* 搜索 */
.search-box {
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin: 20px auto;
}

.search-box input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid #d5dce6;
  border-radius: 30px;
  font-size: 1rem;
}

.search-box button {
  background: #f39c12;
  border: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
}

/* 图片懒加载占位 */
.lazy-placeholder {
  background: #e5e9f0;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7f8c8d;
}

/* 滚动动画 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}