/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif;
}

:root {
    --primary-color: #2e7d32;
    --primary-light: #60ad5e;
    --primary-dark: #005005;
    --secondary-color: #ff8f00;
    --secondary-light: #ffc046;
    --secondary-dark: #c56000;
    --text-on-primary: #ffffff;
    --text-on-secondary: #000000;
    --text-primary: #212121;
    --text-secondary: #757575;
    --bg-color: #f8f9fa;
    --light-gray: #eaeaea;
    --dark-gray: #666;
    --white: #fff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    --transition-standard: all 0.3s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-standard);
}

img {
    max-width: 100%;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 2rem;
    background-color: var(--white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%; /* 确保导航栏宽度为100% */
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 180px; /* 给logo设置最小宽度 */
}

.logo img {
    height: 48px;
    width: auto;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    margin: 0;
}

/* 导航容器样式 - 修改为居中对齐 */
.nav-container {
    flex: 1;
    display: flex;
    justify-content: center; /* 内容居中 */
}

/* 占位元素与logo保持相同宽度，实现视觉对称 */
.nav-placeholder {
    min-width: 180px;
}

/* 导航链接列表样式 - 确保居中 */
.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center; /* 链接居中 */
    font-size: 1.1rem;
}

.nav-item {
    position: relative;
}

.nav-links a {
    font-weight: 700;
    position: relative;
    padding: 0.8rem 1rem;
    margin: 0 0.2rem;
    display: block;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.nav-links .nav-item > a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links .nav-item:hover > a::after,
.nav-links .nav-item > a.active::after {
    width: 100%;
}

.nav-links .nav-item:hover > a {
    color: var(--primary-color);
}

.nav-links a.active {
    color: var(--primary-color);
}

.nav-links i {
    margin-right: 0.4rem;
}

/* 移动设备菜单按钮 */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    border-radius: 30px;
    padding: 0.3rem 0.5rem;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: var(--transition-standard);
}

.search-bar:focus-within {
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(46, 125, 50, 0.2);
}

.search-bar input {
    border: none;
    background: transparent;
    padding: 0.7rem 1rem;
    outline: none;
    width: 240px;
    transition: width 0.3s ease;
    font-size: 0.95rem;
}

.search-bar input:focus {
    width: 280px;
}

.search-bar button {
    background: transparent;
    border: none;
    color: var(--dark-gray);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition-standard);
}

.search-bar button:hover {
    color: var(--primary-color);
}

/* 主要内容区域 */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* 页面头部 */
.page-header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.page-header h1 {
    color: white;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.page-description {
    max-width: 700px;
    margin: 0 auto;
    color: white;
    font-weight: 300;
}

/* 欢迎横幅 */
.hero-banner {
    display: flex;
    background: linear-gradient(120deg, #ffffff 50%, #f0f7f0 100%);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: var(--card-shadow);
    position: relative;
}

.hero-banner::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(120deg, var(--primary-light) 0%, var(--primary-color) 100%);
    border-radius: 50%;
    opacity: 0.1;
    top: -100px;
    right: -100px;
}

.banner-content {
    flex: 1;
    padding: 4rem 3rem;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.banner-content h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    line-height: 1.2;
}

.banner-content p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    line-height: 1.6;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--text-on-primary);
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-standard);
    width: fit-content;
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(46, 125, 50, 0.4);
}

.banner-image {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.banner-image:hover img {
    transform: scale(1.05);
}

/* 统计部分 */
.stats-section {
    background: linear-gradient(120deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 4rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}

.stat-description {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 功能模块区域 */
.features {
    margin-bottom: 4rem;
}

.features h3 {
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    color: var(--primary-dark);
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.features h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transform: translateX(-50%);
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 14px 24px rgba(46, 125, 50, 0.15);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.feature-card h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1.05rem;
}

/* 合作伙伴部分 */
.partners-section {
    margin-bottom: 4rem;
    text-align: center;
}

.partners-section h3 {
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    color: var(--primary-dark);
    position: relative;
    padding-bottom: 1rem;
    text-align: center;
}

.partners-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transform: translateX(-50%);
    border-radius: 2px;
}

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin: 0 auto;
    max-width: 1000px;
}

.partner-logo {
    max-width: 180px;
    height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition-standard);
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* 最新动态部分 */
.news {
    margin-bottom: 4rem;
}

.news h3 {
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    color: var(--primary-dark);
    position: relative;
    padding-bottom: 1rem;
}

.news h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 2px;
}

.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.news-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    position: relative;
    transition: var(--transition-standard);
    border-top: 4px solid var(--primary-color);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.12);
}

.news-date {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.7rem;
    display: inline-block;
    background-color: var(--bg-color);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
}

.news-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.4;
}

.news-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-standard);
}

.read-more:after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--primary-dark);
}

.read-more:hover:after {
    transform: translateX(4px);
}

/* 页脚 */
.footer {
    background: linear-gradient(180deg, #333333 0%, #222222 100%);
    color: var(--white);
    padding: 4rem 2rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 3rem;
}

.footer-logo h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #ffffff 0%, #cccccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.footer-logo p {
    color: #aaa;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--white);
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-light);
    border-radius: 1.5px;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    display: inline-block;
    padding: 0.4rem 0;
    transition: var(--transition-standard);
    opacity: 0.8;
}

