/* ============================================================
   LCF Calendario Eventi - CSS dedicato
   ============================================================ */

/* ---- Variabili ---- */
:root {
    --lcf-primary:     #0093d0;
    --lcf-primary-dk:  #0078a8;
    --lcf-dark:        #0f172a;
    --lcf-text:        #1e293b;
    --lcf-text-muted:  #64748b;
    --lcf-bg:          #f1f5f9;
    --lcf-white:       #ffffff;
    --lcf-border:      #e2e8f0;
    --lcf-radius:      10px;
    --lcf-shadow:      0 2px 12px rgba(0,0,0,0.08);
    --lcf-shadow-hov:  0 6px 24px rgba(0,0,0,0.14);

    /* Colori tipi evento */
    --lcf-residenziale: #0093d0;
    --lcf-online:       #059669;
    --lcf-misto:        #7c3aed;
    --lcf-webinar:      #d97706;
    --lcf-fad:          #dc2626;
}

/* ---- Reset specifico pagina ---- */
.lcf-calendario-page {
    font-family: "Montserrat", "Lato", sans-serif;
}

.lcf-calendario-page *,
.lcf-calendario-page *::before,
.lcf-calendario-page *::after {
    box-sizing: border-box;
}

/* ---- Hero ---- */
.lcf-cal-hero {
    background-color: var(--lcf-dark);
    padding: 64px 20px;
    text-align: center;
}

.lcf-cal-hero__title {
    font-family: "Montserrat", sans-serif;
    font-size: 44px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.5px;
}

/* ---- Container ---- */
.lcf-cal-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Filtri e Ricerca ---- */
.lcf-cal-filters {
    background: var(--lcf-white);
    padding: 32px 0;
    border-bottom: 1px solid var(--lcf-border);
}

.lcf-search-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lcf-search-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.lcf-search-row--bottom {
    grid-template-columns: 1fr 1.5fr auto;
    align-items: flex-end;
}

.lcf-search-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lcf-search-field label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--lcf-text-muted);
}

.lcf-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.lcf-input-wrapper .lcf-icon {
    position: absolute;
    left: 12px;
    color: var(--lcf-primary);
    pointer-events: none;
}

.lcf-search-form select,
.lcf-search-form input {
    width: 100%;
    height: 44px;
    padding: 0 12px 0 38px;
    border: 1px solid var(--lcf-border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    color: var(--lcf-text);
    background: #fbfcfd;
    transition: all 0.2s ease;
}

.lcf-search-form select:focus,
.lcf-search-form input:focus {
    outline: none;
    border-color: var(--lcf-primary);
    background: var(--lcf-white);
    box-shadow: 0 0 0 3px rgba(0, 147, 208, 0.1);
}

.lcf-date-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lcf-date-inputs .lcf-input-wrapper {
    flex: 1;
}

.lcf-date-inputs input {
    padding-left: 12px; /* No icon for dates to keep it clean */
}

.lcf-date-sep {
    color: var(--lcf-text-muted);
    font-weight: 600;
}

.lcf-search-actions {
    display: flex;
    gap: 10px;
}

.lcf-btn-search {
    height: 44px;
    padding: 0 24px;
    background: var(--lcf-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.lcf-btn-search:hover {
    background: var(--lcf-primary-dk);
}

.lcf-btn-reset {
    height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    background: transparent;
    color: var(--lcf-text-muted);
    border: 1px solid var(--lcf-border);
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.lcf-btn-reset:hover {
    background: #f8fafc;
    color: var(--lcf-text);
    border-color: var(--lcf-text-muted);
}

/* ---- Legenda ---- */
.lcf-cal-legenda {
    background: var(--lcf-white);
    border-bottom: 1px solid var(--lcf-border);
    padding: 14px 0;
}

.lcf-cal-legenda .lcf-cal-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lcf-legenda-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--lcf-text-muted);
    margin-right: 4px;
}

/* ---- Badges condivisi ---- */
.lcf-badge,
.lcf-legenda-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff;
}

.lcf-badge--residenziale,
.lcf-legenda-item.lcf-badge--residenziale { background: var(--lcf-residenziale); }

.lcf-badge--online,
.lcf-legenda-item.lcf-badge--online       { background: var(--lcf-online); }

.lcf-badge--misto,
.lcf-legenda-item.lcf-badge--misto        { background: var(--lcf-misto); }

.lcf-badge--webinar,
.lcf-legenda-item.lcf-badge--webinar      { background: var(--lcf-webinar); }

.lcf-badge--fad,
.lcf-legenda-item.lcf-badge--fad          { background: var(--lcf-fad); }

/* ---- Sezione principale ---- */
.lcf-cal-main {
    background: var(--lcf-bg);
    padding: 48px 0 80px;
}

/* ---- Header mese ---- */
.lcf-cal-month {
    margin-bottom: 12px;
}

.lcf-cal-month__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    margin-top: 40px;
}

