/*resetta i margini e la box-sizing per tutti gli elementi*/
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll; /*Mostra sempre la barra di scorrimento verticale*/
}

#burgy {
    display: none;
}

footer {
    display: flex;
    height: 15em;
    margin-top: 3em;
    justify-content: space-between;
    align-items: center;
    background-color: #990026;
}

#informazioni {
    display: flex;
    flex-direction: column;
    margin-left: 3em;
    height: 10em;
    /* border: 1px solid yellow; */
}

#informazioni h3 {
    font-family: 'EB Garamond', sans-serif;
    color: white;
    font-size: 2em;
}

#informazioni p {
    font-family: 'EB Garamond', sans-serif;
    color: white;
    font-size: 1em;
    text-decoration: underline;
    cursor: pointer;
    transition: font-weight 0.3s ease;
}

#informazioni p:hover {
    font-weight: bold;
}

#navigazione {
    display: flex;
    flex-direction: column;
    height: 10em;
    /* border: 1px solid yellow; */
}

#navigazione h3 {
    font-family: 'EB Garamond', sans-serif;
    color: white;
    font-size: 2em;
}

#navigazione p {
    font-family: 'EB Garamond', sans-serif;
    color: white;
    font-size: 1em;
    text-decoration: underline;
    cursor: pointer;
    transition: font-weight 0.3s ease;
}

#navigazione p:hover {
    font-weight: bold;
}

#social {
    display: flex;
    flex-direction: column;
    font-family: 'EB Garamond', sans-serif;
    font-size: 2em;
    color: white;
    /* border: 1px solid red; */
}

#icon {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding-top: 0.5em;
    /* border: 1px solid blue; */
}

.icon {
    width: 1.5em;
    /* border: 1px solid green; */
}

.box {
    transition: transform 0.3s ease;
}

.box:hover {
    transform: scale(1.2);
}

footer #info {
    display: flex;
    flex-direction: column;
    margin-right: 3em;
    width: 22em;
}

footer #info p {
    font-family: 'EB Garamond', sans-serif;
    color: white;
    font-size: 1em;
    text-decoration: underline;
    cursor: pointer;
    transition: font-weight 0.3s ease;
}

footer #info p:hover {
    font-weight: bold;
}

/* --- HOME --- */

#sfondo{
    position: absolute;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    object-fit: cover;
    z-index: 1;
}

#opaco{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0, 0.5);
    z-index: 2;
}

header{
    /*L'header ricopre già la grandezza dello schermo orizzontalmente perché è un elemento di blocco e non è necessario specificare width 100%*/
    display: flex;
    position: sticky;
    height: 10em;
    top: 0; /*Comunichiamo all'elemento dove "attaccarsi"*/
    justify-content: center;
    align-items: flex-start;
    padding: 0 2em;
    background: linear-gradient(to bottom, white, rgba(0,0,0, 0));
    z-index: 3;
}

nav{
    display: flex; /* layout flessibile */
    position: relative;
    align-items: center; /*allinea verticalmente al centro*/
    justify-content: space-between; /*distribuisce gli elementi centrati */
    width: 100%;
    height: 5em;
    max-width: 65em;
    box-shadow: 0 5px 15px 0 black;
    border-radius: 3em;
    background-color: white;
    padding: 0 6em;
    margin-top: 2.5em;
    z-index: 4;
}

/*stile delle liste*/
nav ul {
    /*non serve specificare position:relative poiché la eredita dal nav*/
    display: flex; /*dispone gli elementi in riga*/
    justify-content: flex-start;
    list-style: none;
    height: 3em;
    gap: 7em; /*spaziatura fra i link*/
}

nav ul li{
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'EB Garamond', sans-serif;
    font-size: 1.5em;
}

nav ul li a{
    color: black;
    text-decoration: none;
    padding: 0.5em;
    transition: transform 0.3s ease;
}

nav ul li a.active {
    font-weight: bold;
    color: #990026;
    transform: scale(1.2);
}

nav ul li a:hover {
    transform: scale(1.2);
}

#logo{
    /*Dimensioni del contenitore*/
    width: 6em;
    height: 8em;
    background-image: url("img/lira_hd.png"); /*url dell'immagine*/
    background-position: center; /*Posizione dell'immagine all'interno del contenitore affinché sia centrata*/
    background-repeat: no-repeat; /*l'immagine di backgroound non si ripete*/
    background-size: contain; /*l'immagine viene ridimensionata per adattarsi all'interno del contenitore*/
    margin-left: -2em;
}

