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

:root {
    --primary: #2a7f62;
    --primary-light: #3a9b7a;
    --primary-dark: #1e5c47;
    --accent: #f0b429;
    --accent-light: #fcd34d;
    --bg: #f0f4f8;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-glass: rgba(255, 255, 255, 0.25);
    --text: #1a202c;
    --text-light: #4a5568;
    --text-muted: #718096;
    --border: rgba(42, 127, 98, 0.15);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.12);
    --radius: 20px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
    --max-width: 1200px;
    --nav-height: 70px;
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f172a;
        --bg-card: rgba(30, 41, 59, 0.75);
        --bg-glass: rgba(30, 41, 59, 0.4);
        --text: #e2e8f0;
        --text-light: #94a3b8;
        --text-muted: #64748b;
        --border: rgba(56, 189, 248, 0.1);
        --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.6);
        --primary: #38bdf8;
        --primary-light: #7dd3fc;
        --primary-dark: #0284c7;
        --accent: #fbbf24;
        --accent-light: #fde68a;
    }
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: calc(var(--nav-height) + 20px);
}

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

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ===== 通用动画 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@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); }
}

/* ===== 渐变Banner（H1区域） ===== */
main > h1 {
    background: linear-gradient(135deg, var(--primary), var(--primary-light), var(--accent), var(--accent-light));
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    text-align: center;
    padding: 2rem 1rem;
    margin: 0;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
}

main > h1::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(42,127,98,0.08), transparent 70%);
    pointer-events: none;
}

/* ===== 面包屑导航 ===== */
nav[aria-label="面包屑导航"] {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

nav[aria-label="面包屑导航"] ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
}

nav[aria-label="面包屑导航"] a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

nav[aria-label="面包屑导航"] a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

nav[aria-label="面包屑导航"] li + li::before {
    content: '›';
    margin-right: 0.5rem;
    color: var(--text-muted);
}

/* ===== 网站导航（Header） ===== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: background var(--transition), border-color var(--transition);
}

header nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

header nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
    justify-content: center;
}

header nav a {
    display: inline-block;
    padding: 0.5rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 50px;
    transition: all var(--transition);
    position: relative;
}

header nav 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);
}

header nav a:hover {
    background: rgba(42, 127, 98, 0.08);
    color: var(--primary);
}

header nav a:hover::after {
    width: 60%;
}

/* 暗色模式适配导航 */
@media (prefers-color-scheme: dark) {
    header nav a:hover {
        background: rgba(56, 189, 248, 0.12);
    }
}

/* ===== 主内容区 ===== */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem 3rem;
}

/* ===== 通用Section卡片 ===== */
section {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    animation: fadeInUp 0.6s ease both;
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(42,127,98,0.03), transparent 60%);
    pointer-events: none;
}

section:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: var(--primary);
}

section h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* ===== 文章卡片（产品/方案/案例/新闻） ===== */
article {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin: 1rem 0;
    transition: all var(--transition);
    position: relative;
}

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

article h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
    transition: color var(--transition);
}

article:hover h3 {
    color: var(--primary);
}

article p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

article time {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-style: italic;
}

article a[href*="news/"] {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: all var(--transition);
}

article a[href*="news/"]::after {
    content: ' →';
    transition: margin-left var(--transition);
}

article a[href*="news/"]:hover {
    color: var(--primary-light);
}

article a[href*="news/"]:hover::after {
    margin-left: 6px;
}

/* 新闻列表特殊样式 */
#news article {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* ===== 列表样式 ===== */
section ul,
section ol {
    padding-left: 1.5rem;
    margin: 0.75rem 0;
    color: var(--text-light);
}

section li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

section li strong {
    color: var(--primary);
}

/* ===== 引用（客户评价） ===== */
blockquote {
    background: var(--bg-glass);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    font-style: italic;
    color: var(--text-light);
    transition: all var(--transition);
}

blockquote:hover {
    border-left-color: var(--primary);
    background: rgba(42,127,98,0.05);
}

blockquote p {
    margin: 0;
}