.lcf-cal-month:first-child .lcf-cal-month__header {
    margin-top: 0;
}

.lcf-cal-month__header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--lcf-border);
}

.lcf-cal-month__title {
    font-family: "Montserrat", sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--lcf-dark);
    margin: 0;
    white-space: nowrap;
    letter-spacing: -0.3px;
}

/* ---- Card evento ---- */
.lcf-cal-event {
    display: flex;
    align-items: stretch;
    background: var(--lcf-white);
    border-radius: var(--lcf-radius);
    box-shadow: var(--lcf-shadow);
    margin-bottom: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border: 1px solid var(--lcf-border);
}

.lcf-cal-event:hover {
    box-shadow: var(--lcf-shadow-hov);
    transform: translateY(-2px);
}

/* Data badge (colonna sinistra) */
.lcf-cal-event__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    width: 72px;
    background: var(--lcf-dark);
    padding: 18px 8px;
    flex-shrink: 0;
    gap: 2px;
    position: relative;
}

.lcf-date-day {
    font-family: "Montserrat", sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--lcf-primary);
    line-height: 1;
    letter-spacing: -1px;
}

.lcf-date-month {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.lcf-badge-incorso {
    margin-top: 8px;
    background: #22c55e;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Immagine */
.lcf-cal-event__image {
    width: 110px;
    min-width: 110px;
    flex-shrink: 0;
    overflow: hidden;
    background: #f8fafc;
}

.lcf-cal-event__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.lcf-cal-event:hover .lcf-cal-event__image img {
    transform: scale(1.04);
}

/* Corpo testo */
.lcf-cal-event__body {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}

.lcf-cal-event__badges {
    margin-bottom: 2px;
}

.lcf-cal-event__title {
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--lcf-text);
    margin: 0;
    line-height: 1.3;
}

.lcf-cal-event__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.lcf-cal-event__title a:hover {
    color: var(--lcf-primary);
}

.lcf-cal-event__subtitle {
    font-size: 13px;
    color: var(--lcf-text-muted);
    margin: 0;
    line-height: 1.45;
    font-style: italic;
}

/* Meta: luogo + data */
.lcf-cal-event__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 2px;
}

.lcf-cal-event__luogo,
.lcf-cal-event__data-testo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--lcf-text);
}

.lcf-cal-event__luogo svg,
.lcf-cal-event__data-testo svg {
    color: var(--lcf-primary);
    flex-shrink: 0;
}

/* Relatori */
.lcf-cal-event__relatori {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 12px;
    color: var(--lcf-text-muted);
    margin: 0;
    line-height: 1.4;
}

.lcf-cal-event__relatori svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* CTA button */
.lcf-cal-event__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--lcf-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: gap 0.2s ease;
    align-self: flex-start;
}

.lcf-cal-event__cta:hover {
    gap: 10px;
    color: var(--lcf-primary-dk);
}

/* Messaggio vuoto */
.lcf-cal-empty {
    text-align: center;
    color: var(--lcf-text-muted);
    padding: 48px 0;
    font-size: 16px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* -- Responsive Search -- */
@media (max-width: 980px) {
    .lcf-search-row--bottom {
        grid-template-columns: 1fr 1fr;
    }
    .lcf-search-actions {
        grid-column: span 2;
        justify-content: flex-end;
    }
}

@media (max-width: 767px) {
    .lcf-search-row,
    .lcf-search-row--bottom {
        grid-template-columns: 1fr;
    }

    .lcf-search-actions {
        grid-column: span 1;
        width: 100%;
    }

    .lcf-btn-search {
        flex: 1;
    }

    .lcf-cal-hero__title {
        font-size: 30px;
    }

    .lcf-cal-event {
        flex-wrap: wrap;
    }

    .lcf-cal-event__date {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        padding: 12px 16px;
        gap: 8px;
        min-width: unset;
    }

    .lcf-date-day {
        font-size: 20px;
    }

    .lcf-cal-event__image {
        width: 100%;
        min-width: unset;
        height: 160px;
    }

    .lcf-cal-event__body {
        padding: 16px;
    }

    .lcf-cal-event__meta {
        flex-direction: column;
        gap: 6px;
    }
}

@media (min-width: 768px) and (max-width: 980px) {
    .lcf-cal-event__image {
        width: 90px;
        min-width: 90px;
    }

    .lcf-cal-event__title {
        font-size: 15px;
    }
}
