* {
    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 nel body */
.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;
}

.search-bar {
    margin: 2rem 0;
    text-align: center;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #4a7c59;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #2d5a27;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 124, 89, 0.4);
}

#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;
}

.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;
}

.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;
}

.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;
}

.add-plant {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #4a7c59;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(74, 124, 89, 0.3);
    transition: all 0.3s ease;
}

.add-plant:hover {
    background: #2d5a27;
    transform: scale(1.1);
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: #666;
    border-top: 1px solid #eee;
    margin-top: 3rem;
}

.no-plants {
    text-align: center;
    padding: 3rem 0;
    color: #666;
}

.no-plants h3 {
    margin-bottom: 1rem;
    color: #4a7c59;
}

/* Stili per pagine singole piante */
.plant-detail {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.plant-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.plant-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.plant-details {
    padding: 1.5rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h3 {
    color: #2d5a27;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #e8f5e8;
    padding-bottom: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.info-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.info-label {
    font-weight: bold;
    color: #2d5a27;
    display: block;
    margin-bottom: 0.25rem;
}

.back-button {
    display: inline-block;
    padding: 10px 20px;
    background: #4a7c59;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    margin-bottom: 1rem;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: #2d5a27;
}

/* Stili aggiuntivi per pagine dettaglio */
.plant-header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    margin-bottom: 2rem;
}

.plant-title {
    font-size: 2.5rem;
    color: #2d5a27;
    margin-bottom: 0.5rem;
}

.plant-scientific-name {
    font-style: italic;
    color: #666;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.plant-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.plant-location {
    background: #fff3cd;
    color: #856404;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.content-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.content-text p {
    margin-bottom: 1rem;
}

/* Tab system per coltivazione */
.cultivation-tabs {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab-buttons {
    display: flex;
    background: #f8f9fa;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    background: white;
    border-bottom-color: #4a7c59;
    color: #2d5a27;
    font-weight: 600;
}

.tab-content {
    display: none;
    padding: 1.5rem;
}

.tab-content.active {
    display: block;
}

.tab-content h4 {
    color: #2d5a27;
    margin-bottom: 1rem;
}


/* Indice malattine */

.quick-index {
  
}
			
.index-column ul {
	margin-left: 4rem;
}

.index-column ul a {
	text-decoration: none;
	color: darkgreen;
	background: #F0F0F0;
}

.index-column ul a:hover {
	box-shadow: 0 4px 15px rgba(0,0,0,0.2);
	color: darkred;
}

/* Cards stagionali */
.seasonal-care {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.season-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #4a7c59;
}

.season-card h4 {
    color: #2d5a27;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.season-card ul {
    list-style: none;
    padding: 0;
}

.season-card li {
    margin-bottom: 0.8rem;
    padding-left: 1rem;
    position: relative;
}

.season-card li:before {
    content: "•";
    color: #4a7c59;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Cards metodi riproduzione */
.reproduction-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.method-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-top: 4px solid #4a7c59;
}

.method-card h4 {
    color: #2d5a27;
    margin-bottom: 1rem;
}

/* Note personali */
.personal-notes {
    background: #fff9c4;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 1.5rem;
    font-style: italic;
}

/* Modal per immagini */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 900px;
    max-height: 80%;
    object-fit: contain;
    margin-top: 5%;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #bbb;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* Differenziazione h4 e strong nella pagina descrittiva */
.detail-section h4 {
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    color: #2d5a27 !important;
    margin: 1.5rem 0 1rem 0 !important;
    border-bottom: 2px solid #e8f5e8;
    padding-bottom: 0.5rem;
}

.content-text strong,
.detail-section strong {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #4a7c59 !important;
    background: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
}

.content-text a {
	text-decoration: none;
	color: #a87f32;
	font-weight: 700 !important
}

.content-text a:hover {
	color: #806636 !important;
	box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.plant-detail strong {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #4a7c59 !important;
    background: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Correzione dimensioni immagini pagina descrittiva */
/* Correzione per vedere l'immagine completa e più piccola */
.plant-gallery img {
    width: 250px !important;
    height: auto !important;
    max-height: 200px !important;
    object-fit: contain !important;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px;
}

.detail-section img {
    max-width: 250px !important;
    height: auto !important;
    max-height: 200px !important;
    object-fit: contain !important;
    border-radius: 8px;
}

.content-text img, 
.plant-detail img {
    max-width: 250px !important;
    height: auto !important;
    max-height: 200px !important;
    object-fit: contain !important;
    border-radius: 8px;
}

/* Media queries per responsività */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .stats {
        gap: 1rem;
    }
    
    .plants-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .plant-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .plant-title {
        font-size: 2rem;
    }

    .plant-scientific-name {
        font-size: 1.2rem;
    }

    .plant-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tab-buttons {
        flex-direction: column;
    }

    .seasonal-care {
        grid-template-columns: 1fr;
    }

    .reproduction-methods {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .plant-card {
        flex: 0 0 calc(50% - 0.75rem);
    }
}

@media (max-width: 800px) {
    .plant-card {
        flex: 0 0 100%;
    }
}