:root {
    --primary: #0a6dff;
    --primary-light: #e5f0ff;
    --primary-dark: #064fb8;
    --text-color: #182334;
    --text-light: #667085;
    --bg-light: #f5f7fb;
    --border-color: #dde3f0;
    --white: #ffffff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-color);
    background-color: #ffffff;
    scroll-behavior: smooth;
    scroll-padding-top: 64px;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-color);
}

.logo img {
    width: 48px;
    height: 36px;
    object-fit: contain;
}

.main-nav {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.main-nav a {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--text-light);
    transition: all 0.15s ease-in-out;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-dark);
    background-color: var(--primary-light);
    font-weight: 600;
}

/* Mobile nav toggle */

.nav-toggle {
    display: none;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    position: relative; /* 关键：相对定位 */
}

.nav-toggle span {
    display: block;
    position: absolute; /* 关键：绝对定位 */
    height: 2px;
    width: 24px;
    background-color: var(--text-color);
    border-radius: 999px;
    transition: all 0.3s ease;
    left: 4px; /* (32-24)/2 居中 */
    transform-origin: center;
}

/* 初始三条杠的位置 */
.nav-toggle span:nth-child(1) {
    top: 8px;
}

.nav-toggle span:nth-child(2) {
    top: 15px; /* 居中 (32-2)/2 = 15 */
}

.nav-toggle span:nth-child(3) {
    top: 22px;
}

/* 激活状态变成 X */
.nav-toggle.active span:nth-child(1) {
    top: 15px;
    transform: rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    top: 15px;
    transform: rotate(-45deg);
}

/* Hero */

.hero {
    padding: 64px 0 56px;
    background: radial-gradient(circle at top left, #e5f0ff 0, #ffffff 40%, #ffffff 100%);
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.hero-content h1 {
    font-size: 32px;
    line-height: 1.3;
    margin: 0 0 16px;
    color: var(--primary-dark);
}

.hero-subtitle {
    margin: 0 0 20px;
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(10, 109, 255, 0.25);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(10, 109, 255, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-outline {
    background-color: var(--white);
    color: var(--primary-dark);
    border-color: var(--primary-light);
}

.btn-outline:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
}

.hero-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
}

.hero-highlights li::before {
    content: "•";
    color: var(--primary);
    margin-right: 6px;
}

.hero-visual {
    height: 100%;
    display: flex;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.15);
}

/* Sections */

.section {
    padding: 64px 0;
}

.section-alt {
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-header h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.section-header p {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
}

.section-inner.two-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.section-text h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 24px;
}

.section-subtitle {
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--text-light);
    font-size: 14px;
}

.section-text p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-light);
}

.section-visual img {
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
}

/* Stats */

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 16px;
}

.stat-item {
    min-width: 90px;
}

.stat-number {
    display: block;
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-dark);
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
}

/* Feature list */

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-list li h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.feature-list li p {
    margin: 0;
    font-size: 13px;
    color: var(--text-light);
}

/* Cards */

.cards {
    display: grid;
    gap: 18px;
}

.cards.three-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    background-color: var(--white);
    border-radius: 18px;
    border: 1px solid var(--border-color);
    padding: 18px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    border-color: #ced6eb;
}

/* 动画 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 延迟类，用于交错动画 */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* 淡入放大效果 */
.fade-in-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}


.card h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.card p {
    margin: 0;
    font-size: 13px;
    color: var(--text-light);
}

/* Scene cards */

.card-scene {
    padding: 0;
    overflow: hidden;
}

.card-scene .scene-image {
    position: relative;
    width: 100%;
    height: 200px;
}

.card-scene .scene-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-scene .scene-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
    color: #fff;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.card-scene .scene-overlay h3 {
    margin: 0;
    font-size: 16px;
}

.card-scene .scene-tags {
    display: flex;
    gap: 6px;
}

.card-scene .scene-tags .tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
}

.card-scene p {
    padding: 16px;
}

.card-scene .expand-btn {
    margin: 0 16px 16px;
}

/* Factory grid */

.factory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.factory-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.factory-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
}

.card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.factory-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin: 0 0 12px;
    font-size: 18px;
    color: var(--text-color);
    font-weight: 600;
}

.card-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
}

.card-content .clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-content .clamp.expanded {
    -webkit-line-clamp: initial;
}

.clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clamp.expanded {
    -webkit-line-clamp: initial;
}

.expand-btn {
    margin-top: 12px;
    align-self: flex-start;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    color: var(--text-color);
    cursor: pointer;
}

