/**
 * Corsi per tag — [mafad-featured-courses]
 *
 * 1. Intestazione sezione
 * 2. Stato (iscritto / data inizio / scadenza imminente) — condiviso
 * 3. Spotlight (1 corso) e card (2-3 corsi)
 * 4. Box info: date, iscritti, discipline accreditate
 * 5. Lista compatta (4+ corsi)
 * 6. Animazioni (solo questa sezione — l'elenco corsi non è toccato)
 * 7. Responsive
 *
 * Box neutri (bianco + bordo grigio). Il colore resta su:
 * accento rosa dello spotlight, badge ECM teal, CTA rosa, scadenza imminente ambra.
 *
 * @since 2.1.0
 */


/* =========================================================================
 * 1. INTESTAZIONE
 * ========================================================================= */

.mafad-featured-courses {
    margin: 0 0 36px;
}

.mafad-featured-courses *,
.mafad-featured-courses *::before,
.mafad-featured-courses *::after {
    box-sizing: border-box;
}

.mafad-featured-courses__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.mafad-featured-courses__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 24px;
    line-height: 1.3;
    color: #222222;
}

.mafad-featured-courses__star {
    flex: 0 0 auto;
    color: #c1146e;
}

.mafad-featured-courses__count {
    font-size: 13px;
    color: #888888;
    white-space: nowrap;
}


/* =========================================================================
 * 2. STATO (condiviso)
 * ========================================================================= */

.mafad-fc-status {
    font-size: 12.5px;
    color: #777777;
}

.mafad-fc-status--soon {
    font-weight: 600;
    color: #b45f06;
}

.mafad-fc-status--enrolled {
    color: #1d9b93;
}

.mafad-fc-pulse {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 2px;
    border-radius: 50%;
    background: #b45f06;
    vertical-align: 1px;
}


/* =========================================================================
 * 3. SPOTLIGHT + CARD
 * ========================================================================= */

.mafad-fc-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.mafad-fc-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.mafad-fc-card:hover {
    border-color: #c9c9c9;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

/*
 * Locandina: mostrata intera (contain) e mai oltre la risoluzione originale
 * (max-width/max-height inline dal template). Dietro, la stessa immagine
 * sfocata riempie lo spazio, così le locandine verticali non lasciano bande vuote.
 */
.mafad-fc-card__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 240px;
    padding: 16px;
    overflow: hidden;
    isolation: isolate;
    background-color: #eef3f3;
}

.mafad-fc-card__media::before {
    content: "";
    position: absolute;
    inset: -24px;
    z-index: -1;
    background-image: var(--mafad-fc-poster, none);
    background-size: cover;
    background-position: center;
    filter: blur(22px) saturate(1.1);
    opacity: 0.55;
}

.mafad-fc-card__poster {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition: transform 0.35s ease;
}

.mafad-fc-card:hover .mafad-fc-card__poster {
    transform: scale(1.04) rotate(-1deg);
}

/* Badge crediti: numero grande + etichetta su due righe */
.mafad-fc-card__ecm {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 10px;
    border-radius: 10px;
    background: #1d9b93;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(17, 94, 89, 0.3);
}

.mafad-fc-card__ecm-num {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
}

.mafad-fc-card__ecm-label {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.mafad-fc-card__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1 1 auto;
    padding: 18px;
}

.mafad-fc-card__title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
}

.mafad-fc-card__title a {
    color: #222222;
    text-decoration: none !important;
}

.mafad-fc-card__title a:hover {
    color: #1d9b93;
}

.mafad-fc-card__excerpt {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.6;
    color: #555555;
}

.mafad-fc-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mafad-fc-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border: 1px solid #e3e3e3;
    border-radius: 999px;
    font-size: 12.5px;
    line-height: 1.4;
    color: #555555;
}

.mafad-fc-chip.mafad-fc-status--soon {
    border-color: #f0d2b0;
    color: #b45f06;
}

.mafad-fc-chip.mafad-fc-status--enrolled {
    border-color: #bfe3e0;
    color: #1d9b93;
}

.mafad-fc-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.mafad-fc-teacher {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.mafad-fc-teacher__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    overflow: hidden;
    border-radius: 50%;
    background: #eef3f3;
    color: #1d9b93;
    font-size: 13px;
    font-weight: 700;
}

