/* 全局重置与基础样式 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0a7c42;
    --primary-light: #4caf50;
    --primary-dark: #065a30;
    --primary-gradient: linear-gradient(135deg, #0a7c42 0%, #4caf50 100%);
    --bg: #f8faf8;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.72);
    --text: #1a2a1a;
    --text-secondary: #3a5a3a;
    --text-light: #6a8a6a;
    --border: #d0e0d0;
    --shadow: 0 8px 32px rgba(10, 124, 66, 0.08);
    --shadow-hover: 0 16px 48px rgba(10, 124, 66, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 72px;
    --font: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d1a0d;
        --bg-card: #142014;
        --bg-glass: rgba(20, 32, 20, 0.8);
        --text: #e0f0e0;
        --text-secondary: #b0d0b0;
        --text-light: #80a080;
        --border: #2a4a2a;
        --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.4);
    }
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* 滚动动画基础 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== 导航 ==================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    height: var(--nav-height);
    transition: var(--transition);
}

header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

nav > div:first-child a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
}

nav > div:first-child a span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav ul {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

nav ul li a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 2px;
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a:focus::after {
    transform: translateX(-50%) scaleX(1);
}

nav ul li a:hover {
    background: rgba(10, 124, 66, 0.08);
    color: var(--primary);
}

nav button {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    color: var(--text);
    display: none; /* 移动端显示 */
}

nav button:hover {
    background: rgba(10, 124, 66, 0.1);
}

/* ==================== 首屏Banner ==================== */
section[aria-label="企业首屏"] {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 50%, #e0f2f1 100%);
}

@media (prefers-color-scheme: dark) {
    section[aria-label="企业首屏"] {
        background: linear-gradient(135deg, #0a1a0a 0%, #0d1f0d 50%, #0a1a12 100%);
    }
}

section[aria-label="企业首屏"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(76, 175, 80, 0.06) 0%, transparent 60%),
                radial-gradient(circle at 70% 60%, rgba(10, 124, 66, 0.04) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes bgFloat {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-20px, 20px) rotate(3deg); }
}

section[aria-label="企业首屏"] > div {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

section[aria-label="企业首屏"] h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

section[aria-label="企业首屏"] p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 540px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

section[aria-label="企业首屏"] div:first-child > div:last-child {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.2s both;
}

section[aria-label="企业首屏"] a[role="button"] {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

section[aria-label="企业首屏"] a[role="button"]:first-child {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(10, 124, 66, 0.3);
}

section[aria-label="企业首屏"] a[role="button"]:first-child:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(10, 124, 66, 0.4);
}

section[aria-label="企业首屏"] a[role="button"]:last-child {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

section[aria-label="企业首屏"] a[role="button"]:last-child:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

section[aria-label="企业首屏"] svg {
    width: 100%;
    height: auto;
    max-width: 600px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 通用section样式 ==================== */
main > section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
    scroll-margin-top: var(--nav-height);
}

main > section:nth-child(even) {
    background: var(--bg-card);
    max-width: 100%;
    padding-left: calc((100% - 1200px) / 2 + 24px);
    padding-right: calc((100% - 1200px) / 2 + 24px);
}

main > section h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
    position: relative;
    display: inline-block;
}

main > section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 4px;
    margin-top: 8px;
}

main > section > p:first-of-type {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 720px;
}

/* ==================== 卡片通用 ==================== */
article, .card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    animation: fadeInUp 0.5s ease both;
}

article:hover, .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

/* ==================== 产品中心 ==================== */
#products {
    display: grid;
    grid-template-columns: 1fr;
}

#products > p {
    grid-column: 1 / -1;
}

#products > article {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}

#products > article h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 8px;
    grid-column: 1 / -1;
}

#products > article p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

#products > article p strong {
    color: var(--text);
}

#products > article svg {
    width: 180px;
    height: auto;
    border-radius: var(--radius-sm);
    background: var(--bg);
    padding: 12px;
}

/* ==================== 解决方案 ==================== */
#solutions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

#solutions > p {
    grid-column: 1 / -1;
}

#solutions article h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 8px;
}

/* ==================== 行业应用 ==================== */
#applications ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

#applications ul li {
    background: var(--bg-card);
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    font-size: 0.95rem;
    color: var(--text-secondary);
}

#applications ul li:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

#applications ul li strong {
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
}

/* ==================== 客户案例 ==================== */
#cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

#cases > p {
    grid-column: 1 / -1;
}

#cases article h3 {
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 8px;
}

#cases article p:last-of-type {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-style: italic;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ==================== 新闻中心 ==================== */
#news {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

#news > p {
    grid-column: 1 / -1;
}

#news article {
    display: flex;
    flex-direction: column;
}

