/* ============================================
   青花椒种植技术展示 - 青柠风格主题
   圆润设计 · 青柠色调
   ============================================ */

:root {
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;
  --lime-400: #a3e635;
  --lime-500: #84cc16;
  --lime-600: #65a30d;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--green-50);
  color: #333;
  line-height: 1.6;
}

/* ===== 顶部导航 ===== */
.navbar {
  background: linear-gradient(135deg, var(--green-700), var(--green-800));
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 70px;
  gap: 8px;
}

.navbar .logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  margin-right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar .logo i { color: var(--lime-400); font-size: 1.4rem; }

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-menu::-webkit-scrollbar { display: none; }

.nav-menu li a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.3s;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.navbar .search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.15);
  border-radius: 25px;
  padding: 4px 12px;
  transition: all 0.3s;
  flex-shrink: 0;
}

.navbar .search-box:focus-within {
  background: rgba(255,255,255,0.25);
}

.navbar .search-box input {
  background: none;
  border: none;
  color: #fff;
  outline: none;
  width: 120px;
  font-size: 0.85rem;
}

.navbar .search-box input::placeholder { color: rgba(255,255,255,0.6); }
.navbar .search-box button {
  background: none; border: none; color: #fff; cursor: pointer;
}

/* ===== 轮播 ===== */
.carousel {
  width: 100%;
  max-height: 450px;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-lg);
  margin: 24px auto;
  max-width: 1200px;
  box-shadow: var(--shadow);
}

.carousel img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  display: none;
}

.carousel img.active { display: block; }

.carousel .dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel .dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.carousel .dots span.active { background: var(--green-400); width: 30px; border-radius: 6px; }

/* ===== 通用卡片 ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 40px 0; }
.section-title {
  text-align: center;
  font-size: 1.8rem;
  color: var(--green-800);
  margin-bottom: 10px;
  font-weight: 700;
}

.section-subtitle {
  text-align: center;
  color: #888;
  margin-bottom: 30px;
  font-size: 1rem;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.card h3 { font-size: 1.1rem; margin-bottom: 8px; color: #333; }
.card p { color: #666; font-size: 0.9rem; line-height: 1.6; }
.card .meta { color: #999; font-size: 0.8rem; margin-top: 12px; }

/* ===== 网格布局 ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== 首页栏目区域 ===== */
.category-section {
  padding: 30px 0;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--green-200);
}

.category-header h2 {
  font-size: 1.4rem;
  color: var(--green-700);
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-header h2 i { color: var(--lime-500); }

.category-header a {
  color: var(--green-600);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 20px;
  padding: 6px 16px;
  background: var(--green-100);
  transition: all 0.3s;
}

.category-header a:hover { background: var(--green-200); }

/* ===== 文章详情页 ===== */
.article-detail {
  max-width: 860px;
  margin: 30px auto;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}

.article-detail h1 {
  font-size: 2rem;
  color: var(--green-800);
  margin-bottom: 16px;
}

.article-detail .meta {
  display: flex;
  gap: 20px;
  color: #999;
  font-size: 0.9rem;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--green-100);
}

.article-detail .content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #444;
}

.article-detail .content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 25px;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: #fff;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(34,197,94,0.35); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--green-500);
  color: var(--green-600);
}

.btn-outline:hover { background: var(--green-500); color: #fff; }

/* ===== 页脚 ===== */
.footer {
  background: linear-gradient(135deg, var(--green-800), var(--green-900));
  color: rgba(255,255,255,0.8);
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer h3 { color: var(--lime-400); margin-bottom: 12px; }
.footer .copyright { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.pagination a, .pagination strong {
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  background: #fff;
  color: var(--green-600);
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.pagination a:hover,
.pagination strong { background: var(--green-500); color: #fff; }

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 16px 0;
  color: #999;
  font-size: 0.9rem;
}

.breadcrumb a { color: var(--green-600); text-decoration: none; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .navbar-inner { flex-wrap: wrap; height: auto; padding: 12px 0; }
  .nav-menu { order: 3; width: 100%; overflow-x: auto; margin-top: 8px; }
  .nav-menu li a { padding: 8px 14px; font-size: 0.85rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .carousel { max-height: 250px; }
  .carousel img { height: 250px; }
  .article-detail { padding: 20px; }
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate { animation: fadeInUp 0.6s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }