/* =========================================================
   公开站点通用样式（所有模板共享区块组件，模板通过变量改皮肤）
   ========================================================= */

:root {
    --tp-bg: #ffffff;
    --tp-surface: #ffffff;
    --tp-ink: #101828;
    --tp-muted: #5b6478;
    --tp-brand: #2563eb;
    --tp-brand-ink: #ffffff;
    --tp-line: #e4e8f0;
    --tp-radius: 14px;
    --tp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --tp-heading-font: var(--tp-font);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.tp-body {
    margin: 0;
    background: var(--tp-bg);
    color: var(--tp-ink);
    font-family: var(--tp-font);
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

.tp-wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.tp-center { text-align: center; }

/* ---------- 头部 ---------- */

.tp-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--tp-line);
}

.tp-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 68px;
}

.tp-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--tp-ink);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -.01em;
    min-width: 0;
}

.tp-logo img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 9px;
}

.tp-logo .mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--tp-brand);
    color: var(--tp-brand-ink);
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 700;
    flex: 0 0 34px;
}

.tp-logo span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 14.5px;
}

.tp-nav a {
    color: var(--tp-muted);
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}

.tp-nav a:hover { color: var(--tp-ink); }

.tp-nav a.active {
    color: var(--tp-ink);
    border-bottom-color: var(--tp-brand);
    font-weight: 600;
}

/* ---------- 区块：首屏 ---------- */

/* v1.4.3：首屏/CTA 不再写死蓝渐变（浅色模板套上去会突兀一块蓝），
   改成「模板墨色打底 + 模板品牌色光晕」，浅色模板也能融进去 */
.tp-hero {
    position: relative;
    background-color: var(--tp-ink);
    background-image:
        linear-gradient(rgba(0, 0, 0, .30), rgba(0, 0, 0, .30)),
        radial-gradient(1100px 460px at 84% -14%, rgba(255, 255, 255, .16), transparent 62%),
        linear-gradient(135deg, var(--tp-brand) 0%, transparent 62%);
    background-size: cover;
    background-position: center;
    color: #fff;
    min-height: 520px;
    display: flex;
    align-items: center;
}

.tp-hero-inner {
    padding-top: 96px;
    padding-bottom: 96px;
    max-width: 860px;
}

.tp-hero h1 {
    font-family: var(--tp-heading-font);
    font-size: clamp(30px, 4.4vw, 48px);
    line-height: 1.2;
    letter-spacing: -.03em;
    margin: 0 0 18px;
    color: #fff;
}

.tp-hero-sub {
    font-size: 16.5px;
    color: rgba(255, 255, 255, .78);
    margin: 0 0 28px;
    max-width: 640px;
    line-height: 1.8;
}

.tp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 24px;
    border-radius: calc(var(--tp-radius) / 2 + 14px);
    background: var(--tp-brand);
    color: var(--tp-brand-ink) !important;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s, opacity .15s;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
}

.tp-btn:hover { transform: translateY(-2px); text-decoration: none; }

.tp-btn-light {
    background: #fff;
    color: var(--tp-ink) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

/* ---------- 区块：图文 ---------- */

.tp-section { padding: 64px 0; }

.tp-prose h2 {
    font-family: var(--tp-heading-font);
    font-size: 26px;
    letter-spacing: -.02em;
    margin: 0 0 18px;
    color: var(--tp-ink);
}

.tp-prose p {
    color: var(--tp-muted);
    font-size: 15.5px;
    margin: 0 0 14px;
    max-width: 760px;
}

.tp-prose p:last-child { margin-bottom: 0; }

/* ---------- 区块：特色 ---------- */

.tp-section h2.tp-center {
    font-family: var(--tp-heading-font);
    font-size: 28px;
    letter-spacing: -.02em;
    margin: 0 0 34px;
}

.tp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.tp-card {
    background: var(--tp-surface);
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    padding: 24px;
    transition: transform .18s, box-shadow .18s;
}

.tp-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(16, 24, 40, .08); }

.tp-card h3 {
    font-family: var(--tp-heading-font);
    font-size: 17px;
    margin: 0 0 8px;
    color: var(--tp-ink);
}

.tp-card p { color: var(--tp-muted); font-size: 14.5px; margin: 0; line-height: 1.8; }

/* ---------- 区块：图片墙 ---------- */

.tp-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.tp-gallery figure {
    margin: 0;
    border-radius: var(--tp-radius);
    overflow: hidden;
    background: #eef2f9;
    aspect-ratio: 4 / 3;
}

.tp-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.tp-gallery figure:hover img { transform: scale(1.04); }

/* ---------- 区块：单图 ---------- */

.tp-figure { margin: 0; }
.tp-figure img { width: 100%; border-radius: var(--tp-radius); }
.tp-figure figcaption { text-align: center; color: var(--tp-muted); font-size: 13px; margin-top: 10px; }

/* ---------- 区块：行动号召 ---------- */

.tp-cta {
    background-color: var(--tp-ink);
    background-image:
        linear-gradient(rgba(0, 0, 0, .26), rgba(0, 0, 0, .26)),
        radial-gradient(700px 300px at 88% -20%, rgba(255, 255, 255, .18), transparent 62%),
        linear-gradient(120deg, var(--tp-brand) 0%, transparent 70%);
    color: #fff;
    margin: 56px 0;
}

.tp-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding-top: 54px;
    padding-bottom: 54px;
    flex-wrap: wrap;
}

