/* =========================================================
   BASE
   ========================================================= */
*,
*::before,
*::after{
    box-sizing: border-box;
}

img,
svg{
    max-width: 100%;
    height: auto;
}

body{
    overflow-x: hidden;
}

/* =========================================================
   HERO DETTAGLIO
   ========================================================= */
.detail-hero{
    margin-top: 18px;
}

.detail-hero__grid{
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(16px, 3vw, 28px);
    align-items: start;
}

.detail-hero__grid > *{
    min-width: 0;
}

.detail-hero__media{
    margin: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 14px;
    display: grid;
    place-items: center;
    min-height: 280px;
}

.detail-hero__media img{
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    display: block;
}

.detail-hero__content{
    min-width: 0;
}

.detail-hero__cards{
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.detail-card{
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(255,255,255,.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 10px 26px rgba(0,0,0,.06);
}

.detail-card__label{
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-500);
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.detail-card__value{
    margin-top: 6px;
    font-size: 16px;
    font-weight: 800;
    color: var(--ink-900);
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.detail-card__value small,
.detail-card__note{
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-500);
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* =========================================================
   CONTENUTI CORSO
   ========================================================= */
.course{
    padding: clamp(26px,4vw,44px) 0;
}

.course__grid{
    display: grid;
    gap: 22px;
}

.course__section{
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: clamp(18px,2.4vw,24px);
    box-shadow: var(--shadow);
    min-width: 0;
}

.course__h{
    margin: 0 0 10px;
    color: var(--primary-dark);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.course__p{
    margin: 0 0 10px;
    color: var(--ink-700);
    font-size: 16px;
    line-height: 1.65;
    min-width: 0;
}

.course__p img,
.course__p iframe,
.course__p table{
    max-width: 100%;
}

.course__list{
    margin: 0;
    padding-left: 18px;
    color: var(--ink-700);
    line-height: 1.65;
}

/* =========================================================
   SUMMARY CARD
   ========================================================= */
.course .xcard.xcard--summary,
.page-hero--course .xcard.xcard--summary{
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 18px 46px rgba(0,0,0,.10);
}

.course .xcard.xcard--summary::before,
.page-hero--course .xcard.xcard--summary::before{
    content:"";
    position:absolute;
    inset:0;
    padding:1px;
    border-radius:22px;
    background: linear-gradient(
            135deg,
            rgba(0,155,153,.55),
            rgba(10,160,232,.35),
            rgba(189,255,203,.55)
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events:none;
}

.course .xcard--summary .xcard__body,
.page-hero--course .xcard--summary .xcard__body{
    padding: 20px 20px 18px;
    min-width: 0;
}

.course .xcard--summary .xbadge,
.page-hero--course .xcard--summary .xbadge{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(189,255,203,.55);
    color: var(--primary-dark);
    border: 1px solid rgba(0,155,153,.18);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.course .xcard--summary .xbadge__dot,
.page-hero--course .xcard--summary .xbadge__dot{
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #19d36b;
    box-shadow: 0 0 0 5px rgba(25,211,107,.14);
    animation: badgeBlink 1.25s ease-in-out infinite;
}

@keyframes badgeBlink{
    0%,100%{ transform:scale(1); opacity:.65; }
    50%{ transform:scale(1.55); opacity:1; }
}

.course .xcard--summary .xcard__title,
.page-hero--course .xcard--summary .xcard__title{
    margin: 14px 0 14px;
    font-size: clamp(20px, 2.2vw, 26px);
    line-height: 1.18;
    color: var(--primary-dark);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.course .xcard--summary .xsummary,
.page-hero--course .xcard--summary .xsummary{
    margin: 0 0 14px;
    display: grid;
    gap: 12px;
}

.course .xcard--summary .xsummary__row,
.page-hero--course .xcard--summary .xsummary__row{
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.06);
    background: rgba(247,248,250,.75);
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    min-width: 0;
}

.course .xcard--summary .xsummary__row dt,
.page-hero--course .xcard--summary .xsummary__row dt{
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: var(--ink-500);
    overflow-wrap: anywhere;
}

.course .xcard--summary .xsummary__row dd,
.page-hero--course .xcard--summary .xsummary__row dd{
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--ink-900);
    overflow-wrap: anywhere;
}

/* CTA summary */
.course .xcard--summary .xsummary__cta,
.page-hero--course .xcard--summary .xsummary__cta{
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
}

.page-hero--course .xcard--summary .xsummary__cta.xsummary__cta--double{
    grid-template-columns: 1fr 1fr !important;
}

.course .xcard--summary .xbtn-primary,
.page-hero--course .xcard--summary .xbtn-primary,
.course .xcard--summary .xcard__cta--btn,
.page-hero--course .xcard--summary .xcard__cta--btn{
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 14px;
    padding: 1em 1.1em;
    background: linear-gradient(135deg, #3f7f82, #009b99);
    color: #fff;
    font-weight: 900;
    letter-spacing: .02em;
    box-shadow: 0 12px 24px rgba(0,155,153,.18);
    text-decoration: none;
    animation: ctaPulse 2.4s ease-in-out infinite;
    transform-origin: center;
}

@keyframes ctaPulse{
    0%,100%{
        transform: scale(1);
        box-shadow: 0 12px 24px rgba(0,155,153,.18);
    }
    50%{
        transform: scale(1.03);
        box-shadow: 0 18px 34px rgba(0,155,153,.26);
    }
}

.course .xcard--summary .xbtn-primary:hover,
.page-hero--course .xcard--summary .xbtn-primary:hover,
.course .xcard--summary .xcard__cta--btn:hover,
.page-hero--course .xcard--summary .xcard__cta--btn:hover{
    animation-play-state: paused;
    transform: scale(1.04);
    filter: saturate(1.06);
}

.page-hero--course .xcard--summary .xbtn-outline{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 14px;
    text-align: center;
    transition: all .2s ease;
}

.page-hero--course .xcard--summary .xbtn-outline:hover{
    background: var(--primary);
    color: #fff;
}

/* =========================================================
   MODULI
   ========================================================= */
.course__modules{
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.module{
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    background: var(--bg-soft);
    min-width: 0;
}

.module__k{
    font-weight: 800;
    color: var(--primary-dark);
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.module__t{
    color: var(--ink-900);
    font-weight: 700;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.course__muted{
    color: var(--ink-500);
    margin-top: 12px;
    min-width: 0;
}

.course__muted .module-meta{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 14px;
    font-size: 16px;
    color: var(--ink-500);
    white-space: nowrap;
}

.course__muted .module-meta svg.icon{
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    max-width: 14px !important;
    flex: 0 0 14px;
    display: inline-block;
    vertical-align: middle;
    opacity: 0.75;
}

.course__muted .module-meta + .module-meta{
    margin-left: 10px;
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 900px){
    .detail-hero__grid{
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px){
    .detail-hero{
        margin-top: 20px;
    }

    .detail-hero__grid{
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .detail-hero__media{
        min-height: auto;
        padding: 12px;
    }

    .detail-hero__media img{
        max-height: none;
    }

    .detail-hero__cards{
        gap: 10px;
    }

    .detail-card{
        width: 100%;
        padding: 14px;
    }

    .detail-card__label{
        font-size: 11px;
    }

    .detail-card__value{
        font-size: 15px;
        line-height: 1.4;
    }

    .page-hero__title{
        font-size: 30px;
        line-height: 1.15;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .page-hero__subtitle{
        font-size: 16px;
        line-height: 1.6;
    }

    .page-hero--course .xcard--summary .xsummary__cta.xsummary__cta--double{
        grid-template-columns: 1fr !important;
    }

    .module{
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .course__muted{
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .course__muted .module-meta{
        white-space: normal;
        margin-right: 0;
        margin-left: 0;
    }
}

@media (max-width: 480px){
    .page-hero__title{
        font-size: 26px;
    }

    .course .xcard--summary .xcard__body,
    .page-hero--course .xcard--summary .xcard__body{
        padding: 16px;
    }

    .course__section{
        padding: 16px;
    }
}

/* =========================================================
   ACCESSIBILITÀ
   ========================================================= */
@media (prefers-reduced-motion: reduce){
    .xbadge__dot,
    .xbtn-primary,
    .xcard__cta--btn{
        animation: none !important;
    }
}

/*LOGO PARTNER*/
.detail-card__organizer{
    display: flex;
    align-items: center;
    min-height: 70px;
}

.detail-card__organizer-link{
    display: flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    text-decoration: none;
}

.detail-card__organizer-logo{
    display: block;
    width: 180px;
    height: 64px;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
}

.detail-card__organizer-name{
    font-weight: 700;
}

.detail-card__partner{
    display: block;
    margin-top: 8px;
}

/*attestato,certificazioni,accreditamenti*/
.detail-hero__extras{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.detail-hero__extras .detail-card{
    height: 100%;
}

/* Attestato sempre a tutta larghezza */
.detail-card--attestato{
    grid-column: 1 / -1;
}

.detail-card--extra{
    min-height: 110px;
}

@media (max-width: 768px){

    .detail-hero__extras{
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 14px;
    }

    .detail-card--attestato{
        grid-column: auto;
    }

    .detail-card--extra{
        min-height: auto;
    }
}

/* ===== SUMMARY: fascia prezzi ===== */

.xpricing{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
    margin-bottom: 18px;
}

.xpricing__card{
    position: relative;
    min-width: 0;
    padding: 18px 18px 20px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.06);
    overflow: hidden;
}

.xpricing__card::before{
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}


/* LISTINO */
.xpricing__card--listino{
    background: rgba(10,94,168,.07);
}

.xpricing__card--listino::before{
    background: var(--brand-900);
}


/* RETE PROFESSIONALE */
.xpricing__card--rete{
    background: rgba(0,155,153,.09);
}

.xpricing__card--rete::before{
    background: var(--primary);
}


/* COMMUNITY */
.xpricing__card--community{
    background: rgba(189,255,203,.28);
}

.xpricing__card--community::before{
    background: #55c982;
}


.xpricing__label{
    margin-bottom: 8px;
    color: rgba(17,17,17,.60);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.xpricing__price{
    color: var(--ink-900);
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 700;
    line-height: 1.2;
}

.xpricing__price small{
    font-size: .65em;
    font-weight: 700;
}

.xpricing__card--rete{
    background: rgba(0,155,153,.12);
    border-color: rgba(0,155,153,.20);
}

.xpricing__card{
    padding: 20px 18px 22px;
}

.xpricing__label{
    margin-bottom: 10px;
}
.xpricing__card--rete{
    background: rgba(0,155,153,.14);
    border-color: rgba(0,155,153,.28);
}

@media (max-width: 768px){

    .xpricing{
        grid-template-columns: 1fr;
        gap: 10px;
    }

}
/* ==========================================================
   CERTIFICAZIONI - BADGE
   ========================================================== */

.cert-badges{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.cert-badge{
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 82px;
    height: 82px;

    padding: 8px;

    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;

    background: #fff;

    cursor: pointer;

    box-shadow: 0 5px 14px rgba(0,0,0,.05);

    transition:
            transform .2s ease,
            box-shadow .2s ease,
            border-color .2s ease;
}

.cert-badge:hover,
.cert-badge:focus-visible{
    transform: translateY(-3px);

    border-color: rgba(0,155,153,.35);

    box-shadow: 0 9px 22px rgba(0,0,0,.10);
}

.cert-badge img{
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;
}

.cert-badge__fallback{
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
    font-weight: 700;
}


/* Tooltip */

.cert-badge::after{
    content: attr(data-tooltip);

    position: absolute;

    left: 50%;
    bottom: calc(100% + 9px);

    transform: translateX(-50%) translateY(4px);

    min-width: 150px;
    max-width: 240px;

    padding: 7px 10px;

    border-radius: 8px;

    background: #173f42;
    color: #fff;

    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;

    text-align: center;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition:
            opacity .18s ease,
            transform .18s ease,
            visibility .18s ease;

    z-index: 20;
}

.cert-badge:hover::after,
.cert-badge:focus-visible::after{
    opacity: 1;
    visibility: visible;

    transform: translateX(-50%) translateY(0);
}
/* ==========================================================
   CERTIFICAZIONI - MODAL
   ========================================================== */

.cert-modal{
    position: fixed;
    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 24px;

    z-index: 9999;
}

.cert-modal.is-open{
    display: flex;
}

.cert-modal__backdrop{
    position: absolute;
    inset: 0;

    background: rgba(5,30,32,.66);
    backdrop-filter: blur(5px);
}

.cert-modal__dialog{
    position: relative;
    z-index: 2;

    width: min(680px, 100%);
    max-height: min(760px, 88vh);

    overflow-y: auto;

    padding: 32px;

    border-radius: 22px;

    background: #fff;

    box-shadow: 0 25px 70px rgba(0,0,0,.25);
}

.cert-modal__close{
    position: absolute;

    top: 13px;
    right: 16px;

    width: 36px;
    height: 36px;

    border: 0;
    border-radius: 50%;

    background: rgba(0,0,0,.05);

    color: #333;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;
}

.cert-modal__logo{
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 120px;

    margin-bottom: 20px;
}

.cert-modal__logo img{
    display: block;

    max-width: 180px;
    max-height: 120px;

    width: auto;
    height: auto;

    object-fit: contain;
}

.cert-modal__title{
    margin: 0 40px 20px 0;

    color: var(--primary-dark);

    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.15;
}

.cert-modal__content{
    color: rgba(17,17,17,.75);

    font-size: 15px;
    line-height: 1.65;
}

.cert-modal__content p:last-child{
    margin-bottom: 0;
}

.cert-modal__content a{
    color: var(--primary-dark);
    font-weight: 700;
}

.cert-modal__empty{
    color: rgba(17,17,17,.55);
    font-style: italic;
}

.cert-modal__actions{
    margin-top: 24px;
}
@media (max-width: 600px){

    .cert-badge{
        width: 68px;
        height: 68px;
    }

    .cert-modal{
        padding: 14px;
    }

    .cert-modal__dialog{
        padding: 26px 20px;
        border-radius: 18px;
    }

    .cert-modal__logo{
        min-height: 90px;
    }

    .cert-modal__logo img{
        max-width: 150px;
        max-height: 90px;
    }

    /* su touch il tooltip non ci serve */
    .cert-badge::after{
        display: none;
    }
}
body.cert-modal-open{
    overflow: hidden;
}