/* =====================================================================
   Sezione Eventi: card, gruppi per mese, pagina interna.

   Lo stesso foglio serve al sito (eventi.php, eventi-passati.php,
   evento.php) e all'anteprima della card in dashboard: cosi' quello che
   si vede mentre si scrive e' esattamente quello che esce sul sito.
   Per questo non si appoggia alle classi del tema (style.css), che la
   dashboard non carica: l'aspetto riprende quello delle card delle news
   in home (.blog-item, con il riquadro blu della data).
   ===================================================================== */

.eventi-introduzione {
    max-width: 46rem;
    margin: 0 0 3rem;
    font-size: 18px;
    line-height: 1.6;
    color: #4A5568;
}

/* ---------- un mese: titoletto e griglia ---------- */
.eventi-mese-titolo {
    margin: 0 0 2rem;
    font-family: "Poppins", sans-serif;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 600;
    color: #04213F;
}
.eventi-mese-titolo span { color: #3E66F7; }

.eventi-separatore {
    margin: 3.75rem 0;
    border: 0;
    border-top: 1px solid #DDE3EE;
    opacity: 1;
}

.eventi-griglia {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 30px;
}

/* ---------- la card ---------- */
.evento-card {
    display: flex;
    flex-direction: column;
    background: #FFF;
    box-shadow: 0 6px 30px rgba(4, 33, 63, .07);
    min-width: 0;
}
.evento-card-media {
    position: relative;
    height: 260px;
    flex: none;
}
.evento-card-foto {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #F4F7FC;
}
.evento-card-foto img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
/* senza immagine: il logo intero su fondo blu scuro, invece che tagliato ai lati */
.evento-card-foto--riserva { background: #0B1B3F; }
.evento-card-foto--riserva img { object-fit: contain; }
.evento-card:hover .evento-card-foto img,
.evento-card:focus-within .evento-card-foto img { transform: scale(1.08); }

/* il riquadro della data, come nelle card delle news in home */
.evento-card-data {
    position: absolute;
    left: 30px;
    bottom: -20px;
    min-width: 80px;
    padding: 16px 12px 14px;
    border-radius: 10px;
    background: #3E66F7;
    color: #FFF;
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    line-height: 20px;
    text-align: center;
}
.evento-card-data span { display: block; }
.evento-card-data span:first-child { font-size: 30px; font-weight: 700; margin-bottom: 5px; line-height: 30px; }
.evento-card-data span:nth-child(2) {
    margin-bottom: 7px;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.evento-card-concluso {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(4, 33, 63, .78);
    color: #FFF;
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.evento-card--concluso .evento-card-data { background: #5B6B85; }

.evento-card-corpo {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 42px 30px 30px;
}
.evento-card-titolo {
    margin: 0 0 12px;
    font-family: "Poppins", sans-serif;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 600;
    color: #0E0A01;
    overflow-wrap: anywhere;
}
.evento-card-titolo a { color: inherit; text-decoration: none; }
.evento-card-titolo a:hover,
.evento-card-titolo a:focus { color: #3E66F7; }

.evento-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 14px;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: #1B3C54;
}
.evento-card-quando,
.evento-card-dove {
    padding-left: 22px;
    background-repeat: no-repeat;
    background-position: 0 2px;
    background-size: 15px 15px;
}
.evento-card-quando { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E66F7' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3.5 10h17'/%3E%3C/svg%3E"); }
.evento-card-dove   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E66F7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"); }

.evento-card-testo {
    margin: 0 0 22px;
    font-family: "Lato", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #5C6670;
    overflow-wrap: anywhere;
}

/* il pulsante: come «theme-btn btn-border» del tema */
.evento-card-pulsante {
    align-self: flex-start;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: 12px 24px;
    border: 1.5px solid rgba(36, 51, 66, .5);
    border-radius: 2px;
    background: transparent;
    color: #243342;
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    line-height: 22px;
    font-weight: 500;
    text-decoration: none;
    transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.evento-card-pulsante:hover,
.evento-card-pulsante:focus { background: #243342; border-color: #243342; color: #FFF; }

@media (max-width: 575px) {
    .evento-card-media { height: 220px; }
    .evento-card-corpo { padding: 40px 22px 24px; }
    .evento-card-titolo { font-size: 20px; }
    .eventi-mese-titolo { font-size: 23px; }
    .eventi-separatore { margin: 2.75rem 0; }
}

/* ---------- pagina vuota e collegamento all'altra pagina ---------- */
.eventi-vuoto {
    padding: 3rem 2rem;
    border: 1px dashed #C9D3E3;
    border-radius: 6px;
    background: #F8FAFD;
    text-align: center;
}
.eventi-vuoto h2 { font-size: 24px; margin: 0 0 .5rem; }
.eventi-vuoto p { max-width: 36rem; margin: 0 auto; color: #5C6670; }
.eventi-altri { margin: 3.5rem 0 0; text-align: center; }

/* ---------- pagina interna dell'evento ---------- */
.evento-pagina-quando {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.5rem;
    margin: 1.25rem 0 0;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    color: rgba(255, 255, 255, .9);   /* l'intestazione delle pagine e' blu scuro */
}
.evento-pagina-quando span:first-child { padding-left: 22px; background: no-repeat 0 3px / 15px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E66F7' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3.5 10h17'/%3E%3C/svg%3E"); }
.evento-pagina-quando span + span { padding-left: 22px; background: no-repeat 0 3px / 15px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E66F7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"); }
/* il tema toglie pallini e margini agli elenchi: nell'HTML delle pagine interne li rimettiamo */
.evento-pagina-contenuto ul:not([class]) { list-style: disc; padding-left: 1.25rem; margin: 0 0 1rem; }
.evento-pagina-contenuto ol:not([class]) { list-style: decimal; padding-left: 1.25rem; margin: 0 0 1rem; }
.evento-pagina-contenuto li:not([class]) { margin-bottom: .35rem; display: list-item; }
.evento-pagina-contenuto ul:not([class]) > li:not([class]) { list-style: disc; }
.evento-pagina-contenuto ol:not([class]) > li:not([class]) { list-style: decimal; }
.evento-pagina-contenuto p:not([class]) { margin: 0 0 1rem; }
.evento-pagina-immagine { border-radius: 6px; box-shadow: 0 10px 40px rgba(4, 33, 63, .12); }
.evento-modulo-sezione { background: #F4F7FC; }
.evento-modulo-titolo { margin: 0 0 1.5rem; text-align: center; }
.evento-modulo { max-width: 46rem; margin: 0 auto; }

/* sul telefono (chi arriva dal link nella bio) le card devono vedersi subito:
   via la foto dell'intestazione e un po' di spazio */
@media (max-width: 767px) {
    .eventi-banner .page-banner__media { display: none; }
    .eventi-banner { padding-bottom: 28px; }
    .eventi-pagina { padding-top: 36px !important; }
    .eventi-introduzione { font-size: 16px; margin-bottom: 2rem; }
}

/* ---------- iscrizioni chiuse, pulsante delle foto (22/11/2026) ---------- */
.evento-card-chiuse {
    align-self: flex-start;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: 12px 18px;
    border-radius: 2px;
    background: #EEF1F6;
    color: #5B6B85;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 500;
}
.evento-card-chiuse::before {
    content: "";
    width: 14px;
    height: 14px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6B85' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
}
.evento-card-pulsante--foto { border-color: #3E66F7; color: #3E66F7; }
.evento-card-pulsante--foto:hover,
.evento-card-pulsante--foto:focus { background: #3E66F7; border-color: #3E66F7; color: #FFF; }
.evento-card-pulsante[hidden], .evento-card-chiuse[hidden] { display: none !important; }

/* ---------- galleria foto di un evento passato ---------- */
.evento-galleria-conta { margin: 0 0 1.5rem; color: #5C6670; font-size: 15px; }
.evento-galleria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.evento-galleria li { margin: 0; }
.evento-galleria a {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
    background: #EEF1F6;
}
.evento-galleria img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.evento-galleria a:hover img,
.evento-galleria a:focus img { transform: scale(1.05); }
.evento-galleria p { margin: .5rem 0 0; font-size: 14px; line-height: 1.45; color: #5C6670; }
@media (max-width: 575px) { .evento-galleria { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* ---------- pagina d'iscrizione chiusa ---------- */
.evento-chiuso-riquadro {
    max-width: 44rem;
    margin: 0 auto;
    padding: 3rem 2rem;
    border-radius: 6px;
    background: #F4F7FC;
    text-align: center;
}
.evento-chiuso-occhiello { margin: 0 0 .5rem; color: #3E66F7; font-family: "Poppins", sans-serif; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.evento-chiuso-riquadro h1 { font-size: 32px; line-height: 1.25; margin: 0 0 .75rem; }
.evento-chiuso-quando { color: #1B3C54; font-family: "Poppins", sans-serif; font-weight: 500; margin: 0 0 1.25rem; }
.evento-chiuso-testo { font-size: 18px; color: #4A5568; margin: 0 0 2rem; }
.evento-chiuso-azioni { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 0; }
