/* ============================================================
   数智总动员-科学平台 宣传网站 公共样式
   基于《平台下载.html》视觉体系：Tailwind CDN + 本文件定制组件
   ============================================================ */

:root {
    --primary: #165DFF;
    --secondary: #00B4FF;
    --accent: #0099FF;
    --tech-green: #00B578;
    --ink: #1e293b;
    --muted: #64748b;
    --light-bg: #F8FAFC;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Microsoft YaHei', sans-serif;
    background-color: var(--light-bg);
    color: var(--ink);
    overflow-x: hidden;
}

/* ---------- 网格底纹 ---------- */
.grid-bg {
    background-image:
        linear-gradient(rgba(22, 93, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 93, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ---------- 渐变文字 ---------- */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(90deg, #165DFF, #00B4FF, #0099FF, #00B578);
}

/* ---------- 浮动粒子背景 ---------- */
.bg-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.bg-particles span {
    position: absolute;
    border-radius: 9999px;
    filter: blur(64px);
    opacity: .08;
}
.bg-particles .p1 { width: 16rem; height: 16rem; background: var(--primary); top: 5rem; left: -8rem; animation: float 6s ease-in-out infinite; }
.bg-particles .p2 { width: 20rem; height: 20rem; background: var(--tech-green); bottom: 5rem; right: -10rem; animation: float 6s ease-in-out infinite 1s; }
.bg-particles .p3 { width: 18rem; height: 18rem; background: var(--secondary); top: 50%; left: 50%; transform: translate(-50%, -50%); animation: pulseSlow 3s cubic-bezier(.4, 0, .6, 1) infinite; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes pulseSlow {
    0%, 100% { opacity: .08; }
    50% { opacity: .16; }
}
.animate-float { animation: float 6s ease-in-out infinite; }

/* ============================================================
   顶部导航
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(22, 93, 255, .10);
    box-shadow: 0 2px 16px rgba(15, 42, 110, .06);
}
.site-header .inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    height: 64px;
    gap: .5rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-right: auto;
    text-decoration: none;
    flex-shrink: 0;
}
.brand .logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.brand .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.brand .name {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: .5px;
    color: var(--ink);
    white-space: nowrap;
}
.brand .name small {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 2px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: .15rem;
}
.nav-item { position: relative; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .5rem .72rem;
    border-radius: .6rem;
    font-size: 14.5px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    white-space: nowrap;
    transition: all .2s;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}
.nav-link:hover { color: var(--primary); background: rgba(22, 93, 255, .07); }
.nav-link.active {
    color: var(--primary);
    background: rgba(22, 93, 255, .10);
}
.nav-link.nav-cta {
    color: #fff;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 12px rgba(22, 93, 255, .3);
    margin-left: .35rem;
}
.nav-link.nav-cta:hover { filter: brightness(1.08); color: #fff; }

/* 下拉菜单 */
.nav-dropdown .dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 190px;
    background: #fff;
    border-radius: .8rem;
    box-shadow: 0 12px 32px rgba(15, 42, 110, .14);
    border: 1px solid rgba(22, 93, 255, .08);
    padding: .45rem;
    opacity: 0;
    visibility: hidden;
    transition: all .22s ease;
    z-index: 60;
}
.nav-dropdown:hover .dropdown-panel,
.nav-dropdown.open .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown-panel a {
    display: block;
    padding: .55rem .8rem;
    border-radius: .55rem;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all .18s;
}
.dropdown-panel a:hover { background: rgba(22, 93, 255, .08); color: var(--primary); }
.dropdown-panel a.active { background: rgba(22, 93, 255, .10); color: var(--primary); }
.dropdown-panel a i { width: 20px; color: var(--accent); }

/* 移动端 */
.nav-toggle {
    display: none;
    border: none;
    background: none;
    font-size: 22px;
    color: var(--primary);
    cursor: pointer;
    padding: .4rem;
}
@media (max-width: 1080px) {
    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        border-bottom: 1px solid rgba(22, 93, 255, .1);
        box-shadow: 0 16px 32px rgba(15, 42, 110, .12);
        padding: .6rem 1rem 1rem;
        gap: .1rem;
    }
    .main-nav.open { display: flex; }
    .nav-dropdown .dropdown-panel,
    .nav-dropdown:hover .dropdown-panel,
    .nav-dropdown.open .dropdown-panel {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        display: none;
        padding-left: 1rem;
        min-width: 0;
        left: auto;
        top: auto;
    }
    .nav-dropdown.open .dropdown-panel { display: block; }
    .nav-dropdown > .nav-link .caret { transition: transform .2s; }
    .nav-dropdown.open > .nav-link .caret { transform: rotate(180deg); }
}

/* ============================================================
   页面 Hero 条
   ============================================================ */
.page-hero {
    position: relative;
    padding: 2.25rem 1rem 2rem;
    text-align: center;
    background:
        radial-gradient(ellipse 60% 80% at 20% 20%, rgba(22, 93, 255, .12), transparent),
        radial-gradient(ellipse 50% 70% at 80% 30%, rgba(0, 181, 120, .10), transparent),
        linear-gradient(180deg, rgba(0, 180, 255, .05), transparent);
    overflow: hidden;
}
.page-hero h1 {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    font-weight: 800;
    margin-bottom: .9rem;
}
.page-hero .sub {
    max-width: 820px;
    margin: 0 auto;
    color: var(--muted);
    font-size: clamp(.95rem, 1.6vw, 1.1rem);
    line-height: 1.8;
}
.page-hero .crumbs {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: 13px;
    color: var(--accent);
    background: rgba(22, 93, 255, .08);
    border: 1px solid rgba(22, 93, 255, .15);
    padding: .3rem .9rem;
    border-radius: 999px;
    margin-bottom: 1.2rem;
}

/* 章节分隔彩条 */
.gradient-bar {
    height: 4px;
    width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent), var(--tech-green));
}

