﻿/* ===== 全局基础样式 ===== */
:root {
    --primary: #2d8c3c;
    --primary-dark: #1a6b27;
    --primary-light: #4caf50;
    --primary-bg: #f0f9f0;
    --accent: #ffb300;
    --text: #333;
    --text-light: #666;
    --white: #fff;
    --gray: #f5f5f5;
    --gray-dark: #e0e0e0;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 5px 30px rgba(0,0,0,0.15);
    --radius: 12px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: #fff;
}

a { text-decoration:none; color:inherit; transition:var(--transition); }
img { max-width:100%; height:auto; display:block; }
ul { list-style:none; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 顶部信息栏 ===== */
.top-bar {
    background: var(--primary-dark);
    color: var(--white);
    font-size: 13px;
    padding: 6px 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar span { opacity:0.9; }
.top-bar a { color:var(--white); margin-left:15px; }
.top-bar a:hover { color:var(--accent); }

/* ===== 导航栏 ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo img {
    height: 50px;
    width: auto;
}
.logo-text { display:none; }
.logo-text h1 {
    font-size: 20px;
    color: var(--primary);
}
.logo-text small {
    font-size: 11px;
    color: var(--text-light);
}
/* 导航菜单 */
.nav { display:flex; align-items:center; gap:5px; }
.nav a {
    padding: 8px 16px;
    font-size: 15px;
    color: var(--text);
    border-radius: 6px;
    white-space: nowrap;
}
.nav a:hover,
.nav a.active {
    color: var(--primary);
    background: var(--primary-bg);
}
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}
.nav-toggle span {
    width: 26px;
    height: 2.5px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== 页面标题横幅 ===== */
.page-banner {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
    text-align: center;
    padding: 60px 20px;
}
.page-banner h1 {
    font-size: 36px;
    margin-bottom: 10px;
}
.page-banner p {
    font-size: 16px;
    opacity: 0.9;
}

/* ===== 通用按钮 ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* ===== 区块通用 ===== */
.section {
    padding: 80px 0;
}
.section-title {
    text-align: center;
    margin-bottom: 50px;
}
.section-title h2 {
    font-size: 30px;
    color: var(--primary-dark);
    margin-bottom: 10px;
}
.section-title p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}
.section:nth-child(even) {
    background: var(--primary-bg);
}
/* ===== 卡片网格 ===== */
.grid {
    display: grid;
    gap: 30px;
}
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }

.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.card-body { padding: 25px; }
.card-body h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-dark);
}
.card-body p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* ===== 页脚 ===== */
.footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 60px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer h3 {
    color: var(--white);
    font-size: 16px;
    margin-bottom: 20px;
}
.footer p, .footer li {
    font-size: 14px;
    line-height: 2;
}
.footer li a:hover { color: var(--primary-light); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 15px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    .nav.open { display:flex; }
    .nav a { padding:12px 16px; font-size:16px; }
    .nav-toggle { display:flex; }
    .page-banner { padding:40px 20px; }
    .page-banner h1 { font-size:26px; }
    .section { padding:50px 0; }
    .section-title h2 { font-size:24px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns:1fr; }
    .footer-grid { grid-template-columns:1fr; gap:30px; }
    .stat-grid { grid-template-columns: repeat(2,1fr); }
    .hero h1 { font-size:28px; }
    .hero p { font-size:15px; }
    .top-bar .container { flex-direction:column; gap:5px; text-align:center; }
    .top-bar a { margin:0 8px; }
    .about-content { flex-direction:column; }
    .contact-wrap { grid-template-columns:1fr; }
    .product-table { overflow-x:auto; }
}

/* ===== 首页特有 ===== */
.hero {
    background: linear-gradient(135deg, #1a6b27 0%, #2d8c3c 50%, #4caf50 100%);
    color: var(--white);
    padding: 80px 0;
    min-height: 500px;
    display: flex;
    align-items: center;
}
.hero-content { max-width:600px; }
.hero h1 {
    font-size: 40px;
    margin-bottom: 20px;
    line-height: 1.2;
}
.hero p {
    font-size: 17px;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.8;
}
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 25px;
    margin-top: 50px;
}
.stat-item { text-align:center; }
.stat-item .num {
    font-size: 36px;
    font-weight: 700;
    display: block;
}
.stat-item .label {
    font-size: 14px;
    opacity: 0.85;
    margin-top: 5px;
}
.hero-image {
    flex:1;
    display:flex;
    justify-content:center;
    align-items:center;
}
.hero-image img {
    max-height:400px;
    object-fit:contain;
}

/* ===== 产品表格 ===== */
.product-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}
.product-table th,
.product-table td {
    border: 1px solid var(--gray-dark);
    padding: 10px 12px;
    text-align: center;
}
.product-table th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}
.product-table tr:nth-child(even) { background: var(--primary-bg); }
.product-table tr:hover { background: #e8f5e9; }

/* ===== 产品筛选 ===== */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.tab-btn {
    padding: 10px 24px;
    border: 2px solid var(--gray-dark);
    border-radius: 30px;
    background: var(--white);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}
.tab-btn:hover,
.tab-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.tab-content { display:none; }
.tab-content.active { display:block; }

/* ===== 解决方案 ===== */
.solution-card .card-img { height:180px; }

/* ===== 案例 ===== */
.case-card .card-img { height:220px; }

/* ===== 关于我们 ===== */
.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}
.about-text { flex:1; }
.about-text p {
    margin-bottom: 15px;
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.8;
}
.about-image { flex:1; }
.about-image img { border-radius:var(--radius); }

/* ===== 合作伙伴 ===== */
.partner-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}
.partner-item {
    background: var(--white);
    border: 1px solid var(--gray-dark);
    border-radius: 8px;
    padding: 15px 25px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* ===== 联系页面 ===== */
.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}
.contact-info h3 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-size: 18px;
}
.contact-info p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.6;
}
.contact-info i { color:var(--primary); margin-right:8px; }
.contact-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-dark);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 18px;
    transition: var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45,140,60,0.15);
}
.contact-form textarea { height:120px; resize:vertical; }

/* ===== 荣誉 ===== */
.honor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px,1fr));
    gap: 15px;
    margin-top: 30px;
}
.honor-item {
    background: var(--white);
    border: 1px solid var(--gray-dark);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
}
