/* ===== Variables ===== */
:root {
    --green-dark: #2d5016;
    --green-mid: #4a7c2e;
    --green-light: #6b9b37;
    --green-pale: #e8f0e0;
    --brown-dark: #5c3d1a;
    --brown-mid: #8B6914;
    --brown-light: #a0522d;
    --cream: #faf8f0;
    --cream-dark: #f5f0e6;
    --text-dark: #2c2c2c;
    --text-mid: #555;
    --text-light: #777;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(45, 80, 22, 0.08);
    --shadow-md: 0 4px 16px rgba(45, 80, 22, 0.12);
    --shadow-lg: 0 8px 32px rgba(45, 80, 22, 0.15);
    --radius: 12px;
    --radius-lg: 16px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Source Sans 3', sans-serif;
    color: var(--text-dark);
    background: var(--cream);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    line-height: 1.3;
}

a { color: var(--green-mid); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-dark); }

/* ===== Header ===== */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--green-pale);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--green-dark);
}
.logo:hover { color: var(--green-mid); }

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--green-mid);
}

.main-nav { display: flex; gap: 2rem; }
.main-nav a {
    font-weight: 600;
    color: var(--text-mid);
    font-size: 0.95rem;
}
.main-nav a:hover { color: var(--green-mid); }

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 50%, var(--green-light) 100%);
    color: var(--white);
    text-align: center;
    padding: 4rem 1.5rem 3rem;
}

.hero-container { max-width: 700px; margin: 0 auto; }

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.92;
    line-height: 1.6;
}

/* ===== Plant Finder ===== */
.finder-section {
    padding: 0 1.5rem 3rem;
    margin-top: -2rem;
}

.finder-container {
    max-width: 1000px;
    margin: 0 auto;
}

.finder-controls {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    align-items: end;
}

.control-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-mid);
    margin-bottom: 0.4rem;
}

.control-group select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid var(--green-pale);
    border-radius: 8px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a7c2e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.control-group select:focus {
    outline: none;
    border-color: var(--green-mid);
}

.find-button {
    padding: 0.7rem 2rem;
    background: var(--green-mid);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.find-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.find-button:active { transform: translateY(0); }

/* Results */
.results-summary {
    margin-top: 2rem;
    padding: 1rem 0;
    font-size: 1.05rem;
    color: var(--text-mid);
    border-bottom: 1px solid var(--green-pale);
}
.results-summary strong { color: var(--green-dark); }

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.plant-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--green-pale);
    transition: box-shadow 0.2s, transform 0.2s;
}
.plant-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.plant-card .plant-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background: var(--green-pale);
}

.plant-card .common-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 0.15rem;
}

.plant-card .scientific-name {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.plant-card .category-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}

.tag-shade-trees { background: #d4e8c2; color: #2d5016; }
.tag-understory-trees { background: #e0d8c8; color: #5c3d1a; }
.tag-shrubs { background: #c8deb8; color: #3a6820; }
.tag-wildflowers { background: #f0dce0; color: #8b3a4a; }
.tag-ferns { background: #c8e0d0; color: #1a5030; }
.tag-grasses { background: #e8e0c8; color: #6b5a20; }
.tag-vines { background: #d0d8e8; color: #2a3a5c; }

.plant-card .plant-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-mid);
}

.plant-card .plant-details span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.plant-card .description {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.5;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ===== Articles Section ===== */
.articles-section {
    padding: 4rem 1.5rem;
    background: var(--cream-dark);
}

.articles-container {
    max-width: 1000px;
    margin: 0 auto;
}

.articles-container h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--green-dark);
    margin-bottom: 2rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--green-pale);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}
.article-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--text-dark);
}

.article-card h3 {
    font-size: 1.1rem;
    color: var(--green-dark);
    margin-bottom: 0.5rem;
}

.article-card p {
    font-size: 0.9rem;
    color: var(--text-mid);
    flex: 1;
    margin-bottom: 0.75rem;
}

.article-card .read-more {
    font-weight: 600;
    color: var(--green-mid);
    font-size: 0.9rem;
}

.view-all {
    text-align: center;
    margin-top: 1.5rem;
}
.view-all a {
    font-weight: 600;
    font-size: 1rem;
}

/* ===== Products Section ===== */
.products-section {
    padding: 4rem 1.5rem;
}

.products-container {
    max-width: 1000px;
    margin: 0 auto;
}

.products-container h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--green-dark);
    margin-bottom: 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.75rem;
    border: 2px solid var(--green-pale);
    text-align: center;
}

.product-card h3 {
    font-size: 1.15rem;
    color: var(--brown-dark);
    margin-bottom: 0.5rem;
}

.product-card p {
    font-size: 0.9rem;
    color: var(--text-mid);
    margin-bottom: 1.25rem;
}

.product-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: #FF9900;
    color: var(--white);
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.product-btn:hover { background: #e68a00; color: var(--white); }

/* ===== Footer ===== */
.site-footer {
    background: var(--green-dark);
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 2rem 1.5rem;
    margin-top: auto;
}

.footer-container { max-width: 1000px; margin: 0 auto; }

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 0.75rem 0;
}
.footer-links a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-links a:hover { color: var(--white); }

.affiliate-disclosure {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-top: 0.75rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-menu-btn { display: flex; }

    .hero h1 { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero { padding: 3rem 1.5rem 2.5rem; }

    .finder-controls {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}
