/* ============================================================
   TMGM 外汇平台 - 主样式表
   金融外汇风格：深海蓝 + 金色点缀 + 白/浅灰底色
   ============================================================ */

:root {
  --navy: #0b2545;
  --navy-2: #0f2f5c;
  --blue: #155eef;
  --blue-deep: #1148b8;
  --gold: #d9a441;
  --gold-2: #e8b84b;
  --green: #0e9f6e;
  --red: #e02424;
  --ink: #1f2d3d;
  --ink-2: #52606d;
  --muted: #7b8794;
  --line: #e6ebf2;
  --bg: #f5f7fb;
  --bg-card: #ffffff;
  --shadow: 0 10px 30px rgba(11, 37, 69, .08);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

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

/* ---------------- 顶部 header（白色） ---------------- */
.site-header { background: #fff; box-shadow: 0 1px 0 var(--line); position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; align-items: center; gap: 28px; height: 86px; }

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 44px; width: auto; }
.brand-text { font-size: 20px; font-weight: 800; color: var(--navy); letter-spacing: .5px; white-space: nowrap; }

.main-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 6px; }
.nav-item { position: relative; }
.nav-link {
  display: block; padding: 10px 16px; font-size: 16px; font-weight: 600; color: var(--ink);
  border-radius: 8px; transition: .2s; white-space: nowrap;
}
.nav-link:hover, .nav-item.active > .nav-link { color: var(--blue); background: #eef4ff; }

.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 180px; background: #fff;
  border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--line);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s;
}
.nav-item.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 9px 14px; font-size: 14.5px; color: var(--ink-2); border-radius: 8px; transition: .15s; }
.dropdown a:hover, .dropdown a.active { color: var(--blue); background: #eef4ff; }

.header-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.action-btns { display: flex; gap: 10px; }
.action-contacts { display: flex; gap: 12px; }

.copy-chip {
  font-size: 12.5px; color: var(--ink-2); border: 1px dashed var(--line); border-radius: 999px;
  padding: 2px 10px; transition: .2s;
}
.copy-chip:hover { color: var(--blue); border-color: var(--blue); background: #eef4ff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: 10px; font-size: 15px; font-weight: 700; transition: .2s; white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #3b2a05; box-shadow: 0 6px 16px rgba(217, 164, 65, .35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(217, 164, 65, .45); }
.btn-outline { border: 1.5px solid var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-blue { background: linear-gradient(135deg, var(--blue), var(--blue-deep)); color: #fff; box-shadow: 0 6px 16px rgba(21, 94, 239, .32); }
.btn-blue:hover { transform: translateY(-2px); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--navy); border-radius: 2px; transition: .25s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------------- 幻灯片 ---------------- */
.hero-slider { position: relative; overflow: hidden; background: var(--navy); }
.slide { position: relative; display: none; min-height: 380px; align-items: center; justify-content: center; }
.slide.active { display: flex; animation: fadeIn .6s ease; }
.slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.slide-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(11,37,69,.92) 0%, rgba(11,37,69,.72) 45%, rgba(15,47,92,.35) 100%); }
.slide-content { position: relative; z-index: 2; width: 100%; max-width: 1200px; padding: 60px 40px; color: #fff; }
.slide-tag { display: inline-block; font-size: 13px; letter-spacing: 2px; color: var(--gold-2); border: 1px solid rgba(232,184,75,.6); padding: 4px 14px; border-radius: 999px; margin-bottom: 18px; }
.slide-content h1, .slide-content h2 { font-size: 44px; line-height: 1.2; font-weight: 800; max-width: 720px; }
.slide-content p { font-size: 17px; color: rgba(255,255,255,.85); max-width: 560px; margin: 16px 0 28px; }
.slide-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.slide-dots button { width: 26px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.4); transition: .3s; }
.slide-dots button.active { background: var(--gold-2); width: 40px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- 通用区块 ---------------- */
.section { padding: 60px 0; }
.section-alt { background: #fff; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head .eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 2px; color: var(--blue); text-transform: uppercase; margin-bottom: 10px; }
.section-head h2 { font-size: 32px; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 16px; }

/* ---------------- 首页特色 ---------------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; transition: .25s; }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.feature-icon { width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--muted); }
.ic-blue { background: #eef4ff; color: var(--blue); }
.ic-gold { background: #fdf6e7; color: var(--gold); }
.ic-green { background: #e7f7f0; color: var(--green); }
.ic-red { background: #fdeeee; color: var(--red); }

/* 数据统计 */
.stats-band { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; padding: 48px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-item .num { font-size: 40px; font-weight: 800; color: var(--gold-2); }
.stat-item .label { font-size: 14px; color: rgba(255,255,255,.7); margin-top: 6px; }

/* 产品卡片 */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .25s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-card .thumb { height: 180px; background-size: cover; background-position: center; position: relative; }
.product-card .badge { position: absolute; top: 14px; left: 14px; background: var(--blue); color: #fff; font-size: 12px; padding: 3px 12px; border-radius: 999px; }
.product-card .body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.product-card h3 { font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.product-card p { font-size: 14px; color: var(--muted); flex: 1; }
.product-card .more { margin-top: 16px; font-weight: 700; color: var(--blue); font-size: 14px; }
.product-card .more:hover { color: var(--blue-deep); }

/* 新闻列表 */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .25s; display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.news-card .thumb { height: 170px; background-size: cover; background-position: center; }
.news-card .body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-card .date { font-size: 12.5px; color: var(--muted); }
.news-card h3 { font-size: 17px; font-weight: 700; color: var(--navy); margin: 8px 0; line-height: 1.45; }
.news-card p { font-size: 14px; color: var(--muted); flex: 1; }
.news-card .more { margin-top: 12px; font-weight: 700; color: var(--blue); font-size: 13.5px; }

/* ---------------- 页面横幅 ---------------- */
.page-banner { position: relative; background: var(--navy); color: #fff; padding: 70px 0; overflow: hidden; }
.page-banner::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(217,164,65,.25), transparent 70%); }
.page-banner .container { position: relative; z-index: 2; }
.page-banner h1 { font-size: 38px; font-weight: 800; }
.page-banner p { color: rgba(255,255,255,.8); margin-top: 10px; max-width: 640px; }

.breadcrumb { font-size: 13.5px; color: var(--muted); padding: 18px 0 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { margin: 0 6px; color: #c2cbd6; }
.breadcrumb .current { color: var(--ink-2); }

/* ---------------- 关于我们 ---------------- */
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-content h2 { font-size: 30px; color: var(--navy); font-weight: 800; margin-bottom: 18px; }
.about-content p { color: var(--ink-2); margin-bottom: 14px; }
.about-points { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.about-point { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.about-point b { display: block; color: var(--navy); font-size: 16px; margin-bottom: 6px; }
.about-point span { font-size: 13.5px; color: var(--muted); }
.about-visual { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

/* ---------------- 产品详情页 ---------------- */
.spec-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.spec-table th, .spec-table td { padding: 14px 18px; text-align: left; font-size: 14.5px; }
.spec-table thead th { background: var(--navy); color: #fff; font-weight: 600; }
.spec-table tbody tr:nth-child(even) { background: #f8fafd; }
.spec-table td.up { color: var(--green); font-weight: 600; }
.spec-table td.down { color: var(--red); font-weight: 600; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.info-tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.info-tile h4 { color: var(--navy); font-size: 16px; margin-bottom: 8px; }
.info-tile p { font-size: 14px; color: var(--muted); }

/* ---------------- 新闻详情 ---------------- */
.article-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.article-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
.article-main h1 { font-size: 30px; color: var(--navy); line-height: 1.4; margin-bottom: 16px; }
.article-meta { font-size: 13.5px; color: var(--muted); padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.article-body { font-size: 16px; color: var(--ink-2); line-height: 1.9; }
.article-body p { margin-bottom: 18px; }
.article-body img { border-radius: 10px; margin: 8px 0; }
.article-side h4 { font-size: 17px; color: var(--navy); margin-bottom: 14px; padding-left: 12px; border-left: 4px solid var(--gold); }
.side-news { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 24px; }
.side-news li { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.side-news li:last-child { border-bottom: none; }
.side-news a { font-size: 14px; color: var(--ink-2); transition: .2s; }
.side-news a:hover { color: var(--blue); }
.side-news .d { font-size: 12px; color: var(--muted); display: block; margin-top: 4px; }

/* ---------------- 联系我们 ---------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.contact-card h3 { color: var(--navy); font-size: 22px; margin-bottom: 18px; }
.contact-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.contact-item:last-child { border-bottom: none; }
.contact-item .ico { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: #eef4ff; color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.contact-item b { display: block; color: var(--navy); font-size: 15px; }
.contact-item span, .contact-item button { color: var(--ink-2); font-size: 14px; }
.wechat-box { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
.wechat-box h3 { color: var(--navy); font-size: 22px; margin-bottom: 8px; }
.wechat-box .sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.wechat-box .qr { width: 220px; height: 220px; margin: 0 auto 18px; border-radius: 16px; border: 1px solid var(--line); padding: 10px; background: #fff; }
.wechat-box .qr img { width: 100%; height: 100%; object-fit: contain; }
.wechat-box .tip { font-size: 14px; color: var(--ink-2); }
.wechat-box .tip b { color: var(--blue); }

/* ---------------- 分页 ---------------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; font-size: 14px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); transition: .2s; padding: 0 12px; }
.pagination a:hover { border-color: var(--blue); color: var(--blue); }
.pagination .current { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------------- 404 ---------------- */
.notfound { text-align: center; padding: 100px 20px; }
.notfound .code { font-size: 120px; font-weight: 900; color: var(--navy); line-height: 1; letter-spacing: 4px; }
.notfound h1 { font-size: 26px; color: var(--navy); margin: 16px 0 10px; }
.notfound p { color: var(--muted); margin-bottom: 28px; }

/* ---------------- footer（白色） ---------------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1fr; gap: 32px; padding: 52px 0 32px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand img { height: 40px; }
.footer-brand span { font-size: 18px; font-weight: 800; color: var(--navy); }
.footer-about p { font-size: 13.5px; color: var(--muted); }
.footer-col h4 { font-size: 16px; color: var(--navy); margin-bottom: 16px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a, .footer-links button { font-size: 14px; color: var(--ink-2); transition: .2s; }
.footer-links a:hover, .footer-links button:hover { color: var(--blue); }
.footer-contact li { font-size: 14px; color: var(--ink-2); }
.link-btn { font-size: 14px; color: var(--ink-2); text-align: left; }
.footer-bottom { border-top: 1px solid var(--line); padding: 22px 0 80px; text-align: center; }
.footer-bottom p { font-size: 13px; color: var(--muted); }
.footer-risk { max-width: 860px; margin: 10px auto 0; font-size: 12px !important; color: #a0aab8 !important; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--blue); }

/* ---------------- 手机端底部固定按钮 ---------------- */
.mobile-fixed-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; background: #fff; border-top: 1px solid var(--line); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); gap: 10px; }
.mobile-fixed-btn { flex: 1; text-align: center; padding: 12px 0; border-radius: 10px; font-size: 16px; font-weight: 700; }
.mobile-fixed-btn.btn-open { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #3b2a05; }
.mobile-fixed-btn.btn-admin { border: 1.5px solid var(--navy); color: var(--navy); }

/* ---------------- 提示 ---------------- */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 10px 22px; border-radius: 999px; font-size: 14px; opacity: 0; visibility: hidden; transition: .3s; z-index: 2000; }
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: 86px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .3s ease; box-shadow: var(--shadow);
  }
  .main-nav.open { max-height: 80vh; overflow-y: auto; }
  .nav-list { flex-direction: column; align-items: stretch; padding: 12px 20px; gap: 0; }
  .nav-link { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0 0 0 16px; display: none; }
  .nav-item.has-dropdown.open .dropdown { display: block; }
  .header-actions { margin-left: auto; }
  .action-contacts { display: none; }
  .header-inner { height: 70px; }
  .main-nav { top: 70px; }
  .brand-text { font-size: 17px; }
  .brand img { height: 38px; }

  .slide-content h1, .slide-content h2 { font-size: 30px; }
  .slide { min-height: 300px; }
  .slide-content { padding: 44px 24px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .about-content, .contact-grid, .article-layout { grid-template-columns: 1fr; }
  .article-main { padding: 24px; }
  .spec-table { font-size: 13px; }
  .spec-table th, .spec-table td { padding: 10px 10px; }
  .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .feature-grid, .product-grid, .news-grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .section-head h2 { font-size: 26px; }
  .page-banner h1 { font-size: 28px; }
  .mobile-fixed-bar { display: flex; }
  .footer-bottom { padding-bottom: 90px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .header-actions .btn { padding: 8px 14px; font-size: 13px; }
  .slide-content h1, .slide-content h2 { font-size: 24px; }
  .stat-item .num { font-size: 30px; }
}
