/* =====================================================================
   lead_landing.css – Stili per le landing page lead di DITA Academy
   Mobile-first. Caricato solo dalla vista lead_corso_detail.php
   ===================================================================== */

/* ---- Variabili ---- */
:root {
    --lead-primary: #1a3a5c;
    --lead-accent: #d4a017;
    --lead-cta: #e63946;
    --lead-cta-hover: #c1121f;
    --lead-wa: #25d366;
    --lead-wa-hover: #1ebe57;
    --lead-dark: #0d1b2a;
    --lead-light: #f4f7fb;
    --lead-card-bg: #ffffff;
    --lead-radius: 12px;
    --lead-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    --font-base: 'Barlow', sans-serif;
}

/* ---- Hero ---- */
.lead-hero,
.lead-final-cta {
    background: linear-gradient(135deg, var(--lead-dark) 0%, var(--lead-primary) 60%, #2a5298 100%);
    color: #fff;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.lead-hero__inner,
.lead-final-cta__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1.25rem 2rem;
    gap: 1.5rem;
}

@media (min-width: 768px) {

    .lead-hero__inner,
    .lead-final-cta__inner {
        flex-direction: row;
        align-items: flex-start;
        padding: 3.5rem 2rem 3rem;
    }
}

.lead-hero__image {
    width: 100%;
    max-width: 340px;
    border-radius: var(--lead-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    object-fit: cover;
    aspect-ratio: 4/3;
}

@media (min-width: 768px) {
    .lead-hero__image {
        width: 42%;
        max-width: 420px;
    }
}

.lead-hero__text {
    flex: 1;
}

.lead-hero__badge {
    display: inline-block;
    background: var(--lead-accent);
    color: var(--lead-dark);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.lead-hero__title {
    font-size: clamp(1.6rem, 5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    font-family: var(--font-base);
}

.lead-hero__excerpt {
    font-size: 1rem;
    opacity: 0.88;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.lead-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.2rem;
    font-size: 0.9rem;
    opacity: 0.85;
    margin-bottom: 1.5rem;
}

.lead-hero__meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lead-hero__price-box {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--lead-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.lead-hero__price-original {
    font-size: 0.95rem;
    text-decoration: line-through;
    opacity: 0.65;
}

.lead-hero__price-current {
    font-size: 2rem;
    font-weight: 800;
    color: var(--lead-accent);
}

.lead-hero__price-vat {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ---- CTA Buttons ---- */
.btn-lead-cta {
    display: block;
    background: var(--lead-cta);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
    padding: 0.9rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.5px;
    width: 100%;
}

.btn-lead-cta:hover {
    background: var(--lead-cta-hover);
    color: #fff;
    transform: translateY(-1px);
}

.btn-lead-info {
    display: block;
    background: transparent;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
    width: 100%;
    margin-top: 0.6rem;
}

.btn-lead-info:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ---- Trust Bar ---- */
.lead-trust-bar {
    background: var(--lead-accent);
    padding: 0.75rem 1rem;
}

.lead-trust-bar__inner {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.lead-trust-bar__item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--lead-dark);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ---- Sections generic ---- */
.lead-section {
    padding: 3rem 1.25rem;
}

.lead-section--alt {
    background: var(--lead-light);
}

.lead-section__title {
    font-size: clamp(1.3rem, 4vw, 1.9rem);
    font-weight: 800;
    color: var(--lead-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-base);
}

.lead-section__subtitle {
    color: #555;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.lead-section__divider {
    width: 48px;
    height: 4px;
    background: var(--lead-accent);
    border-radius: 2px;
    margin: 0.5rem 0 1.75rem;
}

/* ---- Benefits List ---- */
.lead-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.85rem;
}

@media (min-width: 576px) {
    .lead-benefits {
        grid-template-columns: 1fr 1fr;
    }
}

.lead-benefits__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--lead-card-bg);
    border-radius: var(--lead-radius);
    padding: 0.85rem 1rem;
    box-shadow: var(--lead-shadow);
    font-size: 0.95rem;
    color: var(--lead-dark);
    font-weight: 500;
}

.lead-benefits__icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ---- Program list ---- */
.lead-program {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
    counter-reset: prog-counter;
}

.lead-program__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--lead-accent);
    background: var(--lead-card-bg);
    border-radius: 0 var(--lead-radius) var(--lead-radius) 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-size: 0.95rem;
    counter-increment: prog-counter;
}

.lead-program__item::before {
    content: counter(prog-counter);
    background: var(--lead-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ---- Interviste Video ---- */
.lead-interviews {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.lead-interviews::-webkit-scrollbar {
    height: 4px;
}

.lead-interviews::-webkit-scrollbar-thumb {
    background: var(--lead-primary);
    border-radius: 2px;
}

.lead-interview-card {
    flex: 0 0 min(280px, 80vw);
    scroll-snap-align: start;
    border-radius: var(--lead-radius);
    overflow: hidden;
    box-shadow: var(--lead-shadow);
    background: var(--lead-dark);
    display: flex;
    flex-direction: column;
}

/* Contenitore iframe 9:16 per i video intervista */
.lead-interview-card__player {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000;
    flex-shrink: 0;
}

.lead-interview-card video {
    width: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
    display: block;
    background: #000;
    flex: 1;
}

.lead-interview-card__caption {
    /* Non più sovrapposta: è sotto il video nel flusso normale */
    background: #0d1b2a;
    color: #e0e0e0;
    padding: 0.65rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lead-interview-card__label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--lead-accent);
    text-transform: uppercase;
    margin-bottom: 3px;
}

@media (min-width: 768px) {
    .lead-interview-card {
        flex: 0 0 260px;
    }
}

/* ---- Momenti del Corso – layout 16:9 mobile-first ---- */

/* Mobile: scroll orizzontale con 1 video per volta */
.lead-clips {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
}

.lead-clips::-webkit-scrollbar {
    height: 4px;
}

.lead-clips::-webkit-scrollbar-thumb {
    background: var(--lead-primary);
    border-radius: 2px;
}

.lead-clip-card {
    flex: 0 0 min(92vw, 560px);
    /* 1 video visibile, peek del successivo */
    scroll-snap-align: start;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

@media (min-width: 768px) {
    .lead-clip-card {
        flex: 0 0 400px;
    }
}

/* Contenitore iframe 16:9 */
.lead-clip-card__player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

/* ---- FAQ ---- */
.lead-faq .accordion-button {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--lead-primary);
    background: var(--lead-card-bg);
}

.lead-faq .accordion-button:not(.collapsed) {
    color: var(--lead-primary);
    background: var(--lead-light);
    box-shadow: none;
}

.lead-faq .accordion-button::after {
    filter: hue-rotate(200deg);
}

.lead-faq .accordion-item {
    border-radius: var(--lead-radius) !important;
    margin-bottom: 0.6rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.lead-faq .accordion-body {
    font-size: 0.93rem;
    color: #444;
    line-height: 1.65;
}

/* ---- Form Lead ---- */
.lead-form-card {
    background: var(--lead-card-bg);
    border-radius: var(--lead-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 2rem 1.5rem;
    max-width: 99%;
    margin: 0 auto;
}

.lead-form-card__title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--lead-primary);
    margin-bottom: 0.25rem;
}

.lead-form-card__sub {
    font-size: 0.88rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.lead-form__field {
    margin-bottom: 1rem;
}

.lead-form__field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--lead-primary);
    margin-bottom: 4px;
    display: block;
}

.lead-form__field input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #d1d9e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--font-base);
    transition: border-color 0.2s;
}

.lead-form__field input:focus {
    outline: none;
    border-color: var(--lead-primary);
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.12);
}