#titolo{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 10em);
    width: 100%;
    position: relative;
    z-index: 2;
}

#titolo h1{
    font-family: 'Imperial Script', serif;
    text-align: center;
    font-size: 10em;
    color: white;
    margin-top: 1.5em;
}

#titolo h2{
    font-family: 'EB Garamond', sans-serif;
    text-align: center;
    font-size: 3em;
    color: white;
}

#timeline {
    text-align: center;
    margin: 5em auto;
    font-family: 'EB Garamond', sans-serif;
}

#timeline h2 {
    font-size: 2.5em; /* Rimane in em per coerenza */
    color: #990026;
    margin-bottom: 1.5em;
}

#pentagramma {
    position: relative;
    height: 11em; /* Altezza relativa alla finestra */
    width: 80%; /* Larghezza relativa al contenitore */
    margin: 0 auto;
    background: repeating-linear-gradient(
        to bottom,
        black 0,
        black 0.125em, /* Linea nera di 2px */
        transparent 0.125em,
        transparent 2.5em /* Spazio tra le righe */
    ); /* 5 righe */
    display: flex;
    justify-content: space-around;
}

.nota {
    position: absolute;
    width: 3.125em;
    height: 3.125em;
    background-image: url(img/nota.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulsazione 1.5s infinite;
    cursor: pointer;
    z-index: 2;
}

/* Posizionamento delle note sul pentagramma */
.nota:nth-child(1) { /* Sulla riga più bassa */ 
    top: 6em;
    left: 10%;
    --img-url: url("img/inizi.jpg");
}
.nota:nth-child(2) { /* Sulla seconda riga */ 
    top: 3.5em; 
    left: 45%;
    --img-url: url("img/anni60.jpg"); 
}
.nota:nth-child(3) { /* Sulla terza riga */
    top: 1em; 
    left: 80%; 
    --img-url: url("img/oggi.jpg");
}

.nota img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nota:hover{
    animation: none;
    transform: scale(1.2);
}

.nota:hover img {
    display: block;
}

.nota::after {
    content: attr(data-year);
    position: absolute;
    top: 135%; /* Adjust this value to position the text below the note */
    left: 50%;
    transform: translateX(-50%);
    font-family: 'EB Garamond', sans-serif;
    font-size: 1.2em;
    color: black;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.nota:hover::after {
    content: attr(data-title); /* Use the data-title attribute for the title */
    position: absolute;
    top: -1.9em; /* Position above the picture */
    left: 50%;
    transform: translateX(-50%);
    width: 26em; /* Cover the whole length of the photo */
    height: 2em; /* Adjust the height as needed */
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    color: white; /* Text color */
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'EB Garamond', sans-serif;
    font-size: 1em;
    padding: 0.5em;
    box-sizing: border-box;
    z-index: 2; /* Ensure it appears above the picture */
}

/* Hover: rettangolo più grande per visualizzare la foto */
.nota:hover::before {
    content: '';
    position: absolute;
    top: -18em;
    left: 50%;
    transform: translateX(-50%);
    width: 26em;
    height: 18em;
    background-image: var(--img-url);
    background-size: cover;
    background-position: center;
    border: 0.125em solid black;
    box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.2);
    z-index: 1;
}

@keyframes pulsazione {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 transparent;
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    }
}

.modal {
    background-color: rgba(0, 0, 0, 0.3);
    position: fixed;
    opacity: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: all 0.3s ease-in-out;
    z-index: -1;

    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.open{
    opacity: 1;
    z-index: 20;
}

.modal-inner {
    display: flex;
    flex-direction: row;
    position: relative;
    background-color: white;
    border-radius: 1em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    padding: 2em 1.5em;
    width: 80%;
    height: auto;
}

.modal-inner img{
    width: 65%;
    height: auto;
    margin-right: 1em;
    border-radius: 0.5em;
}

.close-button {
    position: absolute;
    top: 0.5em;
    right: 0.5em;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: black;
}

.close-button:hover {
    color: #990026;
}

.inner-text {
    display: flex;
    flex-direction: column;
    width: 35%;
}

.inner-text h2{
    font-family: 'EB Garamond', sans-serif;
    font-size: 2em;
}

.inner-text p {
    font-family: 'EB Garamond', sans-serif;
    font-size: 1.5em;
    margin-top: auto;
    margin-bottom: auto;
    align-items: center;
    justify-content: center;
}

#prev-gallery {
    margin: 2em;
    margin-top: 7em;
    text-align: center;
}

