/* ==========================================================================
   Video "La tua scheda personale" (sezione con video in autoplay)
   Usato da: profilo-coach.html, landing-profilo-coach.html, scheda-personale-video.html
   Comportamento (avvio automatico quando visibile, ripetizione, pausa): video-showcase.js
   ========================================================================== */

.vs-section {
    position: relative;
    padding: 64px 0 80px;
    background: #fff;
}

/* Variante "pagina del video": sotto l'intestazione fissa, sfondo come l'hero delle landing */
.vs-section.vs-hero {
    padding: 130px 0 70px;
    background: linear-gradient(135deg, var(--primary-50) 0%, #fff 55%, var(--primary-50) 100%);
}

.vs-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    column-gap: 3.5rem;
    align-items: center;
    max-width: 1040px;
    margin: 0 auto;
}

.vs-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
}

.vs-copy .section-badge { margin-bottom: 0; }

.vs-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
}

.vs-copy h2,
.vs-copy h1 {
    font-size: clamp(1.75rem, 3.6vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--gray-900);
    margin: 0;
}

.vs-copy h1 { font-size: clamp(1.9rem, 3.9vw, 2.75rem); }
.vs-copy h1 .vs-highlight { display: block; }

.vs-copy .vs-highlight {
    background: linear-gradient(135deg, var(--primary-600), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vs-lead {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--gray-600);
}

.vs-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.vs-points li {
    position: relative;
    padding-left: 1.75rem;
    font-size: 1rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.vs-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: var(--primary-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat;
}

.vs-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
}

.vs-link {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--primary-700);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.vs-link:hover,
.vs-link:focus-visible { border-bottom-color: currentColor; }

/* Il video */
.vs-frame {
    margin: 0;
    width: 100%;
    max-width: 420px;
    justify-self: center;
}

.vs-box {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 28px;
    overflow: hidden;
    background: #eceafe;
    border: 1px solid var(--gray-200);
    box-shadow: 0 25px 50px -12px rgba(76, 29, 149, 0.28);
}

.vs-box video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vs-toggle {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(15, 23, 42, 0.62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.vs-toggle:hover { background: rgba(15, 23, 42, 0.82); transform: scale(1.06); }
.vs-toggle:focus-visible { outline: 3px solid var(--primary-400); outline-offset: 2px; }
.vs-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.vs-toggle .vs-icon-play { display: none; }
.vs-box.is-paused .vs-icon-play { display: block; }
.vs-box.is-paused .vs-icon-pause { display: none; }

.vs-caption {
    margin: 0.875rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--gray-500);
    text-align: center;
}

.vs-caption a { color: var(--primary-700); }

/* Trascrizione e testi della pagina dedicata */
.vs-article { padding: 70px 0 20px; }
.vs-article .container { max-width: 820px; }
.vs-article h2 { font-size: clamp(1.4rem, 3vw, 1.875rem); font-weight: 800; color: var(--gray-900); margin: 0 0 1rem; }
.vs-article h3 { font-size: 1.125rem; font-weight: 700; color: var(--gray-900); margin: 0 0 0.25rem; }
.vs-article p { color: var(--gray-600); line-height: 1.75; margin: 0 0 1rem; }
.vs-article section + section { margin-top: 3rem; }

.vs-transcript { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; counter-reset: vs; }
.vs-transcript li { position: relative; padding: 1rem 1.25rem 1rem 4rem; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-xl); counter-increment: vs; }
.vs-transcript li::before { content: counter(vs); position: absolute; left: 1.25rem; top: 1rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--primary-100); color: var(--primary-700); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.vs-transcript .vs-time { display: inline-block; margin-left: 0.5rem; font-size: 0.8125rem; font-weight: 600; color: var(--primary-700); background: var(--primary-50); padding: 0.1rem 0.5rem; border-radius: 9999px; vertical-align: middle; }
.vs-transcript p { margin: 0; }

.vs-note { font-size: 0.875rem; color: var(--gray-500); border-left: 3px solid var(--primary-200); padding-left: 1rem; }

.vs-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.vs-steps div { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-xl); padding: 1.25rem; }
.vs-steps strong { display: block; margin-bottom: 0.25rem; color: var(--gray-900); }
.vs-steps span { color: var(--gray-600); font-size: 0.9375rem; line-height: 1.6; }

.vs-related { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; padding: 0; margin: 0; list-style: none; }
.vs-crumbs { font-size: 0.875rem; color: var(--gray-500); margin: 0 0 1rem; }
.vs-crumbs a { color: var(--primary-700); text-decoration: none; }
.vs-crumbs a:hover { text-decoration: underline; }

@media (max-width: 860px) {
    .vs-section { padding: 56px 0; }
    .vs-section.vs-hero { padding: 104px 0 48px; }
    .vs-grid { display: flex; flex-direction: column; align-items: stretch; row-gap: 1.5rem; }
    /* i blocchi di testo si "sciolgono" nella colonna per poter mettere il video fra titolo e punti elenco */
    .vs-copy { display: contents; }
    .vs-copy > * { order: 3; }
    .vs-copy > .vs-head { order: 1; }
    .vs-frame { order: 2; max-width: 380px; margin: 0 auto; }
    .vs-copy > .vs-actions { order: 4; }
    .vs-steps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .vs-toggle { transition: none; }
}

/* Banda finale con invito all'azione (pagina del video) */
.vs-cta {
    margin-top: 4rem;
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    text-align: center;
}

.vs-cta h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 1rem;
}

.vs-cta p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 580px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.vs-cta .btn-white {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.0625rem;
    font-weight: 700;
    text-decoration: none;
    background: #fff;
    color: var(--primary-700);
    border-radius: var(--radius-lg);
}

.vs-cta .cta-note { margin: 1rem 0 0; font-size: 0.875rem; color: rgba(255, 255, 255, 0.72); }
