/* 全局样式 */
:root {
  --primary-color: #ff4757;
  --secondary-color: #ff6b81;
  --accent-color: #2f3542;
  --text-color: #2f3542;
  --light-bg: #f9f9f9;
  --header-height: 80px;
  --container-width: 1200px;
}

/* 响应式断点 */
@media (max-width: 768px) {
  :root {
    --container-width: 100%;
    --header-height: 60px;
  }
}

/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 15px;
}

/* 响应式图片 */
img {
  max-width: 100%;
  height: auto;
  loading: lazy;
}

/* 工具类 */
.hidden-mobile {
  @media (max-width: 768px) {
    display: none;
  }
}

.hidden-desktop {
  @media (min-width: 769px) {
    display: none;
  }
}

/* 主内容区域样式 */
.main-content {
  padding-top: calc(var(--header-height) + 20px);
  flex: 1;
}

/* Header样式 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

/* Logo样式 */
.logo {
  flex: 0 0 auto;
  padding: 10px 0;
}

.logo h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
}

.logo img {
  height: 40px;
  width: auto;
  margin-right: 10px;
}

.logo span {
  font-weight: bold;
}

/* 导航菜单样式 */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  margin-left: 30px;
}

.nav-menu li a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu li a:hover {
  color: var(--primary-color);
}

/* 子菜单样式优化 */
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 8px 0;
  z-index: 100;
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.nav-menu > li:hover .sub-menu {
  display: block;
  opacity: 1;
  visibility: visible;
}

.sub-menu::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #fff;
  box-shadow: -2px -2px 5px rgba(0,0,0,0.05);
}

.sub-menu li {
  list-style: none;
}

.sub-menu a {
  padding: 10px 24px;
  font-size: 14px;
  color: var(--text-color);
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.sub-menu a:hover {
  color: var(--primary-color);
  background: rgba(255, 71, 87, 0.05);
}

/* 当前激活项样式 */
.nav-menu .active > a {
  color: var(--primary-color);
}

/* 搜索框样式 */
.search-box {
  flex: 0 0 200px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 8px 35px 8px 15px;
  border: 1px solid #ddd;
  border-radius: 20px;
  outline: none;
  transition: border-color 0.3s;
}

.search-box button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-box button i {
  font-size: 16px;
  color: var(--text-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .header-container {
    gap: 10px;
  }

  .logo {
    flex: 1;
  }

  .main-nav {
    order: 2;
    padding-left: 0;
  }

  .search-box {
    order: 2;
    flex: 0 0 auto;
  }

  .menu-toggle {
    margin-left: auto;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  }

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

  .nav-menu li {
    margin: 0 0 15px 0;
  }

  .nav-menu li:last-child {
    margin-bottom: 0;
  }

  .nav-menu > li > a {
    height: auto;
    line-height: 1.5;
    padding: 15px 20px;
  }

  .sub-menu {
    position: static;
    transform: none;
    box-shadow: none;
    width: 100%;
    border-radius: 0;
    background: rgba(255, 71, 87, 0.02);
    padding: 0;
    opacity: 1;
    visibility: visible;
  }

  .sub-menu::before {
    display: none;
  }

  .sub-menu a {
    padding: 12px 20px 12px 40px;
  }

  .nav-menu > li.active .sub-menu {
    display: block;
  }

  .search-box {
    display: none;
  }

  .site-header {
    z-index: 1001;
  }

  .menu-toggle {
    display: block;
    width: 24px;
    height: 20px;
    position: relative;
    margin-right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
  }

  .menu-toggle span:nth-child(1) {
    top: 0;
  }

  .menu-toggle span:nth-child(2) {
    top: 9px;
  }

  .menu-toggle span:nth-child(3) {
    top: 18px;
  }

  /* 激活状态的样式 */
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
  }

  .hero-section {
    height: auto;
    min-height: auto;
    padding: calc(var(--header-height) + 20px) 0 30px;
  }

  .hero-title {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
  }

  .hero-description {
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    padding: 0 10px;
  }

  .hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    width: 140px;
    margin: 0;
  }
}

