/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navbar Responsive */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

#logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #004a8d;
    font-weight: bold;
    gap: 10px;
}

.logopng img {
    height: 40px;
    width: auto;
}

.links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.links a {
    text-decoration: none;
    color: #555;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.links a:hover {
    color: #004a8d;
}

/* Hero Section */
.hero-section {
    /* Il gradiente (rgba) crea uno strato scuro sopra l'immagine per la leggibilità */
    background: linear-gradient(rgba(0, 40, 80, 0.7), rgba(0, 40, 80, 0.7)), 
                url('IMG/hero-bg.jpg'); 
    
    background-size: cover;       /* L'immagine copre l'intera area senza deformarsi */
    background-position: center;  /* L'immagine rimane centrata */
    background-repeat: no-repeat; /* Evita che l'immagine si ripeta se lo schermo è grande */
    
    height: 60vh;                 /* Altezza della sezione (60% dell'altezza schermo) */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;                 /* Testo bianco per contrasto */
    padding: 0 20px;
}

.hero-section h1 { font-size: 3rem; margin-bottom: 10px; }

/* Contenitori */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

section { margin-bottom: 40px; }
h2 { color: #004a8d; margin-bottom: 15px; }

/* Footer */
footer {
    background: #222;
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.social-icons {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icons svg { fill: white; transition: transform 0.3s; }
.social-icons svg:hover { transform: scale(1.2); }

/* --- MEDIA QUERIES (Il cuore del responsive) --- */

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
    }

    .links {
        flex-wrap: wrap; /* Permette ai link di andare a capo su telefoni piccoli */
        justify-content: center;
        gap: 10px;
        margin-top: 15px;
    }

    .links li {
        font-size: 0.85rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .logopng img { height: 30px; }
    .txt { font-size: 1.1rem; }
    
    .container { padding: 20px 15px; }
    
    /* Trasforma i link in una lista verticale più cliccabile */
    .links {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    
    .links li {
        border-bottom: 1px solid #eee;
        padding: 8px 0;
        width: 100%;
    }
}
