@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/* Aggiungi il box-sizing globale per evitare problemi con padding e width */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Imposta l'altezza al 100% per html e body */
html,
body {
    height: 100%;
    overflow-x: hidden;
}

/* Trasforma il body in un flex container a colonna */
body {
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
    font-optical-sizing: auto;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
}

/* Fai crescere il contenuto per occupare lo spazio disponibile */
#content {
    flex: 1;
    max-width: 800px;
    width: 100%;
    text-align: center;
}

#header {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    position: relative;
    z-index: 10;
}

#logo {
    max-width: 120px;
    margin: 0 auto;
}

#logo img {
    width: 100%;
    height: auto;
}

/* Aggiungi in fondo al file oppure in una sezione dedicata al carosello */
#carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    height: 200px;
    /* Nascondi barra scorrimento */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer and Edge */
    -webkit-overflow-scrolling: touch; /* Abilita lo scorrimento fluido su iOS */
    -webkit-scrollbar {
        display: none; /* Safari e Chrome */
    }
}

#carousel a, .carousel-item-solo a {
    text-decoration: none;
}

.carousel-item {
    flex: 0 0 auto;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 10px;
    width: 280px;
    /* Regola la larghezza a seconda delle necessità */
}

.carousel-text {
    position: relative;
    width: 100%;
    bottom: 30%;
    height: 30%;
    display: table;
    /* Per centrare verticalmente */
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 0 0 8px 8px;
}

.carousel-text p {
    text-align: center;
    vertical-align: middle;
    display: table-cell;
    /* Per centrare verticalmente */
}

/* Item unico */
.carousel-item-solo {
    width: 280px;
    height: 200px;
    position: relative;
    left:50%;
    transform: translateX(-50%);
    flex: 0 0 auto;
    border-radius: 8px;
    overflow: hidden;
}

.carousel-item img, .carousel-item-solo img {
    height: 100%;
    border-radius: 8px;
}

#menu ul {
    padding: 0;
    margin: 20px auto;
    list-style: none;
}

#menu ul li {
    margin: 15px 0;
}

#menu ul li a {
    text-decoration: none;
    padding: 15px;
    display: inline-block;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    font-weight: bold;
    text-align: left;
    transition: all 0.3s ease-in-out;

    text-align: center;
}

#menu ul li a img {
    position: relative;
    height: 40px;
    margin-right: 10px;
    vertical-align: middle;
}

#footer {
    width: 100%;
    text-align: center;
    font-size: 14px;
}

/*CODICE QR*/
/* Icona QR nell'header */
#qr-icon {
    position: absolute;
    top: 30px;
    right: 30px;
    cursor: pointer;
}

#qr-icon img {
    height: 40px;
    width: 40px;
}

/* Light mode e Dark Mode */
@media (prefers-color-scheme: light) {
    body {
        background-color: #ffffff;
        color: #231f1e;
    }

    #header {
        color: #231f1e;
    }

    #footer {
        color: #231f1e;
        border-top: 1px solid #e0e0e0;
    }

    #menu ul li a {
        color: #231f1e;
        background-color: #e0e0e0;
        /* box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); */
    }

    #menu ul li a:hover {
        background-color: #7f2f14;
        color: #ffffff;
    }

    .light {
        display: none;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #231f1e;
        color: #ffffff;
    }

    #header {
        color: #ffffff;
    }

    #footer {
        color: #ffffff;
        border-top: 1px solid #3a3a3a;
    }

    #menu ul li a {
        color: #ffffff;
        background-color: #3a3a3a;
        /* box-shadow: 0 0 10px rgba(255, 255, 255, 0.1); */
    }

    #menu ul li a:hover {
        background-color: #7f2f14;
        color: #ffffff;
    }

    .dark {
        display: none;
    }
}