/* 大屏样式 */
.hero-section {
    position: relative;
    height: 40vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
    margin-bottom: 20px;
    padding-top: calc(var(--header-height) - 20px);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff4757 0%, #ff6b81 100%);
    z-index: -1;
}

.hero-content {
    position: relative;
    width: 100%;
    padding: 20px 0; /* 减少内容区域的内边距 */
    z-index: 1;
}

.hero-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding-bottom: 20px; /* 添加底部内边距 */
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem; /* 减少标题底部间距 */
    line-height: 1.2;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.hero-description {
    font-size: 1rem;
    margin-bottom: 1.2rem; /* 减少描述文字底部间距 */
    line-height: 1.6;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-buttons {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

.btn-primary {
    background: #fff;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.2);
}

.btn-outline {
    border: 2px solid #fff;
    color: #fff;
}

.btn-outline:hover {
    background: #fff;
    color: var(--primary-color);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .hero-section {
        height: auto;
        min-height: auto;
        padding: calc(var(--header-height) + 20px) 0 30px;
    }

    .hero-content {
        padding: 0;
    }

    .hero-text {
        padding: 0 15px 20px;
    }

    .hero-title {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
        padding: 0 10px;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 0 15px;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        width: 140px;
        margin: 0;
    }
}

/* 尾部样式 */
.site-footer {
    background: #2f3542;
    color: #fff;
    padding: 30px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .site-footer {
        padding: 20px 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
    }

    .footer-links {
        gap: 15px;
    }
}

/* 栏目分类模块样式 */
.category-section {
    padding: 30px 0;
    background: #fff;
    margin-top: -20px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 0 auto;
}

.category-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.category-link {
    display: block;
    padding: 30px;
    text-decoration: none;
    color: var(--text-color);
    text-align: center;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.category-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .category-section {
        padding: 20px 0;
        margin-top: -10px;
    }

    .category-grid {
        gap: 15px;
        padding: 0 15px;
    }

    .category-link {
        padding: 20px;
    }

    .category-title {
        font-size: 1.1rem;
    }

    .category-desc {
        font-size: 0.85rem;
    }
}

/* 产品展示模块样式 */
.products-section {
    padding: 40px 0;
    background: #fff;
    margin-top: -20px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 0 auto;
    padding: 0 15px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    text-align: center;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.product-price {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.btn-view {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .products-section {
        padding: 20px 0;
        margin-top: -10px;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    .products-grid {
        gap: 15px;
    }

    .product-image {
        height: 180px;
    }

    .product-info {
        padding: 15px;
    }

    .product-title {
        font-size: 1rem;
    }

    .product-price {
        font-size: 0.9rem;
    }

    .btn-view {
        padding: 6px 16px;
        font-size: 0.8rem;
    }
}

/* FAQ模块样式 */
.faq-section {
    padding: 40px 0;
    background: #fff;
    margin-top: -20px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text-color);
}

.faq-list {
    /* 移除最大宽度限制 */
    /* max-width: 800px; */
    /* 移除自动边距 */
    /* margin: 0 auto; */
    /* 移除内边距 */
    /* padding: 0 15px; */
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.faq-question {
    padding: 20px;
    background: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.3s ease;
    position: relative;
}

.faq-question span {
    flex: 1;
    padding-right: 40px;
}

.faq-icon {
    width: 20px;
    height: 20px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: var(--text-color);
    transition: all 0.3s ease;
}

.faq-icon::before {
    width: 2px;
    height: 12px;
    top: 4px;
    left: 9px;
}

.faq-icon::after {
    width: 12px;
    height: 2px;
    top: 9px;
    left: 4px;
}

.faq-item.active .faq-icon::before {
    transform: rotate(90deg);
    opacity: 0;
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    background: #f9f9f9;
    line-height: 1.6;
    opacity: 0;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 1000px; /* 增加最大高度，确保内容能完全显示 */
    opacity: 1;
}

.faq-answer p {
    margin: 0;
    color: #666;
}

.faq-icon {
    transition: transform 0.3s ease-in-out;
}

.faq-item.active .faq-icon {
    transform: translateY(-50%) rotate(180deg);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .faq-section {
        padding: 30px 0;
        margin-top: -10px;
    }

    .faq-question {
        padding: 15px;
        font-size: 0.9rem;
    }

    .faq-icon {
        right: 15px;
    }

    .faq-item.active .faq-answer {
        padding: 15px;
    }
}

/* 文章列表页样式 */
.article-header {
    padding: 60px 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-description {
    font-size: 1.1rem;
    opacity: 0.9;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px; /* 减小卡片之间的间距 */
    margin-bottom: 40px;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex; /* 添加flex布局 */
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.article-link {
    text-decoration: none;
    color: var(--text-color);
    width: 100%; /* 确保链接占满整个卡片 */
}

.article-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%; /* 让内容区域占满高度 */
}

.article-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text-color);
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制标题为2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-excerpt {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 限制预览文字为3行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1; /* 让预览文字占据剩余空间 */
}

.article-meta {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    justify-content: space-between;
    margin-top: auto; /* 将元信息推到底部 */
}

/* 文章详情页样式 */
.article-detail {
    padding: 80px 0;
    background: #fff;
}

.article-detail .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px; /* 添加左右内边距 */
    width: auto; /* 确保容器可以自适应 */
}

.article-detail .article-header {
    background: none;
    color: var(--text-color);
    padding: 0;
    margin-bottom: 40px;
    text-align: center;
}

.article-detail .article-title {
    font-size: 2.8rem;
    margin-bottom: 25px;
    line-height: 1.3;
    font-weight: 700;
    color: #2c3e50;
}

.article-detail .article-meta {
    justify-content: center;
    gap: 30px;
    color: #718096;
    font-size: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* 文章内容样式 */
.article-detail .article-content {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #3a4f66;
    overflow-wrap: break-word; /* 确保长文本会换行 */
    word-wrap: break-word;
}

.article-detail .article-content p {
    margin-bottom: 2rem;
}

.article-detail .article-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    color: #2c3e50;
    position: relative;
    padding-bottom: 15px;
}

.article-detail .article-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.article-detail .article-content h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 2.5rem 0 1.2rem;
    color: #2c3e50;
}

.article-detail .article-content ul,
.article-detail .article-content ol {
    margin: 1.5rem 0 2rem;
    padding-left: 1.8rem;
}

.article-detail .article-content li {
    margin-bottom: 0.8rem;
    position: relative;
}

.article-detail .article-content img {
    max-width: 100%;
    height: auto;
    margin: 2.5rem auto;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    display: block;
}

.article-detail .article-content a {
    color: var(--primary-color);
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.article-detail .article-content a:hover {
    border-bottom-color: var(--primary-color);
}

.article-detail .article-content blockquote {
    margin: 2.5rem 0;
    padding: 2rem;
    border-left: 4px solid var(--primary-color);
    background: #f8fafc;
    border-radius: 0 16px 16px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.article-detail .article-content blockquote p {
    margin: 0;
    color: #4a5568;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-detail .article-content code {
    background: #f7fafc;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    color: #e53e3e;
}

.article-detail .article-content pre {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    background: #2d3748;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 100%; /* 限制最大宽度 */
}

.article-detail .article-content pre code {
    white-space: pre-wrap; /* 确保代码可以换行 */
    word-wrap: break-word; /* 长单词换行 */
}

/* 平板端适配 */
@media (max-width: 1024px) {
    .article-detail .container {
        max-width: 100%;
        padding: 0 30px;
    }

    .article-detail .article-title {
        font-size: 2.2rem;
    }

    .article-detail .article-content {
        font-size: 1.1rem;
    }

    .article-detail .article-content pre {
        margin: 1.5rem -10px;
        border-radius: 8px;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .article-detail {
        padding: 40px 0;
    }

    .article-detail .container {
        padding: 0 15px;
    }

    .article-detail .article-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
        word-break: break-word;
    }

    .article-detail .article-content {
        font-size: 1.05rem;
    }

    .article-detail .article-content pre {
        margin: 1.5rem -15px;
        border-radius: 0;
        padding: 1rem;
    }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
    .article-detail .container {
        padding: 0 12px;
    }

    .article-detail .article-title {
        font-size: 1.6rem;
    }

    .article-detail .article-content {
        font-size: 1rem;
    }
}

/* 文章导航样式优化 */
.article-navigation {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-previous,
.nav-next {
    flex: 0 0 calc(50% - 10px);
    position: relative;
}

.nav-previous a,
.nav-next a {
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    height: 100%;
}

.nav-previous a:hover,
.nav-next a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.nav-label {
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 500;
}

.nav-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-previous a {
    padding-left: 40px;
}

.nav-next a {
    padding-right: 40px;
    text-align: right;
}

.nav-previous a::before,
.nav-next a::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    transform: translateY(-50%);
}

.nav-previous a::before {
    left: 15px;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z'/%3E%3C/svg%3E");
}

.nav-next a::after {
    right: 15px;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E");
}

/* 移动端适配 */
@media (max-width: 768px) {
    .article-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .nav-previous,
    .nav-next {
        flex: 0 0 100%;
    }

    .nav-previous a,
    .nav-next a {
        padding: 15px;
    }

    .nav-previous a {
        padding-left: 35px;
    }

    .nav-next a {
        padding-right: 35px;
    }

    .nav-label {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }

    .nav-title {
        font-size: 0.95rem;
    }

    .nav-previous a::before {
        left: 12px;
    }

    .nav-next a::after {
        right: 12px;
    }
}

/* 分页样式 v1.0.3 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    list-style: none;
    padding: 0;
}

.pagination li {
    margin: 0 3px;
    list-style: none;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border-radius: 8px;
    background: #fff;
    color: var(--text-color);
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    font-weight: 500;
}

/* 当前页码的激活样式 */
.pagination li.active span,
.pagination li.active a {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.pagination a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Prev/Next 按钮样式 */
.pagination li:first-child a,
.pagination li:last-child a {
    padding: 0 20px;
    font-weight: 500;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .pagination {
        margin: 30px 0;
    }

    .pagination li {
        margin: 0 2px;
    }

    .pagination a,
    .pagination span {
        min-width: 35px;
        height: 35px;
        padding: 0 12px;
        font-size: 0.9rem;
    }

    .pagination li:first-child a,
    .pagination li:last-child a {
        padding: 0 15px;
    }
}

/* 文章模块样式 */
.featured-articles {
    padding: 60px 0;
    background: #fff;
}

.articles-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.article-link {
    display: block;
    text-decoration: none;
    height: 100%;
    color: var(--text-color);
}

.article-content {
    padding: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-excerpt {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 0.9rem;
}

.article-date {
    color: #888;
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    transition: transform 0.3s ease;
}

.article-card:hover .read-more {
    transform: translateX(5px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .featured-articles {
        padding: 40px 0;
    }

    .articles-row {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 20px;
    }

    .article-content {
        padding: 20px;
    }

    .article-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .article-excerpt {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
}

/* 添加性能优化相关的CSS */
/* 使用will-change提示浏览器优化动画 */
.lang-switch:hover .lang-dropdown,
.article-card:hover {
    will-change: transform, opacity;
}

/* 优化字体加载 */
@font-face {
    font-family: 'PingFang SC';
    font-display: swap;
}

/* 优化动画性能 */
.lang-dropdown,
.article-card,
.nav-menu a {
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
}

/* 添加打印样式 */
@media print {
    .lang-switch,
    .menu-toggle,
    .nav-menu {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* 添加骨架屏样式 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
} 