.mafad-fc-teacher__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mafad-fc-teacher__name {
    overflow: hidden;
    font-size: 13.5px;
    color: #555555;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mafad-fc-card__buy {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.mafad-fc-card__price {
    font-size: 19px;
    font-weight: 700;
    color: #222222;
    white-space: nowrap;
}

/* CTA: freccia che scorre all'hover + riflesso che passa dopo l'entrata */
.mafad-fc-card__cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    padding: 10px 18px;
    border-radius: 8px;
    background: #c1146e;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.mafad-fc-card__cta::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 45%;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    pointer-events: none;
}

.mafad-fc-card__cta-arrow {
    flex: 0 0 auto;
    transition: transform 0.2s ease;
}

.mafad-fc-card__cta:hover,
.mafad-fc-card__cta:focus-visible {
    background: #a00f5a;
    box-shadow: 0 6px 16px rgba(193, 20, 110, 0.3);
    transform: translateY(-1px);
}

.mafad-fc-card__cta:hover .mafad-fc-card__cta-arrow,
.mafad-fc-card__cta:focus-visible .mafad-fc-card__cta-arrow {
    transform: translateX(4px);
}

.mafad-fc-card__cta:active {
    transform: translateY(0) scale(0.98);
}

.mafad-fc-card__cta--enrolled {
    background: #1d9b93;
}

.mafad-fc-card__cta--enrolled:hover,
.mafad-fc-card__cta--enrolled:focus-visible {
    background: #178a83;
    box-shadow: 0 6px 16px rgba(29, 155, 147, 0.3);
}

.mafad-fc-card__cta:focus-visible,
.mafad-fc-card__title a:focus-visible {
    outline: 2px solid #1d9b93;
    outline-offset: 2px;
}



/* =========================================================================
 * 3b. SPOTLIGHT (1 corso) — pannello sinistro + corpo informativo
 * ========================================================================= */

.mafad-featured-courses--spotlight .mafad-featured-courses__title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #c1146e;
}

.mafad-featured-courses--spotlight .mafad-featured-courses__star {
    width: 18px;
    height: 18px;
}

.mafad-fc-spot {
    display: grid;
    grid-template-columns: minmax(280px, 37%) minmax(0, 1fr);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(16, 24, 48, 0.08);
}

.mafad-fc--anim.is-done .mafad-fc-spot,
.mafad-featured-courses:not(.mafad-fc--anim) .mafad-fc-spot {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.mafad-fc-spot:hover {
    box-shadow: 0 24px 52px rgba(16, 24, 48, 0.12);
    transform: translateY(-3px);
}

/* ── Pannello sinistro ── */

.mafad-fc-spot__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    text-decoration: none !important;
}

.mafad-fc-spot__panel.mafad-fc-card__media {
    height: auto;
    min-height: 420px;
    padding: 28px;
}

.mafad-fc-spot__panel .mafad-fc-card__poster {
    max-height: 420px;
}

