/* ==========================================================================
   Neuvition 组件样式
   按钮 / 导航 / 卡片 / 参数表 / FAQ / CTA 横幅 / 表单 / 页脚
   对应 Gutenberg：core/button、core/group + 自定义类名落地
   ========================================================================== */

/* ---------- 按钮 ---------- */
.nv-btn,
.wp-block-button__link.nv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--nv-radius-sm);
    font-family: var(--nv-font-heading);
    font-weight: 600;
    font-size: var(--nv-text-base);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--nv-fast) var(--nv-ease);
    border: 2px solid transparent;
}

.nv-btn--primary {
    background: var(--nv-orange-500);
    color: #fff;
}
.nv-btn--primary:hover {
    background: var(--nv-orange-600);
    transform: translateY(-2px);
    box-shadow: var(--nv-shadow-md);
    color: #fff;
}

.nv-btn--secondary {
    background: transparent;
    border-color: var(--nv-cyan-500);
    color: var(--nv-cyan-500);
}
.nv-btn--secondary:hover {
    background: var(--nv-cyan-500);
    color: var(--nv-navy-900);
    transform: translateY(-2px);
}

.nv-btn--ghost {
    background: transparent;
    color: var(--nv-text-secondary);
    padding: 14px 16px;
}
.nv-btn--ghost:hover { color: var(--nv-cyan-600); }

/* ---------- 导航（深色透明 → 滚动后玻璃态，main.js 加 .is-scrolled） ---------- */
.nv-nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: var(--nv-header-h);
    display: flex;
    align-items: center;
    background: transparent;
    transition: background var(--nv-normal) var(--nv-ease), box-shadow var(--nv-normal) var(--nv-ease);
}
.nv-nav.is-scrolled {
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--nv-shadow-md);
}
.nv-nav__inner {
    width: min(var(--nv-container), 92%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nv-nav__logo {
    font-family: var(--nv-font-heading);
    font-weight: 700;
    font-size: 1.35rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.nv-nav__logo-img {
    height: 44px;
    width: auto;
    display: block;
}
.nv-nav__logo-img--footer {
    height: 36px;
}
/* 登录状态下 WP 管理员工具栏占位，避免导航被遮挡 */
body.admin-bar .nv-nav { top: 32px; }
@media (max-width: 782px) {
    body.admin-bar .nv-nav { top: 46px; }
}
.nv-nav__menu {
    display: flex;
    gap: var(--nv-space-3);
    list-style: none;
    margin: 0;
    padding: 0;
}
.nv-nav__menu a {
    color: var(--nv-text-on-dark);
    text-decoration: none;
    font-size: var(--nv-text-sm);
    font-weight: 500;
    padding: 8px 4px;
    transition: color var(--nv-fast) var(--nv-ease);
}
.nv-nav__menu a:hover,
.nv-nav__menu .current-menu-item > a { color: var(--nv-cyan-500); }

/* 语言切换 */
.nv-lang-switch {
    display: flex;
    gap: 6px;
    font-size: var(--nv-text-xs);
}
.nv-lang-switch a {
    color: var(--nv-text-secondary);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: var(--nv-radius-sm);
}
.nv-lang-switch .active,
.nv-lang-switch a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* 移动端汉堡（<768px 显示，main.js 控制） */
.nv-nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
}
.nv-nav__toggle span {
    width: 22px;
    height: 2px;
    background: #fff;
    transition: all var(--nv-fast) var(--nv-ease);
}
@media (max-width: 767px) {
    .nv-nav__toggle { display: flex; }
    .nv-nav__menu {
        position: fixed;
        inset: var(--nv-header-h) 0 auto 0;
        flex-direction: column;
        background: var(--nv-navy-900);
        padding: var(--nv-space-3);
        gap: var(--nv-space-2);
        transform: translateY(-120%);
        transition: transform var(--nv-normal) var(--nv-ease);
    }
    .nv-nav__menu.is-open { transform: translateY(0); }
}

/* ---------- 卡片族 ---------- */
.nv-card {
    background: var(--nv-white);
    border: 1px solid var(--nv-border);
    border-radius: var(--nv-radius-lg);
    padding: var(--nv-space-4);
    transition: all var(--nv-normal) var(--nv-ease);
    height: 100%;
}
.nv-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--nv-shadow-lg);
    border-color: var(--nv-cyan-500);
}

