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

:root {
    --primary: #2b7a4b;
    --primary-dark: #1f5c38;
    --primary-light: #3c9e5e;
    --accent: #f0a030;
    --accent-dark: #d48a1a;
    --bg: #f5f7f5;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.6);
    --text: #1a1a2e;
    --text-secondary: #4a4a5a;
    --text-light: #7a7a8a;
    --border: #e0e4e0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
    --font: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f172a;
        --bg-card: #1e293b;
        --bg-glass: rgba(30, 41, 59, 0.7);
        --text: #e2e8f0;
        --text-secondary: #94a3b8;
        --text-light: #64748b;
        --border: #334155;
        --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.4);
    }
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* 动画关键帧 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 通用滚动动画类 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 渐变Banner */
#banner {
    background: linear-gradient(135deg, #1a5c3a 0%, #2b7a4b 30%, #3c9e5e 60%, #f0a030 100%);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
    color: #fff;
    padding: 80px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}
#banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(240,160,48,0.15) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
#banner h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}
#banner p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    line-height: 1.8;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}
#banner a {
    display: inline-block;
    padding: 14px 40px;
    margin: 8px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}
#banner a:first-of-type {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
#banner a:first-of-type:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
#banner a:last-of-type {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.6);
}
#banner a:last-of-type:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    transform: translateY(-3px);
}

/* 头部导航 */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 20px;
}
nav a[aria-label] {
    flex-shrink: 0;
    transition: transform var(--transition);
}
nav a[aria-label]:hover {
    transform: scale(1.05);
}
nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
    flex-wrap: wrap;
}
nav ul li a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 50px;
    transition: all var(--transition);
    position: relative;
}
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: width var(--transition);
}
nav ul li a:hover {
    background: rgba(43, 122, 75, 0.1);
    color: var(--primary);
}
nav ul li a:hover::after {
    width: 60%;
}
nav form {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
nav form input[type="search"] {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    width: 180px;
    transition: all var(--transition);
}
nav form input[type="search"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(43, 122, 75, 0.15);
    width: 220px;
}
nav form button {
    padding: 8px 20px;
    border: none;
    border-radius: 50px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
nav form button:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* 主体内容 */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px 60px;
}
main > section {
    margin: 60px 0;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}
main > section:nth-child(2) { animation-delay: 0.1s; }
main > section:nth-child(3) { animation-delay: 0.2s; }
main > section:nth-child(4) { animation-delay: 0.3s; }
main > section:nth-child(5) { animation-delay: 0.4s; }
main > section:nth-child(6) { animation-delay: 0.5s; }
main > section:nth-child(7) { animation-delay: 0.6s; }

/* 通用标题 */
h1, h2, h3, h4 {
    line-height: 1.3;
    color: var(--text);
}
h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}
h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

/* 圆角卡片通用样式 */
section > article, section > blockquote, section > details {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
section > article::before, section > blockquote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transition: opacity var(--transition);
}
section > article:hover, section > blockquote:hover, section > details:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
section > article:hover::before, section > blockquote:hover::before {
    opacity: 1;
}
section > article h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--primary);
}
section > article p, section > blockquote p {
    color: var(--text-secondary);
    line-height: 1.8;
}
section > blockquote {
    font-style: italic;
    padding-left: 32px;
    position: relative;
}
section > blockquote::after {
    content: '"';
    position: absolute;
    top: 10px;
    left: 14px;
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.2;
    font-family: Georgia, serif;
}

/* 毛玻璃效果卡片 (用于特定板块) */
#intro, #history, #culture, #advantages, #applications, #team, #qualifications, #privacy, #disclaimer, #copyright {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 40px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* 作品展示 */
#products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
#products h2 {
    grid-column: 1 / -1;
}
#products article {
    margin-bottom: 0;
}

/* 解决方案 */
#solutions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
#solutions h2 {
    grid-column: 1 / -1;
}
#solutions article {
    margin-bottom: 0;
}

/* 新闻中心 */
#articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}
#articles h2 {
    grid-column: 1 / -1;
}
#articles article {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#articles article time {
    font-size: 0.85rem;
    color: var(--text-light);
}
#articles article a {
    align-self: flex-start;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding-right: 20px;
    transition: all var(--transition);
}
#articles article a::after {
    content: '→';
    position: absolute;
    right: 0;
    transition: transform var(--transition);
}
#articles article a:hover {
    color: var(--primary-dark);
}
#articles article a:hover::after {
    transform: translateX(4px);
}

/* 案例 & 评价 */
#cases, #testimonials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
#cases h2, #testimonials h2 {
    grid-column: 1 / -1;
}

/* FAQ 细节样式 */
#faq details {
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
}
#faq details summary {
    padding: 16px 24px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition);
    position: relative;
}
#faq details summary::marker, 
#faq details summary::-webkit-details-marker {
    display: none;
    content: '';
}
#faq details summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform var(--transition);
    font-weight: 300;
}
#faq details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}
#faq details summary:hover {
    background: rgba(43, 122, 75, 0.05);
}
#faq details[open] summary {
    background: rgba(43, 122, 75, 0.08);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
