* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo h1 {
    font-size: 1.8rem;
    color: #b8860b;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #b8860b;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 2px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    /*background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1548550023-2bdb3c5beed7?w=1600');*/

    /* Immagine di background memorizzata in images */
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/img_background.jpg?w=1600');
    
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 60px;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #b8860b;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    background-color: #8b6508;
}

/* Featured Sections */
.featured-section {
    padding: 5rem 5%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #b8860b;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #b8860b;
    margin: 1rem auto;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #f0f0f0;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(184, 134, 11, 0.2);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover img {
    transform: scale(1.05);
}

.card h3 {
    font-size: 1.5rem;
    margin: 1rem 1rem 0.5rem;
    color: #b8860b;
}

.scientific-name {
    font-style: italic;
    color: #666;
    margin: 0 1rem 0.5rem;
    font-size: 0.9rem;
}

.card p {
    margin: 0 1rem 1rem;
    color: #555;
}

.features {
    list-style: none;
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
}

.features li {
    margin-bottom: 0.3rem;
    color: #666;
    padding-left: 1.2rem;
    position: relative;
}

.features li::before {
    content: '•';
    color: #b8860b;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* GALLERIA SECTION */
.gallery-section {
    padding: 5rem 5%;
    background-color: #fff;
}

.gallery-intro {
    text-align: center;
    margin-bottom: 2rem;
    color: #666;
    font-style: italic;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    aspect-ratio: 4/3;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(184, 134, 11, 0.3);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    display: block;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

/* LIGHTBOX */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}

.lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}




/* AGGIUNGI QUESTO AL TUO FILE STYLE.CSS SE NON C'E' GIA' */
.lightbox-caption {
    color: white;
    padding: 1rem;
    text-align: center;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
    margin-top: 1rem;
    font-family: 'Montserrat', sans-serif;
}



.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
}

.close-lightbox:hover {
    color: #b8860b;
    background: rgba(255,255,255,0.2);
}

.lightbox-nav {
    position: absolute;
    bottom: 50%;
    transform: translateY(50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 5px;
    pointer-events: auto;
    transition: background-color 0.3s, transform 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #b8860b;
    transform: scale(1.1);
}

/* Stile per la didascalia */
.lightbox-caption {
    color: white;
    padding: 1rem;
    text-align: center;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
    margin-top: 1rem;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
    border-left: 3px solid #b8860b;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .lightbox-caption {
        font-size: 0.9rem;
        padding: 0.8rem;
        max-width: 90%;
    }
}

/* About Section */
.about-section {
    background-color: #f9f9f9;
    padding: 5rem 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat {
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #b8860b;
    font-family: 'Playfair Display', serif;
}

.stat-label {
    font-size: 1rem;
    color: #666;
}

/* Contact Section aggiornata con immagine */
.contact-section {
    padding: 5rem 5%;
    background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

/* Nuovo stile per l'immagine */
.contact-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(184, 134, 11, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 3px solid #fff;
}

.contact-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(184, 134, 11, 0.3);
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

.contact-image:hover .featured-image {
    transform: scale(1.05);
}

.contact-info {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(184, 134, 11, 0.15);
    border: 1px solid #f0e6d2;
    position: relative;
    overflow: hidden;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #b8860b, #ffd700, #b8860b);
}

.contact-info h3 {
    margin-bottom: 2rem;
    color: #b8860b;
    font-size: 1.8rem;
    font-family: 'Playfair Display', serif;
    position: relative;
    display: inline-block;
}

.contact-info h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: #b8860b;
    margin: 0.5rem 0 0;
}

.contact-info p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-left: 0.5rem;
    transition: transform 0.2s;
}

.contact-info p:hover {
    transform: translateX(5px);
    color: #b8860b;
}

.domain-note {
    font-style: italic;
    color: #666;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0e6d2;
    font-size: 1rem;
}

.domain-note::before {
    content: '?';
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Nuovo stile per la nota aggiuntiva */
.contact-note {
    margin-top: 2rem;
    padding: 1rem;
    background: #fdf8f0;
    border-radius: 10px;
    border-left: 4px solid #b8860b;
    text-align: center;
}

.contact-note p {
    margin-bottom: 0;
    justify-content: center;
    font-size: 1rem;
    color: #8b6508;
}

/* Responsive per contatti con immagine */
@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-image {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .contact-info {
        padding: 2rem;
    }
    
    .contact-info h3 {
        font-size: 1.6rem;
    }
    
    .contact-info p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .contact-info {
        padding: 1.5rem;
    }
    
    .contact-info h3 {
        font-size: 1.4rem;
    }
    
    .contact-info p {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        text-align: left;
    }
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 2rem 5%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.social-links a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #b8860b;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .about-section {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .gallery-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }

    .close-lightbox {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 10px 15px;
        font-size: 18px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .social-links a {
        margin: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .card-container {
        grid-template-columns: 1fr;
    }

    .gallery-container {
        grid-template-columns: 1fr;
    }
    
    .lightbox-nav {
        padding: 0 10px;
    }
}
/* Stili per i video nella galleria */
.gallery-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.5s;
}

.gallery-item.video-item {
    position: relative;
}

.gallery-item.video-item:hover .gallery-video {
    transform: scale(1.05);
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(184, 134, 11, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none; /* Permette di cliccare attraverso per far partire il video */
}

.gallery-item.video-item:hover .video-play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    background: #b8860b;
}


/* CODICE AGGIUNTO */

/* Versione minimale - Solo l'essenziale */
.gallery-item.video-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.gallery-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(184, 134, 11, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    border: 2px solid white;
}

.video-play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: #b8860b;
}

/* Nascondi pulsante quando video in riproduzione (gestito da JS) */
.video-play-button[style*="opacity: 0"] {
    opacity: 0 !important;
    pointer-events: none !important;
}