/* =============================================
   蜜芽植物社区 - 主样式文件
   khcLx6c.cn | 植物视频 | 植物教程视频
   ============================================= */

/* === 基础重置 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  color: #222;
  background: #f8faf6;
  line-height: 1.7;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* === 干扰标签隐藏 === */
.noise-wrap { display: none !important; visibility: hidden !important; position: absolute !important; width: 0 !important; height: 0 !important; overflow: hidden !important; }

/* === 颜色变量 === */
:root {
  --green-dark: #1a5c2a;
  --green-main: #2d8a4e;
  --green-light: #4caf7d;
  --green-pale: #e8f5e9;
  --gold: #c8a84b;
  --text-dark: #1a1a1a;
  --text-mid: #444;
  --text-light: #888;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(0,0,0,0.10);
  --radius: 12px;
  --radius-sm: 6px;
}

/* === 顶部公告栏 === */
.top-bar {
  background: var(--green-dark);
  color: #fff;
  font-size: 13px;
  text-align: center;
  padding: 6px 20px;
  letter-spacing: 1px;
}
.top-bar a { color: var(--gold); margin: 0 8px; }

/* === 头部导航 === */
.site-header {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--green-dark);
}
.site-logo img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.site-logo span { color: var(--green-main); }

/* 主导航 */
.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav > ul { display: flex; gap: 4px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  display: block;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a {
  background: var(--green-pale);
  color: var(--green-dark);
}
/* 下拉菜单 */
.main-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  box-shadow: var(--shadow);
  border-radius: var(--radius-sm);
  min-width: 160px;
  z-index: 200;
  padding: 6px 0;
}
.main-nav li:hover .dropdown { display: block; }
.main-nav .dropdown li a {
  display: block;
  padding: 8px 18px;
  font-size: 14px;
  color: var(--text-mid);
  transition: background 0.15s;
}
.main-nav .dropdown li a:hover { background: var(--green-pale); color: var(--green-dark); }

/* 汉堡菜单 */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--green-dark); border-radius: 2px; transition: all 0.3s; }

/* === 搜索框 === */
.search-bar-wrap {
  background: var(--green-pale);
  border-bottom: 1px solid #d4e8d0;
  padding: 10px 20px;
}
.search-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-bar-inner form {
  display: flex;
  flex: 1;
  max-width: 600px;
  background: #fff;
  border: 1.5px solid #b2d8b8;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(45,138,78,0.07);
}
.search-bar-inner input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 9px 18px;
  font-size: 14px;
  background: transparent;
  color: var(--text-dark);
}
.search-bar-inner button {
  background: var(--green-main);
  color: #fff;
  border: none;
  padding: 9px 22px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.search-bar-inner button:hover { background: var(--green-dark); }
.search-hint { font-size: 13px; color: var(--text-light); }
.search-hint a { color: var(--green-main); margin: 0 4px; }

/* === 面包屑 === */
.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text-light);
}
.breadcrumb a { color: var(--green-main); }
.breadcrumb span { margin: 0 6px; }

/* === Banner 首屏 === */
.hero-banner {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: var(--green-dark);
}
.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.85;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,92,42,0.72) 0%, rgba(0,0,0,0.25) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
.hero-overlay h1 {
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  margin-bottom: 14px;
  letter-spacing: 3px;
}
.hero-overlay p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.92);
  max-width: 640px;
  margin-bottom: 28px;
  line-height: 1.8;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn-primary {
  background: var(--green-main);
  color: #fff;
  padding: 12px 32px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 4px 16px rgba(45,138,78,0.35);
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.8);
  padding: 12px 32px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-outline:hover { background: rgba(255,255,255,0.15); }

/* === 通用容器 === */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.section-alt { background: #fff; }
.section-title {
  text-align: center;
  margin-bottom: 40px;
}
.section-title h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}
.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--green-main);
  border-radius: 2px;
  margin: 10px auto 0;
}
.section-title p { color: var(--text-light); font-size: 15px; }

/* === 统计数字栏 === */
.stats-bar {
  background: var(--green-dark);
  color: #fff;
  padding: 30px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-item .num {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--gold);
  display: block;
}
.stat-item .label { font-size: 14px; color: rgba(255,255,255,0.8); margin-top: 4px; }

/* === 视频卡片网格 === */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.video-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}
.video-card:hover { transform: translateY(-6px); box-shadow: 0 12px 36px rgba(0,0,0,0.14); }
.video-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #111;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}
.video-card:hover .video-thumb img { transform: scale(1.06); }
.play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.28);
  opacity: 0;
  transition: opacity 0.25s;
}
.video-card:hover .play-btn { opacity: 1; }
.play-btn svg {
  width: 56px;
  height: 56px;
  fill: rgba(255,255,255,0.92);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
.video-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--green-main);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 4px;
}
.video-info { padding: 14px 16px 16px; }
.video-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-light);
}
.video-meta span { display: flex; align-items: center; gap: 4px; }
.video-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}

