/* ===== Explore: sezione a tinta piatta (secondary bg + primary text) ===== */
.explore{
    background: var(--tertiary);
    color: var(--primary-dark); /* testo fuori dalle card in verde scuro */
    padding: clamp(32px,5vw,56px) 0;
}

.explore__head{ margin-bottom: 16px; }
.explore__title{
    margin: 0 0 .25em;
    font-size: clamp(22px,2.8vw,34px);
    line-height: 1.15;
    color: var(--primary-dark); /* titolo in verde scuro */
}
.explore__subtitle{
    margin: 0;
    color: color-mix(in oklab, var(--primary-dark) 80%, white); /* leggermente più soft */
}

/* Filtri come pulsanti (verde primario) */
.explore__filters{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 20px;
}

.chip{
    appearance: none;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .15s ease;
}
.chip:hover{
    transform: translateY(-1px);
    background: rgba(0,155,153,.10); /* alone primario leggero */
}
.chip:focus-visible{
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,155,153,.25);
}
.chip.is-active{
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Griglia card */
.explore__grid{
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 16px;
}
@media (max-width: 1100px){ .explore__grid{ grid-template-columns: repeat(3,1fr); } }
@media (max-width: 820px){ .explore__grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px){ .explore__grid{ grid-template-columns: 1fr; } }

/* Card */
.xcard{
    background: #fff;
    color: var(--ink-900);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-rows: auto 1fr;
    transition: transform .18s ease, box-shadow .18s ease;
}
.xcard:hover{
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0,0,0,.10);
}

.xcard__media{
    aspect-ratio: 4 / 3;
    background: #f8f9fb;
}
/* template img 1200×900 / 4:3*/
.xcard__media img{
    width: 100%; height: 100%;
    /*se le img sono ok, togliamo le 3 regole sotto*/
    /*object-fit: contain; */         /* mostra tutta l'illustrazione */
    /*object-position: center 35%;*/  /* leggermente rialzata */
    /*padding: 12px;*/
}

.xcard__body{
    padding: 14px 16px 16px;
    display: grid;
    gap: 8px;
}

.xcard__badge{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--secondary);   /* coerenza cromatica */
    color: var(--ink-900);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    width: fit-content;
}

.xcard__title{
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.xcard__cta{
    margin-top: 2px;
    color: var(--brand-900);
    font-weight: 700;
    text-decoration: none;
}
.xcard__cta:hover{ color: var(--brand-600); }

@media (max-width:600px){
    .chip{ padding: 7px 12px; font-size: 13px; }
}

/* Puntino rosso ON AIR */
.onair-dot{
    display:inline-block;
    width:10px;
    height:10px;
    border-radius:50%;
    margin-left:8px;
    background:#ff4b4b;
    box-shadow:0 0 0 0 rgba(255,75,75,.7);
    animation:onair-pulse 1.6s infinite;
    vertical-align:middle;
}
@keyframes onair-pulse{
    0%   { transform:scale(1);   box-shadow:0 0 0 0 rgba(255,75,75,.7); }
    70%  { transform:scale(1.2); box-shadow:0 0 0 10px rgba(255,75,75,0); }
    100% { transform:scale(1);   box-shadow:0 0 0 0 rgba(255,75,75,0); }
}

/* Stato caricamento / errore */
.explore__status{
    font-size:14px;
    color:var(--ink-700);
    margin-bottom:12px;
}

/* Chip attivi (già definiti, ma ribadisco per sicurezza) */
.chip.is-active{
    background:#fff;
    color:var(--primary-dark);
    border-color:#fff;
}
/* Box descrizione filtro */
/* Box descrizione filtro (più contrasto) */
.explore__desc{
    margin: 12px 0 18px;
    padding: 16px 18px;
    border-radius: 18px;

    background: rgba(255,255,255,.78);
    backdrop-filter: blur(8px);

    border: 1px solid rgba(7,98,103,.18);
    box-shadow: 0 14px 30px rgba(0,0,0,.10);

    color: var(--primary-dark);
    display: grid;
    gap: 8px;

    position: relative;
    overflow: hidden;
}

/* Barretta laterale moderna */
.explore__desc::before{
    content:"";
    position:absolute;
    left:0; top:0; bottom:0;
    width: 6px;
    background: var(--primary);
    opacity: .95;
}

/* Titolo */
.explore__desc strong{
    font-size: 15px;
    letter-spacing: .02em;
    padding-left: 8px; /* per non “toccare” la barretta */
}

/* Testo */
.explore__desc p{
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: rgba(17,17,17,.72);
    padding-left: 8px;
}

/* Animazione ingresso */
.explore__desc.is-show{
    animation: exploreDescIn .25s ease both;
}
@keyframes exploreDescIn{
    from{ opacity:0; transform: translateY(-6px); }
    to  { opacity:1; transform: translateY(0); }
}
.explore__desc[hidden]{
    display:none !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    box-shadow:none !important;
}
.explore__grid{
    margin-top: 50px;
}
#explore{
    padding-top: 50px;
    padding-bottom: 90px;
}
/* ===== XCARD: CTA button + barra colore categoria ===== */

.xcard{
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* contenuto */
.xcard__body{
    position: relative;
    padding: 16px 16px 18px 18px;
}

/* barra laterale (default) */
.xcard__body::before{
    content:"";
    position:absolute;
    left:0;
    top:14px;
    bottom:14px;
    width:3px;
    border-radius: 999px;
    background: var(--primary); /* fallback */
    opacity: .95;
}

/* badge resta, ma un filo più “premium” */
.xcard__badge{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    background: rgba(189,255,203,.65);
    color: var(--primary-dark);
}

/* CTA diventa un bottone */
.xcard__cta{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-top: 12px;
    padding: .65em 1.0em;
    border-radius: 12px;
    background: var(--primary);
    color:#fff;
    text-decoration:none;
    font-weight:700;
    border: 1px solid transparent;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.xcard__cta:hover{
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0,0,0,.08);
}

/* ===== Colori per categoria (barra + badge) ===== */
/* metti data-category sull'articolo: <article class="xcard" data-category="formazione"> */

.xcard[data-category="formazione"] .xcard__body::before{ background: var(--brand-600); }
.xcard[data-category="laboratori-supervisioni"] .xcard__body::before{ background: var(--primary); }
.xcard[data-category="crescita-personale"] .xcard__body::before{ background: #6f7cff; } /* tono “calmo” */
.xcard[data-category="talk-podcast"] .xcard__body::before{ background: #ff7a3d; }      /* tono “media” */

/* badge coerente con la categoria */
.xcard[data-category="formazione"] .xcard__badge{ background: rgba(10,160,232,.14); color: var(--brand-900); }
.xcard[data-category="laboratori-supervisioni"] .xcard__badge{ background: rgba(0,155,153,.14); color: var(--primary-dark); }
.xcard[data-category="crescita-personale"] .xcard__badge{ background: rgba(111,124,255,.14); color: #2e357a; }
.xcard[data-category="talk-podcast"] .xcard__badge{ background: rgba(255,122,61,.14); color: #7a2d10; }