.mafad-fc-spot__panel--text {
    gap: 24px;
    overflow: hidden;
    isolation: isolate;
    padding: 40px 44px 36px;
    background: radial-gradient(120% 90% at 85% 40%, #2a3a6a 0%, #1b2547 45%, #141c38 100%);
    color: #ffffff;
}

/* Cerchi decorativi */
.mafad-fc-spot__rings {
    position: absolute;
    top: 50%;
    right: -22%;
    z-index: -1;
    width: 78%;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    transform: translateY(-50%);
    transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.mafad-fc-spot__rings::before,
.mafad-fc-spot__rings::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.mafad-fc-spot__rings::before {
    inset: -18%;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mafad-fc-spot__rings::after {
    inset: 14%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 70%);
}

.mafad-fc-spot:hover .mafad-fc-spot__rings {
    transform: translateY(-50%) scale(1.06) rotate(8deg);
}

.mafad-fc-spot__kicker {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    line-height: 1.5;
    text-transform: uppercase;
    color: #f06bb0;
}

.mafad-fc-spot__big {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 auto;
    font-size: clamp(64px, 7.5vw, 112px);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: -0.04em;
    color: #ffffff;
}

.mafad-fc-spot__big-accent {
    color: #ff4fa3;
}

.mafad-fc-spot__keywords {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #ffffff;
}

/* ── Corpo ── */

.mafad-fc-spot__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: 36px 40px 28px;
}

.mafad-fc-spot__eyebrow {
    align-self: flex-start;
    padding-top: 4px;
    border-top: 2px solid #c1146e;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #c1146e;
}

.mafad-fc-spot__title {
    margin: 0;
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.mafad-fc-spot__title a {
    color: #1b2547;
    text-decoration: none !important;
}

.mafad-fc-spot__title a:hover {
    color: #c1146e;
}

.mafad-fc-spot__subtitle {
    margin: -4px 0 0;
    font-size: 19px;
    font-style: italic;
    font-weight: 600;
    color: #3b4566;
}

.mafad-fc-spot__excerpt {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #4b5468;
}

/* Descrizione HTML dal contenuto del corso */
.mafad-fc-spot__excerpt > * {
    margin: 0 0 8px;
}

.mafad-fc-spot__excerpt > *:last-child {
    margin-bottom: 0;
}

.mafad-fc-spot__excerpt ul,
.mafad-fc-spot__excerpt ol {
    padding-left: 20px;
}

.mafad-fc-spot__excerpt li {
    margin: 0 0 2px;
}

.mafad-fc-spot__excerpt strong,
.mafad-fc-spot__excerpt b {
    color: #1b2547;
}

.mafad-fc-spot__excerpt a {
    color: #c1146e;
}

/* Barra accreditamento */
.mafad-fc-spot__accr {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: #f5f7fb;
    border: 1px solid #e4e8f0;
    border-radius: 12px;
}

.mafad-fc-spot__accr-icon {
    flex: 0 0 auto;
    color: #c1146e;
}

.mafad-fc-spot__accr-text {
    flex: 1 1 180px;
    min-width: 0;
    font-size: 15.5px;
    color: #1b2547;
}

.mafad-fc-spot__accr-details summary {
    cursor: pointer;
    list-style: none;
}

.mafad-fc-spot__accr-details summary::-webkit-details-marker {
    display: none;
}

.mafad-fc-spot__accr-toggle {
    margin-left: 8px;
    font-size: 13px;
    color: #c1146e;
    text-decoration: underline;
}

.mafad-fc-spot__accr-details[open] .mafad-fc-spot__accr-toggle {
    text-decoration: none;
}

.mafad-fc-spot__accr .mafad-fc-disc {
    margin-top: 8px;
    font-size: 13.5px;
}

.mafad-fc-spot__event {
    flex: 0 0 auto;
    padding-left: 18px;
    border-left: 1px solid #d9dee8;
    font-size: 14px;
    color: #5b6478;
    white-space: nowrap;
}

.mafad-fc-spot__event strong {
    font-size: 17px;
    color: #1b2547;
}

/* Temi */
.mafad-fc-spot__topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mafad-fc-spot__topics li {
    margin: 0;
    padding: 7px 14px;
    background: #f1f2f6;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1b2547;
}

/* Docente */
.mafad-fc-spot__teacher {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 16px;
    color: #1b2547;
}

.mafad-fc-spot__teacher-label {
    font-size: 14px;
    color: #6b7488;
}

/* Fatti in riga con pallino rosa */
.mafad-fc-spot__facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 26px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15.5px;
    font-weight: 600;
    color: #1b2547;
}

.mafad-fc-spot__facts li {
    position: relative;
    margin: 0;
    padding-left: 18px;
}

.mafad-fc-spot__facts li::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c1146e;
    transform: translateY(-50%);
}

.mafad-fc-spot__facts .mafad-fc-pulse {
    display: none;
}

.mafad-fc-spot__facts .mafad-fc-spot__fact--soon {
    color: #b45f06;
}

.mafad-fc-spot__facts .mafad-fc-spot__fact--soon::before {
    background: #b45f06;
    animation: mafad-fc-pulse 1.8s ease-in-out infinite;
}

.mafad-fc-spot__facts .mafad-fc-spot__fact--enrolled {
    color: #1d9b93;
}

.mafad-fc-spot__facts .mafad-fc-spot__fact--enrolled::before {
    background: #1d9b93;
}

.mafad-fc-spot__credits {
    font-size: 19px;
    font-weight: 800;
    color: #c1146e;
}

.mafad-fc-spot__facts .mafad-fc-count {
    font-size: 19px;
    color: #1b2547;
}

/* Prezzo + CTA */
.mafad-fc-spot__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: 4px;
    padding-top: 18px;
    border-top: 1px solid #e6e8ee;
}

