/* 1. RESET GLOBALE - Fondamentale per la larghezza su Mobile */
*, *::before, *::after {
    box-sizing: border-box; /* Costringe padding e bordi a stare DENTRO il 100% */
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw; /* Blocca la larghezza alla vista del telefono */
    overflow-x: hidden; /* Elimina lo scroll orizzontale */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 2. MAIN - Contenitore flessibile */
main[role="main"] {
    flex: 1 0 auto;
    width: 100%;
    max-width: 100%;
    display: block;
}

#backToTop {
    display: none; /* Nascosto di default */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2001; /* Sopra la navbar e il footer */
    border: none;
    outline: none;
    background-color: #ffa400; /* Colore coordinato alla tua navbar */
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.3);
    transition: background-color 0.3s, opacity 0.3s;
}

    #backToTop:hover {
        background-color: #007bff; /* Cambia colore al passaggio del mouse */
    }