/* Blocchi video YouTube (facade click-to-play) — layout a due colonne:
   testo a sinistra, video a destra su desktop; colonna singola su mobile. */

.yt-video-section {
    padding: 4rem 0;
}

.yt-video {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 3.5rem;
    align-items: center;
    width: 100%;
}

.yt-video-text {
    text-align: left;
}

.yt-video-eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand-blue, #1f4375);
}

.yt-video-text > h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    line-height: 1.2;
}

.yt-video-lead {
    margin: 0 0 1.5rem;
    opacity: 0.85;
    line-height: 1.6;
}

.yt-video-lead a {
    color: #1a73cc;
    text-decoration: underline;
    font-weight: 700;
}

.yt-video-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.yt-transcript {
    border: 1px solid rgba(26, 26, 26, 0.18);
    border-radius: 0.75rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.6);
}

.yt-transcript > summary {
    padding: 0.9rem 1.25rem;
    font-weight: 700;
    cursor: pointer;
    list-style-position: inside;
    transition: background-color 150ms ease;
}

.yt-transcript > summary:hover {
    background: rgba(26, 26, 26, 0.05);
}

.yt-transcript > summary:focus-visible {
    outline: 3px solid var(--ocean-blue, #71ccff);
    outline-offset: -3px;
}

.yt-transcript-body {
    padding: 0 1.25rem 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.yt-transcript-body p {
    margin: 0 0 0.75rem;
}

.yt-transcript-body ul {
    margin: 0 0 0.75rem;
    padding-left: 1.25rem;
}

.yt-transcript-body li {
    margin-bottom: 0.35rem;
}

/* Variante su sfondo scuro (es. sezione underwater pagina contatti) */
.yt-transcript-dark {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.yt-transcript-dark > summary:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Dettagli del blocco video nelle sezioni con sfondo underwater:
   stesso blu del pulsante CTA dell'header (--brand-blue) */
.sequential-form-section .yt-video-eyebrow,
.cta-underwater-section .yt-video-eyebrow {
    color: var(--brand-blue, #1f4375);
}

.sequential-form-section .yt-video-lead a,
.cta-underwater-section .yt-video-lead a {
    color: var(--brand-blue, #1f4375);
}

.sequential-form-section .yt-video-actions .btn-primary,
.cta-underwater-section .yt-video-actions .btn-primary {
    background-color: var(--brand-blue, #1f4375);
}

@media (min-width: 900px) {
    .yt-transcript[open] .yt-transcript-body {
        max-height: 22rem;
        overflow-y: auto;
    }
}

.yt-facade {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 1rem;
    background: transparent;
    box-shadow: 0 24px 50px -24px rgba(15, 28, 35, 0.45);
    cursor: pointer;
}

.yt-facade img,
.yt-facade iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

.yt-facade-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ocean-blue, #71ccff);
    color: var(--brand-blue, #1f4375);
    box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.55);
    cursor: pointer;
    transition: transform 150ms ease, background-color 150ms ease;
}

.yt-facade-play svg {
    margin-left: 4px;
}

.yt-facade:hover .yt-facade-play,
.yt-facade-play:hover {
    transform: translate(-50%, -50%) scale(1.07);
    background: var(--sky-blue, #b4e4ff);
}

.yt-facade-play:focus-visible {
    outline: 3px solid var(--brand-blue, #1f4375);
    outline-offset: 4px;
}

.yt-video-media noscript p {
    text-align: center;
    margin: 0.75rem 0 0;
}

.yt-video-media noscript a {
    color: #1a73cc;
    font-weight: 700;
}

/* Mobile: colonna singola — titolo/testo, video, bottone, trascrizione */
@media (max-width: 899px) {
    .yt-video-section {
        padding: 3rem 0;
    }

    .yt-video {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .yt-video-text,
    .yt-video-media {
        display: contents;
    }

    .yt-video-eyebrow { order: 1; }
    .yt-video-text > h2 { order: 2; }
    .yt-video-lead { order: 3; }
    .yt-facade { order: 4; margin: 0.5rem 0 1.5rem; }
    .yt-video-media noscript { order: 5; }
    .yt-video-actions { order: 6; }
    .yt-transcript { order: 7; }
}