#prev-gallery h2 {
    font-size: 2.5em; /* Rimane in em per coerenza */
    color: #990026;
}

.slider {
    width: 100%;
    height: var(--height);
    overflow: hidden;
    mask-image: linear-gradient(
        to right,
        transparent,
        #000 20% 80%,
        transparent
    );
}

.slider:hover .item {
    animation-play-state: paused!important;
}

.slider .list {
    display: flex;
    width: 100%;
    min-width: calc(var(--width) * var(--quantity));
    position: relative;
}

.slider .list .item {
    width: var(--width);
    height: var(--height);
    position: absolute;
    left: 70%;
    animation: autoRun 20s linear infinite;
    animation-delay: calc((20s / var(--quantity)) * (var(--position) - 1));
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.slider .list .item img {
    width: 100%;
    border-radius: 1em;
    transition: transform 0.3s ease;
    transform-origin: center;
}

.slider .list .item:hover {
    z-index: 10;
}

.slider .list .item:hover img {
    transform: scale(1.2);
}

@keyframes autoRun {
    from{
        left: 70%;
    }to{
        left: calc(var(--width) * -3.5);
    }
}

a {
    text-decoration: none;
}

#sponsor {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 30%;
    margin: 5em auto;
    background-color: #008000;
    border-radius: 6em;
}

#sponsor h2{
    color: white;
    font-family: 'EB Garamond', sans-serif;
    font-size: 2em;
    margin-right: 1em;
    margin-left: 1em;
}

#sponsor img {
    height: auto;
    width: 5em;
    margin-top: 1em;
    margin-bottom: 1em;
    margin-right: 1em;
}

/* --- EVENTI --- */

#eventi {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#eventi h1 {
    width: 100%;
    font-family: 'Imperial Script', serif;
    font-size: 7em;
    color: #990026;
    margin-bottom: 0.1em;
    text-align: center;
}

#eventi h2 {
    width: 100%;
    font-family: 'EB Garamond', sans-serif;
    color: #990026;
    font-size: 3em;
    font-weight: normal;
    text-align: center;
    margin-bottom: 1em;
}

#container-evidenza {
    display: flex;
    flex-direction: row;
    position: relative;
    justify-content: space-between;
    margin: 0 auto 5em;
    background-color: white;
    border-radius: 1em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    padding: 2em 1.5em;
    width: 80%;
    height: auto;
}

#text-eventi {
    display: flex;
    flex-direction: column;
    width: 55%;
}

#text-eventi h2 {
    text-align: left;
}

#text-eventi p {
    text-align: left;
    font-size: 1.8em;
    margin-bottom: 0.5em;
}

#text-eventi a {
    color: #990026;
}

#container-evidenza img {
    width: 70vh;
    height: 100vh;
    border-radius: 1em;
}

.emodal-evidenza {
    background-color: rgba(0, 0, 0, 0.3);
    position: fixed;
    opacity: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* transition: all 0.3s ease-in-out; */
    z-index: -1;

    display: flex;
    align-items: center;
    justify-content: center;
}

.emodal-evidenza.eopen{
    opacity: 1;
    z-index: 20;
}

.emodal-inner-evidenza {
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: white;
    border-radius: 1em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    padding: 2em 1.5em;
    width: 32%;
    height: auto;
}

.emodal-inner-evidenza img{
    width: 100%;
    height: auto;
    margin-right: 1em;
}

.eclose-button {
    transform: translateY(-25em);
    cursor: pointer;
}

#altri {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 10em;
    justify-content: center;
}

.poster {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    text-align: center;
}

.poster img {
    width: 20em;
    height: 30em;
    border-radius: 1em;
}

.poster h3 {
    font-family: 'EB Garamond', sans-serif;
    color: #990026;
    font-weight: normal;
    font-size: 1.5em;
    margin-top: 1em;
    transition: transform 0.3s ease, font-weight 0.3s ease ;
}

.poster:hover {
    cursor: pointer;
}

.poster:hover h3{
    font-weight: bold;
    transform: scale(1.2);
}

.poster-modal {
    background-color: rgba(0, 0, 0, 0.3);
    position: fixed;
    opacity: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: all 0.3s ease-in-out;
    z-index: -1;

    display: flex;
    align-items: center;
    justify-content: center;
}

.poster-modal.open {
    opacity: 1;
    z-index: 20;
}

.poster-modal-inner {
    display: flex;
    flex-direction: row;
    position: relative;
    justify-content: space-between;
    background-color: white;
    border-radius: 1em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    padding: 2em 1.5em;
    width: 80%;
    height: auto;
}

