/* --- 全局与基础样式 --- */
:root {
    --primary-color: #4CAF50; /* 主题绿 */
    --secondary-color: #f3f3f3; /* 浅灰背景 */
    --text-color: #333;
    --light-text-color: #fff;
    --border-radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: #d4d2d2;
    color: var(--text-color);
    line-height: 1.7;
}

.container {
    background-color: #faf9fa;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 头部与导航 --- */
header {
    background-color: var(--light-text-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}



/* --- new--- */

  .header {
            background-color: var(--light-text-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
        }

        .header-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 0;
        }

        .brand {
            display: flex;
            align-items: center;
        }

        .brand-title {
            font-size: 28px;
            font-weight: 700;
            color: #333;
            letter-spacing: -0.5px;
        }

        .brand-title span {
            color: #ff6b6b;
        }
        .brand-logo {
            margin-right: 10px;
            color: #ff6b6b
        }
        .brand-logo svg {
            width:35px;
            height: 35px;
        }

        .nav-menu {
            display: flex;
            list-style: none;
        }

        .nav-item {
            margin-left: 30px;
            position: relative;
        }

          .nav-item a {
           
            margin-left: 30px;
            position: relative;
            text-decoration: none;
            color: var(--primary-color);
            font-weight: bold;
            margin-left: 25px;
            font-size: 1rem;
            padding-bottom: 5px;
            transition: color 0.3s, border-bottom 0.3s;

        }

        .nav-item a:hover, nav a.active {
             color: var(--primary-color);
            border-bottom: 2px solid var(--primary-color);
        }

        .nav-link {
            text-decoration: none;
               color: var(--primary-color);
            font-weight: 600;
            font-size: 16px;
            padding: 8px 0;
            transition: color 0.3s ease;
            position: relative;
        }

        .nav-link:hover {
            color: #ff6b6b;
        }

        .nav-link::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: 0;
            left: 0;
            background-color: #ff6b6b;
            transition: width 0.3s ease;
        }

        .nav-link:hover::after {
            width: 100%;
        }





/* --- 主页 Hero 区域 --- */
.hero {
    height: 60vh;
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--light-text-color);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* --- 卡片网格布局 --- */
main {
    padding: 3rem 0;
}

.featured-posts  {
background: transparent;
    }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.12);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.btn {
    display: inline-block;
    margin-top: 1rem;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #45a049;
}

/* --- 文章详情页 --- */
.post-full {
    background-color: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
}
.post-full-image {
    width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}
.post-meta {
    color: #777;
    margin-bottom: 1.5rem;
}
.plant-care {
  padding: 4rem 0;
}

.care-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.care-tab {
  padding: 0.5rem 1rem;
  border: none;
  background-color: #f0f4f8;
  color: #2c7be5;
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  transition: all 0.3s ease;
}

.care-tab.active {
  background-color: #2c7be5;
  color: #fff;
  font-weight: 500;
}

.care-content {
  background-color: #fff;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.care-list {
  margin: 1rem 0 1.5rem;
  padding-left: 1.5rem;
  line-height: 1.8;
}

.care-content img {
  width: 100%;
  max-width: 600px;
  border-radius: 8px;
  margin-top: 1rem;
}

/* --- 日记表单 --- */
#diary-form {
    margin-top: 2rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

/* --- 市集 --- */
.price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}
.product-container{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:30px;
}


/* --- 页脚 --- */
footer {
    text-align: center;
    padding: 2rem;
    background-color: #e9e9e9;
    margin-top: 2rem;
}
