/* Global styles */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #F4F4F9;
    color: #002F4B;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Hero Section */
.hero {
    background-color: #002F4B;
    color: white;
    text-align: center;
    padding: 4rem 1rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.logo {
    width: 100px;
    height: auto;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 3rem;
    margin: 0.5rem 0;
    font-family: 'Playfair Display', serif;
}

.hero p {
    font-size: 1.5rem;
    margin: 0.5rem 0;
    font-weight: 400;
}

/* Introduction Section */
.introduction {
    text-align: center;
    padding: 3rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Locandina Section */
.locandina-section {
    text-align: center;
    padding: 3rem 1rem;
}

.locandina {
    max-width: 350px;
    height: auto;
    border: 2px solid #D9534F;
    border-radius: 10px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
}

/* Programma Section */
.programma-section {
    text-align: center;
    padding: 3rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.programma-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.programma-item {
    display: flex;
    align-items: center;
    flex-direction: column;
    background-color: #FFFFFF;
    padding: 1.5rem;
    border: 2px solid #D9534F;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.programma-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 2px solid #D9534F;
}

.ora {
    font-size: 1.5rem;
    font-weight: bold;
    color: #D9534F;
    margin-bottom: 1rem;
}

.programma-item strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.programma-item p {
    margin: 0;
    font-size: 1rem;
    color: #444;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 3rem 1rem;
}

.cta-section .button {
    display: inline-block;
    margin: 1rem;
    background-color: #D9534F;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background-color 0.3s;
}

.cta-section .button:hover {
    background-color: #C9302C;
}

/* Footer */
footer {
    background-color: #002F4B;
    color: white;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
}

/* Carousel styles */
.scroll-stack {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 1rem;
    scroll-padding-inline: 1rem;
    white-space: nowrap;
}

.item {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.card {
    position: relative;
    width: 220px;
    height: 300px;
    perspective: 1000px;
    transition: transform 0.6s ease-in-out;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.card-front {
    background-color: #FFFFFF;
    border: 2px solid #D9534F;
}

.card-front img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
}

.card-front p {
    font-size: 1rem;
    color: #002F4B;
    font-weight: bold;
    margin-top: 0.5rem;
    text-align: center;
}

.card-back {
    background-color: #D9534F; /* Colore di sfondo */
    color: white; /* Testo bianco */
    transform: rotateY(180deg); /* Retro della card */
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centra il contenuto */
    text-align: center; /* Testo centrato */
    padding: 1rem; /* Spaziatura interna */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Ombreggiatura */
    height: 100%; /* Altezza coerente */
    overflow-y: auto; /* Scorrimento per testi lunghi */
    white-space: normal; /* Permette al testo di andare a capo */
    word-wrap: break-word; /* Spezza le parole lunghe */
    word-break: break-word; /* Assicura compatibilità */
}

.card-back p {
    margin: 0; /* Rimuovi margini */
    padding: 0.5rem; /* Spaziatura interna del testo */
    font-size: 1rem; /* Dimensione del testo */
    line-height: 1.4; /* Spaziatura tra le righe */
    max-width: 90%; /* Limita larghezza massima del testo */
    white-space: normal; /* Permette l'andata a capo */
    text-align: center; /* Centra il testo */
}
.card:hover .card-front {
    transform: rotateY(180deg);
}

.card:hover .card-back {
    transform: rotateY(0);
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #002F4B;
    font-family: 'Playfair Display', serif;
}