.expand-btn:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .factory-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
    
    .card-image {
        height: 200px;
    }
}

/* Video */

.video-wrapper {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    aspect-ratio: 16 / 9; /* 使用 aspect-ratio 替代 padding hack，确保高度随宽度变化 */
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    object-fit: cover;
}

/* News */

.news-date {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-light);
}

/* Footer */

.site-footer {
    background-color: #0b1630;
    color: #e2e7f5;
    padding-top: 32px;
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 28px;
    padding-bottom: 24px;
}

.footer-col h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 15px;
}

.footer-col p {
    margin: 4px 0;
    font-size: 13px;
    color: #cdd4ea;
}

.footer-qrcode .qrcode-placeholder {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    border: 1px dashed #526197;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #7f8ab5;
}

.footer-bottom {
    border-top: 1px solid #1f2942;
    text-align: center;
    padding: 10px 0 14px;
    font-size: 12px;
    color: #8e99c0;
}

/* Responsive */

@media (max-width: 960px) {
    .hero-inner,
    .section-inner.two-cols,
    .footer-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        padding-top: 80px;
    }

    .hero-inner {
        gap: 24px;
    }

    .hero-visual {
        order: -1;
    }
}

/* 大屏：>= 1440px 可以稍微放大字体和间距 */
@media (min-width: 1440px) {
    .hero {
        padding: 96px 0 72px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .section {
        padding: 80px 0;
    }
}

/* 中屏：笔记本 / 小桌面 */
@media (max-width: 1199px) and (min-width: 769px) {
    .hero-content h1 {
        font-size: 28px;
    }
}

/* 平板 & 手机（你原来这段可以合并稍微丰富一下） */
@media (max-width: 768px) {
    .main-nav {
        position: absolute;
        top: 64px;
        right: 0;
        left: 0;
        flex-direction: column;
        background-color: var(--white);
        padding: 16px 24px 24px;
        border-bottom: 1px solid var(--border-color);
        /* display: none; 改为用透明度控制，实现动画 */
        display: flex;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    .main-nav.open {
        /* display: flex; */
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 32px 0 40px;
    }

    .hero-inner,
    .section-inner.two-cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .hero-visual {
        order: -1;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .section {
        padding: 32px 0;
    }

    .section-header h2 {
        font-size: 20px;
        /* padding: 0 16px; 防止文字贴边 */
    }

    .cards.three-cols,
    .factory-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    
    .qualification-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .qualification-item {
        justify-content: center;
        width: 100%;
        padding: 14px 10px; /* 稍微增加高度，便于点击 */
    }
}

/* 图片懒加载渐变 */
.progressive-img {
    filter: blur(0px);
    transition: filter 0.5s ease-out;
}

.progressive-img.loaded {
    filter: blur(0);
}

/* Qualifications */
.qualifications {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.qualification-title {
    font-size: 20px;
    margin: 0 0 24px;
    color: var(--text-color);
    font-weight: 600;
}

.qualification-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 15px;
    color: var(--text-color);
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 200px;
}

.qualification-item:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 109, 255, 0.1);
}

.qualification-item .icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    max-width: 20px;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

/* Qualification Gallery */
.qualification-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
    background: #fff;
    /* 改为 contain 并移除 aspect-ratio 限制，或者保留 aspect-ratio 但用 contain */
    /* 为了视觉整齐，保留 aspect-ratio 但改为 contain 可能会有留白 */
    /* 为了显示完整，使用 contain */
    aspect-ratio: 3/4; 
    object-fit: contain;
    object-position: center;
    cursor: zoom-in;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 4px; /* 增加一点内边距，像相框一样 */
}

.gallery-item img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.gallery-item .caption {
    font-size: 14px;
    color: var(--text-light);
    text-align: center;
    line-height: 1.4;
}

.qualification-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.lightbox-caption {
    color: #fff;
    margin-top: 16px;
    font-size: 16px;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px; /* 加大触控区域 */
    height: 60px;
    background: transparent; /* 去掉背景 */
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); /* 增加阴影保证可见性 */
    touch-action: manipulation;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: transparent;
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

@media (max-width: 768px) {
    .lightbox-close {
        top: -40px;
        right: 0;
    }
    
    .lightbox-prev {
        left: 0; /* 贴边 */
    }
    
    .lightbox-next {
        right: 0; /* 贴边 */
    }
    
    .lightbox-prev,
    .lightbox-next {
        position: fixed;
        background: transparent;
        width: 50px;
        height: 50px;
        font-size: 30px;
    }
}