.lead-form__privacy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    color: #555;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.lead-form__privacy input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: var(--lead-primary);
}

.btn-lead-submit {
    width: 100%;
    background: var(--lead-primary);
    color: #fff;
    border: none;
    padding: 0.9rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-base);
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-lead-submit:hover:not(:disabled) {
    background: #0f2540;
    transform: translateY(-1px);
}

.btn-lead-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.lead-form__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.lead-form__whatsapp-alt {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #555;
}

.lead-form__whatsapp-alt a {
    color: var(--lead-wa);
    font-weight: 700;
    text-decoration: none;
}

/* ---- Alert messages form ---- */
.lead-form-alert {
    display: none;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.lead-form-alert--success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.lead-form-alert--error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ---- Final CTA Section ---- 
.lead-final-cta {
    background: linear-gradient(135deg, var(--lead-primary) 0%, #2a5298 100%);
    color: #fff;
    text-align: center;
    padding: 3rem 1.25rem;
}

.lead-final-cta__title {
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.lead-final-cta__price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--lead-accent);
    margin-bottom: 0.5rem;
}

.lead-final-cta__vat {
    font-size: 0.82rem;
    opacity: 0.7;
    margin-bottom: 1.75rem;
}

.btn-cta-final {
    display: inline-block;
    background: var(--lead-cta);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    max-width: 340px;
    width: 100%;
}

.btn-cta-final:hover {
    background: var(--lead-cta-hover);
    color: #fff;
    transform: translateY(-2px);
}
*/
/* ---- WhatsApp Floating Button ---- */
.lead-wa-float {
    position: fixed;
    bottom: 80px;
    right: 1.25rem;
    z-index: 1050;
    background: var(--lead-wa);
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
    animation: bounce-in 0.6s ease 1s both;
}

.lead-wa-float:hover {
    background: var(--lead-wa-hover);
    transform: scale(1.1);
    color: #fff;
}

@keyframes bounce-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    60% {
        transform: scale(1.15);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

/* ---- Sticky Bottom Bar (mobile only) ---- */
.lead-sticky-bar {
    display: none;
}

@media (max-width: 767px) {
    .lead-sticky-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1040;
        background: var(--lead-dark);
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    }

    .lead-sticky-bar__wa {
        flex: 0 0 auto;
        background: var(--lead-wa);
        color: #fff;
        border-radius: 8px;
        padding: 0.65rem 1rem;
        font-size: 1.1rem;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 5px;
        font-weight: 700;
        transition: background 0.2s;
    }

    .lead-sticky-bar__wa:hover {
        background: var(--lead-wa-hover);
        color: #fff;
    }

    .lead-sticky-bar__cta {
        flex: 1;
        background: var(--lead-cta);
        color: #fff;
        border-radius: 8px;
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
        font-weight: 700;
        text-align: center;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s;
    }

    .lead-sticky-bar__cta:hover {
        background: var(--lead-cta-hover);
        color: #fff;
    }

    /* Space for sticky bar on mobile */
    body {
        padding-bottom: 70px;
    }

    /* Float WA higher on mobile to avoid sticky bar */
    .lead-wa-float {
        bottom: 80px;
    }
}

/* ---- Scarcity Bar (posti disponibili) ---- */
.lead-scarcity-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.55rem 0.9rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(4px);
}

