/* 从 style.css 迁移过来的全局基础样式 + home 的全局样式（合并版） */

/* 基础重置 */
html, body {
  padding: 0;
  margin: 0;
}

/* 字体渲染优化 */
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 全局变量 */
:root {
  --primary: #009a44;
  --primary-dark: #0b7d36;
  --accent: #f17c4e;
  --bg: #f6f8fb;
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --surface: #ffffff;
  --radius-card: 14px;
  --radius-pill: 999px;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
  --underline-width: 120px;
  --underline-height: 4px;
  --container-width: 1200px;
}

/* 统一盒模型 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 全局 body 样式（只保留这一份） */
body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;  /* 用现在首页的字体 */
  color: var(--text);                                  /* 用首页的文字颜色 */
  background: var(--bg);                               /* 用首页的背景色 */
  line-height: 1.8;
  overflow-x: hidden;
  font-size: 16px;                                     /* 从 style.css 继承 */
  letter-spacing: 1px;                                 /* 从 style.css 继承的字间距 */
}

/* 全局链接样式 */
body a {
  color: #2bce5f;                 /* 旧版绿色 */
  text-decoration: none;
  transition: all 0.3s linear;
}

body a:hover,
body a:focus {
 
  text-decoration: none;
}


img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 80px 0;
}

.section.section-chart{
  position: relative;
  padding-bottom: 10px; 
  overflow: hidden;
}

.section-header {
  margin-bottom: 48px;
  position: relative;
  text-align: left;
  color: #009A44;
}

.section-label {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: inline-block;
}

.section-title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  padding-bottom: 20px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--underline-width);
  height: var(--underline-height);
  background: var(--primary);
  border-radius: 2px;
}

.section-lead {
  max-width: none;
  width: 100%;
  color: var(--text-muted);
  margin: 0 auto 24px; 
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--primary);
}

.brand-mark {
  height: 42px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 2px;
}

.brand-text img {
  height: 30px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.2;
}

.nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link,
.dropdown-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;

  padding: 10px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;

  font: inherit;              /* 关键：button 不再用默认字体 */
  font-weight: 600;
  color: var(--text-muted);

  background: transparent;
  border: none;
  cursor: pointer;

  text-decoration: none;      /* 兼容 a */
  appearance: none;           /* 关键：去掉 button 默认外观差异 */
  -webkit-appearance: none;
}


.nav-link:hover,
.nav-link.active,
.dropdown-toggle:hover,
.nav-item.open .dropdown-toggle {
  color: var(--primary);
  background: rgba(0, 154, 68, 0.08);
}


.nav-item {
  position: relative;
}

.nav-label {
  font-size: 13px;
  text-transform: uppercase;
  line-height: 1.2;
  letter-spacing: 0.12em;   /* 关键：让 Browse 看起来和其它一样“紧致” */
  color: inherit;
  font-weight: inherit;
}

.nav-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  opacity: .55;
  transition: filter .2s ease, opacity .2s ease;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon,
.dropdown-toggle:hover .nav-icon,
.nav-item.open .dropdown-toggle .nav-icon {
  opacity: 1;
  filter: brightness(0) saturate(100%)
          invert(30%) sepia(88%) saturate(1200%)
          hue-rotate(92deg) brightness(95%) contrast(95%);
}

.caret {
  line-height: 1;
}

.dropdown-toggle::after {
  display: none !important;
}

.dropdown-toggle:hover,
.nav-item.open .dropdown-toggle {
  color: var(--primary);
  background: rgba(0, 154, 68, 0.08);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  border-radius: 12px;
  padding: 12px;
  display: none;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 1000;
}

.dropdown-menu li a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;

  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;

  color: var(--text);
  background: transparent;

  letter-spacing: 0;  
  text-transform: none; 
  outline: none;
}

.site-header .dropdown-menu li > a:hover,
.site-header .dropdown-menu li > a:focus,
.site-header .dropdown-menu li > a:active {
  background: rgba(0, 154, 68, 0.12) !important;
  color: var(--primary-dark) !important;
  outline: none !important;
  box-shadow: none !important;
}
.site-header .dropdown-menu li {
  background: transparent !important;
}
.site-header .dropdown-menu li:hover {
  background: transparent !important;
}


/* 可选：键盘访问时给一个柔和的可视焦点，不要黑块 */
.site-header .dropdown-menu li > a:focus-visible {
  outline: 2px solid rgba(0, 154, 68, 0.35) !important;
  outline-offset: 2px;
}