.poster-modal-inner img {
    width: 30%;
    height: auto;
    border-radius: 1em;
    margin-right: 2em;
}

.poster-inner-text {
    display: flex;
    flex-direction: column;
    width: 65%;
    padding-right: 1em;
}

.poster-modal-inner .poster-inner-text h2 {
    font-family: 'EB Garamond', sans-serif;
    font-size: 2.8em !important;
    text-align: left !important;
}

.poster-inner-text p {
    font-family: 'EB Garamond', sans-serif;
    font-size: 1.5em;
    margin-bottom: 1em;
}

.poster-inner-text a {
    color: #990026;
    transition: font-weight 0.3s ease;
}

.poster-inner-text a:hover {
    font-weight: bold;
}

/* --- GALLERIA --- */
#galleria {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#galleria h1 {
    font-family: 'Imperial Script', serif;
    text-align: center;
    font-size: 7em;
    color: #990026;
    margin-bottom: 0.5em;
}

#immagini {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 4em;
    /* padding: 2em; */
    justify-content: center;
}

.image {
    width: 22em;
    height: 18em;
    text-align: center;
    border-radius: 1em;
    transition: transform 0.3s ease;
}

.image:hover {
    transform: scale(1.2);
    cursor: pointer;
}

.gmodal {
    background-color: rgba(0, 0, 0, 0.3);
    position: fixed;
    opacity: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* transition: all 0.3s ease-in-out; */
    z-index: -1;

    display: flex;
    align-items: center;
    justify-content: center;
}

.gmodal.gopen{
    opacity: 1;
    z-index: 20;
}

.gmodal-inner {
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: white;
    border-radius: 1em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    padding: 2em 1.5em;
    width: 55%;
    height: auto;
}

.gmodal-inner img {
    margin-right: 1.5em;
    border-radius: 0.5em;
}

/* --- CONTATTI --- */

#text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* border: 1px solid red; */
}

#text h1 {
    font-family: 'Imperial Script', serif;
    text-align: center;
    font-size: 7em;
    color: #990026;
}

#text h2 {
    margin-bottom: 1em;
    font-family: 'EB Garamond', sans-serif;
    font-size: 2em;
    font-weight: normal;
    justify-content: center;
    color: #990026;
}

#telefono, #email {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 20%;
    margin-bottom: 1em;
}

#telefono span, #email span{
    font-size: 3.5em;
    margin-right: 0.5em;
}

#telefono a, #email a {
    font-family: 'EB Garamond', sans-serif;
    font-size: 2em;
    color: black;
    text-decoration: underline;
    transition: 0.3s ease;
    flex-shrink: 0;
}

#contacts a:hover {
    color: #990026;
    font-weight: bold;
    transform: translateX(0.5em);
}

#telefono a {
    margin-right: 3em;
}

#email a {
    margin-right: 1.8em;
}

#contacts #indirizzo {
    width: 80%;
    height: 28em;
    margin: 0 auto;
    border-radius: 3em;
}

#contacts #indirizzo iframe {
    width: 100%;
    height: 100%;
    border-radius: 3em;
}

/* --- PRIVACY --- */

#policy {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 2em;
}

#policy h1 {
    font-family: 'Imperial Script', serif;
    text-align: center;
    font-size: 6em;
    color: #990026;
    margin-bottom: 0.2em;
}

.policy-updated {
    font-family: 'EB Garamond', sans-serif;
    font-style: italic;
    color: #555;
    margin-bottom: 2em;
}

.policy-content {
    max-width: 55em;
    width: 100%;
    background-color: white;
    border-radius: 1em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    padding: 3em;
    margin-bottom: 5em;
    font-family: 'EB Garamond', sans-serif;
}

.policy-content h2 {
    color: #990026;
    font-size: 1.6em;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.policy-content h2:first-child {
    margin-top: 0;
}

.policy-content h3 {
    color: #990026;
    font-size: 1.2em;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.policy-content p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 1em;
}

.policy-content ul {
    margin: 0 0 1em 1.5em;
    font-size: 1.1em;
    line-height: 1.6;
}

.policy-content li {
    margin-bottom: 0.4em;
}

.policy-content a {
    color: #990026;
    text-decoration: underline;
    transition: font-weight 0.3s ease;
}

.policy-content a:hover {
    font-weight: bold;
}

.policy-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    font-size: 1em;
}

