/* ============================================================
   前台样式 —— 大气科技感工程主题
   ============================================================ */
:root {
    --bg: #060d1c;
    --bg-2: #0b1730;
    --panel: rgba(255, 255, 255, 0.035);
    --panel-solid: #0e1d3a;
    --line: rgba(86, 156, 255, 0.16);
    --line-strong: rgba(86, 156, 255, 0.4);
    --primary: #2f9bff;
    --cyan: #22d3ee;
    --gold: #ffb545;
    --text: #e8f0fe;
    --text-2: #93a8cc;
    --text-3: #5f759c;
    --radius: 14px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.muted { color: var(--text-3); }
.ml { margin-left: 10px; }

.container { width: min(1200px, 92%); margin: 0 auto; }

/* ---------- 背景装饰 ---------- */
.site-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(86, 156, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(86, 156, 255, 0.05) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.5; }
.glow-1 { width: 560px; height: 560px; background: #1457b8; top: -180px; left: -120px; }
.glow-2 { width: 480px; height: 480px; background: #0e7490; top: 8%; right: -160px; opacity: 0.35; }

/* ---------- 顶栏 ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(6, 13, 28, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 42px; height: 42px; display: grid; place-items: center;
    color: var(--cyan);
    background: linear-gradient(145deg, rgba(47, 155, 255, 0.22), rgba(34, 211, 238, 0.08));
    border: 1px solid var(--line-strong);
    border-radius: 11px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 17px; letter-spacing: 1px; }
.brand-text small { font-size: 11px; color: var(--text-2); }

.mainnav { display: flex; gap: 6px; margin-left: auto; }
.mainnav a {
    padding: 9px 18px; border-radius: 9px;
    color: var(--text-2); font-size: 15px;
    transition: all 0.2s;
}
.mainnav a:hover { color: var(--text); background: var(--panel); }
.mainnav a.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(47, 155, 255, 0.28), rgba(34, 211, 238, 0.14));
    border: 1px solid var(--line-strong);
}

/* ---------- Hero ---------- */
.hero { padding: 84px 0 56px; text-align: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 18px; border-radius: 99px; font-size: 13px; color: var(--text-2);
    background: var(--panel); border: 1px solid var(--line);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.hero-title { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.28; margin: 24px 0 18px; font-weight: 800; letter-spacing: 1px; }
.gradient-text {
    background: linear-gradient(92deg, var(--primary), var(--cyan));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--text-2); font-size: 16px; max-width: 680px; margin: 0 auto 36px; }

.search-bar {
    display: flex; align-items: center; gap: 10px;
    max-width: 680px; margin: 0 auto;
    padding: 8px 8px 8px 18px;
    background: var(--panel); border: 1px solid var(--line-strong);
    border-radius: 99px; color: var(--text-3);
    box-shadow: 0 0 0 4px rgba(47, 155, 255, 0.06);
}
.search-bar input { flex: 1; background: transparent; border: 0; outline: none; color: var(--text); font-size: 15px; }
.search-bar input::placeholder { color: var(--text-3); }
.search-bar button {
    padding: 12px 30px; border: 0; border-radius: 99px; cursor: pointer;
    font-size: 15px; font-weight: 600; color: #fff;
    background: linear-gradient(92deg, var(--primary), #1d7fe0);
    box-shadow: 0 8px 24px rgba(47, 155, 255, 0.35);
    transition: transform 0.15s;
}
.search-bar button:hover { transform: translateY(-1px); }

.stats-row { display: flex; justify-content: center; align-items: center; gap: 34px; margin-top: 46px; }
.stat-item { display: flex; flex-direction: column; }
.stat-item strong { font-size: 32px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.stat-item span { color: var(--text-2); font-size: 13px; }
.stat-divider { width: 1px; height: 38px; background: var(--line); }

/* ---------- 通用区块 ---------- */
.section { padding: 30px 0 70px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.section-head h2, .info-block h2 { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; }
.head-line { width: 5px; height: 22px; border-radius: 3px; background: linear-gradient(var(--cyan), var(--primary)); box-shadow: 0 0 12px rgba(34, 211, 238, 0.6); }
.section-head p { color: var(--text-2); font-size: 14px; }
.section-head strong { color: var(--cyan); font-size: 17px; }

/* ---------- 企业卡片 ---------- */
.company-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.company-card {
    position: relative; display: flex; flex-direction: column;
    padding: 26px 24px 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: all 0.25s;
    overflow: hidden;
}
.company-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(140deg, rgba(47, 155, 255, 0.12), transparent 45%);
    opacity: 0; transition: opacity 0.25s;
}
.company-card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.company-card:hover::before { opacity: 1; }
.card-corner { position: absolute; top: 0; right: 0; width: 64px; height: 64px;
    background: linear-gradient(225deg, rgba(34, 211, 238, 0.25), transparent 70%); }
.recommend-flag {
    position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: var(--gold);
}
.card-logo {
    width: 64px; height: 64px; border-radius: 12px; overflow: hidden;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
    display: grid; place-items: center; margin-bottom: 16px;
}
.card-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.logo-placeholder {
    width: 100%; height: 100%; display: grid; place-items: center;
    font-size: 26px; font-weight: 700; color: var(--cyan);
    background: linear-gradient(145deg, rgba(47, 155, 255, 0.2), rgba(34, 211, 238, 0.06));
}
.logo-placeholder.lg { font-size: 40px; }
.card-name { font-size: 17px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; padding-right: 52px; }
.card-region { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; margin-bottom: 12px; }
.card-intro { color: var(--text-2); font-size: 13.5px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 12px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; font-size: 12px; }
.tag-level { color: var(--cyan); background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.25); }
.tag-prepay { color: var(--gold); background: rgba(255, 181, 69, 0.1); border: 1px solid rgba(255, 181, 69, 0.3); }
.tag-prepay.sm { font-size: 11px; padding: 2px 7px; }

/* 主材辅材企业 */
.tag-material {
    color: #f59e0b; background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.32);
}
/* 保证金标签（绿色系，区别于金色赔付/橙色材料） */
.tag-deposit {
    color: #34d399; background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.32);
}
.tag-deposit.sm { font-size: 11px; padding: 2px 7px; }
.material-flag {
    position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: #f59e0b;
}
.material-card { border-color: rgba(245, 158, 11, 0.22); }
.material-card:hover { border-color: rgba(245, 158, 11, 0.55); }
.filter-field.grow { flex: 2; min-width: 220px; }
.card-price { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.view-detail { color: var(--primary); font-weight: 600; }

/* ---------- 详情页 ---------- */
.detail-hero { padding: 34px 0 40px; background: linear-gradient(180deg, rgba(47, 155, 255, 0.08), transparent); border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; gap: 9px; font-size: 13px; color: var(--text-3); margin-bottom: 28px; }
.breadcrumb a:hover { color: var(--cyan); }
.detail-head { display: flex; gap: 28px; align-items: flex-start; }
.detail-logo {
    flex-shrink: 0; width: 118px; height: 118px; border-radius: 18px; overflow: hidden;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-strong);
    display: grid; place-items: center;
}
.detail-logo img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.detail-title h1 { font-size: clamp(22px, 3vw, 30px); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.badge-recommend { color: #fff; background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35); }
.badge-prepay { color: #1c1300; background: linear-gradient(135deg, #ffd27a, var(--gold)); box-shadow: 0 6px 18px rgba(255, 181, 69, 0.35); }
.badge-material { color: #f59e0b; background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.5); }
.badge-deposit {
    color: #ecfdf5; background: linear-gradient(135deg, #10b981, #059669);
    border: 1px solid rgba(110, 231, 183, 0.5);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}
.detail-region { display: flex; align-items: center; gap: 7px; color: var(--text-2); margin-bottom: 22px; }
.contact-row { display: flex; gap: 40px; flex-wrap: wrap; }
.contact-item { display: flex; flex-direction: column; gap: 4px; }
.contact-label { font-size: 12px; color: var(--text-3); }
.contact-item strong { font-size: 17px; }
.contact-item.phone strong { display: flex; align-items: center; gap: 8px; color: var(--cyan); font-size: 22px; letter-spacing: 0.5px; }

.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.info-block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 22px; }
.info-block h2 { font-size: 19px; margin-bottom: 16px; }
.block-content { color: var(--text-2); font-size: 14.5px; }
.block-content p { margin-bottom: 8px; }

.case-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.case-item { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; position: relative; }
.case-item img { width: 100%; height: 160px; object-fit: cover; transition: transform 0.3s; }
.case-item:hover img { transform: scale(1.06); }
.case-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 9px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.78)); }

.side-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.side-card h3 { font-size: 16px; margin-bottom: 16px; }
.price-box { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.price-box:last-of-type { border-bottom: 0; }
.price-label { color: var(--text-2); font-size: 13.5px; }
.price-box strong { color: var(--cyan); font-size: 14px; }
.price-note { font-size: 12px; color: var(--text-3); margin-top: 10px; }
.side-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 13.5px; }
.side-list dt { color: var(--text-3); }
.side-list dd { color: var(--text); text-align: right; }
.prepay-card { text-align: center; color: var(--gold); border-color: rgba(255, 181, 69, 0.35); background: linear-gradient(160deg, rgba(255, 181, 69, 0.1), var(--panel)); }
.prepay-card h3 { color: var(--gold); margin: 10px 0 8px; }
.prepay-card p { font-size: 12.5px; color: var(--text-2); }

/* 保证金侧栏卡片（增强版，与先行赔付同等突出） */
.deposit-card {
    position: relative; overflow: hidden; text-align: center;
    color: #34d399; padding: 26px 22px;
    border: 1px solid rgba(52, 211, 153, 0.4);
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.18), rgba(6, 95, 70, 0.08) 55%, var(--panel));
    box-shadow: 0 14px 34px rgba(16, 185, 129, 0.18), inset 0 1px 0 rgba(167, 243, 208, 0.12);
}
.deposit-card::before {
    content: ''; position: absolute; top: -46px; right: -46px;
    width: 120px; height: 120px; border-radius: 50%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.35), transparent 70%);
    pointer-events: none;
}
.deposit-icon {
    width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.45);
}
.deposit-icon svg { width: 28px; height: 28px; color: #ecfdf5; }
.deposit-card h3 { color: #6ee7b7; font-size: 15px; margin-bottom: 8px; }
.deposit-amount {
    font-size: 28px; font-weight: 800; line-height: 1.1;
    margin: 2px 0 10px; letter-spacing: 0.5px;
    background: linear-gradient(135deg, #d1fae5, #34d399);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.deposit-amount .yuan { font-size: 16px; font-weight: 700; margin-right: 2px; }
.deposit-note { font-size: 12.5px; color: var(--text-2); margin-bottom: 12px; }
.deposit-seal {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; color: #a7f3d0;
    padding: 5px 12px; border-radius: 99px;
    background: rgba(16, 185, 129, 0.14); border: 1px solid rgba(52, 211, 153, 0.4);
}
.deposit-seal svg { width: 13px; height: 13px; }

/* 灯箱 */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: rgba(2, 6, 16, 0.9); padding: 5vw; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 90%; max-height: 88vh; border-radius: 10px; box-shadow: var(--shadow); }
.lightbox-close { position: absolute; top: 24px; right: 32px; background: none; border: 0; color: #fff; font-size: 42px; cursor: pointer; line-height: 1; }

/* ---------- 内页 Hero ---------- */
.page-hero { padding: 60px 0 40px; text-align: center; }
.page-title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
.page-sub { color: var(--text-2); margin-top: 12px; }

/* ---------- 筛选面板 ---------- */
.filter-panel { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; }
.filter-field { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 150px; }
.filter-field label { font-size: 12.5px; color: var(--text-3); }
.filter-field input, .filter-field select {
    padding: 10px 13px; border-radius: 9px; font-size: 14px; color: var(--text);
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); outline: none;
}
.filter-field input:focus, .filter-field select:focus { border-color: var(--primary); }
.filter-field select option { background: var(--bg-2); color: var(--text); }
.filter-actions { display: flex; gap: 10px; }
.btn-primary { padding: 10px 26px; border-radius: 9px; border: 0; cursor: pointer; font-size: 14px; font-weight: 600; color: #fff; background: linear-gradient(92deg, var(--primary), #1d7fe0); display: inline-block; }
.btn-ghost { padding: 10px 22px; border-radius: 9px; font-size: 14px; color: var(--text-2); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--line-strong); }
.result-count { color: var(--text-2); font-size: 14px; margin-bottom: 18px; }
.result-count strong { color: var(--cyan); }

/* ---------- 数据表格 ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 820px; }
.data-table th { background: rgba(47, 155, 255, 0.08); color: var(--text-2); font-weight: 600; text-align: left; padding: 15px 18px; white-space: nowrap; }
.data-table td { padding: 15px 18px; border-top: 1px solid var(--line); color: var(--text); vertical-align: middle; }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: rgba(47, 155, 255, 0.05); }
.table-link { color: var(--cyan); font-weight: 600; }
.table-link:hover { text-decoration: underline; }
.cell-ellipsis { max-width: 220px; color: var(--text-2); }

/* ---------- 培训卡片 ---------- */
.training-list { display: flex; flex-direction: column; gap: 16px; }
.training-card { display: flex; gap: 22px; align-items: center; padding: 22px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: all 0.2s; }
.training-card:hover { border-color: var(--line-strong); transform: translateX(4px); }
.training-date { flex-shrink: 0; width: 72px; height: 72px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(160deg, rgba(47, 155, 255, 0.25), rgba(34, 211, 238, 0.08)); border: 1px solid var(--line-strong); }
.training-date strong { font-size: 26px; line-height: 1; }
.training-date span { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.training-info { flex: 1; min-width: 0; }
.training-info h3 { font-size: 17px; margin-bottom: 6px; }
.training-company { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2); margin-bottom: 10px; flex-wrap: wrap; }
.trainee-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.trainee-tag { padding: 3px 11px; font-size: 12.5px; border-radius: 99px; color: var(--cyan); background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.22); }
.training-count { flex-shrink: 0; text-align: center; padding-left: 22px; border-left: 1px solid var(--line); }
.training-count strong { font-size: 26px; color: var(--cyan); display: block; }
.training-count span { font-size: 12px; color: var(--text-2); }

/* ---------- 空状态 / 404 ---------- */
.empty-state { text-align: center; padding: 70px 20px; color: var(--text-3); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state svg { margin: 0 auto 16px; color: var(--text-3); }
.empty-state.notfound h1 { font-size: 72px; background: linear-gradient(92deg, var(--primary), var(--cyan)); -webkit-background-clip: text; color: transparent; margin-bottom: 10px; }
.empty-state .btn-primary { margin-top: 18px; }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 38px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; padding: 9px 13px; text-align: center; border-radius: 9px; font-size: 14px; border: 1px solid var(--line); color: var(--text-2); }
.pagination a:hover { color: #fff; border-color: var(--primary); background: rgba(47, 155, 255, 0.12); }
.pagination .current { color: #fff; background: linear-gradient(92deg, var(--primary), #1d7fe0); border-color: transparent; font-weight: 600; }
.pagination .disabled { opacity: 0.4; }
.pagination .ellipsis { border: 0; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0; background: rgba(6, 13, 28, 0.7); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
    .company-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-layout { grid-template-columns: 1fr; }
    .case-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .topbar-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 10px; }
    .mainnav { order: 3; width: 100%; margin-left: 0; justify-content: space-around; }
    .company-grid { grid-template-columns: 1fr; }
    .hero { padding: 50px 0 36px; }
    .stats-row { gap: 20px; }
    .detail-head { flex-direction: column; }
    .detail-logo { width: 92px; height: 92px; }
    .contact-item.phone strong { font-size: 19px; }
    .case-gallery { grid-template-columns: 1fr; }
    .training-card { flex-wrap: wrap; }
    .training-count { border-left: 0; padding-left: 0; width: 100%; display: flex; align-items: baseline; gap: 8px; }
    .search-bar { flex-wrap: wrap; border-radius: 18px; padding: 12px; }
    .search-bar button { width: 100%; }
}
