html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #eee;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #800000;
    padding: 5px;
    border-radius: 0px 0px 25px 25px;
    text-align: center;
    display: flex;
    justify-content: space-evenly;
}

.header1 {
    justify-content: center;
}

.title {
    text-align: center;
    color: #fff;
    font-size: 40px;
    margin: 16px;
}

.text-subtitle {
    text-align: center;
    color: #fff;
    margin: 12px;
}

path {
    cursor: pointer;
    transition: fill 0.3s;
}

path:hover {
    fill: #a83232;
    /* Colore più chiaro al passaggio del mouse */
}

main {
    display: flex;
    align-items: flex-start;
    flex: 1;
    max-width: 1440px;
    width: 100%;
    /* <-- Aggiungi solo questa riga */
    margin: 0 auto;
}

svg {
    width: 50%;
    height: 100%;
    object-fit: contain;
}

.pannello-info {
    width: 50%;
    padding: 20px;
    background: #f4f4f9;
    border-radius: 8px;
    margin-top: 20px;
}

#titolo-regione {
    margin: 0px 0px 15px 40px;
}

#elenco-province {
    /* border: 1px solid black; */
    width: 100%;
}

.title-legend {
    margin: 0;
    margin-top: 16px;
}

.hel {
    margin: 2px;
    border: 1px solid black;
    padding: 5px;
    background-color: #bbb;
    text-align: center;
}

.el {
    margin: 2px;
    border: 1px solid black;
    padding: 5px;
    background-color: #eee;
}

.pointer {
    cursor: pointer;
}

.select-none {
    -webkit-user-select: none;
    /* Aggiunge compatibilità per i browser Apple/Safari per il comando user-select seguente */
    user-select: none;
}

.index {
    width: 15px;
    text-align: right;
}

.sigla {
    text-align: center;
}

.abitanti {
    text-align: center;
}

.sup {
    color: black;
    text-decoration: none;
}

.sup:hover {
    text-decoration: underline;
}

footer {
    background-color: #800000;
    color: white;
    text-align: center;
    padding: 1rem;
    border-radius: 20px 20px 0px 0px;
}

.a_footer {
    color: white;
    text-decoration: none;
}

.a_footer:hover {
    text-decoration: underline;
}

.github {
    justify-content: center;
}

.github-logo {
    height: 17px;
    margin-right: 5px;
}

.button {
    cursor: pointer;
    display: inline-block;
    border: 1px solid #800000;
    border-radius: 20px;
    background-color: #fff;
    color: #800000;
    padding: 10px;
    transition: all 0.3s;
}

.button:hover {
    border: 1px solid #fff;
    background-color: #800000;
    color: white;
}

@media (max-width: 768px) {
    main {
        flex-direction: column-reverse;
    }

    .logo {
        display: none;
    }

    .pannello-info {
        width: 90%;
        max-height: none;
        margin: 0 auto;
    }

    svg {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    body {
        height: auto;
        overflow: auto;
    }
}