/* ===== 联系信息 ===== */
#contact p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

#contact p:first-of-type {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

/* ===== 网站地图 & 友情链接 ===== */
#sitemap ul,
#links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    list-style: none;
    padding-left: 0;
}

#sitemap a,
#links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all var(--transition);
}

#sitemap a:hover,
#links a:hover {
    background: rgba(42,127,98,0.08);
    color: var(--primary-light);
}

/* ===== Footer ===== */
footer {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.8;
}

footer p {
    margin-bottom: 0.35rem;
}

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

footer a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* ===== 响应式设计 ===== */
/* 平板 */
@media (max-width: 1024px) {
    main {
        padding: 1rem 1rem 2rem;
    }

    section {
        padding: 1.5rem;
    }

    header nav ul {
        gap: 0;
    }

    header nav a {
        padding: 0.4rem 0.7rem;
        font-size: 0.82rem;
    }
}

/* 手机 */
@media (max-width: 640px) {
    :root {
        --nav-height: 60px;
        --radius: 16px;
        --radius-sm: 10px;
    }

    header nav ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
        padding: 0 0.5rem;
    }

    header nav ul::-webkit-scrollbar {
        display: none;
    }

    header nav a {
        white-space: nowrap;
        padding: 0.4rem 0.6rem;
        font-size: 0.78rem;
    }

    section {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    article {
        padding: 1rem;
    }

    main > h1 {
        padding: 1.5rem 0.5rem;
        font-size: clamp(1.6rem, 7vw, 2.2rem);
    }

    #sitemap ul,
    #links ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    footer {
        padding: 1.5rem 1rem;
        font-size: 0.8rem;
    }

    blockquote {
        padding: 0.75rem 1rem;
    }

    section h2 {
        font-size: 1.3rem;
    }
}

/* 小屏手机 */
@media (max-width: 380px) {
    header nav a {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }

    section {
        padding: 1rem;
    }
}

/* ===== 滚动动画增强（通用） ===== */
@media (prefers-reduced-motion: no-preference) {
    section:nth-child(2) { animation-delay: 0.1s; }
    section:nth-child(3) { animation-delay: 0.2s; }
    section:nth-child(4) { animation-delay: 0.3s; }
    section:nth-child(5) { animation-delay: 0.4s; }
    section:nth-child(6) { animation-delay: 0.5s; }
    section:nth-child(7) { animation-delay: 0.6s; }
    section:nth-child(8) { animation-delay: 0.7s; }
    section:nth-child(9) { animation-delay: 0.8s; }
    section:nth-child(10) { animation-delay: 0.9s; }
    section:nth-child(11) { animation-delay: 1.0s; }
    section:nth-child(12) { animation-delay: 1.1s; }
    section:nth-child(13) { animation-delay: 1.2s; }
    section:nth-child(14) { animation-delay: 1.3s; }
    section:nth-child(15) { animation-delay: 1.4s; }
}

/* ===== 暗色模式微调 ===== */
@media (prefers-color-scheme: dark) {
    section::before {
        background: radial-gradient(circle at 30% 20%, rgba(56,189,248,0.04), transparent 60%);
    }

    article {
        background: var(--bg-card);
    }

    blockquote {
        border-left-color: var(--accent);
    }

    blockquote:hover {
        border-left-color: var(--primary);
        background: rgba(56,189,248,0.06);
    }

    main > h1 {
        background: linear-gradient(135deg, var(--primary), var(--primary-light), var(--accent), var(--accent-light));
        background-size: 300% 300%;
        -webkit-background-clip: text;
        background-clip: text;
    }

    header nav a:hover {
        background: rgba(56,189,248,0.1);
    }
}

/* ===== 打印样式 ===== */
@media print {
    header {
        position: static;
        backdrop-filter: none;
        background: white;
        border: none;
    }

    section {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        animation: none;
    }

    body {
        background: white;
        color: black;
    }

    main > h1 {
        color: #2a7f62;
        background: none;
        -webkit-background-clip: unset;
        background-clip: unset;
    }
}

/* ===== 可访问性 ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}