/* ============================================================
   上海市有色金属学会 - 网站样式
   配色体系：深钢蓝（学术庄重）+ 铜金（有色金属）+ 金属灰
   ============================================================ */
:root {
  --primary: #1d4e79;          /* 深钢蓝：主色 */
  --primary-dark: #0f3554;     /* 藏青：顶部条/页脚/深色块 */
  --primary-light: #2f6ea0;    /* 浅钢蓝 */
  --accent: #b8742c;           /* 铜金：强调色（有色金属） */
  --accent-dark: #96601f;      /* 铜金 hover */
  --copper-light: #d9a05e;     /* 亮铜：数字/高光 */
  --metal: #7d8a99;            /* 金属灰 */
  --ink: #212b35;
  --ink-soft: #5a6875;
  --bg: #f4f6f8;               /* 冷灰浅底 */
  --bg-alt: #eaf0f5;
  --card: #ffffff;
  --border: #dde4ea;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(15, 53, 84, .08);
  --shadow-lg: 0 8px 30px rgba(15, 53, 84, .14);
  --maxw: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

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

ul { list-style: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部条 ---------- */
.topbar {
  background: var(--primary-dark);
  color: rgba(255,255,255,.85);
  font-size: 13px;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center;
  height: 34px;
}
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: var(--copper-light); }
.topbar .links span { margin-left: 18px; }

/* ---------- 页头 ---------- */
.site-header {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-main {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand-mark {
  height: 64px; width: auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(13, 79, 142, .12));
}
.brand-text .cn { font-size: 21px; font-weight: 700; color: var(--primary-dark); letter-spacing: 1px; line-height: 1.25; }
.brand-text .en { font-size: 11px; color: var(--metal); letter-spacing: .5px; text-transform: uppercase; margin-top: 2px; }

/* ---------- 导航 ---------- */
.main-nav ul { display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 8px 14px; border-radius: 8px;
  color: var(--ink); font-size: 15px; font-weight: 500;
}
.main-nav a:hover { background: #eaf0f5; color: var(--primary); }
.main-nav a.active { background: var(--primary); color: #fff; }

/* ---------- 首屏 ---------- */
.hero {
  background:
    radial-gradient(ellipse at 78% 12%, rgba(217, 160, 94, .30), transparent 55%),
    linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #2a5d8c 100%);
  color: #fff;
  padding: 56px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, transparent 0 60px, rgba(255,255,255,.04) 60px 61px);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 34px; letter-spacing: 2px; margin-bottom: 14px; line-height: 1.35; }
.hero p.sub { font-size: 16px; color: rgba(255,255,255,.85); margin-bottom: 26px; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 10px 26px; border-radius: 999px;
  font-size: 15px; font-weight: 500; border: 1px solid transparent; cursor: pointer;
  transition: all .2s;
}
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-light:hover { background: var(--accent); color: #fff; }
.btn-outline { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.15); }

.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat-card {
  background: rgba(255,255,255,.12); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius);
  padding: 16px 18px; text-align: center;
}
.stat-card .num { font-size: 26px; font-weight: 700; color: var(--copper-light); font-family: Georgia, serif; }
.stat-card .label { font-size: 13px; color: rgba(255,255,255,.85); }

/* ---------- 滚动公告条 ---------- */
.notice-bar {
  background: #fff; border-bottom: 1px solid var(--border);
}
.notice-bar .container {
  display: flex; align-items: center; gap: 14px; height: 46px; overflow: hidden;
}
.notice-bar .tag {
  flex: none; background: var(--accent); color: #fff;
  font-size: 12px; padding: 2px 10px; border-radius: 4px; font-weight: 600;
}
.notice-bar .ticker { flex: 1; overflow: hidden; position: relative; height: 46px; }
.notice-bar .ticker ul {
  position: absolute; animation: ticker-roll 16s linear infinite;
}
.notice-bar .ticker li {
  height: 46px; line-height: 46px; white-space: nowrap;
  font-size: 14px; color: var(--ink-soft);
}
.notice-bar .ticker li a { color: var(--ink); }
@keyframes ticker-roll {
  0% { top: 0; } 33% { top: -46px; } 66% { top: -92px; } 100% { top: -92px; }
}

/* ---------- 通用区块 ---------- */
.section { padding: 44px 0; }
.section.alt { background: #fff; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.section-head h2 {
  font-size: 24px; color: var(--primary-dark);
  position: relative; padding-left: 16px;
}
.section-head h2::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px;
  background: linear-gradient(var(--primary), var(--accent)); border-radius: 3px;
}
.section-head .more { font-size: 14px; color: var(--ink-soft); }
.section-head .more:hover { color: var(--primary); }

/* ---------- 区块标题（大标题+英文副标题） ---------- */
.tpl-title { text-align: center; margin-bottom: 34px; }
.tpl-title h2 {
  font-size: 30px; color: var(--primary-dark); letter-spacing: 2px;
  display: inline-block; position: relative; padding: 0 70px;
}
.tpl-title h2::before, .tpl-title h2::after {
  content: ""; position: absolute; top: 50%; width: 46px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent));
}
.tpl-title h2::before { left: 0; }
.tpl-title h2::after { right: 0; transform: scaleX(-1); }
.tpl-title .en {
  display: block; margin-top: 8px; font-size: 12px; color: var(--metal);
  letter-spacing: 4px; text-transform: uppercase; font-family: Georgia, serif;
}