.nav-item:hover .dropdown-menu,
.nav-item.open .dropdown-menu {
  display: block;
}

/* ✅ Language menu highlight (same behavior as china.css) */
#langMenu a.is-current{
  background: rgba(0,154,68,.12);
  color: var(--primary-dark);
}

/* ✅ 防止语言下拉在导航最右侧时“溢出屏幕” */
.lang-item .dropdown-menu{
  left: auto;
  right: 0;
}

.nav-item.has-dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;        /* 对应 calc(100% + 10px) 的 10px 空隙 */
}

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
}

.hero-section {
  position: relative;
  background: linear-gradient(120deg, rgba(0, 154, 68, 0.8), rgba(0, 154, 68, 0.55)), url("../images/home-back.png") center/cover no-repeat;
  color: #fff;
  padding: 120px 0 100px;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  /* 左侧更暗保证文字；往右更透明，让右侧图更清晰 */
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 35%,
    rgba(0, 0, 0, 0.16) 65%,
    rgba(0, 0, 0, 0.04) 100%
  );
  z-index: 1;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.45fr);
  gap: 48px;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 800;
  margin-bottom: 18px;
  line-height: 1.15;
}

.hero-content .lead {
  font-size: 18px;
  opacity: 0.92;
  margin-bottom: 28px;
  max-width: 660px;
}

.eyebrow {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 12px;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.hero-visual img {
  max-width: 380px;
  width: 100%;
}

.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 800;
  border:none;
  cursor:pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
  transition: all .2s ease;
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }

.btn i {
  font-size: 14px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: #7ab800;
  color: #fff;
}

.btn-secondary:hover {
  background: #6ba200;
}

.btn-dark {
  background: #37b13b;
  color: #fff;
}

.btn-dark:hover {
  background: #318834;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
}

.btn-outline:hover {
  background: #fff;
  color: var(--primary);
}

.btn-aus {
  background: #4ca269;
  color: #fff;
}

.btn-aus:hover {
  background: #438f5c;
  color: #fff;
}

.section-about {
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image img {
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.about-content h3 {
  font-size: 23px;
  margin-bottom: 18px;
  line-height: 1.6;
  letter-spacing: 0px;
}

.about-content p {
  font-size: 18px;
  margin-bottom: 14px;
  color: var(--text-muted);
  width: 90%;
  text-align: justify; 
  text-align-last: left; 
  letter-spacing: 0.4px;
}

.section-about .section-header {
  margin-bottom: 18px;
}

.about-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  padding: 4px 0;
}

.about-email:hover {
  color: var(--primary);
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 12px;
}

.section-data {
  background: #ecfdf5;
}

.section-data .section-header { /* CHANGE: center title */
  text-align: center;
}

.section-data .section-title::after { /* CHANGE: center underline */
  left: 50%;
  transform: translateX(-50%);
}

.section-data .section-label { /* CHANGE: hide Statistics line */
  display: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.kpi-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 210px;
}

.kpi-top { /* CHANGE: icon + number inline */
  display: flex;
  align-items: center;
  gap: 16px;
}

.kpi-icon img {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.kpi-number {
  font-size: 34px;
  font-weight: 800;
  color: var(--primary);
}

.kpi-title {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 17px; /* CHANGE: enlarge title */
  color: #05411adb;
  letter-spacing: 0px;
}

.kpi-desc {
  font-size: 17px;
  color: #77a186;
  line-height: 1.5;
}

/* 新 chart 包裹：段落下方居中、自适应 */
.section-chart .chart-embed{
  width: 100%;
  margin-top: 10px; /* 跟你原来段落到图的间距一致 */
  justify-content: center;
}

.section-chart .chart-ghost{
  width: 100%;
  max-width: var(--container-width);
  padding: 14px;
  border-radius: 18px;
  overflow: hidden;   

  /* ghost feeling */
  background: transparent;
  border: 1px solid rgba(231, 230, 230, 0.75);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);

  /* subtle depth */
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

/* 新 chart 容器：自适应布局 */
#sankey-chart{
  position: relative;
  width: 100%;
  max-width: var(--container-width); /* 跟页面 container 一致 */
  /* 移除固定高度，让 JavaScript 动态控制 */
  min-height: 400px; /* 设置最小高度作为后备 */
}


.section-chart .section-header--center {
  text-align: center;
}

.section-chart .section-header--center .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

.section-chart .section-label {
  display: none;
}

.section-chart .chart-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: 24px; /* keep chart directly under text */
}

