* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

header {
    background: linear-gradient(135deg, #2d5a27 0%, #4a7c59 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Menu navigazione */
.nav-menu {
    display: flex;
    gap: 0rem;
    margin: 0.1rem 0;
    justify-content: left;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    background: #2d5a27;
    padding: 0.40rem 1rem;
    border-radius: 0px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    background: #1a3319;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-decoration: none;
    color: white;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #4a7c59;
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 0.5rem;
}

/* Barra di ricerca */
.search-bar {
    margin: 2rem 0;
    text-align: center;
}

#search {
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    width: 100%;
    max-width: 400px;
    outline: none;
    transition: border-color 0.3s ease;
}

#search:focus {
    border-color: #4a7c59;
}

/* Statistiche */
.stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    padding: 0.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 120px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #4a7c59;
    display: block;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Filtri */
.filters {
    margin: 2rem 0;
    text-align: center;
}

.filter-btn {
    background: white;
    border: 2px solid #ddd;
    padding: 6px 12px;
    margin: 0 1px 4px 0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.filter-btn:hover,
.filter-btn.active {
    background: #4a7c59;
    color: white;
    border-color: #4a7c59;
}

/* Griglia piante */
.plants-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 3rem;
    align-items: flex-start;
}

.plant-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: stretch;
    flex: 0 0 calc(33.333% - 1rem);
    min-width: 350px;
}

.plant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.plant-image {
    height: 250px;
    flex-shrink: 0;
    background: linear-gradient(45deg, #e8f5e8, #f0f8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.plant-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.plant-info {
    flex: 1;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
}

.plant-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d5a27;
    margin-bottom: 0.3rem;
    line-height: 1.3rem;
}

.plant-scientific {
    font-style: italic;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.3rem;
}

.plant-family {
    background: #e8f5e8;
    color: #2d5a27;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.plant-date {
    color: #999;
    font-size: 0.80rem;
}

.plant-categories {
    margin-bottom: 0.4rem;
}

.category-tag {
    background: #f0f8ff;
    color: #0066cc;
    padding: 1px 3px;
    border-radius: 8px;
    font-size: 0.70rem;
    display: inline-block;
    margin-right: 0.2rem;
    margin-bottom: 0.1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: #666;
    border-top: 1px solid #eee;
    margin-top: 3rem;
}

/* Media queries per responsività */
@media (max-width: 1200px) {
    .plant-card {
        flex: 0 0 calc(50% - 0.75rem);
    }
}

@media (max-width: 800px) {
    .plant-card {
        flex: 0 0 100%;
        min-width: unset;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .stats {
        gap: 1rem;
    }
    
    .stat-card {
        min-width: 100px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-menu a {
        font-size: 0.85rem;
        padding: 0.3rem 0.8rem;
    }
    
    #search {
        max-width: 100%;
    }
    
    .filter-btn {
        font-size: 11px;
        padding: 5px 10px;
    }
}