/* ========================================
   福建省生态产业协会 — 官网样式
   ======================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-900: #1B5E20;
  --green-800: #2E7D32;
  --green-700: #388E3C;
  --green-600: #43A047;
  --green-500: #4CAF50;
  --green-200: #A5D6A7;
  --green-100: #C8E6C9;
  --green-50:  #E8F5E9;
  --green-25:  #F1F8E9;
  --white:    #ffffff;
  --gray-50:  #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #EEEEEE;
  --gray-300: #E0E0E0;
  --gray-500: #9E9E9E;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-main: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-700); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-900); }

img { max-width: 100%; height: auto; }

ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s;
}
.header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-area { display: flex; align-items: center; gap: 12px; }
.logo-img { flex-shrink: 0; width: 48px; height: 48px; border-radius: 6px; object-fit: contain; }
.logo-text h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--green-900);
  line-height: 1.2;
  white-space: nowrap;
}
.logo-text .subtitle {
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav ul { display: flex; gap: 4px; }
.nav a {
  display: block;
  padding: 6px 14px;
  font-size: 14px;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  transition: all .2s;
}
.nav a:hover, .nav a.active {
  color: var(--green-800);
  background: var(--green-50);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--green-800);
  border-radius: 1px;
  transition: all .3s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 30%, #388E3C 60%, #43A047 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.05) 0%, transparent 50%);
}
.hero-content {
  position: relative; z-index: 2;
  color: var(--white);
  padding: 0 20px;
}
.hero-content h2 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.hero-content p {
  font-size: 20px;
  opacity: .9;
  margin-bottom: 40px;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .3s;
  border: none;
  font-family: inherit;
}
.btn-primary {
  background: var(--green-600);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--green-800);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(46,125,50,.4);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.5);
}
.btn-outline:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255,255,255,.1);
}
.btn-sm { padding: 8px 20px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- Sections ---------- */
.section {
  padding: 80px 0;
}
.section-alt {
  background: var(--gray-50);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}
.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.section-desc {
  font-size: 15px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.section-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--gray-700);
  font-size: 15px;
  line-height: 1.8;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 50px;
  align-items: start;
}

.about-text .lead {
  font-size: 17px;
  color: var(--green-800);
  margin-bottom: 16px;
  line-height: 1.9;
  padding-left: 16px;
  border-left: 4px solid var(--green-600);
}
.about-text p {
  margin-bottom: 14px;
  color: var(--gray-700);
  line-height: 1.85;
}
.about-stats {
  display: flex;
  gap: 30px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}
.stat-item {
  text-align: center;
  flex: 1;
}
.stat-num {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--green-700);
}
.stat-label {
  font-size: 13px;
  color: var(--gray-500);
}

.about-card { display: flex; flex-direction: column; gap: 16px; }
.info-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px;
}
.info-card h3 {
  font-size: 16px;
  color: var(--green-800);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green-200);
}
.info-card ul li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.6;
}
.info-card ul li strong { color: var(--gray-900); }

/* ---------- News ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  transition: all .3s;
  border: 1px solid var(--gray-100);
}
.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.news-date {
  flex-shrink: 0;
  width: 60px;
  height: 76px;
  background: var(--green-800);
  color: var(--white);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.news-date .day { font-size: 24px; font-weight: 700; line-height: 1; }
.news-date .month { font-size: 11px; margin-top: 2px; }
.news-date .year { font-size: 10px; margin-top: 2px; opacity: .8; }

.news-content h3 {
  font-size: 16px;
  color: var(--gray-900);
  margin-bottom: 6px;
  line-height: 1.5;
}
.news-content p {
  font-size: 14px;
  color: var(--gray-700);
  margin-bottom: 8px;
}
.news-link {
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Services (Members) ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  text-align: center;
  transition: all .3s;
}
.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--green-300);
}
.service-icon { margin-bottom: 16px; }
.service-card h3 {
  font-size: 17px;
  color: var(--gray-900);
  margin-bottom: 10px;
}
.service-card p {
  font-size: 14px;
  color: var(--gray-700);
  margin-bottom: 14px;
  line-height: 1.7;
}
.service-link {
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Experts ---------- */
.experts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.expert-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all .3s;
}
.expert-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.expert-avatar { margin-bottom: 16px; }
.expert-card h3 {
  font-size: 16px;
  color: var(--green-800);
  margin-bottom: 8px;
}
.expert-card p {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.6;
}

/* ---------- Academic ---------- */
.academic-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
}

