/* 害虫与疾病页面样式 */

/* 容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 页面标题区域 */
.page-hero {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 80px 0;
  text-align: center;
  border-bottom: 1px solid #dee2e6;
}

.page-hero__title {
  font-size: 3rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-hero__subtitle {
  font-size: 1.25rem;
  color: #6c757d;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 分类导航 */
.category-navigation {
  background: #fff;
  padding: 40px 0;
  border-bottom: 1px solid #e9ecef;
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.category-tab {
  padding: 12px 24px;
  border: 2px solid #e9ecef;
  background: #fff;
  color: #6c757d;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.category-tab:hover {
  border-color: #dc3545;
  color: #dc3545;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220,53,69,0.15);
}

.category-tab.active {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
  box-shadow: 0 4px 12px rgba(220,53,69,0.3);
}

/* 害虫与疾病展示区域 */
.pests-diseases-showcase {
  background: #f8f9fa;
  padding: 60px 0;
  min-height: 600px;
}

.pests-diseases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* 害虫与疾病卡片样式 */
.pest-disease-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.pest-disease-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.pest-disease-card__image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pest-disease-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pest-disease-card:hover .pest-disease-card__image img {
  transform: scale(1.05);
}

.pest-disease-card__content {
  padding: 24px;
}

.pest-disease-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
}

.pest-disease-card__description {
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 1rem;
}

.pest-disease-card__details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.detail-item {
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #495057;
  border-left: 3px solid #dc3545;
}

.pest-disease-card__btn {
  width: 100%;
  padding: 12px 24px;
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pest-disease-card__btn:hover {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220,53,69,0.3);
}

/* 详情模态框 */
.pest-disease-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
}

.pest-disease-modal__content {
  background-color: #fff;
  margin: 5% auto;
  padding: 0;
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.pest-disease-modal__close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  z-index: 2001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  transition: all 0.3s ease;
}

.pest-disease-modal__close:hover {
  color: #000;
  background: #fff;
  transform: scale(1.1);
}

/* 详情内容样式 */
.pest-disease-detail {
  padding: 40px;
}

.pest-disease-detail__header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
}

.pest-disease-detail__header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 10px;
}

.pest-disease-category {
  display: inline-block;
  background: #dc3545;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.pest-disease-detail__description {
  margin-bottom: 30px;
}

.pest-disease-detail__description p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #495057;
  text-align: justify;
}

.pest-disease-detail__sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.detail-section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.detail-section ul {
  list-style: none;
  padding: 0;
}

.detail-section ul li {
  background: #f8f9fa;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: 8px;
  border-left: 4px solid #dc3545;
  color: #495057;
  line-height: 1.6;
}

.detail-section ul.symptoms li {
  border-left-color: #ffc107;
  background: #fff8e1;
}

.detail-section ul.control li {
  border-left-color: #28a745;
  background: #f8fff9;
}

.detail-section ul.prevention li {
  border-left-color: #17a2b8;
  background: #f0f9ff;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .page-hero {
    padding: 60px 0;
  }
  
  .page-hero__title {
    font-size: 2.5rem;
  }
  
  .page-hero__subtitle {
    font-size: 1.1rem;
  }
  
  .category-tabs {
    gap: 15px;
  }
  
  .category-tab {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .pests-diseases-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .pest-disease-card__content {
    padding: 20px;
  }
  
  .pest-disease-modal__content {
    width: 95%;
    margin: 10% auto;
  }
  
  .pest-disease-detail {
    padding: 20px;
  }
  
  .pest-disease-detail__header h2 {
    font-size: 2rem;
  }
  
  .pest-disease-detail__sections {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .page-hero__title {
    font-size: 2rem;
  }
  
  .category-tabs {
    flex-direction: column;
    align-items: center;
  }
  
  .pest-disease-card__image {
    height: 200px;
  }
  
  .pest-disease-detail__header h2 {
    font-size: 1.8rem;
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pest-disease-card {
  animation: fadeInUp 0.6s ease forwards;
}

.pest-disease-card:nth-child(1) { animation-delay: 0.1s; }
.pest-disease-card:nth-child(2) { animation-delay: 0.2s; }
.pest-disease-card:nth-child(3) { animation-delay: 0.3s; }
.pest-disease-card:nth-child(4) { animation-delay: 0.4s; }
.pest-disease-card:nth-child(5) { animation-delay: 0.5s; }
.pest-disease-card:nth-child(6) { animation-delay: 0.6s; }
.pest-disease-card:nth-child(7) { animation-delay: 0.7s; }
.pest-disease-card:nth-child(8) { animation-delay: 0.8s; }
.pest-disease-card:nth-child(9) { animation-delay: 0.9s; }
.pest-disease-card:nth-child(10) { animation-delay: 1.0s; }

/* 加载状态 */
.pests-diseases-grid.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* 空状态 */
.pests-diseases-grid.empty {
  text-align: center;
  padding: 60px 20px;
}

.pests-diseases-grid.empty::before {
  content: "暂无该分类的害虫或疾病信息";
  font-size: 1.2rem;
  color: #6c757d;
  display: block;
}