.section-lead.section-lead-wide {
  margin: 0 auto;
  text-align: left;
}

.section-lead.section-lead-wide + .chart-card {
  margin-top: 24px;
}

.section-chart {
  overflow: hidden;
}

/* chart section background + overlay */
.section.section-chart::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.466), rgba(255,255,255,0.9)),
              url("../images/chart_bac.jpg") center/cover no-repeat;
  opacity: 1;
  z-index: 0;
}

.section.section-chart > .container {
  position: relative;
  z-index: 2;
}

.chart-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.site-footer{
  background: #eaf7f1;
  background-image: url("/static/images/bac_home_2.png");
  padding: 50px 0 32px;
  color: #4f5f5a;
}
.footer-grid{
  display:grid;
  grid-template-columns: minmax(420px, 1.2fr) repeat(3, minmax(150px, max-content));
  gap: 20px;
  margin-bottom: 32px;
}

.footer-title{
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 18px;
  color: #0f3b25;
  letter-spacing: 0;
}
.footer-links{
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.footer-links a{ color:#77a186; }
.footer-links a:hover{ color:#0f8c4a; text-decoration: underline; }

.footer-desc{
  color:#77a186;
  margin-top: 10px;
  width: 93%;
  letter-spacing: 0;
}

.footer-info{
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.footer-info li{
  display:flex;
  align-items:center;
  gap: 10px;
  color:#77a186;
  font-size: 13px;
  letter-spacing: 0;
}
.footer-info i{
  width: 18px;
  text-align:center;
  color: #05AB74;
}

.input-group{
  display:flex;
  border: 1px solid #d8dde6;
  border-radius: 10px;
  overflow:hidden;
  margin-top: 18px;
}
.input-group input{
  flex:1;
  border:none;
  padding: 12px 14px;
  outline:none;
  font-size: 14px;
}
.input-group button{
  border:none;
  background: var(--primary);
  color:#fff;
  padding: 0 14px;
  cursor:pointer;
}
.input-group button:hover{ background: var(--primary-dark); }

.footer-bottom{
  border-top: 1px solid #d8dde6;
  text-align:center;
  padding-top: 18px;
  color:#6b7280;
  font-size: 13px;
}

.input-group {
  display: flex;
  border: 1px solid #d8dde6;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  margin-top: 18px;
}

.input-group input {
  flex: 1;
  border: none;
  padding: 12px 14px;
  outline: none;
  font-size: 14px;
}

.input-group button {
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.input-group button:hover {
  background: var(--primary-dark);
}

.footer-bottom {
  border-top: 1px solid #d8dde6;
  text-align: center;
  padding-top: 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  left: 20px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
}

.footer-brand .brand-text {
  display: flex;
  align-items: flex-start;
  text-align: left;
  gap: 8px;
  flex-wrap: nowrap;
}

.footer-brand .brand-subtitle {
  white-space: nowrap;
  margin: 0;
  color: #4a6b5a;
}

@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    max-width: 520px;
    margin: 0 auto;
  }
}

@media (max-width: 992px) {
  .header-inner {
    height: auto;
    padding: 14px 0;
    flex-wrap: wrap;
  }

  .nav-toggle-label {
    display: block;
  }

  .nav {
    width: 100%;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    padding: 8px 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-link,
  .dropdown-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;

    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;

    font: inherit;            /* 关键：button 不再用浏览器默认字体 */
    font-weight: 600;         /* 关键：Browse 字重和其它一致 */
    color: var(--text-muted);

    background: transparent;
    border: none;
    cursor: pointer;

    text-decoration: none;    /* 兼容 a */
    appearance: none;         /* 关键：去掉 button 默认外观差异 */
    -webkit-appearance: none;
  }

  .nav-toggle:checked ~ .nav .nav-links {
    max-height: 600px;
  }

  .dropdown-menu {
    position: relative;
    top: 0;
    left: 0;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    margin-top: 6px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    padding: 100px 0 80px;
  }

  .cta-group {
    justify-content: flex-start;
  }
}

@media (max-width: 540px) {
  .cta-group {
    gap: 8px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-col {
    text-align: left;
  }
}
