@keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes espandi {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

#main{
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 70pt;
    margin-top: 50pt;
}

#news_titolo{
    color: #a00000;
    width: 80%;
    height: 200pt;
    font-size: 18pt;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#news_titolo h1{
    padding-bottom: 15pt;
    width: 80%;
    text-align: center;
    animation: fadein .8s ease-in-out;
}



#riga{
    width: 80%;
    height: 2px;
    background-color: #a00000;
    margin-bottom: 10pt;
    transform-origin: center;
    transform: scaleX(0);
    animation: espandi .5s ease-out .3s forwards;
}


#news_descrizione{
    font-size: 13pt;
    padding: 70pt 20pt;
    color: black;
    border: solid 3px #a00000;
    border-radius: 15px;
    width: 90%;
    margin: 0 0 80pt 0;
    opacity: 0; /* Solo per l'inizio, dopo l'animazione rimane visibile */
    animation: fadein .5s ease-in-out .4s forwards;
}

#news_descrizione a{
    color: #a00000;
    text-decoration: underline;
}

#news_descrizione .editor-content { line-height: 1.7; }
#news_descrizione .editor-content img { max-width: 100%; height: auto; }
#news_descrizione .editor-content figure { max-width: 100%; }
#news_descrizione .editor-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
#news_descrizione .editor-content th,
#news_descrizione .editor-content td { border: 1px solid #777; padding: .5rem; }

#news_descrizione .news-image {
    max-width: 100%;
    margin: 1.25rem auto;
    text-align: center;
    clear: both;
}

#news_descrizione .news-image img {
    display: inline-block;
    max-width: min(100%, 720px);
    max-height: 620px;
    height: auto;
    width: 300pt;
    border-radius: 8px;
}

#news_descrizione .news-image-left { float: left; margin-right: 1.5rem; }
#news_descrizione .news-image-right { float: right; margin-left: 1.5rem; }
#news_descrizione .editor-content img { max-width: 100% !important; height: auto !important; }
#news_descrizione .editor-content figure { box-sizing: border-box; max-width: 100%; }

h2.rettifica{
    font-size: 15pt;
}

h3.rettifica{
    font-size: 10pt;
}

@media screen and (max-width: 768px) {

    #main {
        padding: 10px 0 24px;
        margin-top: 16px;
    }

    #news_titolo {
        width: 100%;
        height: auto;
        padding: 20px 10px;
        font-size: 16px;
    }

    #news_titolo h1 {
        width: 100%;
        font-size: clamp(20px, 6vw, 28px);
        line-height: 1.25;
        padding-bottom: 10px;
        overflow-wrap: anywhere;
    }

    #news_descrizione {
        width: 95%;
        padding: 20px 16px;
        font-size: 15px;
        line-height: 1.6;
        margin: 20pt 0;
        overflow-wrap: anywhere;
    }

    #news_descrizione .news-image-left,
    #news_descrizione .news-image-right {
        float: none;
        max-width: 100%;
        margin: 1rem auto;
    }
}