/* 产品卡（Livox 式：产品名 + 一句话 tagline） */
.nv-card--product .nv-card__tagline {
    font-family: var(--nv-font-heading);
    font-size: var(--nv-text-xl);
    color: var(--nv-navy-900);
    margin: var(--nv-space-2) 0;
}
.nv-card--product .nv-card__model {
    font-size: var(--nv-text-xs);
    color: var(--nv-cyan-600);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* 行业卡（techvico 式：图标 + 行业名 + 痛点一句） */
.nv-card--industry { text-align: left; }
.nv-card--industry .nv-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--nv-radius-md);
    background: var(--nv-cyan-100);
    display: grid;
    place-items: center;
    margin-bottom: var(--nv-space-2);
}
.nv-card--industry .nv-card__icon svg { stroke: var(--nv-cyan-600); }

/* 数据信任条（深色科技感区块） */
.nv-section-dark {
    background: linear-gradient(135deg, var(--nv-navy-900) 0%, var(--nv-navy-800) 60%, var(--nv-navy-700) 100%);
    position: relative;
    overflow: hidden;
}
.nv-section-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 300px at 20% 50%, rgba(0, 194, 255, 0.08), transparent),
        radial-gradient(ellipse 600px 300px at 80% 50%, rgba(45, 204, 211, 0.06), transparent);
    pointer-events: none;
}
.nv-section-dark .nv-grid {
    position: relative;
    z-index: 1;
}

/* 数据卡（深色区大数字） */
.nv-card--stat {
    background: transparent;
    border: 0;
    text-align: center;
    padding: var(--nv-space-4) var(--nv-space-3);
    position: relative;
}
/* 卡片间分隔线（最后一个除外） */
.nv-card--stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 56px;
    background: linear-gradient(to bottom, transparent, rgba(0, 194, 255, 0.35), transparent);
}
.nv-card--stat:hover { transform: none; box-shadow: none; border-color: transparent; }

.nv-stat-number {
    font-family: var(--nv-font-heading);
    font-size: clamp(2.5rem, 4.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: #FFFFFF;
    letter-spacing: -0.01em;
    text-shadow: 0 0 32px rgba(0, 194, 255, 0.45);
}
.nv-stat-number span {
    background: linear-gradient(120deg, #FFFFFF 30%, var(--nv-cyan-500) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nv-card--stat .nv-stat-label {
    color: rgba(255, 255, 255, 0.65);
    font-size: var(--nv-text-base);
    font-weight: 500;
    letter-spacing: 0.04em;
    margin-top: var(--nv-space-2);
}
/* 移动端去掉分隔线 */
@media (max-width: 767px) {
    .nv-card--stat:not(:last-child)::after { display: none; }
    .nv-card--stat { padding: var(--nv-space-3) var(--nv-space-2); }
}

/* 案例卡（量化指标横排） */
.nv-card--case .nv-card__metrics {
    display: flex;
    gap: var(--nv-space-3);
    margin-top: var(--nv-space-3);
    padding-top: var(--nv-space-3);
    border-top: 1px solid var(--nv-border);
}
.nv-card--case .nv-metric b {
    display: block;
    font-family: var(--nv-font-heading);
    font-size: var(--nv-text-xl);
    color: var(--nv-cyan-600);
}

/* 文章卡 */
.nv-card--post .nv-card__meta {
    display: flex;
    gap: var(--nv-space-2);
    font-size: var(--nv-text-xs);
    color: var(--nv-text-secondary);
    margin-bottom: var(--nv-space-1);
}
.nv-card--post .nv-card__cat { color: var(--nv-cyan-600); font-weight: 600; }

/* ---------- 规格参数表 ---------- */
.nv-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--nv-text-sm);
}
.nv-spec-table th,
.nv-spec-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--nv-border);
}
.nv-spec-table th {
    font-family: var(--nv-font-heading);
    color: var(--nv-navy-900);
    background: var(--nv-bg-soft);
    font-weight: 600;
}
.nv-spec-table tr:hover td { background: var(--nv-cyan-100); }

