/* ============================================
   RubberLink 胶贸通 - 东南亚橡胶大宗商品贸易平台
   Global Stylesheet
   ============================================ */

:root {
  --brand-green: #0B6E4F;
  --brand-green-dark: #08553C;
  --brand-green-light: #12A374;
  --brand-gold: #E8A33D;
  --brand-navy: #0E1B2C;
  --brand-navy-2: #14263C;
  --brand-ink: #1C2733;
  --brand-muted: #64748B;
  --brand-bg: #F6F8F7;
  --up: #16A34A;
  --down: #DC2626;
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Noto Sans SC", "Noto Sans Thai", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--brand-ink);
  background: var(--brand-bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Utilities ---------- */
.container-x { max-width: 1280px; margin-inline: auto; padding-inline: 1rem; }

.text-up { color: var(--up); }
.text-down { color: var(--down); }
.bg-up { background: var(--up); }
.bg-down { background: var(--down); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; border-radius: .6rem; padding: .65rem 1.25rem; font-size: .9rem;
  transition: all .18s ease; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--brand-green); color: #fff; }
.btn-primary:hover { background: var(--brand-green-dark); transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(11,110,79,.5); }
.btn-gold { background: var(--brand-gold); color: #1a1206; }
.btn-gold:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--brand-green); border-color: var(--brand-green); }
.btn-outline:hover { background: var(--brand-green); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255,255,255,.22); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(14,27,44,.92); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-link { color: rgba(255,255,255,.78); font-size: .875rem; font-weight: 500; padding: .5rem .7rem; border-radius: .5rem; transition: all .15s; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link.active { color: #fff; background: rgba(18,163,116,.25); }

/* ---------- Ticker ---------- */
.ticker-wrap { overflow: hidden; background: var(--brand-navy-2); border-bottom: 1px solid rgba(255,255,255,.06); }
.ticker-track { display: flex; gap: 2.5rem; width: max-content; animation: tickerScroll 40s linear infinite; padding: .5rem 0; }
.ticker-wrap:hover .ticker-track { animation-play-state: paused; }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; color: #cbd5e1; white-space: nowrap; }

/* ---------- Cards ---------- */
.card { background: #fff; border-radius: 1rem; border: 1px solid #E7ECEA; box-shadow: 0 1px 3px rgba(16,44,36,.05); transition: all .2s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 16px 40px -16px rgba(11,110,79,.22); border-color: rgba(11,110,79,.3); }

/* ---------- Section heading ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-green); }
.eyebrow::before { content: ""; width: 1.5rem; height: 2px; background: var(--brand-gold); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 88vh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8,20,16,.92) 20%, rgba(8,20,16,.55) 60%, rgba(8,20,16,.25)); }

/* ---------- Stat ---------- */
.stat-num { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--brand-green); }

/* ---------- Table ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tbl th { text-align: left; padding: .65rem .9rem; font-weight: 600; color: var(--brand-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #E7ECEA; background: #FAFBFA; }
.tbl td { padding: .7rem .9rem; border-bottom: 1px solid #F0F3F2; }
.tbl tbody tr:hover { background: #F4FAF7; }

/* ---------- Badge ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .68rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; }
.badge-green { background: rgba(18,163,116,.12); color: var(--brand-green); }
.badge-gold { background: rgba(232,163,61,.15); color: #B07317; }
.badge-blue { background: rgba(37,99,235,.1); color: #2563EB; }
.badge-gray { background: #EEF1F0; color: var(--brand-muted); }

/* ---------- Form ---------- */
.input, .select, .textarea {
  width: 100%; border: 1px solid #DCE3E0; border-radius: .6rem; padding: .6rem .85rem;
  font-size: .875rem; background: #fff; transition: border .15s, box-shadow .15s; color: var(--brand-ink);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-green); box-shadow: 0 0 0 3px rgba(11,110,79,.12); }
.label { display: block; font-size: .78rem; font-weight: 600; color: var(--brand-ink); margin-bottom: .35rem; }

/* ---------- Tabs ---------- */
.tab-btn { padding: .5rem 1rem; font-size: .85rem; font-weight: 600; border-radius: .5rem; color: var(--brand-muted); transition: all .15s; cursor: pointer; }
.tab-btn.active { background: var(--brand-green); color: #fff; }
.tab-btn:not(.active):hover { background: #EEF3F1; color: var(--brand-ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-navy); color: #B7C2CE; }
.footer-link { color: #93A1B0; font-size: .85rem; transition: color .15s; }
.footer-link:hover { color: #fff; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Map ---------- */
#industryMap { height: 560px; border-radius: 1rem; z-index: 0; }

/* ---------- Chart ---------- */
.chart-box { width: 100%; height: 420px; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #C4CEC9; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #A9B6B0; }

/* ---------- Language dropdown ---------- */
.lang-menu { position: absolute; right: 0; top: calc(100% + .5rem); background: #fff; border-radius: .6rem; box-shadow: 0 12px 40px -8px rgba(0,0,0,.25); min-width: 160px; overflow: hidden; display: none; z-index: 60; }
.lang-menu.open { display: block; }
.lang-item { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; font-size: .85rem; color: var(--brand-ink); cursor: pointer; }
.lang-item:hover { background: #F2F6F4; }

/* ---------- Mobile nav ---------- */
.mobile-menu { display: none; }
.mobile-menu.open { display: block; }

@media (max-width: 1023px) {
  .desktop-nav { display: none; }
}
@media (min-width: 1024px) {
  .mobile-toggle { display: none; }
}