/* === 功能模块卡片 === */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.module-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
  border-top: 4px solid var(--green-main);
}
.module-card:hover { transform: translateY(-4px); }
.module-icon {
  width: 60px;
  height: 60px;
  background: var(--green-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
}
.module-card h3 { font-size: 17px; font-weight: 700; color: var(--green-dark); margin-bottom: 10px; }
.module-card p { font-size: 14px; color: var(--text-mid); line-height: 1.6; }

/* === 专家展示 === */
.expert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}
.expert-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s;
}
.expert-card:hover { transform: translateY(-4px); }
.expert-avatar {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: top;
}
.expert-info { padding: 18px 20px 20px; }
.expert-info h3 { font-size: 18px; font-weight: 700; color: var(--green-dark); margin-bottom: 4px; }
.expert-title { font-size: 13px; color: var(--green-main); margin-bottom: 10px; font-weight: 600; }
.expert-desc { font-size: 13px; color: var(--text-mid); line-height: 1.6; margin-bottom: 14px; }
.expert-awards { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 14px; }
.award-badge {
  background: linear-gradient(135deg, #f5e642, #c8a84b);
  color: #5a3e00;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}
.expert-btns { display: flex; gap: 8px; justify-content: center; }
.btn-sm {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-green { background: var(--green-main); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-ghost { border: 1.5px solid var(--green-main); color: var(--green-main); }
.btn-ghost:hover { background: var(--green-pale); }

/* === 合作品牌Logo墙 === */
.partner-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
}
.partner-logo {
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-mid);
  transition: border-color 0.2s, color 0.2s;
}
.partner-logo:hover { border-color: var(--green-main); color: var(--green-dark); }

/* === FAQ === */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: #fff;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
}
.faq-question {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--green-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-question::after {
  content: '+';
  font-size: 20px;
  color: var(--green-main);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
  display: none;
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.8;
  border-top: 1px solid #f0f0f0;
}
.faq-item.open .faq-answer { display: block; }

/* === 用户评论 === */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.review-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--green-main);
}
.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.reviewer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--green-dark);
  flex-shrink: 0;
}
.reviewer-info h4 { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.reviewer-info span { font-size: 12px; color: var(--text-light); }
.stars { color: #f5b400; font-size: 14px; margin-bottom: 8px; }
.review-text { font-size: 14px; color: var(--text-mid); line-height: 1.7; }
.review-date { font-size: 12px; color: var(--text-light); margin-top: 10px; }

/* === 联系我们 === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-info h3 { font-size: 1.4rem; font-weight: 700; color: var(--green-dark); margin-bottom: 20px; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-mid);
}
.contact-icon {
  width: 36px;
  height: 36px;
  background: var(--green-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.qr-group { display: flex; gap: 24px; flex-wrap: wrap; }
.qr-item { text-align: center; }
.qr-item img { width: 120px; height: 120px; border-radius: 8px; border: 2px solid #e0e0e0; }
.qr-item p { font-size: 12px; color: var(--text-light); margin-top: 6px; }

/* === 信任栏 trust-bar === */
.trust-bar { background: #f0f7f0; border-top: 2px solid #c8e6c9; padding: 20px 0; }
.trust-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.trust-item { text-align: center; font-size: 13px; color: #444; line-height: 1.5; }
.trust-item strong { display: block; font-size: 14px; color: #1a5c2a; margin: 4px 0 2px; }
.trust-item small { color: #888; font-size: 12px; }
.trust-icon { font-size: 20px; }
@media (max-width: 900px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }

/* === 分享区域 share-section === */
.share-section { background: var(--green-dark); padding: 12px 0; }

/* === 社交分享 === */
.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.share-label { font-size: 14px; color: var(--text-mid); font-weight: 600; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.2s;
  color: #fff;
}
.share-btn:hover { opacity: 0.85; }
.share-wechat { background: #07c160; }
.share-weibo { background: #e6162d; }
.share-douyin { background: #010101; }
.share-bilibili { background: #00a1d6; }

/* === 底部页脚 === */
.site-footer {
  background: #0f3d1c;
  color: rgba(255,255,255,0.75);
  padding: 50px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo-text {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.footer-brand p { font-size: 13px; line-height: 1.8; }
.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,0.65); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--green-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}
.footer-bottom a { color: var(--green-light); }
.update-time { color: rgba(255,255,255,0.5); font-size: 12px; }

/* === 滚动到顶部 === */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--green-main);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 999;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }

/* === 内页 Hero === */
.page-hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-main) 100%);
  padding: 60px 20px;
  text-align: center;
  color: #fff;
}
.page-hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 12px; }
.page-hero p { font-size: 15px; color: rgba(255,255,255,0.85); max-width: 600px; margin: 0 auto; }

/* === 文章内容 === */
.article-content {
  max-width: 860px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-mid);
}
.article-content h2 { font-size: 1.5rem; color: var(--green-dark); margin: 28px 0 14px; font-weight: 700; }
.article-content h3 { font-size: 1.2rem; color: var(--green-dark); margin: 20px 0 10px; font-weight: 600; }
.article-content p { margin-bottom: 16px; }
.article-content ul { padding-left: 20px; margin-bottom: 16px; }
.article-content ul li { margin-bottom: 8px; list-style: disc; }

/* === 标签云 === */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud a {
  background: var(--green-pale);
  color: var(--green-dark);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s;
}
.tag-cloud a:hover { background: var(--green-main); color: #fff; }

/* === 视频播放弹窗 === */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.video-modal.active { display: flex; }
.modal-inner {
  position: relative;
  width: 90%;
  max-width: 800px;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
}
.modal-video {
  width: 100%;
  aspect-ratio: 16/9;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-direction: column;
  gap: 12px;
}
.modal-video svg { width: 60px; height: 60px; fill: rgba(255,255,255,0.5); }

/* === 响应式 === */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hero-banner { height: 380px; }
  .hero-overlay h1 { font-size: 2rem; }
  .hero-overlay p { font-size: 14px; }
  .main-nav { display: none; }
  .main-nav.open { display: block; position: absolute; top: 68px; left: 0; right: 0; background: #fff; box-shadow: var(--shadow); padding: 12px 0; }
  .main-nav.open > ul { flex-direction: column; }
  .main-nav.open > ul > li > a { padding: 12px 20px; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .video-grid { grid-template-columns: 1fr 1fr; }
  .expert-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 40px 0; }
  .section-title h2 { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr; }
  .expert-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr 1fr; }
  .hero-overlay h1 { font-size: 1.6rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