/* ---------- 活动风采画廊 ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.gallery-item {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); aspect-ratio: 40/26; background: #dde4ea;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(15, 53, 84, .88));
  color: #fff; padding: 26px 16px 12px; font-size: 15px;
}
.gallery-item .cap small { display: block; font-size: 11px; color: rgba(255,255,255,.7); letter-spacing: 1px; }

/* ---------- 新闻卡片（缩略图+分类） ---------- */
.news-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.news-card .thumb { aspect-ratio: 40/26; overflow: hidden; position: relative; background: var(--bg-alt); }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .thumb img { transform: scale(1.05); }
.news-card .cat {
  position: absolute; left: 12px; top: 12px;
  background: var(--accent); color: #fff; font-size: 12px;
  padding: 2px 10px; border-radius: 4px;
}
.news-card .body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.news-card h4 {
  font-size: 15px; color: var(--ink); line-height: 1.5; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card:hover h4 { color: var(--primary); }
.news-card .meta-line { margin-top: auto; font-size: 12px; color: var(--metal); display: flex; justify-content: space-between; }

/* ---------- 首页三栏 ---------- */
.home-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }

.panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; border-bottom: 2px solid var(--primary);
  background: linear-gradient(90deg, #eef4f9, #fff);
}
.panel-head h3 { font-size: 17px; color: var(--primary-dark); }
.panel-head a { font-size: 13px; color: var(--ink-soft); }
.panel-body { padding: 14px 18px 18px; flex: 1; }

.news-list li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.news-list li:last-child { border-bottom: none; }
.news-list .date { flex: none; color: var(--metal); font-size: 12px; font-family: Georgia, serif; }
.news-list .title {
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink);
}
.news-list .title:hover { color: var(--primary); }

/* ---------- 栏目卡片 ---------- */
.column-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.col-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.col-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.col-card .icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: linear-gradient(135deg, #eef3f8, #e2ebf3);
  border: 1px solid #d5e0ea;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px; color: var(--primary);
}
.col-card .icon svg { width: 24px; height: 24px; }
.col-card h4 { font-size: 17px; color: var(--primary-dark); margin-bottom: 8px; }
.col-card p { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; flex: 1; }
.col-card .links a {
  display: block; font-size: 13px; color: var(--ink);
  padding: 4px 0;
}
.col-card .links a::before { content: "· "; color: var(--accent); font-weight: 700; }

