/* 胡数集团官网 —— 纯 CSS，无构建步骤 */
:root {
    --primary: #1E4A82;
    --nav-bg: #1a2b4a;
    --footer-bg: #1a1a2e;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f5f6f8;
    --border: #e5e5e5;
    /* 深海星穹 × 静奢金线 —— 设计 token */
    --navy-900:#0B1734; --navy-800:#10234A; --navy-700:#16345F; --navy-600:#1E4A82; --navy-500:#2C5FA0; --navy-100:#E8EFF8;
    --gold-600:#9A7B3F; --gold-500:#B89758; --gold-400:#C9AB72; --gold-100:#F3ECDD;
    --ink-900:#12203A; --ink-700:#33405A; --ink-500:#5C6880; --ink-400:#8590A5; --line:#E4E9F0; --surface:#FFFFFF; --canvas:#F5F7FA;
    --brand-mark:#B23A3A;
    --shadow-sm:0 2px 8px rgba(16,35,74,.06); --shadow-md:0 8px 24px rgba(16,35,74,.08); --shadow-lg:0 16px 40px rgba(16,35,74,.12);
}

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

/* 仅供搜索引擎/读屏器识别的视觉隐藏标题（不影响 1:1 视觉） */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-dark);
    background: #fff;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* 原版各页 padding-top:100px（nav fixed 悬浮 91px + 9px 间隙）的等效实现：
   本站导航为 sticky 占位（占流 91px），main 顶部补 9px 间隙 */
main { padding-top: 9px; }

