/* =============================================================
   RuralCloud 乡村云 — 全站公共样式
   -------------------------------------------------------------
   适用页面：index.html / agency.html / products.html
             / merchant.html / help.html
   依赖说明：
     - 本文件为页面自定义样式，Tailwind 工具类由 js/tailwind.min.js 运行时生成
     - 页面中 <link> 的引入顺序应为：
         css/fontawesome.min.css → css/google-fonts.css → css/style.css
   路径说明：本文件位于 /css/ 下，故图片引用统一使用 ../images/
   ============================================================= */

/* -------------------------------------------------------------
   1. 基础排版
   ------------------------------------------------------------- */
body {
  font-family: "Noto Sans SC", sans-serif;
  background-color: #f7faf7;
  color: #1b4332;
  overflow-x: hidden;
  touch-action: pan-x pan-y;
  -ms-content-zooming: none;
}

img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* -------------------------------------------------------------
   2. Hero 首屏区（各页面顶部大图 Banner）
   ------------------------------------------------------------- */
.page-hero {
  background-size: cover;
  background-position: center;
  position: relative;
}

/* 2.1 首页：夜色乡村与温暖木屋 */
.hero-home {
  background:
    linear-gradient(
      180deg,
      rgba(8, 28, 21, 0.4) 0%,
      rgba(27, 67, 50, 0.7) 100%
    ),
    url("../images/hero-home.jpg");
  background-size: cover;
  background-position: center 40%;
}

/* 2.2 代理招商：广袤生态梯田 */
.hero-agency {
  background:
    linear-gradient(
      180deg,
      rgba(8, 28, 21, 0.5) 0%,
      rgba(27, 67, 50, 0.8) 100%
    ),
    url("../images/hero-agency.jpg");
  background-size: cover;
  background-position: center 30%;
}

/* 2.3 产品中心：民宿信息化软件场景 */
.hero-products {
  background:
    linear-gradient(
      180deg,
      rgba(8, 28, 21, 0.5) 0%,
      rgba(27, 67, 50, 0.8) 100%
    ),
    url("../images/hero-products.jpg");
  background-size: cover;
  background-position: center;
}

/* 2.4 商家入驻：自然竹林与山水民宿 */
.hero-merchant {
  background:
    linear-gradient(
      180deg,
      rgba(8, 28, 21, 0.5) 0%,
      rgba(27, 67, 50, 0.8) 100%
    ),
    url("../images/hero-merchant.jpg");
  background-size: cover;
  background-position: center;
}

/* 2.5 帮助中心：绿意山谷与云雾乡村 */
.hero-help {
  background:
    linear-gradient(
      180deg,
      rgba(8, 28, 21, 0.5) 0%,
      rgba(27, 67, 50, 0.8) 100%
    ),
    url("../images/hero-help.jpg");
  background-size: cover;
  background-position: center;
}

/* -------------------------------------------------------------
   3. 卡片组件
   ------------------------------------------------------------- */
/* 绿色生态白底玻璃拟态卡片 */
.glass-card-green {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px -12px rgba(27, 67, 50, 0.12);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card-green:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(82, 183, 136, 0.4);
  box-shadow: 0 24px 48px -12px rgba(27, 67, 50, 0.2);
}

/* -------------------------------------------------------------
   4. 页头滚动背景（由 main.js 切换 header-scrolled 类）
   ------------------------------------------------------------- */
/* 用伪元素只覆盖顶部导航条高度（h-24 = 6rem），
   保证移动端下拉菜单在任何滚动状态下都是同一套毛玻璃效果 */
#main-header.header-scrolled::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6rem;
  background: rgba(8, 28, 21, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.35);
  z-index: -1;
}

/* -------------------------------------------------------------
   5. 导航（当前页高亮）
   ------------------------------------------------------------- */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link.active-nav {
  color: #ffffff !important;
  font-weight: 700;
}

.nav-link.active-nav::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  background-color: #52b788;
  border-radius: 99px;
}

/* -------------------------------------------------------------
   6. 帮助中心：FAQ 折叠展开手风琴
   ------------------------------------------------------------- */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}

.faq-item.open .faq-answer {
  max-height: 500px;
  transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}