.mafad-fc-spot__price {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mafad-fc-spot__price-label {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #6b7488;
}

.mafad-fc-spot__price-value {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #111111;
}

.mafad-fc-spot__cta.mafad-fc-card__cta {
    gap: 12px;
    padding: 18px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
}

.mafad-fc-spot__cta:hover .mafad-fc-card__cta-arrow,
.mafad-fc-spot__cta:focus-visible .mafad-fc-card__cta-arrow {
    transform: translate(3px, -3px);
}

.mafad-fc-spot__provider {
    margin: 0;
    font-size: 13px;
    text-align: right;
    color: #6b7488;
}



/* =========================================================================
 * 4. BOX INFO
 * ========================================================================= */

.mafad-fc-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    background: #fafafa;
    border: 1px solid #eeeeee;
    border-radius: 10px;
    font-size: 13.5px;
    color: #444444;
}

.mafad-fc-info__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.mafad-fc-info__fact {
    margin: 0;
}

.mafad-fc-info__fact--wide {
    grid-column: 1 / -1;
}

.mafad-fc-info__fact dt,
.mafad-fc-info__label {
    display: block;
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #888888;
}

.mafad-fc-info__fact dd {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #222222;
}

.mafad-fc-info__fact--soon dd {
    color: #b45f06;
}

.mafad-fc-count {
    font-size: 20px;
    font-weight: 800;
    color: #1d9b93;
    font-variant-numeric: tabular-nums;
}

.mafad-fc-info__disc {
    padding-top: 12px;
    border-top: 1px solid #eeeeee;
}

.mafad-fc-info__all {
    margin: 4px 0 0;
    font-weight: 600;
    color: #222222;
}

.mafad-fc-disc {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.mafad-fc-disc__group {
    margin: 0;
    line-height: 1.45;
}

.mafad-fc-disc__group strong {
    color: #222222;
}

.mafad-fc-disc__note {
    color: #666666;
}

.mafad-fc-disc__group > strong + .mafad-fc-disc__note::before,
.mafad-fc-disc__group summary strong + .mafad-fc-disc__note::before {
    content: " · ";
    color: #bbbbbb;
}

.mafad-fc-disc details summary {
    cursor: pointer;
    list-style: none;
}

.mafad-fc-disc details summary::-webkit-details-marker {
    display: none;
}

.mafad-fc-disc details summary::after {
    content: "+";
    display: inline-block;
    margin-left: 6px;
    font-weight: 700;
    color: #c1146e;
}

.mafad-fc-disc details[open] summary::after {
    content: "−";
}

.mafad-fc-disc__items {
    margin: 4px 0 0;
    color: #555555;
}


/* =========================================================================
 * 5. LISTA COMPATTA (4+ corsi)
 * ========================================================================= */

.mafad-featured-courses__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mafad-featured-courses__list > li {
    margin: 0;
    padding: 0;
}

.mafad-fc-item__link {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 10px 14px 10px 10px;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    color: #222222;
    text-decoration: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mafad-fc-item__link:hover,
.mafad-fc-item__link:focus-visible {
    border-color: #bdbdbd;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.mafad-fc-item__link:focus-visible {
    outline: 2px solid #1d9b93;
    outline-offset: 2px;
}

.mafad-fc-item__thumb {
    flex: 0 0 88px;
    width: 88px;
    height: 64px;
    border-radius: 6px;
    background-color: #eef3f3;
    background-size: cover;
    background-position: center;
}

.mafad-fc-item__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1 1 auto;
    min-width: 0;
}

.mafad-fc-item__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #222222;
}

.mafad-fc-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    color: #555555;
}

.mafad-fc-item__meta > span + span::before {
    content: "·";
    margin: 0 6px;
    color: #bbbbbb;
}

.mafad-fc-item__ecm {
    font-weight: 600;
    color: #1d9b93;
}

.mafad-fc-item__ecm strong {
    font-size: 17px;
    font-weight: 800;
}

.mafad-fc-item__chevron {
    flex: 0 0 auto;
    color: #c1146e;
    transition: transform 0.2s ease;
}

.mafad-fc-item__link:hover .mafad-fc-item__chevron {
    transform: translateX(3px);
}


/* =========================================================================
 * 6. ANIMAZIONI — solo dentro .mafad-featured-courses
 *
 * .mafad-fc--anim  → aggiunta da uno script inline nel template (stato iniziale)
 * .is-in           → aggiunta da mafad-featured-courses.js quando entra in viewport
 * Rete di sicurezza: se il JS non arriva (ritardato da plugin di ottimizzazione),
 * l'animazione CSS "mafad-fc-failsafe" rende comunque visibile tutto dopo 2.5s.
 * ========================================================================= */

