/* Header */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
    font-family: Arial, Helvetica, sans-serif;
}

header{
    margin-bottom: 134px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    background-color: var(--rosso);
    color: white;
    position: fixed;
    z-index: 1000;
    width: 100%;
    transition: 0.5s;
}

.logo {
    font-size: 28px;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-links{
    align-items: center;
    justify-content: center;
    text-align: center;
}

nav a {
    margin: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
    color: white;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    margin-top: 0;
    padding-right: 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background: #ffffff;
    display: block;
}

@media (max-width: 768px) {

    .topbar {
        padding: 30px 24px;
        display: flex;
        justify-content: flex-end; /* Spinge l'hamburger a destra */
        align-items: center;
    }

    .logo {
        position: absolute;
        padding: 20px 24px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
    }

    .hamburger {
        display: flex;
        z-index: 1001; /* Resta sopra il logo se dovessero sovrapporsi */
    }

    .nav-links {
        position: absolute;
        top: 90px;
        right: 24px;
        background: var(--rosso);
        border-radius: 16px;
        display: none;
        flex-direction: column;
        min-width: 180px;
        padding: 12px 0;
        z-index: 1000;
    }

    .nav-links a {
        margin: 0;
        padding: 12px 20px;
        color:white;
    }

    .nav-links.show {
        display: flex;
    }

    .topbar.scrolled {
        padding: 20px 35px;
        transition: 0.5s;
    }
}

footer {
    text-align: center;
    padding: 20px 0 20px 0; /* Più spazio sopra per staccarlo dai contenuti */
    color: gray;
    
    /* Rimuoviamo position: fixed e width: 99% */
    position: relative; 
    clear: both;
    
    /* Creiamo lo spazio a destra e sinistra della linea */
    margin: 0 20px; /* Cambia 48px con quanto spazio vuoi lasciare ai lati */
    border-top: 1px solid gray;
    
    display: flex;
    align-items: center;
    justify-content: center;
}