.policy-table th,
.policy-table td {
    border: 1px solid #ddd;
    padding: 0.6em 0.8em;
    text-align: left;
    vertical-align: top;
}

.policy-table th {
    background-color: #990026;
    color: white;
}

/* --- 768PX ---*/

@media (max-width: 1024px) {

    footer {
        display: flex;
        flex-direction: column;
        height: auto;
        margin-top: 3em;
        justify-content: center;
        align-items: center;
        background-color: #990026;
    }

    #informazioni {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 10em;
        margin-left: 0;
    }

    #navigazione {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: 10em;
    }

    #social {
        display: flex;
        flex-direction: column;
        text-align: center;
        font-family: 'EB Garamond', sans-serif;
        font-size: 2em;
        color: white;
    }

    footer #info {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-right: 0;
        width: 20em;
    }

    footer #info p {
        font-family: 'EB Garamond', sans-serif;
        color: white;
        font-size: 1em;
        text-decoration: underline;
        cursor: pointer;
        transition: font-weight 0.3s ease;
        margin-top: 0.5em;
        margin-bottom: 0.5em;
    }

    nav ul {
        gap: 2em;
    }

    nav ul li a{
        font-size: 1em;
    }

    #titolo h1 {
        font-size: 6em;
        margin-top: 3.5em;
    }

    #sponsor {
        width: 60%;
    }

    #sponsor h2{
        font-size: 1.7em;
    }

    .modal-inner {
        width: 90%;
    }

    /*Eventi*/

    #container-evidenza {
        flex-direction: column;
    }

    #text-eventi {
        width: 100%;
    }

    #text-eventi h2 {
        font-size: 2em;
    }

    #text-eventi p {
        font-size: 1.2em;
    }

    #container-evidenza img {
        width: 100%;
        height: auto;
        border-radius: 1em;
    }

    #altri {
        grid-template-columns: auto auto;
        gap: 5em;
        justify-content: center;
    }

    .poster img {
        padding: 0 1em;
        border-radius: 3em;
    }

    .poster-modal-inner {
        flex-direction: column;
        height: 90vh;
    }

    .poster-modal-inner img {
        display: none;
    }

    .poster-inner-text {
        width: 100%;
    }

    .poster-modal-inner .poster-inner-text h2 {
        font-size: 2em !important;
    }

    .poster-modal-inner .poster-inner-text p {
        font-size: 1.3em !important;
    }

    /*Galleria*/

    #immagini {
        grid-template-columns: auto auto;
    }

    #immagini img {
        width: 100%;
        padding: 0 1em;
        border-radius: 1.5em;
        height: auto;
    }

    /*Privacy*/

    #policy h1 {
        font-size: 4em;
    }

    .policy-content {
        padding: 2em;
    }

}

/* --- 480PX ---*/