/* ---------- 专业委员会 ---------- */
.committee-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.committee {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center; box-shadow: var(--shadow);
  transition: all .25s;
}
.committee:hover { border-color: var(--accent); background: #fbf8f4; }
.committee .abbr {
  font-family: Georgia, serif; font-size: 13px; letter-spacing: 2px;
  color: var(--metal); text-transform: uppercase; margin-bottom: 6px;
}
.committee h4 { font-size: 16px; color: var(--primary-dark); }
.committee p { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }

/* ---------- 学会刊物 + 会员登录 ---------- */
.media-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; }
.journal-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
  display: flex; gap: 22px; align-items: center;
}
.journal-cover {
  flex: none; width: 150px; height: 200px; border-radius: 6px;
  background: linear-gradient(160deg, var(--primary-dark), var(--primary) 55%, var(--accent) 170%);
  color: #fff; padding: 18px 14px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 10px 24px rgba(15, 53, 84, .3);
}
.journal-cover .j-title { writing-mode: vertical-rl; letter-spacing: 6px; font-size: 20px; font-weight: 600; margin: 0 auto; }
.journal-cover .j-issue { font-size: 12px; color: rgba(255,255,255,.85); text-align: center; }
.journal-info h4 { font-size: 18px; color: var(--primary-dark); margin-bottom: 8px; }
.journal-info p { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.journal-info .ops { display: flex; gap: 10px; margin-top: 14px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { border-color: var(--primary); color: var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 7px 18px; font-size: 13px; }

.login-card {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 70%, #2a5d8c 130%);
  border-radius: var(--radius); color: #fff; padding: 26px;
  box-shadow: var(--shadow-lg);
}
.login-card h4 { font-size: 18px; margin-bottom: 6px; }
.login-card p { font-size: 13px; color: rgba(255,255,255,.8); margin-bottom: 16px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card input {
  height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.14); color: #fff; padding: 0 14px; outline: none;
}
.login-card input::placeholder { color: rgba(255,255,255,.6); }
.login-card input:focus { border-color: var(--copper-light); background: rgba(255,255,255,.2); }
.login-card .row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.login-card .row a { color: rgba(255,255,255,.75); }
.btn-gold { background: var(--accent); color: #fff; text-align: center; }
.btn-gold:hover { background: var(--accent-dark); color: #fff; }

/* ---------- 会员单位 ---------- */
.member-strip { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 24px; }
.member-strip h4 { font-size: 15px; color: var(--primary-dark); margin-bottom: 12px; }
.member-logos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.member-logos a {
  height: 56px; border: 1px solid var(--border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 13px; background: #fafcfd;
  transition: all .2s;
}
.member-logos a:hover { border-color: var(--accent); color: var(--primary); }

/* ---------- 页脚 ---------- */
.site-footer { background: #0d2638; color: rgba(255,255,255,.75); margin-top: 30px; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px;
  padding: 44px 0 30px;
}
.footer-grid h5 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-grid p, .footer-grid li { font-size: 13px; line-height: 2; }
.footer-grid a { color: rgba(255,255,255,.75); }
.footer-grid a:hover { color: var(--copper-light); }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.footer-brand .brand-mark { height: 56px; width: auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25)); }
.footer-brand .name { color: #fff; font-size: 17px; font-weight: 600; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 16px 0; font-size: 12px; color: rgba(255,255,255,.5);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.footer-bottom a {
  color: rgba(255,255,255,.55); text-decoration: none;
  transition: color .2s;
}
.footer-bottom a:hover { color: #fff; text-decoration: underline; }

/* ---------- 内页通用 ---------- */
.page-banner {
  background:
    radial-gradient(ellipse at 85% 0%, rgba(217, 160, 94, .25), transparent 55%),
    linear-gradient(120deg, var(--primary-dark), var(--primary) 80%);
  color: #fff; padding: 40px 0;
}
.page-banner h1 { font-size: 28px; letter-spacing: 2px; }
.page-banner .crumb { font-size: 13px; color: rgba(255,255,255,.75); margin-top: 6px; }
.page-banner .crumb a { color: rgba(255,255,255,.75); }
.page-body { padding: 36px 0 50px; }
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 26px; align-items: start; }

.side-nav {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.side-nav .head {
  background: var(--primary); color: #fff; padding: 12px 18px;
  font-size: 16px; font-weight: 600; letter-spacing: 1px;
}
.side-nav a {
  display: block; padding: 11px 18px; font-size: 14px; color: var(--ink);
  border-bottom: 1px solid #f0f3f7;
}
.side-nav a:last-child { border-bottom: none; }
.side-nav a:hover, .side-nav a.active { background: #eef4f9; color: var(--primary); padding-left: 24px; }

.content-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px 34px;
}
.content-card h1 { font-size: 24px; color: var(--primary-dark); margin-bottom: 10px; }
.meta { font-size: 13px; color: var(--metal); margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.meta span { margin-right: 18px; }
.article-text p { margin-bottom: 14px; text-indent: 2em; text-align: justify; }
.article-text .noindent { text-indent: 0; text-align: right; }
.article-empty { padding: 60px 0; text-align: center; color: var(--ink-soft); font-size: 14px; }

.doc-list li {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 12px 4px; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.doc-list .date { color: var(--metal); font-family: Georgia, serif; font-size: 13px; flex: none; }
.doc-list a { color: var(--ink); }
.doc-list a:hover { color: var(--primary); }
.doc-list .sub {
  flex: none; font-size: 11px; color: var(--accent);
  border: 1px solid #e6d4bd; background: #fbf6ef;
  border-radius: 4px; padding: 0 6px; line-height: 1.6; margin-right: 6px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .home-grid { grid-template-columns: 1fr 1fr; }
  .home-grid .panel:first-child { grid-column: 1 / -1; }
  .column-cards, .committee-grid { grid-template-columns: repeat(2, 1fr); }
  .member-logos { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .layout { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .news-cards { grid-template-columns: 1fr 1fr; }
  .tpl-title h2 { padding: 0 40px; font-size: 24px; }
}
@media (max-width: 720px) {
  .hero .container { grid-template-columns: 1fr; }
  .home-grid, .media-grid { grid-template-columns: 1fr; }
  .journal-card { flex-direction: column; text-align: center; }
  .journal-info .ops { justify-content: center; }
  .column-cards, .committee-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-main { flex-direction: column; gap: 12px; }
  .main-nav ul { flex-wrap: wrap; justify-content: center; }
  .topbar .container { justify-content: center; }
  .topbar .links { display: none; }
  .brand-mark { height: 52px; }
  .brand-text .cn { font-size: 18px; }
  .brand-text .en { font-size: 10px; }
  .member-logos { grid-template-columns: repeat(2, 1fr); }
  .content-card { padding: 22px 18px; }
  .gallery, .news-cards { grid-template-columns: 1fr; }
  .tpl-title h2 { padding: 0 20px; }
}
