/* La Ferla - Webtic Sync 1.3.3: dark-background presentation. */
.lfws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    gap: 28px;
    align-items: start;
    font-family: inherit;
    color: #d4d4d4 !important;
}
.lfws-grid .lfws-card {
    min-width: 0;
    max-width: 350px;
    width: 100%;
    margin-inline: auto;
    box-sizing: border-box;
    color: #d4d4d4 !important;
}
.lfws-grid .lfws-poster {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 2/3;
    object-fit: contain;
    background: transparent !important;
    border-radius: 4px;
}
.lfws-grid .lfws-placeholder {
    display: grid;
    place-items: center;
    color: #fff !important;
    text-align: center;
    padding: 1rem;
    box-sizing: border-box;
}
.lfws-grid .lfws-body {
    min-width: 0;
    padding: 16px 0;
    color: #d4d4d4 !important;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.lfws-grid .lfws-body h3 {
    font-size: clamp(19px,2vw,25px);
    line-height: 1.25;
    margin: 0 0 10px;
    color: #fff !important;
}
.lfws-grid .lfws-body .lfws-meta,
.lfws-grid .lfws-body .lfws-duration,
.lfws-grid .lfws-body .lfws-date {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 8px;
    color: #d4d4d4 !important;
}
.lfws-grid .lfws-body .lfws-duration,
.lfws-grid .lfws-body .lfws-date {
    display: flex;
    align-items: flex-start;
    gap: 7px;
}
.lfws-grid .lfws-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 2px;
    color: inherit;
}
.lfws-grid .lfws-body .lfws-date {
    font-weight: 600;
    color: #fff !important;
    margin-bottom: 12px;
}
.lfws-grid .lfws-body details {
    font-size: 14px;
    margin: 10px 0;
    overflow-wrap: anywhere;
    color: #d4d4d4 !important;
}
.lfws-grid .lfws-body summary {
    cursor: pointer;
    font-weight: 600;
    line-height: 1.5;
    color: #fff !important;
    padding: 4px 0;
}
.lfws-grid .lfws-body details p,
.lfws-grid .lfws-body details ul,
.lfws-grid .lfws-body details li {
    color: #d4d4d4 !important;
}
.lfws-grid .lfws-body details p { margin: 8px 0; }
.lfws-grid .lfws-body details strong { color: #fff !important; }
.lfws-grid .lfws-shows ul { padding-inline-start: 18px; margin: 8px 0; }
.lfws-grid .lfws-body .lfws-button {
    display: block;
    text-align: center;
    padding: 12px 14px;
    min-height: 44px;
    box-sizing: border-box;
    background-color: #9b1911 !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 16px;
}
.lfws-grid .lfws-body .lfws-button:hover,
.lfws-grid .lfws-body .lfws-button:focus { background-color: #400b0c !important; }
.lfws-grid .lfws-body .lfws-trailer {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #fff !important;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 8px 0;
}
.lfws-empty { padding: 12px 0; color: #d4d4d4 !important; }
.lfws-empty a { color: #fff !important; text-decoration: underline; }
.lfws-grid a:focus-visible,
.lfws-grid summary:focus-visible,
.lfws-empty a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Prossimamente: flexbox con ritorno a capo, massimo quattro schede per riga. */
.lfws-grid.lfws-grid--upcoming {
    display: flex !important;
    flex-flow: row wrap !important;
    gap: 18px !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}
.lfws-grid.lfws-grid--upcoming > .lfws-card {
    display: block !important;
    flex: 0 0 var(--lfws-upcoming-basis, min(100%, max(160px, calc((100% - 54px) / 4)))) !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.lfws-grid.lfws-grid--upcoming .lfws-body h3 {
    font-size: clamp(18px, 2vw, 24px);
}
/* Consenti al widget shortcode di usare tutta la larghezza del suo contenitore Elementor. */
.elementor-widget-shortcode:has(.lfws-grid--upcoming),
.elementor-widget-shortcode .elementor-widget-container:has(.lfws-grid--upcoming),
.elementor-shortcode:has(.lfws-grid--upcoming) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

/* Adesso al cinema: un film per riga; locandina a sinistra se c'è spazio. */
.lfws-grid.lfws-grid--current {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
}
.lfws-grid.lfws-grid--current .lfws-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    max-width: none;
    align-items: start;
}
.lfws-grid.lfws-grid--current .lfws-poster {
    align-self: start;
    max-width: 350px;
    justify-self: center;
}
.lfws-grid.lfws-grid--current .lfws-body h3 {
    font-size: clamp(24px, 3vw, 36px);
}

/* Fallback per i browser che non supportano le container query. */
@media (max-width: 767px) {
    .lfws-grid .lfws-body { padding: 12px 0; }
    .lfws-grid .lfws-body .lfws-button { font-size: 14px; padding: 10px 8px; }
}
@media (min-width: 768px) {
    .lfws-grid.lfws-grid--current .lfws-card {
        grid-template-columns: minmax(0, min(34%, 320px)) minmax(0, 1fr);
        gap: clamp(20px, 3vw, 40px);
    }
    .lfws-grid.lfws-grid--current .lfws-body { padding: 0; }
    .lfws-grid.lfws-grid--current .lfws-body .lfws-button {
        width: fit-content;
        max-width: 100%;
        min-width: min(220px, 100%);
    }
    .lfws-grid.lfws-grid--current .lfws-body .lfws-trailer { width: fit-content; max-width: 100%; }
}

/* Nei browser moderni conta la larghezza reale del widget Elementor,
   anche quando la pagina usa colonne, sidebar o contenitori stretti. */
@supports (container-type: inline-size) {
    .lfws-grid.lfws-grid--current { container: lfws-current / inline-size; }
    .lfws-grid.lfws-grid--current .lfws-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
    .lfws-grid.lfws-grid--current .lfws-body { padding: 16px 0; }
    .lfws-grid.lfws-grid--current .lfws-body .lfws-button,
    .lfws-grid.lfws-grid--current .lfws-body .lfws-trailer { width: 100%; min-width: 0; max-width: 100%; }
    @container lfws-current (min-width: 580px) {
        .lfws-grid.lfws-grid--current .lfws-card {
            grid-template-columns: minmax(0, min(34%, 320px)) minmax(0, 1fr);
            gap: clamp(20px, 4cqi, 40px);
        }
        .lfws-grid.lfws-grid--current .lfws-body { padding: 0; }
        .lfws-grid.lfws-grid--current .lfws-body .lfws-button { width: fit-content; min-width: min(220px, 100%); }
        .lfws-grid.lfws-grid--current .lfws-body .lfws-trailer { width: fit-content; }
    }
}

/* Prossimamente: 1 colonna smartphone, 2 tablet, fino a 4 desktop. */
@media (max-width: 767px) {
    .lfws-grid.lfws-grid--upcoming {
        --lfws-upcoming-basis: 100%;
    }
}
@media (min-width: 768px) and (max-width: 1024px) {
    .lfws-grid.lfws-grid--upcoming {
        --lfws-upcoming-basis: min(100%, max(160px, calc((100% - 18px) / 2)));
    }
}