.mafad-fc--anim .mafad-fc-reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: mafad-fc-failsafe 0.01s linear 2.5s forwards;
}

.mafad-fc--anim.is-in .mafad-fc-reveal {
    opacity: 1;
    transform: none;
    animation: none;
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 90ms);
}

/* Dopo l'entrata, la card torna a usare le sue transizioni di hover */
.mafad-fc--anim.is-done .mafad-fc-reveal {
    transition-delay: 0s;
}

.mafad-fc--anim.is-done .mafad-fc-card {
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

@keyframes mafad-fc-failsafe {
    to {
        opacity: 1;
        transform: none;
    }
}

/* Riflesso sul pulsante: passa due volte dopo l'entrata, poi si ferma */
.mafad-fc--anim.is-in .mafad-fc-card__cta::after {
    animation: mafad-fc-shine 1.1s ease-in-out 0.9s 2;
}

@keyframes mafad-fc-shine {
    from { left: -60%; }
    to   { left: 130%; }
}

/* Puntino scadenza imminente */
.mafad-fc-pulse {
    animation: mafad-fc-pulse 1.8s ease-in-out infinite;
}

@keyframes mafad-fc-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(180, 95, 6, 0.45); }
    50%      { box-shadow: 0 0 0 5px rgba(180, 95, 6, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .mafad-fc--anim .mafad-fc-reveal,
    .mafad-fc--anim.is-in .mafad-fc-reveal {
        opacity: 1;
        transform: none;
        animation: none;
        transition: none;
    }

    .mafad-fc--anim.is-in .mafad-fc-card__cta::after,
    .mafad-fc-pulse {
        animation: none;
    }

    .mafad-fc-spot__facts .mafad-fc-spot__fact--soon::before {
        animation: none;
    }

    .mafad-fc-spot__rings,
    .mafad-fc-spot:hover .mafad-fc-spot__rings {
        transition: none;
        transform: translateY(-50%);
    }

    .mafad-fc-spot,
    .mafad-fc-spot:hover,
    .mafad-fc-card,
    .mafad-fc-card:hover,
    .mafad-fc-card__poster,
    .mafad-fc-card:hover .mafad-fc-card__poster,
    .mafad-fc-card__cta,
    .mafad-fc-card__cta-arrow,
    .mafad-fc-item__link,
    .mafad-fc-item__chevron {
        transition: none;
        transform: none;
    }
}




/* =========================================================================
 * 7. RESPONSIVE
 * ========================================================================= */

@media (max-width: 1100px) {
    .mafad-fc-spot__accr {
        flex-wrap: wrap;
    }

    .mafad-fc-spot__event {
        padding-left: 40px;
        border-left: 0;
    }
}

@media (max-width: 900px) {
    .mafad-fc-spot {
        grid-template-columns: minmax(0, 1fr);
    }

    .mafad-fc-spot__panel--text {
        min-height: 0;
        padding: 30px 28px;
    }

    .mafad-fc-spot__big {
        font-size: clamp(56px, 16vw, 88px);
    }

    .mafad-fc-spot__panel.mafad-fc-card__media {
        min-height: 0;
        height: 320px;
    }

    .mafad-fc-spot__panel .mafad-fc-card__poster {
        max-height: 100%;
    }
}

@media (max-width: 768px) {
    .mafad-featured-courses__title {
        font-size: 20px;
    }

    .mafad-featured-courses--spotlight .mafad-featured-courses__title {
        font-size: 14px;
    }

    .mafad-featured-courses__list {
        grid-template-columns: minmax(0, 1fr);
    }

    .mafad-fc-spot__body {
        padding: 24px 20px 20px;
    }

    .mafad-fc-spot__subtitle {
        font-size: 17px;
    }

    .mafad-fc-spot__excerpt {
        font-size: 15px;
    }

    .mafad-fc-spot__price-value {
        font-size: 34px;
    }

    .mafad-fc-spot__cta.mafad-fc-card__cta {
        justify-content: center;
        width: 100%;
        padding: 16px 20px;
        font-size: 16px;
    }

    .mafad-fc-spot__provider {
        text-align: left;
    }
}