#news article h3 {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 4px;
    flex: 1;
}

#news article time {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

#news article p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#news article a {
    align-self: flex-start;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
    position: relative;
    padding-right: 20px;
}

#news article a::after {
    content: '→';
    position: absolute;
    right: 0;
    transition: var(--transition);
}

#news article a:hover::after {
    transform: translateX(4px);
}

/* ==================== FAQ ==================== */
#faq {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

#faq > p {
    grid-column: 1 / -1;
}

#faq article {
    padding: 20px 28px;
    cursor: pointer;
    position: relative;
}

#faq article h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    padding-right: 32px;
    position: relative;
    transition: var(--transition);
}

#faq article h3::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: var(--primary);
    transition: var(--transition);
}

#faq article.active h3::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}

#faq article p {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    padding-top: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

#faq article.active p {
    max-height: 400px;
    opacity: 1;
    padding-top: 12px;
}

#faq article:hover {
    transform: none;
    border-color: var(--primary-light);
}

/* ==================== HowTo ==================== */
#howto h3 {
    font-size: 1.15rem;
    color: var(--primary);
    margin-top: 24px;
    margin-bottom: 8px;
}

#howto h3:first-of-type {
    margin-top: 0;
}

#howto ul, #howto ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

#howto ul li, #howto ol li {
    list-style: disc;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

#howto ol li {
    list-style: decimal;
}

#howto ol li strong {
    color: var(--text);
}

/* ==================== 联系我们 ==================== */
#contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

#contact > p:first-of-type {
    grid-column: 1 / -1;
}

#contact address {
    font-style: normal;
    background: var(--bg-card);
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

#contact address p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

#contact address p strong {
    color: var(--text);
    min-width: 100px;
    display: inline-block;
}

#contact > p:last-of-type {
    grid-column: 1 / -1;
    color: var(--text-secondary);
}

#contact form {
    background: var(--bg-card);
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: grid;
    gap: 16px;
}

#contact form label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text);
}

#contact form input,
#contact form textarea {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    background: var(--bg);
    color: var(--text);
    transition: var(--transition);
    width: 100%;
}

#contact form input:focus,
#contact form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 124, 66, 0.15);
}

#contact form button {
    padding: 14px 28px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    justify-self: start;
}

#contact form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 124, 66, 0.3);
}

/* ==================== 网站地图 & 友情链接 ==================== */
#sitemap ul, #links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

#sitemap ul li a, #links ul li a {
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

#sitemap ul li a:hover, #links ul li a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ==================== Footer ==================== */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 48px 24px 32px;
    text-align: center;
    margin-top: 40px;
}

footer p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 6px;
}

footer a {
    color: var(--text-light);
    margin: 0 8px;
}

footer a:hover {
    color: var(--primary);
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    section[aria-label="企业首屏"] > div {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    section[aria-label="企业首屏"] p {
        margin-left: auto;
        margin-right: auto;
    }
    section[aria-label="企业首屏"] div:first-child > div:last-child {
        justify-content: center;
    }
    section[aria-label="企业首屏"] svg {
        max-width: 400px;
        margin: 0 auto;
    }

    #products > article {
        grid-template-columns: 1fr;
    }
    #products > article svg {
        width: 100%;
        max-width: 200px;
        justify-self: center;
    }

    #contact {
        grid-template-columns: 1fr;
    }

    main > section:nth-child(even) {
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }

    nav ul {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    }

    nav ul.open {
        display: flex;
    }

    nav ul li a {
        padding: 12px 16px;
        font-size: 1rem;
        width: 100%;
        display: block;
    }

    nav button {
        display: block;
    }

    section[aria-label="企业首屏"] {
        padding: 100px 16px 60px;
        min-height: auto;
    }

    section[aria-label="企业首屏"] svg {
        max-width: 280px;
    }

    main > section {
        padding: 48px 16px;
    }

    #products > article {
        padding: 20px;
    }

    #cases {
        grid-template-columns: 1fr;
    }

    #news {
        grid-template-columns: 1fr;
    }

    #solutions {
        grid-template-columns: 1fr;
    }

    #applications ul {
        grid-template-columns: 1fr;
    }

    #faq article {
        padding: 16px 20px;
    }

    #contact address p strong {
        min-width: 80px;
    }

    footer {
        padding: 32px 16px 24px;
    }
}

@media (max-width: 480px) {
    nav > div:first-child a span {
        display: none;
    }

    section[aria-label="企业首屏"] h1 {
        font-size: 1.6rem;
    }

    section[aria-label="企业首屏"] a[role="button"] {
        padding: 12px 28px;
        font-size: 0.9rem;
    }

    #products > article svg {
        max-width: 160px;
    }
}

/* ==================== 工具类 ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}