.tp-cta h2 {
    font-family: var(--tp-heading-font);
    color: #fff;
    font-size: 26px;
    margin: 0 0 8px;
    letter-spacing: -.02em;
}

.tp-cta p { color: rgba(255, 255, 255, .75); margin: 0; font-size: 15px; }

/* ---------- 区块：联系方式 ---------- */

.tp-contact {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 28px;
    max-width: 720px;
}

.tp-contact li {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid var(--tp-line);
}

.tp-contact span { color: var(--tp-muted); font-size: 13px; min-width: 54px; }
.tp-contact a { color: var(--tp-ink); text-decoration: underline; text-underline-offset: 3px; }
.tp-contact a:hover { color: var(--tp-accent, #2563eb); }
.tp-contact-qr { margin-top: 22px; }
.tp-contact-qr img { width: 148px; height: 148px; object-fit: contain; background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--tp-line); }
.tp-contact strong { font-size: 15px; font-weight: 600; word-break: break-all; }

.tp-html { color: var(--tp-ink); }

/* ---------- 页脚 ---------- */

.tp-footer {
    background: var(--tp-ink);
    color: #94a3b8;
    padding: 46px 0 34px;
    margin-top: 0;
}

.tp-footer .inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
}

.tp-footer .brandline { color: #e2e8f0; font-size: 14px; font-weight: 600; }
.tp-footer a { color: #cbd5e1; text-decoration: none; }
.tp-footer a:hover { color: #fff; }

.tp-preview-flag {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 90;
    background: #111827;
    color: #fff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    font-family: var(--tp-font);
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
    .tp-grid, .tp-gallery, .tp-contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tp-hero { min-height: 420px; }
    .tp-hero-inner { padding-top: 72px; padding-bottom: 72px; }
    .tp-section { padding: 48px 0; }
}

@media (max-width: 620px) {
    .tp-grid, .tp-gallery, .tp-contact { grid-template-columns: 1fr; }
    .tp-header-inner { height: 60px; }
    .tp-nav { gap: 16px; font-size: 13px; flex-wrap: wrap; justify-content: flex-end; }
    .tp-hero h1 { font-size: 30px; }
    .tp-cta-inner { flex-direction: column; align-items: flex-start; }
    .tp-footer .inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- H5 移动端优化（v1.3.0） ---------- */

@media (max-width: 900px) {
    .tp-wrap { padding: 0 18px; }
    .tp-header-inner { gap: 12px; }
    .tp-hero h1 { font-size: 34px; line-height: 1.2; }
    .tp-hero-sub { font-size: 14.5px; }
    .tp-btn { padding: 12px 22px; }
    .tp-section { padding: 40px 0; }
    .tp-card { padding: 20px; }
}

@media (max-width: 620px) {
    /* 顶部导航：品牌一行、菜单横向滑动 */
    .tp-wrap { padding: 0 14px; }
    .tp-header-inner {
        height: auto;
        min-height: 58px;
        padding: 10px 0;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
    }
    .tp-logo { font-size: 16px; }
    .tp-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
        font-size: 13px;
    }
    .tp-nav::-webkit-scrollbar { display: none; }
    .tp-nav a { flex: 0 0 auto; padding: 6px 10px; border-radius: 8px; background: rgba(127, 127, 127, .08); white-space: nowrap; }

    /* 首屏：更紧凑，按钮整行可点 */
    .tp-hero { min-height: auto; padding: 0; }
    .tp-hero-inner { padding-top: 44px; padding-bottom: 44px; }
    .tp-hero h1 { font-size: 26px; }
    .tp-hero-sub { font-size: 13.5px; margin-top: 12px; }
    .tp-btn { display: block; width: 100%; text-align: center; padding: 13px 18px; }

    .tp-section { padding: 32px 0; }
    .tp-section h2 { font-size: 21px; }
    .tp-card { padding: 16px; }
    .tp-figure img { border-radius: 10px; }
    .tp-cta-inner { gap: 14px; padding: 24px 0; }
    .tp-contact { gap: 6px; }
    .tp-footer { padding: 26px 0; font-size: 12.5px; }
    .tp-footer .inner { gap: 10px; }
    .tp-html { word-break: break-word; }
    .tp-preview-flag { right: 10px; bottom: 10px; font-size: 11px; padding: 5px 10px; }
}

/* v1.8.53：模板没有导航条时，后台自定义导航会用这条通用导航 */
.sbx-nav{display:flex;flex-wrap:wrap;gap:8px 22px;justify-content:center;align-items:center;
  padding:14px 20px;background:#fff;border-bottom:1px solid rgba(0,0,0,.08);
  font-size:14px;line-height:1.6;position:relative;z-index:20}
.sbx-nav a{color:#333;text-decoration:none;padding:6px 10px;border-radius:999px;transition:.2s}
.sbx-nav a:hover{background:rgba(0,0,0,.05);color:#000}
@media(max-width:560px){.sbx-nav{gap:6px 14px;padding:10px 12px;font-size:13px}}

/* v1.8.54：模板顶部导航里「多出来的页面链接」统一成一行文字链接，
   不再变成带圆点的裸 <li> 散在整条导航上 */
.nav-extra{display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px;
  list-style:none;margin:0;padding:0;font-size:14px;line-height:1.6}
.nav-extra li{list-style:none;margin:0;padding:0}
.nav-extra a{color:inherit;text-decoration:none;opacity:.85;transition:opacity .2s}
.nav-extra a:hover{opacity:1;text-decoration:underline}
@media(max-width:700px){.nav-extra{display:none}}