/* ---------- FAQ 手风琴 ---------- */
.nv-faq details {
    border: 1px solid var(--nv-border);
    border-radius: var(--nv-radius-md);
    margin-bottom: var(--nv-space-1);
    overflow: hidden;
}
.nv-faq summary {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nv-faq summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--nv-cyan-500);
    transition: transform var(--nv-fast) var(--nv-ease);
}
.nv-faq details[open] summary::after { transform: rotate(45deg); }
.nv-faq details > div { padding: 0 20px 16px; color: var(--nv-text-primary); }

/* ---------- CTA 横幅 ---------- */
.nv-cta-banner {
    background: linear-gradient(135deg, var(--nv-navy-900), var(--nv-navy-700));
    border-radius: var(--nv-radius-lg);
    padding: var(--nv-space-6) var(--nv-space-4);
    text-align: center;
    color: var(--nv-text-on-dark);
}
.nv-cta-banner h2, .nv-cta-banner h3 { color: #fff; margin-bottom: var(--nv-space-2); }
.nv-cta-banner p { margin-bottom: var(--nv-space-3); }

/* ---------- 表单（Fluent Forms 覆盖样式） ---------- */
.nv-form .fluentform .ff-el-form-control {
    border: 1px solid var(--nv-border-strong);
    border-radius: var(--nv-radius-sm);
    padding: 12px 14px;
    font-size: var(--nv-text-base);
    transition: border-color var(--nv-fast) var(--nv-ease), box-shadow var(--nv-fast) var(--nv-ease);
}
.nv-form .fluentform .ff-el-form-control:focus {
    border-color: var(--nv-cyan-500);
    box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.15);
    outline: none;
}
.nv-form .ff-el-group label { font-weight: 600; color: var(--nv-navy-900); }

/* ---------- 页脚 ---------- */
.nv-footer {
    background: var(--nv-navy-900);
    color: var(--nv-text-on-dark);
    padding: var(--nv-space-6) 0 var(--nv-space-4);
}
.nv-footer a { color: var(--nv-text-secondary); text-decoration: none; }
.nv-footer a:hover { color: var(--nv-cyan-500); }
.nv-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--nv-space-4);
}
@media (max-width: 767px) { .nv-footer__grid { grid-template-columns: 1fr; } }
.nv-footer h4 { color: #fff; font-size: var(--nv-text-base); margin-bottom: var(--nv-space-2); }
.nv-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: var(--nv-text-sm); }
.nv-footer__bottom {
    margin-top: var(--nv-space-5);
    padding-top: var(--nv-space-3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--nv-text-xs);
    color: var(--nv-text-secondary);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--nv-space-2);
}

/* ---------- 滚动显现动画（main.js 加 .is-visible） ---------- */
.nv-fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms var(--nv-ease), transform 600ms var(--nv-ease);
}
.nv-fade-in.is-visible {
    opacity: 1;
    transform: none;
}

/* 左滑入（Why Us 左侧标题区） */
.nv-slide-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 700ms var(--nv-ease), transform 700ms var(--nv-ease);
}
.nv-slide-left.is-visible {
    opacity: 1;
    transform: none;
}

/* 右滑入 + 依次延迟（Why Us 右侧列表项） */
.nv-slide-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 700ms var(--nv-ease), transform 700ms var(--nv-ease);
    transition-delay: var(--nv-delay, 0ms);
}
.nv-slide-right.is-visible {
    opacity: 1;
    transform: none;
}

/* 底部滑入 + 依次延迟（卡片网格通用 stagger） */
.nv-stagger > * {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 600ms var(--nv-ease), transform 600ms var(--nv-ease);
}
.nv-stagger.is-visible > * {
    opacity: 1;
    transform: none;
}
.nv-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.nv-stagger.is-visible > *:nth-child(2) { transition-delay: 100ms; }
.nv-stagger.is-visible > *:nth-child(3) { transition-delay: 200ms; }
.nv-stagger.is-visible > *:nth-child(4) { transition-delay: 300ms; }
.nv-stagger.is-visible > *:nth-child(5) { transition-delay: 400ms; }
.nv-stagger.is-visible > *:nth-child(6) { transition-delay: 500ms; }

