/* 全局重置与基础配置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* 平滑滚动 */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    /* 方案一：清新自然渐变背景 */
    background: linear-gradient(135deg, #f5f7f0 0%, #e8f5e9 50%, #f1f8e9 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* 全局动画定义 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.slide-left {
    animation: slideLeft 0.6s ease forwards;
}

/* 导航栏样式（含滚动动效） */
nav {
    background-color: #2e7d32;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

nav.scrolled {
    background-color: rgba(46, 125, 50, 0.95);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 3px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #a5d6a7;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: #a5d6a7;
}

/* 移动端汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* 横幅样式（含渐变遮罩） */
/* 横幅样式（使用模糊大图背景） */
.banner {
    height: 350px;
    background-image: url(../images/banner.jpg); /* 注意这里的文件名 */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 叠加一层深灰色半透明遮罩，确保文字清晰可读 */
    background-color: rgba(0, 0, 0, 0.4);
}

.banner-content {
    position: relative;
    z-index: 1;
    animation: fadeIn 1s ease forwards;
}

.banner h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.banner p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
/* 主内容区 */
.container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #2e7d32;
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #2e7d32;
    border-radius: 2px;
}

/* 植物卡片网格（含悬停动效） */
.plant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.plant-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.plant-card:nth-child(1) { animation-delay: 0.1s; }
.plant-card:nth-child(2) { animation-delay: 0.2s; }
.plant-card:nth-child(3) { animation-delay: 0.3s; }
.plant-card:nth-child(4) { animation-delay: 0.4s; }
.plant-card:nth-child(5) { animation-delay: 0.5s; }
.plant-card:nth-child(6) { animation-delay: 0.6s; }

.plant-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.plant-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.plant-card:hover img {
    transform: scale(1.1);
}

.plant-info {
    padding: 1.5rem;
}

.plant-info h3 {
    color: #2e7d32;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.plant-info p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* 按钮样式（含点击动效） */
.btn {
    display: inline-block;
    background-color: #2e7d32;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 面包屑导航 */
.breadcrumb {
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: #2e7d32;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #1b5e20;
    text-decoration: underline;
}

/* 详情页样式 */
.plant-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.plant-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.plant-image img:hover {
    transform: scale(1.02);
}

.plant-description h2 {
    color: #2e7d32;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.plant-description h3 {
    color: #2e7d32;
    margin: 1.5rem 0 0.5rem;
    font-size: 1.3rem;
}

.plant-description p {
    margin-bottom: 1rem;
    line-height: 1.8;
    text-align: justify;
}

/* 通用内容页样式 */
.content-page {
    max-width: 800px;
    margin: 0 auto;
}

.content-page h3 {
    color: #2e7d32;
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.content-page p {
    margin-bottom: 1rem;
    line-height: 1.8;
    text-align: justify;
}

.content-page ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-page li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* 表单样式 */
.contact-form {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* 页脚样式 */
footer {
    background-color: #2e7d32;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer p {
    margin-bottom: 0.5rem;
}

/* 响应式适配 */
@media (max-width: 992px) {
    .banner h1 {
        font-size: 2.8rem;
    }
    
    .plant-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .plant-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #2e7d32;
        flex-direction: column;
        padding: 1rem 0;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.3s ease;
    }
    
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .nav-links li {
        margin: 0.5rem 2rem;
    }
    
    .hamburger {
        display: flex;
    }
    
    .banner {
        height: 280px;
    }
    
    .banner h1 {
        font-size: 2.2rem;
    }
    
    .banner p {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .container {
        margin: 2rem auto;
        padding: 0 1rem;
    }
    
    .plant-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .banner h1 {
        font-size: 1.8rem;
    }
    
    .plant-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}