/* 天津智码云图 · 服务项目目录 前台样式
   说明：卡片、标题横幅等视觉沿用原静态目录页（zimatrix-catalog.html）的设计，
   横幅背景图从内联 base64 改为 /img/banner-N.jpg，规则与顺序完全一致。 */

:root {
  --navy: #0b1f3a;
  --navy-2: #13294b;
  --indigo: #2a4d8f;
  --teal: #1fb6a6;
  --teal-d: #0e8c7e;
  --cyan: #39c5e0;
  --ink: #1d2733;
  --muted: #5b6b7a;
  --line: #e6ebf2;
  --bg: #f6f8fb;
  --card: #fff;
  --shadow: 0 8px 24px rgba(15, 35, 70, .08);
  --shadow-h: 0 10px 28px rgba(15, 35, 70, .1);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.62; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 22px; }

.btn { display: inline-block; padding: 11px 22px; border-radius: 999px; font-weight: 600; transition: .25s; cursor: pointer; border: 0; font-family: inherit; font-size: 15px; }
.btn-primary { background: linear-gradient(120deg, var(--teal), var(--cyan)); color: #fff; box-shadow: 0 8px 22px rgba(31, 182, 166, .32); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(31, 182, 166, .42); }
.section { padding: 64px 0; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 2px; color: var(--teal-d); text-transform: uppercase; margin-bottom: 10px; }

/* Hero */
.hero { background: radial-gradient(1000px 520px at 78% -10%, rgba(57, 197, 224, .22), transparent), linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; padding: 74px 0 64px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 850; line-height: 1.2; margin-bottom: 14px; }
.hero h1 .accent { background: linear-gradient(120deg, var(--teal), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 筛选 */
.filterbar { position: sticky; top: 0; z-index: 40; background: rgba(246, 248, 251, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 14px 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line); background: #fff; color: var(--muted); padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: .2s; font-family: inherit; }
.filters button:hover { border-color: var(--teal); color: var(--teal-d); }
.filters button.active { background: linear-gradient(120deg, var(--teal), var(--cyan)); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(31, 182, 166, .3); }

/* 分类标题 */
.cat-title { font-size: 22px; font-weight: 800; margin: 42px 0 18px; display: flex; align-items: center; gap: 10px; color: var(--navy); }
.cat-title .bar { width: 5px; height: 22px; border-radius: 3px; background: linear-gradient(var(--teal), var(--cyan)); }
.cat-title small { font-size: 13px; font-weight: 500; color: var(--muted); }

/* 卡片网格 */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }

/* ===== CARD with IMAGE-STYLE TITLE BANNER ===== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .25s; box-shadow: var(--shadow); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); border-color: #cfd9e8; }

/* ===== IMAGE-STYLE TITLE BANNER ===== */
.title-banner { position: relative; min-height: 120px; padding: 20px 24px; color: #fff; overflow: hidden; display: flex; align-items: center; gap: 16px; background-color: #e9f1f8; background-size: cover; background-position: center; background-repeat: no-repeat; }
.title-banner::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(8, 18, 38, .10), rgba(8, 18, 38, .28)); }
.title-banner .b-icon { width: 54px; height: 54px; border-radius: 16px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .35); display: grid; place-items: center; flex-shrink: 0; z-index: 3; box-shadow: 0 8px 22px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .45); }
.title-banner .b-icon svg { width: 30px; height: 30px; stroke: #fff; stroke-width: 2; fill: none; }
.title-banner .b-text { z-index: 3; min-width: 0; }
.title-banner .b-cat { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .28); padding: 3px 11px; border-radius: 999px; margin-bottom: 9px; text-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.title-banner h3 { font-size: 20px; font-weight: 800; line-height: 1.3; letter-spacing: .3px; text-shadow: 0 2px 10px rgba(0, 0, 0, .30); }
.title-banner h3 .tag { font-size: 11px; font-weight: 700; color: #fff; background: rgba(255, 255, 255, .30); border: 1px solid rgba(255, 255, 255, .35); padding: 2px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle; white-space: nowrap; }

/* 8 张标题横幅背景图（与原静态页一一对应），渐变层作为兜底 */
.grid .card:nth-child(8n+1) .title-banner { background-image: url(/img/banner-1.jpg), linear-gradient(135deg, #0e8c7e, #1fb6a6); }
.grid .card:nth-child(8n+2) .title-banner { background-image: url(/img/banner-2.jpg), linear-gradient(135deg, #2747a8, #3a2d8f); }
.grid .card:nth-child(8n+3) .title-banner { background-image: url(/img/banner-3.jpg), linear-gradient(135deg, #7c3aed, #db2777); }
.grid .card:nth-child(8n+4) .title-banner { background-image: url(/img/banner-4.jpg), linear-gradient(135deg, #15803d, #0d9488); }
.grid .card:nth-child(8n+5) .title-banner { background-image: url(/img/banner-5.jpg), linear-gradient(135deg, #f59e0b, #ea580c); }
.grid .card:nth-child(8n+6) .title-banner { background-image: url(/img/banner-6.jpg), linear-gradient(135deg, #2563eb, #0ea5e9); }
.grid .card:nth-child(8n+7) .title-banner { background-image: url(/img/banner-7.jpg), linear-gradient(135deg, #e11d48, #be123c); }
.grid .card:nth-child(8n+8) .title-banner { background-image: url(/img/banner-8.jpg), linear-gradient(135deg, #334155, #0f172a); }

.card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card .lead { font-size: 14px; color: var(--indigo); font-weight: 600; margin-bottom: 10px; }
.card .desc { font-size: 13.5px; color: #41505f; margin-bottom: 12px; }
.card ul { list-style: none; margin: 0 0 14px; display: flex; flex-direction: column; gap: 5px; }
.card ul li { font-size: 13px; color: #41505f; padding-left: 16px; position: relative; }
.card ul li::before { content: "✓"; color: var(--teal-d); font-weight: 800; position: absolute; left: 0; }
.card .who { font-size: 12.5px; color: var(--muted); background: #f3f7fc; border-radius: 9px; padding: 8px 12px; margin-bottom: 14px; }
.card .who b { color: var(--indigo); }

/* DEMO BLOCK */
.demo { border-radius: 13px; overflow: hidden; margin-top: auto; }
.demo.live { background: linear-gradient(135deg, #0e8c7e, #1fb6a6); color: #fff; }
.demo.media { background: linear-gradient(135deg, #13294b, #22385f); color: #cfe0f3; }
.demo.request { background: #f3f7fc; border: 1px dashed #cdd9e8; color: var(--muted); }
.demo-inner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.demo .play { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; color: #fff; }
.demo.request .play { background: #dfe8f3; color: var(--teal-d); }
.demo .dtxt { flex: 1; }
.demo .dtxt .t { font-size: 14px; font-weight: 700; line-height: 1.3; }
.demo .dtxt .s { font-size: 12px; opacity: .85; margin-top: 2px; }
.demo .go { padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #fff; color: var(--teal-d); white-space: nowrap; transition: .2s; cursor: pointer; border: 0; }
.demo.live .go:hover { transform: scale(1.05); }
.demo.request .go { background: var(--teal); color: #fff; }
.demo.disabled { background: #f3f7fc; border: 1px dashed #d5dfeb; color: var(--muted); }
.demo.disabled .go { background: #d7e0ea; color: #8b9aab; cursor: default; }
.demo.disabled .play { background: #e3eaf3; color: #9aa9ba; }

.note { background: #fff8e9; border: 1px solid #ffe2a8; color: #8a5a00; border-radius: 12px; padding: 14px 18px; font-size: 13.5px; margin: 8px 0 0; line-height: 1.6; }
.note b { color: #7a4e00; }

footer { background: #07182e; color: #8ba0bd; text-align: center; padding: 30px 0; font-size: 13px; margin-top: 40px; }
footer b { color: #cdd9ea; }

/* 联系区（沿用原页面的深色区块） */
#contact { background: radial-gradient(900px 500px at 80% 0%, rgba(57, 197, 224, .2), transparent), linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; text-align: center; }
#contact .col { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; font-size: 14px; color: #cdd9ea; }
#contact .col b { color: #fff; display: block; }

/* 状态 */
.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); font-size: 15px; }
.loading { padding: 80px 20px; text-align: center; color: var(--muted); }