@media (prefers-reduced-motion: reduce) {
    .nv-fade-in,
    .nv-slide-left,
    .nv-slide-right,
    .nv-stagger > * { opacity: 1; transform: none; transition: none; }
}

/* ---------- Why Us 区块（参考 techvico） ---------- */
.nv-why-us {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--nv-space-6);
    align-items: start;
}
.nv-why-us__intro {
    position: sticky;
    top: calc(var(--nv-header-h) + var(--nv-space-4));
}
.nv-why-us__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--nv-space-3);
}
.nv-why-us__item {
    display: flex;
    gap: var(--nv-space-2);
    align-items: flex-start;
    background: var(--nv-white);
    border: 1px solid var(--nv-border);
    border-radius: var(--nv-radius-md);
    padding: var(--nv-space-3);
    transition: border-color var(--nv-fast) var(--nv-ease), box-shadow var(--nv-fast) var(--nv-ease);
}
.nv-why-us__item:hover {
    border-color: var(--nv-cyan-500);
    box-shadow: var(--nv-shadow-md);
}
.nv-why-us__check {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--nv-radius-full);
    background: var(--nv-cyan-100);
    color: var(--nv-cyan-600);
    display: grid;
    place-items: center;
    margin-top: 2px;
}
@media (max-width: 900px) {
    .nv-why-us { grid-template-columns: 1fr; gap: var(--nv-space-4); }
    .nv-why-us__intro { position: static; }
}

/* ---------- Why Us：白色背景 + 5 张浅灰卡片（3+2 布局） ---------- */
.nv-whyus {
    background: #FFFFFF;
    padding: var(--nv-space-7) 0;
}
.nv-whyus__title {
    text-align: center;
    font-family: var(--nv-font-heading);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: #0E6BCB;
    margin: 0 0 var(--nv-space-5);
}
.nv-whyus__grid {
    width: min(1080px, 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--nv-space-3);
}
/* 3+2 布局：第一行 3 张（各占 2 列），第二行 2 张（各占 2 列，居中） */
.nv-whyus__card:nth-child(1),
.nv-whyus__card:nth-child(2),
.nv-whyus__card:nth-child(3) { grid-column: span 2; }
.nv-whyus__card:nth-child(4) { grid-column: 2 / span 2; }
.nv-whyus__card:nth-child(5) { grid-column: 4 / span 2; }

.nv-whyus__card {
    background: #F2F4F7;
    border-radius: 16px;
    padding: var(--nv-space-4) var(--nv-space-3);
    text-align: center;
    transition: transform var(--nv-normal) var(--nv-ease), box-shadow var(--nv-normal) var(--nv-ease);
}
.nv-whyus__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(5, 35, 75, 0.12);
}
.nv-whyus__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto var(--nv-space-2);
    border-radius: 50%;
    background: linear-gradient(135deg, #1BA8E8, #0E6BCB);
    color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(14, 107, 203, 0.35);
}
.nv-whyus__text {
    color: var(--nv-navy-900);
    font-size: var(--nv-text-base);
    font-weight: 600;
    line-height: var(--nv-leading-normal);
    margin: 0;
}

/* Why Us 移动端：单列 */
@media (max-width: 768px) {
    .nv-whyus__grid { grid-template-columns: 1fr; }
    .nv-whyus__card:nth-child(n) { grid-column: auto; }
}

/* ==========================================================================
   Case 页面样式（客户案例）
   ========================================================================== */