/* ============================================================
   通用布局
   ============================================================ */
.container-narrow { max-width: 1180px; margin: 0 auto; padding: 0 1rem; position: relative; z-index: 1; }

.section { padding: 3.5rem 0; }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head .tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
    background: rgba(0, 153, 255, .09);
    padding: .25rem 1rem;
    border-radius: 999px;
    margin-bottom: .8rem;
}
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.section-head p { color: var(--muted); max-width: 760px; margin: .7rem auto 0; line-height: 1.8; }

/* ============================================================
   卡片体系
   ============================================================ */
.card {
    background: rgba(255, 255, 255, .95);
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, .18);
    box-shadow: 0 4px 20px rgba(15, 42, 110, .06);
    transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(15, 42, 110, .12); }
.card-pad { padding: 1.6rem; }

/* 图文卡 */
.img-card { overflow: hidden; display: flex; flex-direction: column; }
.img-card figure {
    margin: 0;
    overflow: hidden;
    background: #0b1220;
    aspect-ratio: 16 / 9;
}
.img-card figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.img-card:hover figure img { transform: scale(1.05); }
.img-card .body { padding: 1.1rem 1.25rem 1.3rem; flex: 1; }
.img-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .45rem; }
.img-card p { font-size: .88rem; color: var(--muted); line-height: 1.75; margin: 0; }
.img-card .body .pic-tag {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(0, 153, 255, .09);
    border-radius: 999px;
    padding: .12rem .6rem;
    margin-bottom: .5rem;
}

/* 数字/图标特性卡 */
.icon-card { text-align: left; }
.icon-card .ic {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 20px;
    margin-bottom: 1rem;
}
.icon-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.icon-card p { font-size: .88rem; color: var(--muted); line-height: 1.75; margin: 0; }

/* 编号步骤卡 */
.step-num {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: .6rem;
}

/* ============================================================
   列表/徽章/表格
   ============================================================ */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
    position: relative;
    padding-left: 1.7rem;
    margin-bottom: .65rem;
    font-size: .92rem;
    line-height: 1.7;
    color: #334155;
}
.check-list li::before {
    content: "\f00c";
    font-family: FontAwesome;
    position: absolute;
    left: 0;
    top: .18em;
    color: var(--tech-green);
    font-weight: bold;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .85rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
}
.pill-blue { background: rgba(22, 93, 255, .09); color: var(--primary); }
.pill-green { background: rgba(0, 181, 120, .1); color: var(--tech-green); }
.pill-cyan { background: rgba(0, 180, 255, .1); color: var(--accent); }

