/* ============================================================
   FB EVENT SYNC - CSS DEFINITIVO (STRUTTURA + RESPONSIVE)
   ============================================================ */

/* --- 1. STRUTTURA GRIGLIA DESKTOP --- */
.fb-events-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: both !important;
}

/* Card Evento */
.fb-event-card-final {
    background-color: white;
    overflow: hidden;
    border: 1px solid #eee;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 20px !important;
}

/* Immagine */
.fb-event-image-wrap img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* --- 2. BARRA DETTAGLI (BLU) --- */
.fb-event-details-bar {
    display: flex !important;
    background-color: #3186d3 !important;
    color: white !important;
    padding: 10px !important;
    align-items: flex-start !important;
    min-height: 85px !important;
    box-sizing: border-box !important;
}

/* Box Data */
.fb-event-date-box {
    text-align: center !important;
    padding-right: 15px !important;
    border-right: 1px solid rgba(255, 255, 255, 0.4) !important;
    line-height: 1.2 !important;
    flex-shrink: 0 !important;
}

.fb-date-day {
    display: block !important;
    font-size: 24px !important;
    font-weight: bold !important;
}

.fb-date-month-long {
    display: block !important;
    font-size: 14px !important;
    text-transform: capitalize !important;
}

/* Info Testuali */
.fb-event-location-info {
    padding-left: 15px !important;
    flex-grow: 1 !important;
    word-wrap: break-word !important;
    overflow: hidden !important;
}

.fb-event-title-small {
    font-size: 12px !important; /* Dimensione desktop */
    margin: 0 0 5px 0 !important;
    font-weight: bold !important;
    line-height: 1.2 !important;
    color: white !important;
}

.fb-event-place-name {
    font-size: 11px !important;
    margin: 0 !important;
    line-height: 1.1 !important;
    opacity: 0.9 !important;
    color: white !important;
}

/* --- 3. OTTIMIZZAZIONE RESPONSIVE (SMARTPHONE) --- */
@media screen and (max-width: 800px) {
    
    /* Forza 1 evento per riga (Stacking) */
    .fb-events-grid article.fb-event-card-final {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 30px !important;
    }

    /* Trasforma barra blu da riga a colonna */
    .fb-events-grid .fb-event-details-bar {
        flex-direction: column !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 15px !important;
    }

    /* Data in linea in alto */
    .fb-events-grid .fb-event-date-box {
        display: flex !important;
        flex-direction: row !important;
        align-items: baseline !important;
        gap: 8px !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
        width: 100% !important;
        padding: 0 0 10px 0 !important;
        margin-bottom: 10px !important;
        text-align: left !important;
    }

    .fb-events-grid .fb-event-date-box span {
        display: inline-block !important;
    }

    /* Reset Info sotto la data */
    .fb-events-grid .fb-event-location-info {
        padding-left: 0 !important;
        width: 100% !important;
    }

    /* Testi grandi e leggibili su mobile */
    .fb-events-grid .fb-event-title-small {
        font-size: 16px !important; /* Forza dimensione leggibile */
        line-height: 1.3 !important;
        white-space: normal !important; /* Consente andata a capo */
        margin-bottom: 8px !important;
    }

    .fb-events-grid .fb-event-place-name {
        font-size: 13px !important;
        opacity: 1 !important;
    }
}