/* 通用样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background-color: #4CAF50;
    color: white;
    padding: 1rem 0;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* 允许导航项换行 */
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: #45a049;
    border-radius: 5px;
}

/* 主要内容样式 */
main {
    padding: 20px;
}

/* Hero Section */
#hero {
    background-color: #e0ffe0;
    text-align: center;
    padding: 50px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#hero h2 {
    font-size: 3rem;
    color: #2e8b57;
    margin-bottom: 15px;
}

#hero p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.button {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #45a049;
}

/* Features Section */
#features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.feature-item {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    flex: 1;
    min-width: 280px; /* 确保在小屏幕上有足够的宽度 */
    max-width: 350px;
}

.feature-item h3 {
    color: #4CAF50;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 1rem;
    line-height: 1.5;
}

/* Gallery Page Specific Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.plant-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s ease;
}

.plant-card:hover {
    transform: translateY(-5px);
}

.plant-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.plant-card h3 {
    font-size: 1.5rem;
    color: #4CAF50;
    margin: 15px 0 10px;
}

.plant-card p {
    font-size: 0.9rem;
    color: #666;
    padding: 0 15px 15px;
}

.plant-details {
    text-align: left;
    padding: 0 15px 15px;
    font-size: 0.85rem;
    color: #555;
}

.plant-details p {
    margin: 5px 0;
    padding: 0;
}

.plant-details strong {
    color: #333;
}

/* 页脚样式 */
footer {
    /* Info Section Styles */
    .info-section {
        background-color: white;
        padding: 30px;
        margin-bottom: 30px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .info-section h2 {
        color: #4CAF50;
        font-size: 2rem;
        margin-bottom: 20px;
        text-align: center;
    }

    .info-section p {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 15px;
        text-align: justify;
    }

    .info-section ul {
        list-style: none;
        padding: 0;
        text-align: center;
    }

    .info-section ul li {
        margin-bottom: 10px;
    }

    .info-section ul li a {
        color: #4CAF50;
        text-decoration: none;
        font-weight: bold;
    }

    .info-section ul li a:hover {
        text-decoration: underline;
    }
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0;
    }

    #hero h2 {
        font-size: 2.2rem;
    }

    #hero p {
        font-size: 1rem;
    }

    .feature-item {
        min-width: unset;
        width: 100%;
        max-width: 100%;
    }

    .gallery-grid {
        grid-template-columns: 1fr; /* 在小屏幕上显示单列 */
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .button {
        padding: 10px 20px;
        font-size: 1rem;
    }
}