.sc-wrap{width:100%;padding:20px 0}
.sc-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-items:start}

/* Card — altezza FISSA, tutto troncato */
.sc-card{
    background:#fff;
    border:1px solid #e2ddd4;
    border-radius:4px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    box-shadow:0 2px 12px rgba(0,0,0,.07);
    cursor:pointer;
    height:320px; /* altezza fissa uguale per tutte */
    transition:height .4s cubic-bezier(.25,.46,.45,.94),
               box-shadow .3s, border-color .3s, transform .3s;
}
.sc-card:hover{
    height:440px;
    box-shadow:0 8px 32px rgba(0,0,0,.13);
    border-color:#b8963e;
    transform:translateY(-2px);
}

/* Immagine fissa */
.sc-card-img{
    width:100%; height:150px;
    flex-shrink:0; overflow:hidden;
    background:#f5f4f1;
}
.sc-card-img img{
    width:100%; height:100%;
    object-fit:cover; display:block;
    transition:transform .4s;
}
.sc-card:hover .sc-card-img img{transform:scale(1.05)}

/* Corpo */
.sc-card-body{
    padding:12px 14px 14px;
    display:flex; flex-direction:column;
    flex:1; overflow:hidden;
    min-height:0;
}

/* Testata */
.sc-testata{
    font-size:.62rem; font-weight:700;
    letter-spacing:.13em; text-transform:uppercase;
    color:#b8963e; margin:0 0 5px;
    flex-shrink:0;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.sc-sep{height:1px; background:#e2ddd4; margin:5px 0; flex-shrink:0}

/* Titolo — max 2 righe poi ... */
.sc-title{
    font-family:Georgia,serif;
    font-size:.85rem; font-weight:700;
    color:#111; margin:0 0 6px;
    line-height:1.3; flex-shrink:0;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

/* Testo breve — 2 righe poi ... */
.sc-text{
    font-size:.76rem; line-height:1.6; color:#555;
    margin:0; flex-shrink:0;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

/* Testo full — si rivela all'hover */
.sc-text-full{
    font-size:.74rem; line-height:1.6; color:#666;
    margin:6px 0 0; flex-shrink:0;
    max-height:0; overflow:hidden; opacity:0;
    transition:max-height .35s ease .05s, opacity .28s ease .08s;
}
.sc-card:hover .sc-text-full{max-height:120px; opacity:1}

/* Divisore */
.sc-divider{
    height:1px; background:#e2ddd4;
    margin:10px 0; flex-shrink:0;
    opacity:0; transition:opacity .25s ease .1s;
}
.sc-card:hover .sc-divider{opacity:1}

/* Pulsante */
.sc-btn{
    display:inline-flex; align-items:center; gap:6px;
    align-self:flex-start; margin-top:auto;
    padding:7px 16px;
    background:#111; border:1px solid #111;
    color:#fff !important;
    font-size:.68rem; font-weight:700;
    letter-spacing:.09em; text-transform:uppercase;
    text-decoration:none; border-radius:2px; flex-shrink:0;
    opacity:0; transform:translateY(4px);
    transition:opacity .25s ease .1s, transform .25s ease .1s, background .2s;
}
.sc-card:hover .sc-btn{opacity:1; transform:translateY(0)}
.sc-btn:hover{background:#b8963e; border-color:#b8963e; color:#fff !important; text-decoration:none}

/* Responsive */
@media(max-width:1100px){
    .sc-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:600px){
    .sc-grid{grid-template-columns:1fr}
    .sc-card{height:auto !important}
    .sc-card:hover{transform:none}
    .sc-card-img{height:180px}
    .sc-text-full,.sc-divider,.sc-btn{opacity:1 !important; max-height:200px !important; transform:none !important}
}

/* ── Data pubblicazione ── */
.sc-testata-row{
    display:flex; align-items:baseline; justify-content:space-between;
    gap:6px; flex-shrink:0;
}
.sc-pub-date{
    font-size:.58rem; color:#999; letter-spacing:.04em;
    white-space:nowrap; flex-shrink:0;
}

/* ── Barra filtro ordinamento ── */
.sc-sort-bar{
    display:flex; align-items:center; gap:8px;
    margin-bottom:18px; flex-wrap:wrap;
}
.sc-sort-label{
    font-size:.7rem; color:#888; letter-spacing:.06em;
    text-transform:uppercase; font-weight:600;
}
.sc-sort-btn{
    font-size:.68rem; font-weight:700; letter-spacing:.07em;
    text-transform:uppercase; cursor:pointer;
    padding:5px 14px; border-radius:2px;
    border:1px solid #111; background:transparent; color:#111;
    transition:all .2s;
}
.sc-sort-btn:hover{ background:#111; border-color:#111; color:#fff; }
.sc-sort-btn.sc-sort-active{
    background:#111; border-color:#111; color:#fff;
}

/* ── Toolbar filtri: data a sinistra, tipologia a destra ── */
.sc-filter-toolbar{
    display:grid;
    grid-template-columns:1fr 1fr;
    align-items:center;
    gap:18px;
    margin-bottom:18px;
}
.sc-filter-toolbar .sc-sort-bar,
.sc-filter-toolbar .sc-type-bar{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:nowrap;
    margin-bottom:0;
}
.sc-sort-right{margin-left:auto;justify-content:flex-end}
.sc-type-btn{
    font-size:.68rem; font-weight:700; letter-spacing:.07em;
    text-transform:uppercase; cursor:pointer;
    padding:5px 14px; border-radius:2px;
    border:1px solid #111; background:transparent; color:#111;
    transition:all .2s;
}
.sc-type-btn:hover{ background:#111; border-color:#111; color:#fff; }
.sc-type-btn.sc-type-active{
    background:#111; border-color:#111; color:#fff;
}
@media(max-width:700px){
    .sc-filter-toolbar{display:flex; flex-direction:column; align-items:flex-start; gap:14px}
    .sc-filter-toolbar .sc-sort-bar,
    .sc-filter-toolbar .sc-type-bar{width:100%; justify-content:flex-start; flex-wrap:wrap}
    .sc-sort-right{margin-left:0;justify-content:flex-start;width:100%}
    .sc-type-bar .sc-sort-label{width:100%;}
}


/* ── V4: allineamento perfetto toolbar + stesso comportamento hover ── */
.sc-filter-toolbar{
    display:flex !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    gap:18px !important;
    margin-bottom:34px !important;
}
.sc-filter-toolbar .sc-sort-bar,
.sc-filter-toolbar .sc-type-bar{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    flex-wrap:nowrap !important;
    margin:0 !important;
    padding:0 !important;
    min-height:30px !important;
    line-height:1 !important;
}
.sc-sort-right{
    margin-left:auto !important;
    justify-content:flex-end !important;
}
.sc-sort-label{
    display:inline-flex !important;
    align-items:center !important;
    height:30px !important;
    margin:0 !important;
    line-height:1 !important;
}
.sc-sort-btn,
.sc-type-btn{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:30px !important;
    box-sizing:border-box !important;
    border:1px solid #111 !important;
    background:transparent !important;
    color:#111 !important;
    line-height:1 !important;
    appearance:none !important;
    -webkit-appearance:none !important;
}
.sc-sort-btn:hover,
.sc-type-btn:hover,
.sc-sort-btn.sc-sort-active,
.sc-type-btn.sc-type-active{
    background:#111 !important;
    border-color:#111 !important;
    color:#fff !important;
}
@media(max-width:700px){
    .sc-filter-toolbar{
        display:flex !important;
        flex-direction:column !important;
        align-items:flex-start !important;
        justify-content:flex-start !important;
        gap:14px !important;
        margin-bottom:24px !important;
    }
    .sc-filter-toolbar .sc-sort-bar,
    .sc-filter-toolbar .sc-type-bar{
        width:100% !important;
        justify-content:flex-start !important;
        flex-wrap:wrap !important;
    }
    .sc-filter-toolbar .sc-type-bar{
        clear:both !important;
    }
    .sc-sort-right{
        margin-left:0 !important;
        justify-content:flex-start !important;
        width:100% !important;
    }
    .sc-type-bar .sc-sort-label{
        flex:0 0 100% !important;
        width:100% !important;
        height:auto !important;
        margin-bottom:2px !important;
    }
}


/* ── V5 definitivo: toolbar realmente sulla stessa linea ── */
.sc-filter-toolbar{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:18px !important;
    margin-bottom:28px !important;
}
.sc-filter-toolbar .sc-sort-bar,
.sc-filter-toolbar .sc-type-bar{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    flex-wrap:nowrap !important;
    margin:0 !important;
    padding:0 !important;
    min-height:30px !important;
    line-height:1 !important;
    transform:none !important;
}
.sc-filter-toolbar .sc-type-bar{ margin-left:auto !important; }
.sc-filter-toolbar .sc-sort-label,
.sc-filter-toolbar .sc-sort-btn,
.sc-filter-toolbar .sc-type-btn{
    margin-top:0 !important;
    margin-bottom:0 !important;
    vertical-align:middle !important;
}
.sc-filter-toolbar .sc-sort-label{
    display:inline-flex !important;
    align-items:center !important;
    height:30px !important;
    line-height:1 !important;
}
.sc-filter-toolbar .sc-sort-btn,
.sc-filter-toolbar .sc-type-btn{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:30px !important;
    padding:5px 14px !important;
    box-sizing:border-box !important;
    border:1px solid #111 !important;
    background:transparent !important;
    color:#111 !important;
    line-height:1 !important;
    appearance:none !important;
    -webkit-appearance:none !important;
}
.sc-filter-toolbar .sc-sort-btn:hover,
.sc-filter-toolbar .sc-type-btn:hover,
.sc-filter-toolbar .sc-sort-btn.sc-sort-active,
.sc-filter-toolbar .sc-type-btn.sc-type-active{
    background:#111 !important;
    border-color:#111 !important;
    color:#fff !important;
}
@media(max-width:700px){
    .sc-filter-toolbar{
        display:flex !important;
        flex-direction:column !important;
        align-items:flex-start !important;
        justify-content:flex-start !important;
        gap:14px !important;
        margin-bottom:24px !important;
    }
    .sc-filter-toolbar .sc-sort-bar,
    .sc-filter-toolbar .sc-type-bar{
        width:100% !important;
        justify-content:flex-start !important;
        flex-wrap:wrap !important;
        margin-left:0 !important;
    }
    .sc-filter-toolbar .sc-type-bar{
        clear:both !important;
    }
    .sc-filter-toolbar .sc-type-bar .sc-sort-label{
        flex:0 0 100% !important;
        width:100% !important;
        height:auto !important;
        margin-bottom:2px !important;
    }
}

/* ── V7: toolbar shortcode frontend allineata e autonoma ── */
.sc-wrap-v10 .sc-filter-toolbar{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:18px !important;
    margin:0 0 34px !important;
    padding:0 !important;
    width:100% !important;
    box-sizing:border-box !important;
}
.sc-wrap-v10 .sc-sort-bar,
.sc-wrap-v10 .sc-type-bar{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    flex-wrap:nowrap !important;
    margin:0 !important;
    padding:0 !important;
    min-height:30px !important;
    line-height:1 !important;
}
.sc-wrap-v10 .sc-sort-left{justify-content:flex-start !important;}
.sc-wrap-v10 .sc-sort-right{justify-content:flex-end !important;margin-left:auto !important;}
.sc-wrap-v10 .sc-sort-label{
    display:inline-flex !important;
    align-items:center !important;
    height:30px !important;
    margin:0 !important;
    line-height:1 !important;
    white-space:nowrap !important;
}
.sc-wrap-v10 .sc-sort-btn,
.sc-wrap-v10 .sc-type-btn{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:30px !important;
    padding:5px 14px !important;
    box-sizing:border-box !important;
    border:1px solid #111 !important;
    background:transparent !important;
    color:#111 !important;
    line-height:1 !important;
    text-decoration:none !important;
    appearance:none !important;
    -webkit-appearance:none !important;
    border-radius:2px !important;
}
.sc-wrap-v10 .sc-sort-btn:hover,
.sc-wrap-v10 .sc-type-btn:hover,
.sc-wrap-v10 .sc-sort-btn.sc-sort-active,
.sc-wrap-v10 .sc-type-btn.sc-type-active{
    background:#111 !important;
    border-color:#111 !important;
    color:#fff !important;
    text-decoration:none !important;
}

/* Badge visibile anche sullo shortcode frontend */
.sc-wrap-v10 .sc-type-badge{
    display:inline-flex;
    align-self:flex-start;
    margin:0 0 8px;
    padding:4px 8px;
    border:1px solid #111;
    border-radius:2px;
    background:#fff;
    color:#111;
    font-size:.56rem;
    font-weight:800;
    line-height:1;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.sc-wrap-v10 .sc-type-badge-eventi{
    background:#111;
    color:#fff;
}

@media(max-width:700px){
    .sc-wrap-v10 .sc-filter-toolbar{
        flex-direction:column !important;
        align-items:flex-start !important;
        justify-content:flex-start !important;
        gap:14px !important;
        margin-bottom:24px !important;
    }
    .sc-wrap-v10 .sc-sort-bar,
    .sc-wrap-v10 .sc-type-bar{
        width:100% !important;
        justify-content:flex-start !important;
        flex-wrap:wrap !important;
    }
    .sc-wrap-v10 .sc-type-bar{
        clear:both !important;
    }
    .sc-wrap-v10 .sc-type-bar .sc-sort-label{
        width:100% !important;
        height:auto !important;
        margin-bottom:0 !important;
    }
}

/* ════════════════════════════════
   V7 — filtro shortcode realmente applicato alle card frontend
   ════════════════════════════════ */
.sc-wrap-v10 .sc-card[hidden],
.sc-wrap-v10 .sc-card[aria-hidden="true"]{
    display:none !important;
}
.sc-wrap-v10.sc-show-rassegna_stampa .sc-card[data-card-type="eventi"]{
    display:none !important;
}
.sc-wrap-v10.sc-show-eventi .sc-card[data-card-type="rassegna_stampa"]{
    display:none !important;
}
.sc-wrap-v10.sc-show-rassegna_stampa .sc-card[data-card-type="rassegna_stampa"],
.sc-wrap-v10.sc-show-eventi .sc-card[data-card-type="eventi"]{
    display:flex;
}
@supports selector(:has(*)){
    .sc-wrap-v10:has(.sc-type-btn[data-type="rassegna_stampa"].sc-type-active) .sc-card[data-card-type="eventi"]{
        display:none !important;
    }
    .sc-wrap-v10:has(.sc-type-btn[data-type="eventi"].sc-type-active) .sc-card[data-card-type="rassegna_stampa"]{
        display:none !important;
    }
}
.sc-wrap-v10 .sc-filter-toolbar{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:space-between !important;
    width:100% !important;
    gap:18px !important;
    margin:0 0 34px !important;
    padding:0 !important;
}
.sc-wrap-v10 .sc-sort-bar,
.sc-wrap-v10 .sc-type-bar{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    flex-wrap:nowrap !important;
    margin:0 !important;
    padding:0 !important;
    min-height:30px !important;
    line-height:1 !important;
}
.sc-wrap-v10 .sc-sort-left{justify-content:flex-start !important;}
.sc-wrap-v10 .sc-sort-right{justify-content:flex-end !important;margin-left:auto !important;}
.sc-wrap-v10 .sc-sort-label,
.sc-wrap-v10 .sc-sort-btn,
.sc-wrap-v10 .sc-type-btn{
    margin-top:0 !important;
    margin-bottom:0 !important;
    transform:none !important;
    vertical-align:middle !important;
}
.sc-wrap-v10 .sc-sort-btn,
.sc-wrap-v10 .sc-type-btn{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:30px !important;
    min-height:30px !important;
    box-sizing:border-box !important;
    border:1px solid #111 !important;
    background:transparent !important;
    color:#111 !important;
    line-height:1 !important;
    appearance:none !important;
    -webkit-appearance:none !important;
}
.sc-wrap-v10 .sc-sort-btn:hover,
.sc-wrap-v10 .sc-type-btn:hover,
.sc-wrap-v10 .sc-sort-btn.sc-sort-active,
.sc-wrap-v10 .sc-type-btn.sc-type-active{
    background:#111 !important;
    border-color:#111 !important;
    color:#fff !important;
}
@media(max-width:700px){
    .sc-wrap-v10 .sc-filter-toolbar{
        flex-direction:column !important;
        align-items:flex-start !important;
        justify-content:flex-start !important;
        gap:14px !important;
        margin-bottom:24px !important;
    }
    .sc-wrap-v10 .sc-sort-bar,
    .sc-wrap-v10 .sc-type-bar{
        width:100% !important;
        justify-content:flex-start !important;
        flex-wrap:wrap !important;
    }
    .sc-wrap-v10 .sc-type-bar{
        margin-left:0 !important;
        clear:both !important;
    }
    .sc-wrap-v10 .sc-type-bar .sc-sort-label{
        width:100% !important;
        flex-basis:100% !important;
    }
}

/* ════════════════════════════════
   V9 CLEAN — unico bottone Mostra di più / Mostra meno
   stile oro come il vecchio “Mostra tutte le rassegne”
   ════════════════════════════════ */
.sc-wrap-v10 .sc-more-row{
    display:flex !important;
    justify-content:center !important;
    width:100% !important;
    margin:28px 0 0 !important;
    padding:0 !important;
}
.sc-wrap-v10 .sc-more-btn{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:42px !important;
    padding:12px 34px !important;
    border:1px solid #c9a85a !important;
    border-radius:2px !important;
    background:transparent !important;
    color:#b8963e !important;
    font-size:.68rem !important;
    font-weight:800 !important;
    letter-spacing:.14em !important;
    line-height:1 !important;
    text-transform:uppercase !important;
    cursor:pointer !important;
    appearance:none !important;
    -webkit-appearance:none !important;
    box-shadow:none !important;
}
.sc-wrap-v10 .sc-more-btn:hover{
    background:#b8963e !important;
    border-color:#b8963e !important;
    color:#fff !important;
}
.sc-wrap-v10 .sc-more-btn[hidden],
.sc-wrap-v10 .sc-more-row:has(.sc-more-btn[hidden]){
    display:none !important;
}
.sc-wrap-v10 .sc-card[hidden],
.sc-wrap-v10 .sc-card[aria-hidden="true"]{
    display:none !important;
}
@media(max-width:700px){
    .sc-wrap-v10 .sc-filter-toolbar{
        display:flex !important;
        flex-direction:column !important;
        align-items:flex-end !important;
        justify-content:flex-start !important;
        gap:12px !important;
        width:100% !important;
        margin-bottom:24px !important;
        text-align:right !important;
    }
    .sc-wrap-v10 .sc-sort-bar,
    .sc-wrap-v10 .sc-type-bar{
        display:flex !important;
        width:100% !important;
        justify-content:flex-end !important;
        align-items:center !important;
        flex-wrap:wrap !important;
        gap:7px !important;
        margin-left:0 !important;
        text-align:right !important;
    }
    .sc-wrap-v10 .sc-type-bar .sc-sort-label,
    .sc-wrap-v10 .sc-sort-label{
        width:auto !important;
        flex:0 0 auto !important;
        height:30px !important;
        margin:0 !important;
        text-align:right !important;
        white-space:nowrap !important;
    }
    .sc-wrap-v10 .sc-sort-btn,
    .sc-wrap-v10 .sc-type-btn{
        height:30px !important;
        min-height:30px !important;
        padding:5px 10px !important;
        white-space:nowrap !important;
    }
    .sc-wrap-v10 .sc-more-row{
        justify-content:center !important;
        margin-top:24px !important;
    }
}

/* V10 - animazione apertura/chiusura articoli */
.sc-wrap-v10 .sc-card{
    will-change: opacity, transform;
    transform-origin: center top;
}

.sc-wrap-v10 .sc-card.sc-card-anim-enter{
    opacity:0 !important;
    transform:translateY(18px) scale(.985) !important;
}

.sc-wrap-v10 .sc-card.sc-card-anim-enter.sc-card-anim-enter-active{
    opacity:1 !important;
    transform:translateY(0) scale(1) !important;
    transition:
        opacity 420ms cubic-bezier(.22,.61,.36,1) var(--sc-anim-delay,0ms),
        transform 420ms cubic-bezier(.22,.61,.36,1) var(--sc-anim-delay,0ms),
        box-shadow 420ms ease var(--sc-anim-delay,0ms);
}

.sc-wrap-v10 .sc-card.sc-card-anim-leave{
    opacity:0 !important;
    transform:translateY(-14px) scale(.985) !important;
    pointer-events:none !important;
    transition:
        opacity 360ms cubic-bezier(.4,0,.2,1) var(--sc-anim-delay,0ms),
        transform 360ms cubic-bezier(.4,0,.2,1) var(--sc-anim-delay,0ms);
}

.sc-wrap-v10.sc-list-is-animating .sc-grid{
    transition:padding 220ms ease;
}

.sc-wrap-v10 .sc-more-btn.sc-more-btn-switching{
    transform:translateY(-1px) scale(.985);
    transition:transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

@media (prefers-reduced-motion: reduce){
    .sc-wrap-v10 .sc-card.sc-card-anim-enter,
    .sc-wrap-v10 .sc-card.sc-card-anim-enter.sc-card-anim-enter-active,
    .sc-wrap-v10 .sc-card.sc-card-anim-leave,
    .sc-wrap-v10 .sc-more-btn.sc-more-btn-switching{
        transition:none !important;
        transform:none !important;
    }
}