.info-tip {
    border-radius: .9rem;
    padding: 1rem 1.2rem;
    font-size: .9rem;
    line-height: 1.75;
    display: flex;
    gap: .7rem;
    align-items: flex-start;
}
.info-tip i { font-size: 1.1rem; margin-top: .2rem; }
.info-tip.blue { background: rgba(22, 93, 255, .06); border: 1px solid rgba(22, 93, 255, .18); color: #1e40af; }
.info-tip.amber { background: rgba(245, 158, 11, .07); border: 1px solid rgba(245, 158, 11, .25); color: #92400e; }
.info-tip.green { background: rgba(0, 181, 120, .06); border: 1px solid rgba(0, 181, 120, .22); color: #047857; }

/* 模块概述信息条（实训模块/学时/对象/形式） */
.module-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: .9rem;
}
.module-meta .meta-item {
    background: rgba(255, 255, 255, .95);
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: .9rem;
    padding: 1rem 1.15rem;
}
.module-meta .meta-item .k {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: .3rem;
}
.module-meta .meta-item .v { font-size: .92rem; font-weight: 600; line-height: 1.65; }

/* ============================================================
   能力图谱图谱结构
   ============================================================ */
.map-layer {
    position: relative;
    border-radius: 1.2rem;
    padding: 1.6rem 1.6rem 1.4rem;
    border: 1px solid rgba(148, 163, 184, .22);
    background: rgba(255, 255, 255, .95);
    overflow: hidden;
}
.map-layer .layer-tag {
    position: absolute;
    top: 0; left: 0;
    padding: .3rem 1.1rem;
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    border-radius: 0 0 1rem 0;
}
.map-chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.map-chip {
    font-size: .84rem;
    font-weight: 600;
    padding: .42rem .95rem;
    border-radius: .65rem;
    background: #fff;
    border: 1px solid rgba(22, 93, 255, .18);
    color: #1e40af;
    box-shadow: 0 2px 8px rgba(15, 42, 110, .05);
}

/* ============================================================
   CTA / 页脚
   ============================================================ */
.cta-band {
    position: relative;
    border-radius: 1.4rem;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(120deg, rgba(13, 40, 112, .88), rgba(22, 93, 255, .78)),
        url('../images/cta-bg.jpg') center/cover no-repeat;
    padding: 3rem 2rem;
    text-align: center;
}
.cta-band h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin-bottom: .7rem; }
.cta-band p { color: rgba(255, 255, 255, .85); max-width: 680px; margin: 0 auto 1.6rem; line-height: 1.8; }
.cta-band .btns { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .8rem 1.7rem;
    border-radius: .8rem;
    font-weight: 700;
    font-size: .98rem;
    text-decoration: none;
    transition: all .25s;
}
.btn-white { background: #fff; color: var(--primary); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.btn-white:hover { transform: translateY(-2px); }
.btn-ghost { border: 1.5px solid rgba(255, 255, 255, .65); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 8px 24px rgba(22, 93, 255, .3);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.06); }

.site-footer {
    background: #0d1b3e;
    color: #94a3b8;
    margin-top: 4rem;
}
.site-footer .inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.4rem 1rem 2rem;
    text-align: center;
}
.site-footer .f-brand {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}
.site-footer .f-brand .logo {
    width: 34px; height: 34px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.site-footer .f-brand .logo img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}
.site-footer .f-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem 1.4rem;
    margin: 1rem 0 1.4rem;
}
.site-footer .f-links a {
    color: #cbd5e1;
    font-size: .85rem;
    text-decoration: none;
}
.site-footer .f-links a:hover { color: #fff; }
.site-footer .copyright {
    font-size: .82rem;
    line-height: 1.8;
    border-top: 1px solid rgba(148, 163, 184, .18);
    padding-top: 1.2rem;
    max-width: 900px;
    margin: 0 auto;
}

/* 返回顶部 */
#back-top {
    position: fixed;
    right: 1.4rem;
    bottom: 1.6rem;
    width: 44px; height: 44px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .3s;
    box-shadow: 0 8px 20px rgba(22, 93, 255, .35);
    z-index: 40;
}
#back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ============================================================
   入场动画
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .1s; }
.reveal.d2 { transition-delay: .2s; }
.reveal.d3 { transition-delay: .3s; }

/* 按钮流光 */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
    animation: shimmer 2.5s linear infinite;
}
@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 图集网格 */
.gallery-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.4rem; }
.gallery-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; }

/* 图文左右排版 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; align-items: center; }
@media (max-width: 860px) {
    .split { grid-template-columns: 1fr; gap: 1.6rem; }
}
.split figure {
    margin: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(15, 42, 110, .14);
    border: 1px solid rgba(148, 163, 184, .2);
}
.split figure img { width: 100%; display: block; }