.academic-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all .3s;
}
.academic-card:hover { box-shadow: var(--shadow-sm); }
.academic-card.featured {
  grid-row: span 2;
  background: linear-gradient(135deg, var(--green-50), var(--green-25));
  border-color: var(--green-200);
}
.academic-card h3 {
  font-size: 16px;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.academic-card p {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 12px;
}
.badge {
  display: inline-block;
  background: var(--green-600);
  color: var(--white);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-weight: 600;
}

/* ---------- Eco Service Network ---------- */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.eco-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .3s;
  border: 1px solid var(--gray-100);
}
.eco-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.eco-img {
  height: 160px;
  overflow: hidden;
  background: var(--green-25);
}
.eco-card h3 {
  font-size: 17px;
  color: var(--gray-900);
  margin: 18px 20px 8px;
}
.eco-card p {
  font-size: 14px;
  color: var(--gray-700);
  margin: 0 20px 20px;
  line-height: 1.7;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.contact-item svg { flex-shrink: 0; margin-top: 2px; }
.contact-item h4 {
  font-size: 16px;
  color: var(--gray-900);
  margin-bottom: 4px;
}
.contact-item p {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.6;
}
.contact-item .postcode { color: var(--gray-500); font-size: 13px; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 30px;
}
.contact-form h3 {
  font-size: 20px;
  color: var(--gray-900);
  margin-bottom: 20px;
}
.form-row { display: flex; gap: 16px; }
.form-group { margin-bottom: 16px; flex: 1; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(76,175,80,.15);
}
.form-group textarea { resize: vertical; }

/* ---------- Footer ---------- */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 50px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand h3 { color: var(--white); font-size: 18px; margin-bottom: 8px; }
.footer-brand p { font-size: 13px; }
.footer h4 { color: var(--white); font-size: 15px; margin-bottom: 14px; }
.footer-links ul li { margin-bottom: 8px; }
.footer-links ul li a {
  font-size: 13px;
  color: var(--gray-500);
  transition: color .2s;
}
.footer-links ul li a:hover { color: var(--green-200); }

.footer-qr { text-align: center; }
.footer-qr-images { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.qr-item img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--green-200);
  padding: 4px;
  background: var(--white);
  max-width: 120px;
  height: auto;
}
.qr-item span {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 6px;
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.8;
}
.footer-bottom a { color: var(--gray-500); }
.footer-bottom a:hover { color: var(--green-200); }

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--green-700);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all .3s;
  box-shadow: var(--shadow-md);
  z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--green-900); transform: translateY(-3px); }

/* ---------- 悬浮客服组件 ---------- */
.floating-cs {
  position: fixed;
  right: 20px;
  bottom: 90px;
  z-index: 998;
}

.cs-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: var(--green-700);
  color: var(--white);
  border-radius: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(46,125,50,.35);
  transition: all .3s;
  border: none;
  font-family: inherit;
}
.cs-toggle:hover {
  background: var(--green-900);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46,125,50,.45);
}
.cs-toggle span {
  font-size: 11px;
  writing-mode: vertical-lr;
  letter-spacing: 1px;
}

.cs-panel {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 12px;
  width: 200px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.95);
  transform-origin: bottom right;
  transition: all .25s ease;
}
.floating-cs .cs-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.cs-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}
.cs-panel-header span {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
}
.cs-close {
  width: 22px; height: 22px;
  border: none;
  background: var(--gray-100);
  color: var(--gray-500);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.cs-close:hover { background: var(--gray-300); color: var(--gray-800); }

.cs-tip {
  text-align: center;
  font-size: 13px;
  color: var(--gray-500);
  padding: 0 16px 8px;
}

.cs-qrcode {
  display: block;
  margin: 0 auto 10px;
  width: 160px;
  height: 160px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--green-200);
  padding: 6px;
}

.cs-time {
  text-align: center;
  font-size: 12px;
  color: var(--green-600);
  padding-bottom: 14px;
  border-top: 1px dashed var(--gray-200);
  margin-top: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .experts-grid { grid-template-columns: repeat(2, 1fr); }
  .academic-grid { grid-template-columns: 1fr 1fr; }
  .academic-card.featured { grid-column: span 2; grid-row: auto; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .menu-toggle { display: flex; }
  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: var(--white);
    padding: 20px;
    transform: translateX(100%);
    transition: transform .3s;
    z-index: 999;
  }
  .nav.open { transform: translateX(0); }
  .nav ul { flex-direction: column; gap: 4px; }
  .nav a { padding: 12px 16px; font-size: 16px; }

  .hero-content h2 { font-size: 32px; }
  .hero-content p { font-size: 16px; }
  .section { padding: 50px 0; }
  .section-header h2 { font-size: 26px; }

  .news-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .experts-grid { grid-template-columns: 1fr 1fr; }
  .academic-grid { grid-template-columns: 1fr; }
  .academic-card.featured { grid-column: auto; }
  .eco-grid { grid-template-columns: 1fr; }
  .about-stats { flex-wrap: wrap; gap: 20px; }
  .form-row { flex-direction: column; }
}