#faq details p {
    padding: 20px 24px;
    background: var(--bg-card);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    color: var(--text-secondary);
    line-height: 1.8;
    border-top: 1px solid var(--border);
}

/* 使用教程 */
#howto {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 40px;
    border: 1px solid var(--border);
}
#howto ol {
    padding-left: 24px;
    margin: 20px 0;
}
#howto ol li {
    margin-bottom: 10px;
    color: var(--text-secondary);
    line-height: 1.8;
}
#howto p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* 联系我们 */
#contact {
    background: linear-gradient(135deg, rgba(43, 122, 75, 0.05), rgba(240, 160, 48, 0.05));
    border-radius: var(--radius);
    padding: 40px;
    border: 1px solid var(--border);
}
#contact p {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* 网站地图 & 友情链接 */
#sitemap ul, #friendship-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    padding: 0;
}
#sitemap ul li a, #friendship-links ul li a {
    display: inline-block;
    padding: 8px 20px;
    background: var(--bg-card);
    border-radius: 50px;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all var(--transition);
    font-size: 0.9rem;
}
#sitemap ul li a:hover, #friendship-links ul li a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 122, 75, 0.3);
}

/* 页脚 */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 40px 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}
footer p {
    margin-bottom: 8px;
}
footer a {
    color: var(--primary);
    text-decoration: none;
}

/* 响应式布局 */
@media (max-width: 1024px) {
    nav ul {
        display: none; /* 移动端隐藏导航，可替换为汉堡菜单，但保持简洁 */
    }
    nav form input[type="search"] {
        width: 140px;
    }
    nav form input[type="search"]:focus {
        width: 180px;
    }
    #banner {
        padding: 60px 20px 40px;
    }
}

@media (max-width: 768px) {
    nav {
        height: 56px;
        padding: 0 16px;
    }
    nav form input[type="search"] {
        width: 100px;
    }
    nav form input[type="search"]:focus {
        width: 140px;
    }
    #banner {
        padding: 50px 16px 36px;
        min-height: 50vh;
    }
    #banner h1 {
        font-size: 1.8rem;
    }
    #banner p {
        font-size: 0.95rem;
    }
    #banner a {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
    main {
        padding: 0 16px 40px;
    }
    main > section {
        margin: 40px 0;
    }
    h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    section > article, section > blockquote, section > details {
        padding: 20px;
    }
    #intro, #history, #culture, #advantages, #applications, #team, #qualifications, #privacy, #disclaimer, #copyright, #howto, #contact {
        padding: 24px;
    }
    #products, #solutions, #articles, #cases, #testimonials {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    #sitemap ul, #friendship-links ul {
        gap: 8px;
    }
    #sitemap ul li a, #friendship-links ul li a {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
    footer {
        padding: 30px 16px;
    }
}

@media (max-width: 480px) {
    nav form input[type="search"] {
        width: 80px;
    }
    nav form input[type="search"]:focus {
        width: 120px;
    }
    #banner h1 {
        font-size: 1.5rem;
    }
    #banner p {
        font-size: 0.9rem;
    }
    #banner a {
        padding: 10px 24px;
        font-size: 0.85rem;
        display: block;
        width: 80%;
        margin: 8px auto;
    }
    main {
        padding: 0 12px 30px;
    }
    h2 {
        font-size: 1.4rem;
    }
    section > article, section > blockquote, section > details {
        padding: 16px;
    }
    #intro, #history, #culture, #advantages, #applications, #team, #qualifications, #privacy, #disclaimer, #copyright, #howto, #contact {
        padding: 20px;
    }
}

/* 暗色模式下的额外调整 */
@media (prefers-color-scheme: dark) {
    #banner {
        background: linear-gradient(135deg, #0f2a1a 0%, #1a5c3a 30%, #2b7a4b 60%, #7a4a1a 100%);
    }
    nav ul li a:hover {
        background: rgba(43, 122, 75, 0.2);
    }
    #faq details summary:hover {
        background: rgba(43, 122, 75, 0.15);
    }
    #faq details[open] summary {
        background: rgba(43, 122, 75, 0.2);
    }
    #contact {
        background: linear-gradient(135deg, rgba(43, 122, 75, 0.1), rgba(240, 160, 48, 0.08));
    }
    #sitemap ul li a, #friendship-links ul li a {
        background: var(--bg-card);
    }
    #sitemap ul li a:hover, #friendship-links ul li a:hover {
        background: var(--primary);
    }
}

/* 打印样式 */
@media print {
    header, footer, #banner a, nav form {
        display: none;
    }
    body {
        background: #fff;
        color: #000;
    }
    section {
        page-break-inside: avoid;
    }
}