/* ---------- 案例卡片（归档页） ---------- */
.nv-case-card {
    background: var(--nv-white);
    border: 1px solid var(--nv-border);
    border-radius: var(--nv-radius-lg);
    overflow: hidden;
    transition: all var(--nv-normal) var(--nv-ease);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.nv-case-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--nv-shadow-lg);
    border-color: var(--nv-cyan-500);
}
.nv-case-card__media {
    display: block;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--nv-navy-900), var(--nv-navy-700));
    overflow: hidden;
}
.nv-case-card__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}
.nv-case-card__body {
    padding: var(--nv-space-3);
    display: flex;
    flex-direction: column;
    flex: 1;
}
.nv-case-card__tag {
    display: inline-block;
    font-size: var(--nv-text-xs);
    font-weight: 600;
    color: var(--nv-cyan-600);
    letter-spacing: 0.04em;
    margin-bottom: var(--nv-space-1);
}
.nv-case-card__title {
    font-family: var(--nv-font-heading);
    font-size: var(--nv-text-xl);
    font-weight: 700;
    color: var(--nv-navy-900);
    margin: 0 0 var(--nv-space-1);
    line-height: var(--nv-leading-tight);
}
.nv-case-card__excerpt {
    color: var(--nv-text-secondary);
    font-size: var(--nv-text-sm);
    line-height: var(--nv-leading-normal);
    margin: 0 0 var(--nv-space-2);
    flex: 1;
}
.nv-case-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--nv-cyan-600);
    font-family: var(--nv-font-heading);
    font-weight: 600;
    font-size: var(--nv-text-sm);
    text-decoration: none;
    transition: gap var(--nv-fast) var(--nv-ease), color var(--nv-fast) var(--nv-ease);
}
.nv-case-card__link:hover {
    gap: 10px;
    color: var(--nv-cyan-500);
}

/* ---------- 案例 Hero（单页） ---------- */
.nv-case-hero__meta {
    display: flex;
    gap: var(--nv-space-3);
    flex-wrap: wrap;
    margin: var(--nv-space-2) 0;
}
.nv-case-hero__meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nv-case-hero__meta-label {
    font-size: var(--nv-text-xs);
    color: var(--nv-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.nv-case-hero__meta-value {
    font-family: var(--nv-font-heading);
    font-size: var(--nv-text-base);
    font-weight: 600;
    color: #fff;
}
.nv-case-hero__tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: var(--nv-space-2);
}
.nv-case-hero__tag {
    font-size: var(--nv-text-xs);
    font-weight: 600;
    color: var(--nv-cyan-400);
    border: 1px solid rgba(0, 194, 255, 0.4);
    border-radius: var(--nv-radius-full);
    padding: 5px 14px;
    text-decoration: none;
    transition: all var(--nv-fast) var(--nv-ease);
}
.nv-case-hero__tag:hover {
    background: rgba(0, 194, 255, 0.15);
    color: #fff;
}

/* Hero 移动端：单列 */
@media (max-width: 900px) {
    .nv-case-hero { grid-template-columns: 1fr !important; }
    .nv-case-hero .nv-hero-media { order: -1; }
}

/* ---------- 效果数据统计条 ---------- */
.nv-case-metric {
    display: flex;
    justify-content: center;
    gap: var(--nv-space-5);
    flex-wrap: wrap;
}
.nv-case-metric__item {
    text-align: center;
    padding: var(--nv-space-3) var(--nv-space-4);
    min-width: 160px;
}
.nv-case-metric__item:not(:last-child) {
    border-right: 1px solid rgba(0, 194, 255, 0.2);
}
.nv-case-metric__label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--nv-text-sm);
    font-weight: 500;
    letter-spacing: 0.04em;
    margin-top: var(--nv-space-1);
}
@media (max-width: 767px) {
    .nv-case-metric { gap: var(--nv-space-3); }
    .nv-case-metric__item:not(:last-child) { border-right: 0; }
}

/* ---------- 客户评价引用样式 ---------- */
.nv-case-testimonial {
    position: relative;
    background: var(--nv-white);
    border: 1px solid var(--nv-border);
    border-radius: var(--nv-radius-lg);
    padding: var(--nv-space-5) var(--nv-space-4);
    margin: 0;
    box-shadow: var(--nv-shadow-md);
}
.nv-case-testimonial__quote {
    position: absolute;
    top: var(--nv-space-3);
    left: var(--nv-space-3);
    color: var(--nv-cyan-100);
}
.nv-case-testimonial p {
    position: relative;
    z-index: 1;
    font-size: var(--nv-text-lg);
    line-height: var(--nv-leading-loose);
    color: var(--nv-navy-900);
    font-style: italic;
    margin: 0;
    padding-left: var(--nv-space-5);
}