.lead-scarcity-bar__total {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.lead-scarcity-bar__remaining {
    font-size: 0.88rem;
    font-weight: 800;
    color: #ff6b6b;
    letter-spacing: 0.3px;
    white-space: nowrap;
    animation: pulse-red 1.8s ease-in-out infinite;
}

@keyframes pulse-red {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.65;
    }
}

/* ---- Galleria foto edizioni precedenti ---- */

/* Mobile: scroll orizzontale con 1 foto alla volta (swipe nativo) */
.lead-gallery-grid {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    scroll-padding-left: 0;
}

.lead-gallery-grid::-webkit-scrollbar {
    height: 4px;
}

.lead-gallery-grid::-webkit-scrollbar-thumb {
    background: var(--lead-accent);
    border-radius: 2px;
}

.lead-gallery-grid__img {
    flex: 0 0 min(88vw, 420px);
    /* ~1 foto visibile, col peek della successiva */
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    scroll-snap-align: start;
    display: block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.2s;
}

/* Tablet / Desktop: griglia classica 3 colonne */
@media (min-width: 576px) {
    .lead-gallery-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow-x: visible;
        scroll-snap-type: none;
        padding-bottom: 0;
        gap: 0.5rem;
    }

    .lead-gallery-grid__img {
        flex: none;
        width: 100%;
        min-width: 0;
        border-radius: 8px;
    }

    .lead-gallery-grid__img:hover {
        box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
    }
}

/* ---- Swipe Hint (galleria + interviste) ---- */

/* Il contenitore swipeable serve come riferimento position */
.lead-swipeable {
    position: relative;
}

/* Mobile: full-bleed – rompe fuori dal container Bootstrap/section */
@media (max-width: 575px) {
    .lead-swipeable {
        width: 100vw;
        margin-left: calc((100% - 100vw) / 2);
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
        gap: 0;
        /* nessuno spazio tra item: effetto continuo */
    }

    /* Ogni item occupa esattamente l'intero schermo */
    .lead-gallery-grid__img {
        flex: 0 0 100vw;
        border-radius: 0;
    }

    .lead-interview-card {
        flex: 0 0 100vw;
        border-radius: 0;
    }

    .lead-clip-card {
        flex: 0 0 100vw;
        border-radius: 0;
    }
}

/* L'hint ?? posizionato in basso a destra della sezione */
.lead-swipe-hint {
    position: absolute;
    bottom: 4.5rem;
    /* sopra la caption delle card */
    right: 1rem;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.lead-swipe-hint--visible {
    opacity: 1;
    transform: translateX(0);
    animation: hint-swipe 0.75s ease-in-out 0.2s 5;
    /* 5 ripetizioni poi si ferma */
}

@keyframes hint-swipe {
    0% {
        transform: translateX(0);
    }

    40% {
        transform: translateX(-10px);
    }

    60% {
        transform: translateX(-10px);
    }

    100% {
        transform: translateX(0);
    }
}