/* ============================================================
   东莞市电子计算中心 - 全站公共样式
   ============================================================ */
:root {
  --primary: #0a4d8c;
  --primary-light: #1173c4;
  --accent: #e8f3fc;
  --accent-2: #f5f9fd;
  --text: #333;
  --text-light: #666;
  --border: #e3eaf2;
  --radius: 8px;
}

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

body {
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", sans-serif;
  color: var(--text);
  background: #f4f7fa;
  font-size: 15px;
  line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }
img { max-width: 100%; display: block; }

.container { width: 1200px; max-width: 96%; margin: 0 auto; }

/* ---------- 顶部 ---------- */
.topbar {
  background: linear-gradient(135deg, #063a6e 0%, var(--primary) 55%, var(--primary-light) 100%);
  color: #fff;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 96px;
}
.logo { display: flex; align-items: center; gap: 14px; color: #fff; }
.logo img { height: 58px; }
.logo-text .cn { font-size: 26px; font-weight: bold; letter-spacing: 2px; }
.logo-text .en { font-size: 12px; opacity: .75; letter-spacing: 1px; }
.topbar-right { text-align: right; font-size: 13px; opacity: .9; }
.topbar-right .hotline { font-size: 15px; margin-bottom: 4px; }
.topbar-right .hotline b { font-size: 18px; font-family: Consolas, monospace; }

/* ---------- 主导航 ---------- */
.mainnav { background: #084277; box-shadow: 0 2px 6px rgba(0,0,0,.15); position: sticky; top: 0; z-index: 99; }
.mainnav ul { display: flex; list-style: none; }
.mainnav li a {
  display: block; padding: 0 34px; line-height: 48px;
  color: #dce9f5; font-size: 16px; transition: background .25s;
}
.mainnav li a:hover, .mainnav li a.active {
  background: var(--primary-light); color: #fff;
}

/* ---------- 页面横幅 ---------- */
.page-banner {
  height: 200px;
  background: linear-gradient(120deg, #063a6e, #1173c4 60%, #3f9be0);
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-align: center;
}
.page-banner h1 { font-size: 34px; letter-spacing: 4px; margin-bottom: 10px; }
.page-banner p { font-size: 14px; opacity: .8; letter-spacing: 6px; text-transform: uppercase; }

/* ---------- 面包屑 ---------- */
.crumbs { padding: 18px 0; font-size: 13px; color: var(--text-light); }
.crumbs a { color: var(--text-light); }
.crumbs a:hover { color: var(--primary); }

/* ---------- 通用板块标题 ---------- */
.section { padding: 50px 0 60px; }
.section.alt { background: #fff; }
.sec-head { text-align: center; margin-bottom: 36px; }
.sec-head h2 {
  font-size: 30px; color: var(--primary); letter-spacing: 2px;
  position: relative; display: inline-block; padding-bottom: 14px;
}
.sec-head h2::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 60px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary-light), #6fc3f7);
}
.sec-head p { color: #999; font-size: 13px; letter-spacing: 3px; margin-top: 6px; }

/* ---------- 首页 Banner ---------- */
.hero {
  height: 420px;
  background: linear-gradient(120deg, #063a6e 0%, #0a4d8c 40%, #2f8ad6 100%);
  position: relative; overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.hero::before { width: 500px; height: 500px; top: -200px; right: -120px; }
.hero::after { width: 300px; height: 300px; bottom: -150px; left: 8%; }
.hero-inner { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; color: #fff; }
.hero-inner h2 { font-size: 42px; letter-spacing: 4px; margin-bottom: 18px; }
.hero-inner h2 span { color: #8fd0ff; }
.hero-inner p { max-width: 720px; font-size: 16px; line-height: 2; opacity: .88; text-align: justify; }
.hero-btns { margin-top: 32px; }
.hero-btns a {
  display: inline-block; padding: 12px 34px; margin-right: 16px;
  border-radius: 24px; font-size: 15px; transition: all .25s;
}
.hero-btns .btn-main { background: #ff9d2e; color: #fff; }
.hero-btns .btn-main:hover { background: #ffab4d; color: #fff; }
.hero-btns .btn-ghost { border: 1px solid rgba(255,255,255,.6); color: #fff; }
.hero-btns .btn-ghost:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ---------- 业务模块卡片 ---------- */
.biz-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.biz-card {
  background: #fff; border-radius: var(--radius); padding: 30px 24px;
  border: 1px solid var(--border); transition: all .3s; position: relative; overflow: hidden;
}
.biz-card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--primary-light), #6fc3f7);
  transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.biz-card:hover { transform: translateY(-6px); box-shadow: 0 12px 28px rgba(10,77,140,.14); }
.biz-card:hover::before { transform: scaleX(1); }
.biz-card .icon {
  width: 56px; height: 56px; border-radius: 12px; margin-bottom: 16px;
  background: var(--accent); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.biz-card h3 { font-size: 18px; margin-bottom: 10px; color: var(--primary); }
.biz-card p { font-size: 13px; color: var(--text-light); line-height: 1.8;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.biz-card .more { display: inline-block; margin-top: 12px; font-size: 13px; }

/* ---------- 首页新闻区 ---------- */
.news-layout { display: flex; gap: 24px; }
.news-panel { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.news-panel.w-sm { flex: 0 0 400px; }
.news-panel.w-lg { flex: 1; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  color: #fff;
}
.panel-head h3 { font-size: 17px; letter-spacing: 1px; }
.panel-head a { color: rgba(255,255,255,.85); font-size: 13px; }
.panel-head a:hover { color: #fff; }
.news-list { list-style: none; padding: 8px 20px 14px; }
.news-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 11px 2px; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.news-list li:last-child { border-bottom: 0; }
.news-list li a {
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.news-list li a::before { content: "·"; color: var(--primary-light); font-weight: bold; margin-right: 8px; }
.news-list li a:hover { color: var(--primary); }
.news-list li time { color: #9aa7b3; font-size: 12px; font-family: Consolas, monospace; }

/* 快捷入口 */
.quick-links { margin-top: 20px; display: grid; gap: 12px; }
.quick-links a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; border-radius: var(--radius); color: #fff; font-weight: bold; font-size: 15px;
  transition: transform .2s, box-shadow .2s;
}
.quick-links a:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.15); color: #fff; }
.quick-links .q1 { background: linear-gradient(135deg, #2196F3, #1976D2); }
.quick-links .q2 { background: linear-gradient(135deg, #03A9F4, #0288D1); }

/* ---------- 党建宣传横幅 ---------- */
.party-banner {
  margin-top: 20px;
}
.party-banner a {
  display: block; position: relative; height: 170px;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 8px 22px rgba(158, 26, 26, .18);
  transition: transform .25s, box-shadow .25s;
}
.party-banner a:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(158, 26, 26, .28); }
.party-banner img { width: 100%; height: 100%; object-fit: cover; }
/* 无图片时的 CSS 兜底样式 */
.party-banner #party-fallback {
  display: none; position: absolute; inset: 0;
  align-items: center; justify-content: center; gap: 26px;
  background: linear-gradient(120deg, #a80f1a 0%, #c8161e 45%, #e02b2b 100%);
  color: #fff; text-align: center;
}
.party-banner #party-fallback::before, .party-banner #party-fallback::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255, 215, 120, .08);
}
.party-banner #party-fallback::before { width: 260px; height: 260px; top: -130px; right: -60px; }
.party-banner #party-fallback::after { width: 180px; height: 180px; bottom: -110px; left: 6%; }
.pf-star {
  font-size: 64px; color: #ffd75e; line-height: 1;
  text-shadow: 0 0 24px rgba(255, 215, 94, .6); position: relative; z-index: 2;
}
.pf-text { position: relative; z-index: 2; text-align: left; }
.pf-title {
  font-size: 30px; font-weight: bold; letter-spacing: 4px; margin-bottom: 8px;
}
.pf-sub { font-size: 14px; opacity: .85; letter-spacing: 1px; }

/* ---------- 数字统计带 ---------- */
.stat-band {
  background: linear-gradient(120deg, #063a6e, #1173c4);
  color: #fff; padding: 46px 0;
}
.stat-band .container { display: flex; justify-content: space-around; text-align: center; }
.stat-band .num { font-size: 40px; font-weight: bold; font-family: Consolas, monospace; }
.stat-band .num small { font-size: 18px; }
.stat-band .lbl { font-size: 14px; opacity: .8; margin-top: 6px; }

/* ---------- 两栏布局（内页） ---------- */
.page-body { display: flex; gap: 26px; padding: 10px 0 60px; align-items: flex-start; }
.sidebar { flex: 0 0 250px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.sidebar .side-title {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; padding: 16px 20px; font-size: 18px; letter-spacing: 2px;
}
.sidebar ul { list-style: none; }
.sidebar li a {
  display: block; padding: 13px 20px; color: var(--text);
  border-left: 3px solid transparent; border-bottom: 1px solid #f0f4f8;
  transition: all .2s;
}
.sidebar li a:hover, .sidebar li a.active {
  background: var(--accent); color: var(--primary);
  border-left-color: var(--primary-light); font-weight: bold;
}
.main-col { flex: 1; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 30px 34px; min-height: 500px; }
.main-col h2.article-title { font-size: 24px; color: var(--primary); margin-bottom: 8px; }
.main-col .article-meta { color: #999; font-size: 13px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.article-body p { text-indent: 2em; margin-bottom: 14px; text-align: justify; }
.article-body img { margin: 10px auto; border-radius: var(--radius); }

/* ---------- 新闻标签页 ---------- */
.tabs { display: flex; border-bottom: 2px solid var(--primary); margin-bottom: 22px; }
.tabs a {
  padding: 11px 30px; margin-right: 6px; font-size: 16px;
  background: #eef4fa; color: var(--text); border-radius: 6px 6px 0 0; transition: all .2s;
}
.tabs a.active, .tabs a:hover { background: var(--primary); color: #fff; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---------- 中心风采 ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.gallery-item {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  background: #fff; transition: all .3s;
}
.gallery-item:hover { box-shadow: 0 10px 24px rgba(10,77,140,.15); transform: translateY(-4px); }
.gallery-item .ph {
  height: 220px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #dcebfd, #f2f8ff); color: var(--primary);
  font-size: 40px; overflow: hidden;
}
.gallery-item .ph img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item figcaption { padding: 12px 16px; text-align: center; font-size: 14px; color: var(--text-light); }

/* ---------- 荣誉资质 ---------- */
.honor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 10px; }
.honor-item {
  background: var(--accent-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start;
}
.honor-item::before { content: "🏅"; }

/* ---------- 联系我们 ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 34px; }
.contact-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; text-align: center; transition: all .3s;
}
.contact-card:hover { box-shadow: 0 10px 24px rgba(10,77,140,.12); transform: translateY(-4px); }
.contact-card .icon { font-size: 34px; margin-bottom: 12px; }
.contact-card h3 { color: var(--primary); font-size: 17px; margin-bottom: 10px; }
.contact-card p { font-size: 13px; color: var(--text-light); line-height: 2; }
.contact-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
.contact-table th, .contact-table td { border: 1px solid var(--border); padding: 11px 16px; font-size: 14px; text-align: left; }
.contact-table th { background: var(--accent); color: var(--primary); white-space: nowrap; }

/* ---------- 页脚 ---------- */
.footer { background: #06355f; color: #a9c3da; padding: 44px 0 0; margin-top: 60px; font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; letter-spacing: 1px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer a { color: #a9c3da; }
.footer a:hover { color: #fff; }
.footer-bottom {
  margin-top: 34px; border-top: 1px solid rgba(255,255,255,.12);
  padding: 16px 0; text-align: center; font-size: 12px; color: #7d99b5;
}

/* ---------- 分页 ---------- */
.pager { text-align: center; margin-top: 26px; font-size: 13px; }
.pager a, .pager span {
  display: inline-block; padding: 6px 14px; margin: 0 3px;
  border: 1px solid var(--border); border-radius: 4px; background: #fff; color: var(--text-light);
}
.pager .cur { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager .ellipsis { border: none; background: none; padding: 6px 2px; }

@media (max-width: 900px) {
  .biz-grid, .gallery-grid, .honor-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
  .news-layout, .page-body { flex-direction: column; }
  .sidebar, .news-panel.w-sm { flex: auto; width: 100%; }
}
