/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  line-height: 1.6;
  color: #333;
  background-color: #f4f6f9;
  padding: 0;
  margin: 0 px;
  border-radius: 10px;
}

/* 布局样式 */
/* 顶部导航样式 - 移动端优化 */
/* 头部：包含网站名、菜单栏 */
header {
  background-color: #ffffff;

  color: rgb(0, 0, 0);
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}
/* 主容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  border-radius: 10px;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: bold;
  margin-left: 1rem;
}

.logo img {
  width: 60px;
  margin-right: 20px;
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  transition: transform 0.3s ease;
}

.nav-links li {
  position: relative;

}

.nav-links a {
  display: block;
  height: 70px;
  color: rgb(49, 49, 49);
  text-decoration: none;
  padding: 1rem 0.8rem;
    border-radius: 3px;
  transition: background-color 0.3s;
  font-weight: 500;
  font-size: 0.9rem;
  transition: 0.5s;
}

.nav-links a:hover {
  background-color: rgba(194, 194, 194, 0.2);
}

.nav-links a.active {
  font-weight: 800;
  color: #4caf50;
  /* background-color: rgba(194, 194, 194, 0.5); */

  transition: 1s;
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 1rem; color: #333;
}

.menu-toggle span {
 
  width: 2rem;
  height: 0.25rem;
  background: rgb(152, 152, 152);
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

/* 英雄区域样式 - 仅首页显示 */
.hero {
  text-align: center;
  max-width: 1200px;
  height: 200px;
  margin: 15px auto;
  border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  padding: 3rem 0;
  background: linear-gradient(#ffffff, #fefffc), url("");
  background-size: cover;
  background-position: center;
  color: rgb(0, 0, 0);
  margin-bottom: 2rem;
  display: block;
}

.hero.hidden {
  display: none;
}

.hero h1 {
  font-size: 3.2rem;
  margin-bottom: 1rem;
  font-weight: 1;
  /* text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); */
}

.hero p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* 内容区域样式 */
.page-content {
  display: none;
  animation: fadeIn 0.5s;
  padding: 1rem 0;
}

.page-content.active {
  display: block;
}

.category-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #4caf50;
}

.category-header h2 {
  font-size: 1.8rem;
  color: #2e7d32;
  margin-bottom: 0.5rem;
}

.category-header p {
  color: #666;
  font-size: 1rem;
}

.articles-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.article-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); */
  transition: transform 0.3s, box-shadow 0.3s;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s forwards;
  cursor: pointer;
  /* 添加手型光标 */
}

.article-card img {
  vertical-align: top;
  position: relative;
  width: 100%;

  background-color: white;
}

.article-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.article-card:hover {
  transform: translateY(-5px);

  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.2);
}

.article-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  /* background-color: #f0f0f0; */
  display: block;
}

.article-content {
  padding: 1.2rem;
}

.article-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: #000000;
  line-height: 1.4;
}

.article-meta {
  color: #777;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.article-excerpt {
  margin-bottom: 1.2rem;
  line-height: 1.6;
  font-size: 0.95rem;
  color: #555;
}

.read-more {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #000000;
  color: rgb(14, 14, 14);
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s;
  font-weight: 500;
  font-size: 0.9rem;
}

.read-more:hover {
  background-color: #2e7d32;
}

/* 分页导航样式 */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pagination-button {
  padding: 0.5rem 1rem;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s;
}

.pagination-button:hover:not(:disabled) {
  background-color: #2e7d32;
}

.pagination-button:disabled {
  background-color: #a5d6a7;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 0.3rem;
}

.page-number {
  padding: 0.5rem 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.page-number.active {
  background-color: #4caf50;
  color: white;
  border-color: #4caf50;
}

.page-input {
  width: 60px;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
}

/* 关于页面样式 */
.about-content {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.about-content h2 {
  color: #000000;
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #4caf50;
  font-size: 1.5rem;
}

.about-content p {
  margin-bottom: 1.2rem;
  line-height: 1.7;
  font-size: 1rem;
}

/* 页脚样式 */
footer {
  background-color: #ffffff;
  color: rgb(0, 0, 0);
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-section {
  flex: 1;
  min-width: 200px;
  margin-bottom: 1.5rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section p,
.footer-section a {
  margin-bottom: 0.5rem;
  color: rgba(122, 122, 122, 0.8);
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
}

.footer-section a:hover {
  color: rgb(0, 0, 0);

}

.social-icons a {
  display: inline-block;
  margin-right: 12px;
  font-size: 1.3rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式设计 - 移动端优化 */
@media (max-width: 800px) {
  .container {
    padding: 0 15px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 60px;
    right: 0;
    width: 30%;
    background-color: #ffffff;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    padding: 1rem;
    width: 100%;
  }

  .hero {
    padding: 2rem 0;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .articles-container {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .category-header h2 {
    font-size: 1.5rem;
  }

  .article-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    width: 100%;
    /* height: 180px; */
    object-fit: cover;
    /* background-color: #f0f0f0; */
    display: block;
  }

  .pagination-container {
    flex-direction: raw;
    gap: 1rem;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-section {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.1rem;
  }

  .logo i {
    font-size: 1.3rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .category-header h2 {
    font-size: 1.4rem;
  }

  .article-content h3 {
    font-size: 1.1rem;
  }

  .about-content {
    padding: 1.2rem;
  }

  .about-content h2 {
    font-size: 1.3rem;
  }

  .page-numbers {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* 文章详情页样式 */
.article-detail {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
  max-width: 900px;
}

.article-header {
  margin-bottom: 2rem;
  text-align: center;
}

.article-title {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: #000000;
  line-height: 1.3;
}

.article-meta {
  color: #777;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.article-image-full {
  width: 100%;
  /* height: 250px; */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-body h2 {
  color: #2e7d32;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #4caf50;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.back-button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: #4caf50;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 2rem;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.back-button:hover {
  background-color: #2e7d32;
}

/* 移动端详情页优化 */
@media (max-width: 768px) {
  .article-detail {
    padding: 1.5rem;
    margin: 1rem auto;
  }

  .article-title {
    font-size: 1.8rem;
  }

  .article-meta {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .article-image-full {
    height: 250px;
  }
}

.about-text {
  font-family: 宋体;
  font-size: 22;
}