/* ---- 导航（对齐原 NavBar.vue：91px 高 + 1400 内容盒；深海蓝渐变 + 顶部金线） ---- */
.navbar {
    position: sticky; top: 0; z-index: 100;
    padding: 15px 0;
    transition: all .3s;
    border-bottom: 1px solid rgba(255,255,255,.1);
    border-top: 1px solid rgba(201,171,114,.35);
    background: linear-gradient(135deg, #16345F 0%, #0B1734 100%);
}
/* 滚动 >100px：对应原 NavBar.vue .bg，渐变加深 */
.navbar.bg {
    background: linear-gradient(135deg, #10234A 0%, #081228 100%);
    box-shadow: var(--shadow-lg);
}
.nav-content {
    max-width: 1400px; margin: 0 auto; padding: 0 40px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 60px; /* flex gap 是硬性最小间距，空间不足时也不会归零，避免菜单压到二维码 */
}
/* logo 区域禁止被 flex 压缩（二维码图片宽度固定，压缩会导致内容溢出与菜单重叠） */
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-img, .qrcode-img {
    height: 60px; width: auto; object-fit: contain;
}
.qrcode-img {
    cursor: zoom-in; transition: transform .2s ease;
}
.qrcode-img:hover { transform: scale(1.05); }
/* 菜单区可收缩；用 nav 的 gap 与二维码保持间距，不再靠右侧 margin-right 占位 */
.menu-list { display: flex; gap: 32px; min-width: 0; flex-shrink: 1; }
@media (max-width: 1400px) {
    .nav-content { padding: 0 24px; gap: 32px; }
    .menu-list { gap: 20px; }
    .menu-link { padding: 12px 16px; font-size: 16px; letter-spacing: 2px; }
}
@media (max-width: 1100px) {
    .nav-content { padding: 0 16px; gap: 16px; }
    .menu-list { gap: 8px; }
    .menu-link { padding: 10px 8px; font-size: 14px; letter-spacing: 1px; }
    .logo-img, .qrcode-img { height: 44px; }
    .logo-link { gap: 6px; }
}
.menu-item.has-sub { position: relative; }
.menu-link {
    color: #fff; padding: 12px 24px; display: inline-block;
    font-size: 18px; font-weight: 500; letter-spacing: 4px;
    border-radius: 6px; transition: all .3s; cursor: pointer; white-space: nowrap;
}
.menu-link:hover { color: #a8d4ff; background: rgba(255,255,255,.1); }
.menu-link.active { color: #a8d4ff !important; background: rgba(255,255,255,.15); }
/* 二维码放大弹窗（对齐原 NavBar.vue .qrcode-modal：全屏深色遮罩 + 大图） */
.qr-modal {
    display: none; position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,.85); align-items: center; justify-content: center;
    padding: 20px; cursor: default; animation: qrFadeIn .3s ease;
}
.qr-modal-content {
    position: relative; max-width: 90%; max-height: 90vh;
    border-radius: 10px; overflow: hidden; animation: qrScaleIn .3s ease;
}
.qr-modal-content img {
    display: block; max-width: 100%; max-height: 90vh;
    object-fit: contain; cursor: default;
}
.qr-close-btn {
    position: absolute; top: -40px; right: 0; width: 40px; height: 40px;
    border: none; background: transparent; color: #fff;
    font-size: 36px; cursor: pointer; line-height: 40px;
    transition: all .2s ease;
}
.qr-close-btn:hover { color: #a8d4ff; transform: scale(1.1); }
@keyframes qrFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes qrScaleIn { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.submenu {
    display: none; position: absolute; top: 100%; left: 0; min-width: 220px;
    background: rgba(13,45,74,.98); border: 1px solid rgba(100,150,200,.3);
    border-radius: 10px; box-shadow: 0 10px 40px rgba(13,45,74,.5);
    padding: 12px 0;
}
.menu-item.has-sub:hover .submenu { display: block; }
.submenu a {
    display: block; padding: 16px 28px; font-size: 16px;
    color: rgba(255,255,255,.95);
}
.submenu a:hover { color: #a8d4ff; background: rgba(255,255,255,.15); }

/* ---- 轮播图（首页专用样式在 home.css；此处仅保留通用兜底） ---- */
.banner .swiper-button-prev, .banner .swiper-button-next { color: #fff; }

/* ---- 通用区块 ---- */
.section { max-width: 1200px; margin: 48px auto; padding: 0 20px; }
.section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 24px; border-bottom: 2px solid var(--gold-500); padding-bottom: 12px;
}
.section-head h2 { font-size: 26px; color: var(--text-dark); }
.more { color: var(--text-light); font-size: 14px; }
.more:hover { color: var(--primary); }
.empty { color: #999; text-align: center; padding: 32px 0; }

/* ---- 卡片 ---- */
.card-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.card {
    background: #fff; border: 1px solid var(--line); border-radius: 8px;
    overflow: hidden; transition: all .2s; display: flex; flex-direction: column;
    box-shadow: var(--shadow-md);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card img { height: 150px; width: 100%; object-fit: cover; }
.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-body h3 {
    font-size: 16px; color: var(--text-dark); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card:hover .card-body h3 { color: var(--primary); }
.card-body p { font-size: 13px; color: var(--text-light); flex: 1; }
.card-body time { font-size: 12px; color: #aaa; }

/* ---- 合作商家 ---- */
.merchant-grid {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px;
}
.merchant {
    border: 1px solid var(--border); border-radius: 8px; padding: 24px 12px;
    text-align: center; color: var(--text-light); font-size: 14px;
    transition: all .2s; background: #fff;
}
.merchant:hover { border-color: var(--primary); color: var(--primary); }

/* ---- 内页头图 ---- */
.page-banner {
    background: linear-gradient(135deg, #16345F 0%, #0B1734 100%);
    padding: 64px 20px; text-align: center;
}
.page-banner h1 { color: #fff; font-size: 32px; letter-spacing: 4px; }

.container { max-width: 1000px; margin: 0 auto; padding: 32px 20px; }

/* ---- 公告列表 ---- */
.notice-list { list-style: none; }
.notice-list li { border-bottom: 1px solid var(--border); }
.notice-list a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 8px; transition: all .15s;
}
.notice-list a:hover { padding-left: 16px; color: var(--primary); }
.notice-title { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.badge {
    background: var(--primary); color: #fff; font-size: 12px;
    padding: 1px 8px; border-radius: 3px; margin-right: 8px; vertical-align: 1px;
}
.notice-list time { color: #999; font-size: 14px; margin-left: 24px; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination .current {
    padding: 6px 14px; border: 1px solid var(--border); border-radius: 4px;
    color: var(--text-dark); font-size: 14px;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .total { color: #999; font-size: 13px; align-self: center; margin-left: 8px; }
/* 窗口式分页（gap/跳页）—— notice_list_page.html 的实际样式在 notice_list_page.css */
.pagination a.pg-gap { background: transparent; color: #666; letter-spacing: 2px; }
.pagination .pg-jump { display: inline-flex; align-items: center; gap: 4px; margin-left: 12px; }
.pagination .pg-jump input {
    width: 52px; height: 34px; text-align: center; font-size: 14px;
    border: 1px solid #d4d4d8; border-radius: 4px; padding: 0 4px;
}
.pagination .pg-jump button {
    height: 34px; padding: 0 10px; font-size: 14px; cursor: pointer;
    border: 1px solid #d4d4d8; border-radius: 4px; background: #f4f4f5; color: #333;
}

/* ---- 文章详情 ---- */
.article { background: #fff; }
.article-title { font-size: 28px; line-height: 1.4; margin-bottom: 16px; }
.article-meta { color: #999; font-size: 14px; display: flex; gap: 20px; margin-bottom: 24px; }
.article-cover { border-radius: 8px; margin-bottom: 24px; }
.article-content { font-size: 16px; color: var(--text-dark); }
.article-content p { margin-bottom: 16px; }
.article-content img { margin: 16px auto; border-radius: 6px; }
.related { margin-top: 48px; border-top: 1px solid var(--border); padding-top: 24px; }
.related h3 { font-size: 18px; margin-bottom: 16px; }
.related ul { list-style: none; }
.related a {
    display: flex; justify-content: space-between; padding: 10px 0;
    color: var(--text-dark);
}
.related a:hover { color: var(--primary); }
.related time { color: #999; font-size: 13px; }

/* ---- 联系我们 ---- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-item {
    border: 1px solid var(--border); border-radius: 8px; padding: 32px 24px; text-align: center;
}
.contact-label { color: var(--primary); font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.contact-value { color: var(--text-dark); word-break: break-all; }

/* ---- 页脚 ---- */
.footer { background: var(--navy-900); color: rgba(255,255,255,.7); margin-top: 64px; }
.footer-inner {
    max-width: 1200px; margin: 0 auto; padding: 40px 20px;
    display: flex; justify-content: space-between; align-items: flex-start; gap: 40px;
}
.footer-brand { color: #fff; font-size: 22px; font-weight: 700; letter-spacing: 2px; }
.footer-contacts { list-style: none; font-size: 14px; text-align: right; }
.footer-contacts li { margin-bottom: 8px; }
.copyright {
    text-align: center; padding: 16px; font-size: 13px;
    border-top: 1px solid rgba(255,255,255,.08);
}

@media (max-width: 900px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .merchant-grid { grid-template-columns: repeat(3, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .nav-content { flex-wrap: wrap; gap: 8px 16px; padding-top: 8px; padding-bottom: 8px; }
    .logo, .logo-link { width: 100%; }
    .logo-img, .qrcode-img { height: 40px; }
    .menu-list { flex-wrap: wrap; row-gap: 2px; gap: 6px; justify-content: center; width: 100%; }
    .menu-link { padding: 6px 8px; font-size: 13px; letter-spacing: 0; }
}
