/* ═══════════════════════════════════════════════════════════════════════
   Hero "Testo e video" (page builder, formato video, dalla 1.2.461)
   A sinistra occhiello, titolo, testo e due pulsanti; a destra il video con
   l'anteprima e le etichette sotto. Colori dal pannello in variabili:
   --hv-sfondo, --hv-testo, --hv-accento (colore del pulsante).
   ═══════════════════════════════════════════════════════════════════════ */

:root:has(.hv) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { :root:has(.hv) { scroll-behavior: auto; } }

.hv {
    position: relative;
    overflow: hidden;
    padding: clamp(48px, 7vw, 96px) 0;
    background: var(--hv-sfondo, #15213a);
    color: var(--hv-testo, #fff);
}
/* Una luce morbida in alto a sinistra, come nel mockup */
.hv::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 70% at 0% 0%, rgba(255, 255, 255, .07), transparent 70%);
    pointer-events: none;
}
.hv-dentro {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}
.hv--solo-testo .hv-dentro { grid-template-columns: minmax(0, 760px); }
@media (max-width: 960px) {
    .hv-dentro { grid-template-columns: minmax(0, 1fr); }
}

.hv-occhiello {
    margin: 0 0 18px;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hv-accento, #f26a1b);
}
.hv-titolo {
    margin: 0;
    font-family: inherit;
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -.025em;
    color: inherit;
}
.hv-titolo-riga2 {
    display: block;
    margin-top: 14px;
    font-size: clamp(1.4rem, 2.6vw, 2.3rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.01em;
}
.hv-testo {
    max-width: 34em;
    margin: 22px 0 0;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    line-height: 1.6;
    color: inherit;
    opacity: .88;
}

.hv-azioni {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 30px;
    margin-top: 34px;
}
.hv-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border-radius: 10px;
    background: var(--hv-accento, #f26a1b);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 12px 30px -12px var(--hv-accento, #f26a1b);
    transition: transform .15s ease, filter .15s ease;
}
.hv-cta:hover { transform: translateY(-2px); filter: brightness(1.06); color: #fff; }
.hv-cta svg, .hv-link svg { width: 20px; height: 20px; flex: none; transition: transform .15s ease; }
.hv-cta:hover svg { transform: translateX(3px); }
.hv-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 7px;
}
.hv-link:hover { color: inherit; opacity: .85; }
.hv-link.is-giu:hover svg { transform: translateY(3px); }
.hv-link:not(.is-giu):hover svg { transform: translateX(3px); }

/* ─── Il video ─── */
.hv-video {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 18px;
    background: #0b1324;
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .65);
}
.hv-video video,
.hv-video iframe,
.hv-video > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}
.hv-video video { object-fit: contain; background: #0b1324; }
.hv-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--hv-accento, #f26a1b);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform .15s ease;
}
.hv-play:hover, .hv-play:focus-visible { transform: translate(-50%, -50%) scale(1.07); }
.hv-play svg { width: 34px; height: 34px; margin-left: 5px; }
.hv-video.is-avviato .hv-play,
.hv-video.is-avviato > img { display: none; }
@media (max-width: 640px) {
    .hv-play { width: 64px; height: 64px; }
    .hv-play svg { width: 26px; height: 26px; }
}

.hv-etichette {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 0;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    font-size: .95rem;
    opacity: .92;
}
.hv-etichette li + li::before {
    content: "·";
    margin: 0 14px;
    opacity: .7;
}
@media (max-width: 640px) {
    .hv-etichette { font-size: .85rem; }
    .hv-etichette li + li::before { margin: 0 8px; }
}