.footer-links a:hover {
    color: var(--white);
    opacity: 1;
    transform: translateX(5px);
}

.footer-contact p {
    color: #aaa;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.social-icons {
    display: flex;
    gap: 0.7rem;
    margin-top: 1.5rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition-standard);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .navbar {
        padding: 0.6rem 1.5rem;
    }
    
    .nav-links a {
        padding: 0.7rem 0.8rem;
        font-size: 0.95rem;
    }
    
    .search-bar input {
        width: 180px;
    }
    
    .search-bar input:focus {
        width: 220px;
    }
}

@media (max-width: 992px) {
    .navbar {
        padding: 0.6rem 1rem;
    }
    
    .nav-links {
        gap: 0.1rem;
    }
    
    .nav-links a {
        padding: 0.6rem 0.6rem;
        font-size: 0.9rem;
    }
    
    .nav-links i {
        margin-right: 0.3rem;
    }
    
    .hero-banner {
        flex-direction: column;
    }
    
    .banner-content {
        padding: 3rem 2rem;
    }
    
    .banner-content h2 {
        font-size: 2.4rem;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    .nav-links {
        width: 100%;
        flex-wrap: wrap;
        margin-bottom: 1rem;
        gap: 0.2rem;
    }
    
    .search-bar {
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .search-bar input,
    .search-bar input:focus {
        width: 100%;
    }
    
    .banner-content h2 {
        font-size: 2.2rem;
    }
    
    .banner-content p {
        font-size: 1.1rem;
    }
    
    .stats-container {
        padding: 0 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .feature-card, .news-card {
        padding: 2rem 1.5rem;
    }
    
    .features h3, .news h3, .partners-section h3 {
        font-size: 1.8rem;
    }
    
    /* 移动设备上二级导航的显示逻辑 */
    .nav-item .dropdown .dropdown {
        position: static;
        padding-left: 1.5rem;
        transform: none;
        display: none;
    }
    
    .nav-item .dropdown .nav-item.show-dropdown > .dropdown {
        display: block;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-container {
        justify-content: flex-start;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        overflow-y: auto;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
    }
    
    .dropdown.active {
        max-height: 500px;
    }
    
    .nav-item .dropdown .dropdown {
        position: static;
        padding-left: 1rem;
    }
    
    .nav-placeholder {
        display: none; /* 在移动设备上隐藏占位元素 */
    }
}

@media (max-width: 576px) {
    .features-grid,
    .news-container,
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .partners-grid {
        gap: 2rem;
    }
    
    .partner-logo {
        max-width: 140px;
        height: 60px;
    }
    
    .banner-content h2 {
        font-size: 1.8rem;
    }
    
    .primary-btn {
        padding: 0.8rem 1.6rem;
        font-size: 1rem;
    }
}

.navbar {
    background-color: white;
    box-shadow: var(--nav-shadow);
    padding: 0.6rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo h1 {
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.logo img {
    height: 48px;
    width: auto;
    margin-right: 10px;
}

/* Navigation styling */
.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-links a {
    font-weight: 700;
    position: relative;
    padding: 0.8rem 1rem;
    margin: 0 0.2rem;
    display: block;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.nav-links .nav-item > a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links .nav-item:hover > a::after,
.nav-links .nav-item > a.active::after {
    width: 100%;
}

.nav-links .nav-item:hover > a {
    color: var(--primary-color);
}

.nav-links a.active {
    color: var(--primary-color);
}

.nav-links i {
    margin-right: 0.4rem;
}

/* Dropdown menu styling */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    min-width: 220px;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    padding: 0.5rem 0;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li {
    list-style: none;
}

.dropdown a {
    padding: 0.6rem 1.2rem;
    display: block;
    color: var(--text-primary);
    font-weight: normal;
    border-left: 3px solid transparent;
    margin: 0;
}

.dropdown a:hover {
    background-color: rgba(46, 125, 50, 0.05);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

/* Dropdown indicator */
.has-dropdown > a:after {
    content: "\f107";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.search-bar {
    background-color: var(--background-light);
    border-radius: 30px;
    padding: 0.3rem 0.5rem;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(46, 125, 50, 0.2);
}

.search-bar input {
    padding: 0.7rem 1rem;
    width: 240px;
    transition: width 0.3s ease;
    background: transparent;
    border: none;
    outline: none;
}

.search-bar input:focus {
    width: 280px;
}

.search-bar button {
    background: transparent;
    border: none;
    color: var(--dark-gray);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

/* Multi-level dropdown menu styles */
.nav-item .dropdown .nav-item {
    position: relative;
}

.nav-item .dropdown .dropdown {
    left: 100%;
    top: 0;
    margin-top: 0;
}

/* Show second-level dropdown on hover */
.nav-item .dropdown .nav-item:hover > .dropdown {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* 主导航下拉菜单样式 */
.nav-item.has-dropdown:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 二级导航默认隐藏 */
.nav-item .dropdown .dropdown {
    position: absolute;
    left: 100%;
    top: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

/* 只有当鼠标悬浮在一级下拉项上时才显示二级导航 */
.nav-item .dropdown .nav-item.has-dropdown:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.nav-item .dropdown .nav-item.has-dropdown > .dropdown {
    left: 100%;  /* 将三级菜单定位在二级菜单的右侧 */
    top: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
}

.nav-item .dropdown .nav-item.has-dropdown:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}