@media (max-width: 480px) {

    #burgy {
        display: block;
        cursor: pointer;
        transition: all 0.5s ease-in-out;
        transform: scale(1.5);
    }

    #navbar_ul {
        position: fixed;
        right: -100%;
        top: 7.9em;
        gap: 0;
        flex-direction: column;
        width: 100%;
        height: auto;
        padding-left: 1em;
        padding-right: 1em;
        transition: 0.5s;
        z-index: 20;
    }

    #navbar_ul li {
        margin: 0.5em 0;
        justify-content: center;
        background-color: white;
        border-radius: 3em;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    }

    #navbar_ul.active {
        right: 0;
    }

    footer {
        display: flex;
        flex-direction: column;
        height: auto;
        margin-top: 3em;
        justify-content: center;
        align-items: center;
        background-color: #990026;
    }

    #informazioni {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 10em;
        margin-left: 0;
    }

    #navigazione {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: 10em;
    }

    #social {
        display: flex;
        flex-direction: column;
        text-align: center;
        font-family: 'EB Garamond', sans-serif;
        font-size: 2em;
        color: white;
    }

    footer #info {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-right: 0;
        width: 20em;
    }

    footer #info p {
        font-family: 'EB Garamond', sans-serif;
        color: white;
        font-size: 1em;
        text-decoration: underline;
        cursor: pointer;
        transition: font-weight 0.3s ease;
        margin-top: 0.5em;
        margin-bottom: 0.5em;
    }

    /* --- HOME --- */

    nav{
        display: flex; /*layout flessibile*/
        position: relative;
        align-items: center; /*allinea verticalmente al centro*/
        justify-content: space-between; /*distribuisce gli elementi centrati*/
        width: 100%;
        height: 5em;
        max-width: 65em;
        box-shadow: 0 5px 15px 0 black;
        border-radius: 3em;
        background-color: white;
        padding: 0 3em;
        margin-top: 2.5em;
        z-index: 4;
    }

    #titolo h1{
        font-family: 'Imperial Script', serif;
        text-align: center;
        font-size: 4.5em;
        color: white;
        margin-top: 3.5em;
    }

    #titolo h2{
        font-family: 'EB Garamond', sans-serif;
        text-align: center;
        font-size: 2em;
        color: white;
    }

    #timeline h2 {
        font-size: 2em;
        color: #990026;
        margin-bottom: 1.5em;
        margin-right: 0.5em;
        margin-left: 0.5em;
    }

    .modal-inner {
        display: flex;
        flex-direction: column;
        position: relative;
        background-color: white;
        border-radius: 1em;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
        padding: 1em 1.5em;
        width: 90%;
        height: 70vh;
    }

    .modal-inner img{
        width: 100%;
        height: 25vh;
        margin-right: 1em;
        border-radius: 0.5em;
    }

    .close-button {
        position: absolute;
        top: 0;
        right: 0.1em;
        background: none;
        border: none;
        font-size: 2em;
        cursor: pointer;
        color: black;
    }

    .inner-text {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 80vh;
    }

    .inner-text h2{
        font-family: 'EB Garamond', sans-serif;
        font-size: 1.5em;
    }

    .inner-text p {
        font-family: 'EB Garamond', sans-serif;
        font-size: 1.3em;
        margin-top: auto;
        margin-bottom: auto;
        align-items: center;
        justify-content: center;
    }

    #prev-gallery {
        margin-top: 7em;
        text-align: center;
    }

    #prev-gallery h2 {
        font-size: 2em;
        color: #990026;
    }

    .slider .list .item {
        width: var(--width);
        height: var(--height);
        position: absolute;
        left: 8%;
        animation: autoRun 20s linear infinite;
        animation-delay: calc((20s / var(--quantity)) * (var(--position) - 1));
        display: flex;
        justify-content: center;
        align-items: center;
        transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
    }

    .slider .list .item img {
        width: 70%;
        border-radius: 1em;
        transition: transform 0.3s ease;
        transform-origin: center;
    }

    #sponsor {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        width: 90%;
        margin: 5em auto;
        background-color: #008000;
        border-radius: 4em;
    }

    #sponsor h2{
        color: white;
        font-family: 'EB Garamond', sans-serif;
        font-size: 2em;
        margin-top: 0.5em;
    }

    #sponsor img {
        height: auto;
        width: 5em;
        margin-right: 0;
    }

    /*Eventi*/

    #container-evidenza {
        flex-direction: column;
    }

    #text-eventi {
        width: 100%;
    }

    #text-eventi h2 {
        font-size: 2em;
    }

    #text-eventi p {
        font-size: 1.2em;
    }

    #container-evidenza img {
        width: 100%;
        height: auto;
        border-radius: 1em;
    }

    #altri {
        grid-template-columns: auto;
        gap: 5em;
        justify-content: center;
    }

    .poster img {
        padding: 0 1em;
        border-radius: 3em;
    }

    .poster-modal-inner {
        flex-direction: column;
        height: 90vh;
    }

    .poster-modal-inner img {
        display: none;
    }

    .poster-inner-text {
        width: 100%;
    }

    .poster-modal-inner .poster-inner-text h2 {
        font-size: 1em !important;
    }

    .poster-modal-inner .poster-inner-text p {
        font-size: 0.85em !important;
    }

    /*Galleria*/

    #galleria h1 {
        font-size: 6em;
    }

    #immagini {
        grid-template-columns: auto;
    }
    #immagini img {
        width: 100%;
        padding: 0 1em;
        border-radius: 1.5em;
        height: auto;
    }

    .gmodal-inner {
        width: 90%;
    }

    .gmodal-inner img {
        width: 100%;
        height: auto;
        border-radius: 1em;
    }

    /*Contatti*/

    #text h1 {
        font-size: 5em;
    }

    #telefono, #email {
        width: 80%;
    }

    #telefono span, #email span{
        font-size: 2.5em;
    }

    #telefono a, #email a {
        font-size: 1.5em;
    }

    /*Privacy*/

    #policy h1 {
        font-size: 3em;
    }

    .policy-content {
        padding: 1.5em;
    }

    .policy-content h2 {
        font-size: 1.3em;
    }

    .policy-table {
        font-size: 0.85em;
    }

}