:root {
    --primary-color: #4a7c59;
    --secondary-color: #7ba05b;
    --accent-color: #f4f7f4;
    --text-color: #2c3e50;
    --border-color: #e8ede8;
    --shadow-color: rgba(74, 124, 89, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f8fbf8 0%, #e8f4e8 100%);
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 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;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content {
    padding: 3rem 0;
}

.intro-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 12px var(--shadow-color);
    border-left: 4px solid var(--primary-color);
}

.intro-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.animals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.animal-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.animal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.animal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem;
    text-align: center;
    border-right: 8px solid #808080; /* default grigio */
}

/* Varianti per ruolo ecologico */
.animal-header.benefico {
    border-right-color: #4CAF50; /* Verde */
}

.animal-header.neutrale {
    border-right-color: #2196F3; /* Blu */
}

.animal-header.problematico {
    border-right-color: red; /* Rosso più visibile su sfondo scuro */
}

.animal-icon {
    font-size: 3rem;
    margin-bottom: 0;
    display: block;
}

.animal-header h3 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.animal-scientific {
    font-style: italic;
    opacity: 0.9;
    font-size: 0.9rem;
}

.animal-content {
    padding: 1.5rem;
}

.animal-section {
    margin-bottom: 1.5rem;
}

.animal-section h4 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.3rem;
}

.animal-section p {
    margin-bottom: 0.8rem;
    text-align: justify;
}

.characteristics-list {
    list-style: none;
}

.characteristics-list li {
    padding: 0.15rem 0;
    border-bottom: 1px solid var(--border-color);
}

.characteristics-list li:last-child {
    border-bottom: none;
}

.label {
    font-weight: bold;
    color: var(--primary-color);
}

.benefits-box {
    background: var(--accent-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border-left: 4px solid var(--secondary-color);
}

.threats-box {
    background: #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border-left: 4px solid #fdcb6e;
}

.navigation {
    background: inherit;
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px var(--shadow-color);
    text-align: center;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.nav-link {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

ul.desc-list {
  list-style: disc;        /* bullet standard */
  padding-left: 1.0rem;    /* spazio per i bullet */
  margin: 0.5rem 0;
}

ul.desc-list li {
  line-height: 1.6;
}

ul.desc-list li strong {
  font-weight: 500;
}


        /* Stili per le fotografie nelle card */
        .animal-photo {
            width: 120px;
            height: 90px;
            object-fit: cover;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid var(--border-color);
            margin: 0.5rem 0;
        }
        
        .animal-photo:hover {
            transform: scale(1.05);
            border-color: var(--primary-color);
            box-shadow: 0 4px 12px var(--shadow-color);
        }
        
        .photo-container {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin: 1rem 0;
        }
        
        .photo-info {
            flex: 1;
            font-size: 0.9rem;
            color: var(--text-color);
        }
        
        /* Modal per l'ingrandimento */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            animation: fadeIn 0.3s ease;
        }
        
        .modal-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            max-width: 90%;
            max-height: 90%;
            animation: zoomIn 0.3s ease;
        }
        
        .modal-image {
            width: 100%;
            height: auto;
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
        }
        
        .modal-caption {
            color: white;
            text-align: center;
            margin-top: 1rem;
            font-size: 1.1rem;
            background: rgba(0, 0, 0, 0.7);
            padding: 0.5rem 1rem;
            border-radius: 8px;
        }
        
        .close {
            position: absolute;
            top: 20px;
            right: 30px;
            color: white;
            font-size: 3rem;
            font-weight: bold;
            cursor: pointer;
            transition: color 0.3s ease;
        }
        
        .close:hover {
            color: #ccc;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        @keyframes zoomIn {
            from { transform: translate(-50%, -50%) scale(0.5); }
            to { transform: translate(-50%, -50%) scale(1); }
        }
        
      .expandable-section {
          border-top: 1px solid #e8ede8;
          padding-top: 1rem;
          margin-top: 1rem;
      }

      .expand-btn {
          background: none;
          border: none;
          color: #4a7c59;
          cursor: pointer;
          font-weight: 600;
          display: flex;
          align-items: center;
          gap: 0.5rem;
          font-size: 0.9rem;
          padding: 0.5rem 0;
          width: 100%;
          text-align: left;
          transition: color 0.3s ease;
      }

      .expand-btn:hover {
          color: #2d5a27;
      }

      .expand-icon {
          margin-left: auto;
          transition: transform 0.3s ease;
      }

      .expand-icon.open {
          transform: rotate(180deg);
      }

      .expanded-content {
          display: none;
          margin-top: 1rem;
          animation: slideDown 0.3s ease;
      }

      .expanded-content.show {
          display: block;
      }

      @keyframes slideDown {
          from {
              opacity: 0;
              transform: translateY(-10px);
          }
          to {
              opacity: 1;
              transform: translateY(0);
          }
      }

        /* Responsivo per le foto */
        @media (max-width: 768px) {
            .photo-container {
                flex-direction: column;
                text-align: center;
            }
            
            .animal-photo {
                width: 100px;
                height: 75px;
            }
            
            .modal-content {
                max-width: 95%;
                max-height: 80%;
            }
            
            .close {
                font-size: 2rem;
                top: 10px;
                right: 15px;
            }
        }

.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}


@media (max-width: 768px) {
    .animals-grid {
grid-template-columns: 1fr;
    }
    
    .header h1 {
font-size: 2rem;
    }
    
    .nav-links {
flex-direction: column;
align-items: center;
    }
}