/* ============================================================
   QIGE 美国仓 · 共享样式
   - 范围: 色彩 tokens / 重置 / 顶部导航 / Footer / 悬浮 CTA / 通用容器
   - 两个页面(index.html / news.html)共用,单点维护
   - 页面 <head> 中先加载本文件,再加载页面专属 <style>
   ============================================================ */

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

/* COLOR TOKENS */
:root {
  --gold: #B8860B;
  --gold-light: #d4a017;
  --teal: #09B8A0;
  --dark: #0D1B2A;
  --dark2: #162236;
  --dark3: #0a2030;
  --white: #fff;
  --tint: #f5fafa;
  --gray: #666;
  --border: #ddeeed;
}

/* BASE(页面专属 body 的 color/background 仍在各自 inline 样式里覆盖) */
html { scroll-behavior: smooth; font-size: 18px; }
body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  overflow-x: hidden;
  line-height: 1.7;
  font-size: 1rem;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* CONTAINER */
.container { max-width: 1240px; margin: 0 auto; padding: 0 52px; }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 52px; height: 72px;
  background: rgba(13,27,42,0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184,134,11,0.22);
}
.nav-logo { display: flex; align-items: center; gap: 13px; flex-shrink: 0; min-width: 0; }
.nav-logo-mark { width: 44px; height: 44px; border-radius: 9px; overflow: hidden; flex-shrink: 0; display: block; }
.nav-logo-text-wrap { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; }
.nav-logo-sub { font-family: "Bebas Neue", sans-serif; font-size: 11px; color: rgba(255,255,255,0.35); letter-spacing: 3px; line-height: 1.4; white-space: nowrap; }
.nav-logo-name { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 2px; line-height: 1.4; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-right: 16px; }
.nav-links a {
  font-size: 16px; color: rgba(255,255,255,0.85); padding: 8px 18px;
  border-radius: 4px; letter-spacing: 0.5px; transition: color 0.2s; white-space: nowrap;
}
.nav-links a:hover { color: var(--teal); }
.nav-links a.active { color: var(--teal); }
.nav-links a.oms { color: rgba(255,255,255,0.85); }
.nav-links a.oms:hover { color: var(--teal); }
.nav-btn { background: var(--teal) !important; color: #fff !important; padding: 7px 18px !important; border-radius: 24px !important; font-weight: 600 !important; font-size: 15px !important; margin-left: 8px; }
.nav-btn:hover { background: #07a08b !important; }
.hamburger { display: none; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* FOOTER */
.footer {
  position: relative;
  background: linear-gradient(180deg, #062030 0%, #051826 100%);
  padding: 60px 0 24px;
}
.footer::before {
  content:''; position:absolute; top:0; left:0; right:0; height:2px;
  background: linear-gradient(90deg, transparent 0%, rgba(9,184,160,0.4) 30%, rgba(184,134,11,0.4) 70%, transparent 100%);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.footer-brand-name { font-family: 'Noto Serif SC', serif; font-size: 18px; color: #fff; font-weight: 700; letter-spacing: 2px; margin-bottom: 4px; }
.footer-brand-en { font-family: 'Bebas Neue', sans-serif; font-size: 12px; color: rgba(9,184,160,0.55); letter-spacing: 3px; margin-bottom: 16px; }
.footer-brand-addr { font-size: 15px; color: rgba(255,255,255,0.5); line-height: 1.95; }
.footer-h {
  font-family: 'Noto Serif SC', serif; font-size: 16px; font-weight: 600;
  color: rgba(255,255,255,0.85); letter-spacing: 1px;
  padding-bottom: 10px; margin-bottom: 18px;
  position: relative;
}
.footer-h::after {
  content:''; position:absolute; left:0; bottom:0;
  width: 24px; height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}
.footer-ul { list-style: none; }
.footer-ul li { margin-bottom: 10px; }
.footer-ul a { font-size: 14px; color: rgba(255,255,255,0.55); transition: color 0.2s, transform 0.2s; display: inline-block; }
.footer-ul a:hover { color: var(--teal); transform: translateX(2px); }
.footer-oms-card {
  display: inline-flex; flex-direction: column; gap: 5px;
  border: 1px solid rgba(184,134,11,0.35); border-radius: 12px;
  padding: 14px 18px; background: linear-gradient(135deg, rgba(184,134,11,0.04) 0%, rgba(9,184,160,0.04) 100%);
  margin-top: 4px; transition: border-color 0.25s, background 0.25s, transform 0.25s, box-shadow 0.25s; color: inherit;
}
.footer-oms-card:hover {
  border-color: rgba(184,134,11,0.65);
  background: linear-gradient(135deg, rgba(184,134,11,0.10) 0%, rgba(9,184,160,0.06) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(184,134,11,0.12);
}
.footer-oms-card-eye {
  display: block; font-family: 'Bebas Neue', sans-serif;
  font-size: 11px; color: rgba(9,184,160,0.65); letter-spacing: 3.5px; line-height: 1;
}
.footer-oms-card-text {
  display: block; font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; color: var(--gold); letter-spacing: 2px; line-height: 1.2; transition: color 0.2s;
}
.footer-oms-card:hover .footer-oms-card-text { color: var(--gold-light); }
.footer-bottom {
  position: relative;
  padding-top: 26px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: rgba(255,255,255,0.35);
}
.footer-bottom::before {
  content:''; position:absolute; top:0; left:0; right:0; height:1px;
  background: linear-gradient(90deg, transparent 0%, rgba(9,184,160,0.25) 30%, rgba(184,134,11,0.25) 70%, transparent 100%);
}
.footer-slogan {
  font-family: 'Noto Serif SC', serif; letter-spacing: 2px;
  background: linear-gradient(90deg, rgba(9,184,160,0.75), rgba(212,160,23,0.85));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* FLOATING CTA */
.floating-cta { position: fixed; bottom: 28px; right: 28px; width: 56px; height: 56px; border-radius: 50%; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(9,184,160,0.4); z-index: 99; transition: all 0.25s; }
.floating-cta:hover { background: #07a08b; transform: scale(1.08); box-shadow: 0 6px 20px rgba(9,184,160,0.5); }

/* RESPONSIVE */
@media (max-width: 768px) {
  html { font-size: 16px; }
  .nav { padding: 0 20px; height: 64px; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: rgba(13,27,42,0.99); flex-direction: column; padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.07); gap: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 15px 28px; border-radius: 0; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,0.05); }
  .nav-btn { display: none !important; }
  .hamburger { display: flex; }
  .container { padding: 0 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .floating-cta { bottom: 20px; right: 20px; width: 50px; height: 50px; }
}

/* ============================================================
   站内搜索 (Pagefind ⌘K 模态) — 全站共享
   - Nav 触发按钮 + 居中模态 + Pagefind UI 品牌化覆盖
   - JS 行为见 /assets/search.js
   ============================================================ */

/* Pagefind UI 主题变量 */
:root {
  --pagefind-ui-primary: #09B8A0;
  --pagefind-ui-text: #0D1B2A;
  --pagefind-ui-border: transparent;
  --pagefind-ui-border-radius: 12px;
  --pagefind-ui-font: "Noto Sans SC", system-ui, sans-serif;
  --pagefind-ui-scale: 1;
}

/* ---- Nav 触发按钮 (伪输入框,实际点击弹模态) ---- */
.nav-search-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  flex: 0 1 360px; min-width: 0;
  height: 40px;
  padding: 0 18px;
  margin: 0 24px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;       /* 纯胶囊形,不受宽高影响 */
  color: rgba(255,255,255,0.55);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  font-size: 14px;
  cursor: text;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap; overflow: hidden;
}
.nav-search-trigger:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(9,184,160,0.55);
  color: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 3px rgba(9,184,160,0.10);
}
.nav-search-trigger-icon { flex-shrink: 0; opacity: 0.7; transition: color 0.2s, opacity 0.2s; }
.nav-search-trigger:hover .nav-search-trigger-icon { color: var(--teal); opacity: 1; }
.nav-search-trigger-label {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
  letter-spacing: 0.5px;
  font-weight: 400;
}

/* ---- 模态框 ---- */
.search-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 10vh 20px 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease;
}
.search-modal.is-open { opacity: 1; pointer-events: auto; }
.search-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(8,18,28,0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.search-modal-box {
  position: relative; z-index: 1;
  width: 100%; max-width: 640px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.32), 0 2px 6px rgba(0,0,0,0.08);
  overflow: hidden;
  transform: translateY(-12px) scale(0.985);
  transition: transform 0.22s cubic-bezier(0.16,0.84,0.44,1);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 14vh);
}
.search-modal.is-open .search-modal-box { transform: translateY(0) scale(1); }
.search-modal-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  z-index: 2;
}

/* 输入行 */
.search-modal-input-row {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #eef3f2;
  flex-shrink: 0;
}
.search-modal-input-icon { color: var(--teal); flex-shrink: 0; }
.search-modal-pagefind { flex: 1; min-width: 0; }
.search-modal-esc {
  flex-shrink: 0;
  font-family: "SF Mono", "Menlo", monospace; font-size: 11px;
  color: #888;
  background: #f3f6f6;
  border: 1px solid #e3eae9;
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.search-modal-esc:hover { background: #e8efee; color: var(--dark); border-color: #d0dcdb; }

/* Pagefind 输入框覆盖 */
.search-modal-pagefind .pagefind-ui__form { position: relative; margin: 0; }
.search-modal-pagefind .pagefind-ui__form::before { display: none; }
.search-modal-pagefind .pagefind-ui__search-input {
  width: 100%; box-sizing: border-box;
  height: 32px; padding: 0;
  background: transparent; border: 0;
  color: var(--dark);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  font-size: 17px; font-weight: 500;
  letter-spacing: 0.3px;
}
.search-modal-pagefind .pagefind-ui__search-input::placeholder { color: #bbb; font-weight: 400; }
.search-modal-pagefind .pagefind-ui__search-input:focus { outline: none; }
.search-modal-pagefind .pagefind-ui__search-clear {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; color: #aaa;
  font-size: 12px; padding: 4px 8px; cursor: pointer;
  border-radius: 6px;
  transition: color 0.18s, background 0.18s;
}
.search-modal-pagefind .pagefind-ui__search-clear:hover { color: var(--dark); background: #f3f6f6; }

/* 模态体 */
.search-modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0; }
.search-modal-empty { padding: 22px 22px 24px; }
.search-empty-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 13px; font-weight: 600;
  color: #888; letter-spacing: 2px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.search-empty-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.search-chip {
  display: inline-flex; align-items: center;
  font-family: "Noto Sans SC", system-ui, sans-serif;
  font-size: 13px;
  color: #555;
  background: #f4faf9;
  border: 1px solid #d8ecea;
  border-radius: 16px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.search-chip::before { content: '#'; color: var(--teal); margin-right: 4px; font-weight: 600; }
.search-chip:hover {
  background: #e9f6f4;
  border-color: rgba(9,184,160,0.4);
  color: var(--dark);
  transform: translateY(-1px);
}
.search-empty-tip {
  font-size: 12px; color: #aaa;
  border-top: 1px dashed #eef3f2;
  padding-top: 14px;
}

/* Pagefind 结果区 */
.search-modal-pagefind .pagefind-ui__drawer {
  position: static;
  background: transparent; box-shadow: none; border: 0;
  padding: 0; margin: 0; max-height: none;
}
.search-modal-pagefind .pagefind-ui__drawer.pagefind-ui__hidden { display: none; }
.search-modal.has-query .search-modal-empty { display: none; }
.search-modal-pagefind .pagefind-ui__message {
  font-size: 12px; color: #888;
  padding: 14px 22px 8px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #f3f6f6;
  margin-bottom: 4px;
}
.search-modal-pagefind .pagefind-ui__results { list-style: none; margin: 0; padding: 6px 0; }
.search-modal-pagefind .pagefind-ui__result {
  padding: 14px 22px;
  border-bottom: 1px solid #f3f6f6;
  transition: background 0.15s;
}
.search-modal-pagefind .pagefind-ui__result:last-child { border-bottom: 0; }
.search-modal-pagefind .pagefind-ui__result:hover { background: #f9fcfb; }
.search-modal-pagefind .pagefind-ui__result-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 15px; font-weight: 600;
  margin-bottom: 6px; line-height: 1.45;
}
.search-modal-pagefind .pagefind-ui__result-link { color: var(--dark); text-decoration: none; transition: color 0.18s; }
.search-modal-pagefind .pagefind-ui__result:hover .pagefind-ui__result-link,
.search-modal-pagefind .pagefind-ui__result-link:hover { color: var(--teal); }
.search-modal-pagefind .pagefind-ui__result-excerpt { font-size: 13px; color: #666; line-height: 1.7; }
.search-modal-pagefind .pagefind-ui__result-excerpt mark {
  background: rgba(9,184,160,0.18);
  color: var(--dark);
  padding: 0 2px; border-radius: 2px;
  font-weight: 500;
}
.search-modal-pagefind .pagefind-ui__result-tags,
.search-modal-pagefind .pagefind-ui__result-thumb,
.search-modal-pagefind .pagefind-ui__filter-panel { display: none; }
.search-modal-pagefind .pagefind-ui__button {
  display: block; width: calc(100% - 44px);
  margin: 8px 22px 16px;
  padding: 10px 16px;
  background: #f4faf9;
  border: 1px solid #d8ecea;
  border-radius: 10px;
  color: var(--dark); font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.search-modal-pagefind .pagefind-ui__button:hover {
  background: #e9f6f4;
  border-color: rgba(9,184,160,0.4);
}

/* Footer 提示 */
.search-modal-footer {
  display: flex; align-items: center; gap: 18px;
  padding: 10px 18px;
  background: #fafcfc;
  border-top: 1px solid #eef3f2;
  font-size: 11px; color: #888;
  flex-shrink: 0;
}
.search-modal-hint { display: inline-flex; align-items: center; gap: 5px; }
.search-modal-hint kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  font-family: "SF Mono", "Menlo", monospace; font-size: 10px;
  color: #666;
  background: #fff;
  border: 1px solid #e3eae9;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.search-modal-brand { margin-left: auto; color: #aaa; }
.search-modal-brand a { color: #888; text-decoration: none; transition: color 0.18s; }
.search-modal-brand a:hover { color: var(--teal); }

body.search-modal-open { overflow: hidden; }

/* 响应式 */
/* ≤1100px(平板/iPad/手机): 搜索仅桌面端,移动端不渲染触发按钮 */
@media (max-width: 1100px) {
  .nav-search-trigger { display: none; }
}
/* 模态:理论上移动端用不上(按钮已隐藏),但保留响应规则以防 ⌘K 误触 */
@media (max-width: 768px) {
  .search-modal { padding: 0; }
  .search-modal-box {
    max-width: 100%;
    height: 100vh; max-height: 100vh;
    border-radius: 0;
  }
  .search-modal-input-row { padding: 14px 16px; }
  .search-modal-empty { padding: 18px 16px 20px; }
  .search-modal-pagefind .pagefind-ui__result { padding: 14px 16px; }
  .search-modal-pagefind .pagefind-ui__search-input { font-size: 16px; }
  .search-modal-footer { padding: 10px 16px; gap: 12px; }
  .search-modal-brand { display: none; }
}
